polyrun 2.2.2 → 2.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a2d28bc9ddd04cf7beebdf3dc7588b61c32c5a17b9c2c97dc25a0135f84c0bef
4
- data.tar.gz: 36dbe2a44021aeb42ef235fbddc994cfe823bac129bfe284f8945d60408f06fa
3
+ metadata.gz: 65f2008623ad5bcf9289da8ffb3db95cf07d8261d349978b96ca463b0ff37ea3
4
+ data.tar.gz: a1fabab4fe6cc0f571b09d8f8a73559866730d6a76a0bc09b48f4a0e0631a724
5
5
  SHA512:
6
- metadata.gz: 701f77a58aad54da7963043a54065cf5a11b4905fbfe6fdb20a25345fa0bc7f5b9fe62730e3828cce94b3203986b99d2f724848bfca56c67815d538723bf0602
7
- data.tar.gz: 6591a3dae32970c56b8f329cb7caec8a36b53d25d20ad882dadf8a8d059dad4bcacd97015d8f5cfb822ed7cf0c7b49c03662ede103f3530e4f80f07a7a1f6213
6
+ metadata.gz: eb24b21418a3804b868f62f72f1d8462b15f4b7ab0a9901e82789fdb0c7eb04a73ece7bd437ae10acc8c4edbffd53e64ae9e648e09376e6d9d7df2789b42be78
7
+ data.tar.gz: f0dd0a2b341c81ce8ea3f10358e06f205a0f7329d5695eb82e49a97e067133fe5b665b444c1b57236740a0e354b9945658f2e1351e54730a358583cc411641fb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.2.3 (2026-08-16)
4
+
5
+ - Fix `merge-failures` `Encoding::CompatibilityError` when JSONL or RSpec JSON contains UTF-8 and the process locale is US-ASCII; read fragments as UTF-8
6
+ - Join worker output forwarders before closing pipe ends so shard logs keep the last bytes after a worker exits
7
+
3
8
  ## 2.2.2 (2026-07-25)
4
9
 
5
10
  - BREAKING: Require Ruby 3.4 or newer
data/CODE_OF_CONDUCT.md CHANGED
@@ -1,25 +1,25 @@
1
1
  # Code of Conduct
2
2
 
3
- ## Our pledge
3
+ ## Our Pledge
4
4
 
5
- We pledge to make participation in the Polyrun community a harassment-free experience for everyone. We operate on principles of mutual respect, privacy, and authentic engagement. We value substantive contributions and clarity on intentions.
5
+ We pledge to make participation in our community a harassment-free experience for everyone. We operate on principles of mutual respect, privacy, and authentic engagement. We value substantive contributions and clarity on intentions.
6
6
 
7
- ## Our standards
7
+ ## Our Standards
8
8
 
9
9
  Examples of behavior that contributes to a positive environment include:
10
10
 
11
- - Authenticity: engaging with genuine curiosity and admitting uncertainty rather than feigning knowledge.
12
- - Responsible innovation: taking full responsibility for any content or code contributed, whether manually written or generated by automation tools.
13
- - Gentle correction: responding politely to errors. We view mistakes as opportunities for learning, provided they are addressed with humility.
14
- - Inclusive language: using language that welcomes diverse perspectives and respects the privacy and identity of all participants.
11
+ - Authenticity: Engaging with genuine curiosity and admitting uncertainty rather than feigning knowledge.
12
+ - Responsible Innovation: Taking full responsibility for any content or code contributed, whether manually written or generated by automation tools.
13
+ - Gentle Correction: Responding politely to errors. We view mistakes as opportunities for learning, provided they are addressed with humility.
14
+ - Inclusive Language: Using language that welcomes diverse perspectives and respects the privacy and identity of all participants.
15
15
 
16
16
  Examples of unacceptable behavior include:
17
17
 
18
- - Harassment: public or private harassment, trolling, or insulting comments.
19
- - Weaponized complexity: using jargon or overwhelming volume (including automated spam) to silence others.
20
- - Publishing private information: sharing others' data or personal context without explicit permission.
18
+ - Harassment: Public or private harassment, trolling, or insulting comments.
19
+ - Weaponized Complexity: Using jargon or overwhelming volume (including automated spam) to silence others.
20
+ - Publishing Private Information: Sharing others' data or personal context without explicit permission.
21
21
 
22
- ## Artificial intelligence and automation
22
+ ## Artificial Intelligence and Automation
23
23
 
24
24
  In accordance with our commitment to collective awareness:
