polyrun 2.2.2 → 2.2.4

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: de79eaae07044fa991b839a44011f7648df5ba16d0586a1ea2708c1d7160cf5e
4
+ data.tar.gz: f3cbab3bf642164ffa507aa75be1acaaf7a232057b1b1c5f3fcdb0f804c2a0a7
5
5
  SHA512:
6
- metadata.gz: 701f77a58aad54da7963043a54065cf5a11b4905fbfe6fdb20a25345fa0bc7f5b9fe62730e3828cce94b3203986b99d2f724848bfca56c67815d538723bf0602
7
- data.tar.gz: 6591a3dae32970c56b8f329cb7caec8a36b53d25d20ad882dadf8a8d059dad4bcacd97015d8f5cfb822ed7cf0c7b49c03662ede103f3530e4f80f07a7a1f6213
6
+ metadata.gz: f62f0cbc1760e3fc42a4711b7e55eace3b8b5bb038836abcae91eba876cfabf9b72832e2f04a284744fdf09247288bff6b60c7a3b1a38d00ee140d37634702df
7
+ data.tar.gz: 4f9b6d94992745419d35a5bbb40041094569f725470904f546566bfdba7a3e7eeca899f5b80844d9908ca36e744870fef3f8ecef6e20d589fa090d0363859147
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## Unreleased
4
+
5
+ ## 2.2.4 (2026-09-04)
6
+
7
+ - Fix `DEBUG_SQL` / `POLYRUN_DEBUG_SQL` raising `NoMethodError` for `loggable_sql?` when the SQL subscriber runs on an RSpec example group.
8
+ - Add `rfcs/` starter pack: process (RFC 0001), positioning (RFC 0002), and Standards Track design RFCs 0003–0006 for shard layouts, coverage merge, hooks, and partition config.
9
+
10
+ ## 2.2.3 (2026-08-16)
11
+
12
+ - 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
13
+ - Join worker output forwarders before closing pipe ends so shard logs keep the last bytes after a worker exits
14
+
3
15
  ## 2.2.2 (2026-07-25)
4
16
 
5
17
  - BREAKING: Require Ruby 3.4 or newer
data/CODE_OF_CONDUCT.md CHANGED
@@ -1,31 +1,26 @@
1
1
  # Code of Conduct
2
2
 
3
- ## Our pledge
3
+ ## 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
+ Participation is a harassment-free experience. Treat each other with respect. Keep private context private.
6
6
 
7
- ## Our standards
7
+ ## Expected behavior
8
8
 
9
- Examples of behavior that contributes to a positive environment include:
9
+ - Engage with genuine curiosity. Admit uncertainty.
10
+ - Own every line you submit, including generated code.
11
+ - Correct errors politely.
12
+ - Use language that welcomes people and respects identity and privacy.
10
13
 
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.
14
+ ## Unacceptable behavior
15
15
 
16
- Examples of unacceptable behavior include:
16
+ - Harassment, trolling, or insulting comments, public or private.
17
+ - Using jargon or volume, including automated spam, to silence others.
18
+ - Sharing others' data or personal context without permission.
17
19
 
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.
20
+ ## Automation
21
21
 
22
- ## Artificial intelligence and automation
23
-
24
- In accordance with our commitment to collective awareness:
25
-
26
- - Contributors are responsible for the accuracy and security of any AI-generated artifacts they submit.
27
- - "The AI wrote it" is not a valid excuse for introducing bugs, security vulnerabilities, or bias.
22
+ You remain responsible for bugs, security holes, and bias in generated artifacts you submit.
28
23
 
29
24
  ## Enforcement
30
25
 
31
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at contact@kiskolabs.com. All complaints will be reviewed and investigated promptly and fairly.
26
+ Report abusive or harassing behavior to contact@kiskolabs.com. Reports are reviewed and investigated.
data/CONTRIBUTING.md CHANGED
@@ -1,106 +1,23 @@
1
- # Contributing to Polyrun
1
+ # Contributing Guidelines
2
2
 
3
- ## Development setup
3
+ ## Automation authorship
4
4
 
5
- ```bash
6
- bundle install
7
- bundle exec appraisal install
8
- ```
5
+ You may use AI and automation tools. You remain the author of every line you submit: review, debug, and understand the change.
9
6
 
10
- ## Tests
7
+ Keep pull requests small enough to review. Annotate non-obvious logic.
11
8
 
