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 +4 -4
- data/CHANGELOG.md +12 -0
- data/CODE_OF_CONDUCT.md +14 -19
- data/CONTRIBUTING.md +12 -95
- data/README.md +2 -0
- data/SECURITY.md +12 -14
- data/lib/polyrun/reporting/failure_merge.rb +2 -2
- data/lib/polyrun/rspec/example_debug_instrumentation.rb +2 -2
- data/lib/polyrun/version.rb +1 -1
- data/lib/polyrun/worker_output.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: de79eaae07044fa991b839a44011f7648df5ba16d0586a1ea2708c1d7160cf5e
|
|
4
|
+
data.tar.gz: f3cbab3bf642164ffa507aa75be1acaaf7a232057b1b1c5f3fcdb0f804c2a0a7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
##
|
|
3
|
+
## Pledge
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Participation is a harassment-free experience. Treat each other with respect. Keep private context private.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Expected behavior
|
|
8
8
|
|
|
9
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
1
|
+
# Contributing Guidelines
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Automation authorship
|
|
4
4
|
|
|
5
|
-
|
|
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
|
-
|
|
7
|
+
Keep pull requests small enough to review. Annotate non-obvious logic.
|
|
11
8
|
|
|
12
|
-
|
|
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
|
-
|
|
11
|
+
## How to contribute
|
|
19
12
|
|
|
20
|
-
|
|
13
|
+
### Reporting issues
|
|
21
14
|
|
|
22
|
-
|
|
15
|
+
Verify the facts before filing. Use issue templates for goals, constraints, and reproduction steps.
|
|
23
16
|
|
|
24
|
-
|
|
25
|
-
make native-extension
|
|
26
|
-
# or: bundle exec rake native_extension
|
|
27
|
-
```
|
|
17
|
+
### Pull requests
|
|
28
18
|
|
|
29
|
-
|
|
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
|
-
|
|
21
|
+
### Review
|
|
32
22
|
|
|
33
|
-
|
|
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
|
-
|
|
5
|
+
Email security details to: security@kiskolabs.com
|
|
6
6
|
|
|
7
|
-
|
|
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
|
|
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
|
|
22
|
+
## Automation Security
|
|
25
23
|
|
|
26
|
-
-
|
|
27
|
-
-
|
|
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
|
|
data/lib/polyrun/version.rb
CHANGED
|
@@ -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
|