25
25
 
data/CONTRIBUTING.md CHANGED
@@ -1,106 +1,29 @@
1
- # Contributing to Polyrun
1
+ # Contributing Guidelines
2
2
 
3
- ## Development setup
3
+ Thank you for your interest in contributing. We value learning over perfection but require rigor and responsibility.
4
4
 
5
- ```bash
6
- bundle install
7
- bundle exec appraisal install
8
- ```
5
+ ## The Golden Rule of Automation
9
6
 
10
- ## Tests
7
+ We welcome the use of AI and automation tools to reduce toil, but you must strictly adhere to the following:
11
8
 
12
- ```bash
13
- bundle exec rspec
14
- # or
15
- bundle exec rake spec
16
- ```
9
+ 1. You are the Author: You act as the responsible agent for any code you submit. You must review, debug, and understand every line.
10
+ 2. Manage Cognitive Load: Do not submit massive, unreviewed automated dumps. Respect the reviewers' time by annotating complex logic.
11
+ 3. Security: Never feed project secrets or private context into public AI models.
17
12
 
18
- Coverage merge performance (large synthetic payloads):
13
+ ## How to Contribute
19
14
 
20
- Native extension (optional; compiles via `bundle install` or `cd ext/polyrun_coverage_merge && ruby extconf.rb && make`):
15
+ ### 1. Reporting Issues
21
16
 
22
- After pulling changes under `ext/**/*.c` or `ext/**/extconf.rb`, rebuild the extension before running specs or benchmarks:
17
+ - Verify Accuracy: Before posting, verify your information. Avoid generalizations.
18
+ - Use Structured Inputs: Use issue templates to provide clear goals, constraints, and reproduction steps. This helps us understand the context immediately.
23
19
 
24
- ```bash
25
- make native-extension
26
- # or: bundle exec rake native_extension
27
- ```
20
+ ### 2. Pull Request Process
28
21
 
29
- If merge specs segfault or native acceleration behaves oddly after a pull, run `make clean` in `ext/polyrun_coverage_merge` and `make native-extension` again (or `bundle install` to trigger a full compile).
22
+ - Scope: Keep PRs focused on a single goal.
23
+ - Context: Explain why the change is necessary. Transparency builds trust.
24
+ - Testing: Run all smoke tests and regression checks locally. We prioritize safety first.
30
25
 
31
- CI compiles the extension on Linux and macOS (`.github/workflows/native-extension.yml`).
26
+ ### 3. Review Process
32
27
 