12
- ```bash
13
- bundle exec rspec
14
- # or
15
- bundle exec rake spec
16
- ```
9
+ Never send project secrets or private context to public models.
17
10
 
18
- Coverage merge performance (large synthetic payloads):
11
+ ## How to contribute
19
12
 
20
- Native extension (optional; compiles via `bundle install` or `cd ext/polyrun_coverage_merge && ruby extconf.rb && make`):
13
+ ### Reporting issues
21
14
 
22
- After pulling changes under `ext/**/*.c` or `ext/**/extconf.rb`, rebuild the extension before running specs or benchmarks:
15
+ Verify the facts before filing. Use issue templates for goals, constraints, and reproduction steps.
23
16
 
24
- ```bash
25
- make native-extension
26
- # or: bundle exec rake native_extension
27
- ```
17
+ ### Pull requests
28
18
 
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).
19
+ Keep one pull request to one goal. Explain why the change is needed. Run smoke tests and regression checks locally before opening the request.
30
20
 
31
- CI compiles the extension on Linux and macOS (`.github/workflows/native-extension.yml`).
21
+ ### Review
32
22
 
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.
23
+ Reviewers will ask about approach and trade-offs. Treat suggested changes as part of the work.
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Ruby gem for parallel test runs, merged coverage (SimpleCov-compatible JSON to JSON, LCOV, Cobertura, or console output), CI reporting (JUnit, timing), and parallel-test hygiene (fixtures, snapshots, per-shard databases, asset preparation). Ship it as one development dependency: no runtime gem dependencies beyond the standard library and vendored code.
4
4
 
5
+ Design changes go through `rfcs/` (RFC 0001).
6
+
5
7
  ## Why?
6
8
 
7
9
  Running tests in parallel across processes still requires a single merged coverage report, stable shard assignment, isolated databases per worker so rows are not shared, and reliable timing data for cost-based splits—without wiring together many small tools and shell scripts.
data/SECURITY.md CHANGED
@@ -2,26 +2,24 @@
2
2
 
3
3
  ## Reporting a Vulnerability
4
4
 
5
- Do not open a public GitHub issue for security vulnerabilities.
5
+ Email security details to: security@kiskolabs.com
6
6
 
7
- Email security details to security@kiskolabs.com.
8
-
9
- Include: description, steps to reproduce, potential impact, and suggested fix (if available).
7
+ Send the report only to that address. Include description, steps to reproduce, potential impact, and a suggested fix when you have one.
10
8
 
11
9
  ### Response Timeline
12
10
 
13
- - We will acknowledge receipt of your report
14
- - We will provide an initial assessment
15
- - We will keep you informed of our progress and resolution timeline
11
+ - We will acknowledge receipt of your report.
12
+ - We will provide an initial assessment.
13
+ - We will keep you informed of our progress and resolution timeline.
16
14
 
17
15
  ### Disclosure Policy
18
16
 
19
- - We will work with you to understand and resolve the issue
20
- - We will credit you for the discovery (unless you prefer to remain anonymous)
21
- - We will publish a security advisory after the vulnerability is patched
22
- - We will coordinate public disclosure with you
17
+ - We will work with you to understand and resolve the issue.
18
+ - We will credit you for the discovery unless you prefer to remain anonymous.
19
+ - We will publish a security advisory after the vulnerability is patched.
20
+ - We will coordinate public disclosure with you.
23
21
 
24
- ## Automation security
22
+ ## Automation Security
25
23
 
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.
24
+ - Keep production credentials, API keys, and personal data out of prompts sent to third-party models or automation services.
25
+ - Verify automated dependencies.
@@ -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
 
@@ -11,9 +11,9 @@ module Polyrun
11
11
  rspec_config.around do |example|
12
12
  subscriber = ActiveSupport::Notifications.subscribe("sql.active_record") do |event|
13
13
  payload = event.payload[:sql]
14
- next unless loggable_sql?(payload)
14
+ next unless ExampleDebug.loggable_sql?(payload)
15
15
 
16
- line = sql_with_interpolated_binds(payload, event.payload[:type_casted_binds])
16
+ line = ExampleDebug.sql_with_interpolated_binds(payload, event.payload[:type_casted_binds])
17
17
  io.puts "+ #{line}"
18
18
  end
19
19
 
@@ -1,3 +1,3 @@
1
1
  module Polyrun
2
- VERSION = "2.2.2"
2
+ VERSION = "2.2.4"
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.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Makarov