33
- ```bash
34
- bundle exec rake bench_merge
35
- # or: ruby benchmark/merge_coverage.rb
36
- ```
37
-
38
- RSpec performance benchmarks (coverage merge + spec-quality peek; writes `tmp/benchmarks/profile_<sha>.log`):
39
-
40
- ```bash
41
- bundle exec rake bench_performance
42
- # optional: STACKPROF=1 or BENCHMARK_IPS=1 for spec/performance/profiling_spec.rb
43
- # optional: BENCH_MEMORY=1 bundle exec rspec spec/performance/benchmark_merge_spec.rb spec/performance/benchmark_spec.rb --tag benchmark
44
- # optional env: BENCH_LINE_COUNT_REPS, BENCH_MEMORY_REPS
45
- ```
46
-
47
- Run the suite under alternate Ruby constraints (see `Appraisals` and `gemfiles/`):
48
-
49
- ```bash
50
- bundle exec appraisal ruby34 rspec
51
- bundle exec appraisal ruby40 rspec
52
- ```
53
-
54
- ## Linting
55
-
56
- [RuboCop](https://rubocop.org/) with [Standard](https://github.com/standardrb/standard) style, plus `rubocop-rspec` and `rubocop-thread_safety`. Project-specific cop tweaks and metric `Exclude` lists live in `.rubocop.yml`.
57
-
58
- ```bash
59
- bundle exec rubocop
60
- bundle exec rubocop -a # safe autocorrect
61
- bundle exec rake rubocop
62
- ```
63
-
64
- ## RBS
65
-
66
- Type signatures live under `sig/` and ship with the gem. Validate them after changes:
67
-
68
- ```bash
69
- bundle exec rake rbs
70
- # equivalent: bundle exec rbs -I sig validate
71
- ```
72
-
73
- Keep `require "polyrun"` free of RSpec/Minitest: optional wiring stays in `polyrun/rspec`, `polyrun/minitest`, and `polyrun/reporting/rspec_junit` (see README).
74
-
75
- [Trunk](https://trunk.io/) aggregates RuboCop, YAML, Markdown, shellcheck, and more (see `.trunk/trunk.yaml`):
76
-
77
- ```bash
78
- trunk check
79
- trunk fmt
80
- ```
81
-
82
- CI runs `rake ci` (RSpec + RuboCop). Optional Trunk workflow: `.github/workflows/trunk.yml`.
83
-
84
- ## Adopting Polyrun in other repos
85
-
86
- - [docs/SETUP_PROFILE.md](docs/SETUP_PROFILE.md) — agent or human checklist (CI model A vs B, database, prepare).
87
- - `bundle exec polyrun init --list` — lists starter `polyrun.yml` and `POLYRUN.md` templates (see `examples/templates/README.md`).
88
-
89
- ## Examples
90
-
91
- Runnable demos live under `examples/`. After changing the gem, smoke them:
92
-
93
- ```bash
94
- cd examples && ./bin/ci_prepare
95
- cd examples/simple/simple_demo && RAILS_ENV=test bundle exec rspec
96
- # optional: complex polyrepo demo (multi-DB + three Vite clients + RSpec E2E)
97
- # cd examples/complex/polyrepo_demo && RAILS_ENV=test bin/rails db:prepare && bundle exec rspec
98
- ```
99
-
100
- See `examples/README.md`.
101
-
102
- ## Pull requests
103
-
104
- - One logical change per PR when possible.
105
- - Add or update specs for behavior changes.
106
- - Run `bundle exec rake ci` before pushing.
28
+ - We encourage productive friction. Expect questions about your approach.
29
+ - If a reviewer suggests a change, view it as mutual aid, not criticism.
data/SECURITY.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  ## Reporting a Vulnerability
4
4
 
5
- Do not open a public GitHub issue for security vulnerabilities.
5
+ Do not open a public issue for security vulnerabilities.
6
6
 
7
- Email security details to security@kiskolabs.com.
7
+ Email security details to: security@kiskolabs.com
8
8
 
9
9
  Include: description, steps to reproduce, potential impact, and suggested fix (if available).
10
10
 
@@ -21,7 +21,7 @@ Include: description, steps to reproduce, potential impact, and suggested fix (i
21
21
  - We will publish a security advisory after the vulnerability is patched
22
22
  - We will coordinate public disclosure with you
23
23
 
24
- ## Automation security
24
+ ## Automation Security
25
25
 
26
- - Context isolation: do not include production credentials, API keys, or personally identifiable information in prompts sent to third-party LLMs or automation services.
27
- - Supply chain: verify automated dependencies.
26
+ - Context Isolation: It is strictly forbidden to include production credentials, API keys, or Personally Identifiable Information (PII) in prompts sent to third-party LLMs or automation services.
27
+ - Supply Chain: All automated dependencies must be verified.
@@ -101,7 +101,7 @@ module Polyrun
101
101
  return rows_from_jsonl_file(path)
102
102
  end
103
103
 
104
- text = File.read(path)
104
+ text = File.read(path, encoding: Encoding::UTF_8)
105
105
  data =
106
106
  begin
107
107
  JSON.parse(text)
@@ -126,7 +126,7 @@ module Polyrun
126
126
 
127
127
  def rows_from_jsonl_file(path)
128
128
  acc = []
129
- File.readlines(path, chomp: true).each_with_index do |line, idx|
129
+ File.readlines(path, chomp: true, encoding: Encoding::UTF_8).each_with_index do |line, idx|
130
130
  line = line.strip
131
131
  next if line.empty?
132
132
 
@@ -1,3 +1,3 @@
1
1
  module Polyrun
2
- VERSION = "2.2.2"
2
+ VERSION = "2.2.3"
3
3
  end
@@ -157,12 +157,14 @@ module Polyrun
157
157
  private_class_method :drain_remaining_output
158
158
 
159
159
  def drain_forwarders(entry)
160
+ # Join first so threads can drain pipe buffers after the child exits.
161
+ # Closing read ends before join races and can drop the final bytes.
162
+ entry[:threads].each(&:join)
160
163
  entry[:ios].each do |io|
161
164
  io.close unless io.closed?
162
165
  rescue IOError
163
166
  nil
164
167
  end
165
- entry[:threads].each(&:join)
166
168
  entry[:forwarder].close
167
169
  end
168
170
  private_class_method :drain_forwarders
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polyrun
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.2
4
+ version: 2.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Makarov