Repository navigation
test: record pid readers per file so two green PRs merge green - #37661
Conversation
First Principles Review (Opus 5.5) — ⏭️ skippedRevision |
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: a test-only change that keeps every count exact and removes the shared total that let two green PRs merge into a red Notes
[DESIGN-REVIEWED] 794f013 Description read[DESCRIPTION-READ] f94b6d504edad23233ced4ee78959d6f763aebe10c823185ff901314d71e5ed9 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Code change approver recommendation: ApproveWhy: the decider estimates a 6% chance that this change introduces a defect, within the 12% limit for approving on its own, and every check passes. Test-only change replacing the two global pid-reader totals with a per-file (counted, owner-marked) table so concurrent PRs touching different files edit different lines. I summed the table by hand: 48 files, 143 counted, 13 owner-marked, the same as the old totals. Keys match the scanner's src/kiro_crew-relative paths, and nothing else reads the removed constants. Checking each file exactly is strictly tighter than the old total. New tests cover the drift helper, reject (0,0) entries and check the per-file owner pair, and CI including the Static Ratchet Gate is green on this head. An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
9be09da to
ac6e101
Compare
|
Rebased: main moved in 5 commits (e58284e -> 860a01b) touching docs/system-specs/modules/runtime-ownership.md and sibling module specs this PR also edits. Re-ran test/test_pid_reader_ratchet.py on the new base (14 passed). Also black-formatted test/test_pid_reader_ratchet.py, which failed Backend Lint on the previous head (9be09da). New head: ac6e101. |
ac6e101 to
81a5631
Compare
81a5631 to
794f013
Compare
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approving. On this head, the review checked that the per-file _BASELINE table sums to 48 files, 143 counted and 13 owner-marked readers, which matches the old scalars. The head's test file passed (14 tests) against both the head src and current main src. A probe that adds an owner-marked reader fails the owner test and prints the exact line to write. No other code reads the removed constants.
Done well: per-file exact equality is strictly tighter than the old totals, so two green PRs that touch different files now edit different lines. The (0, 0) entry guard also keeps a dead line from going stale.
Optional:
- Moving a reader from one file to another (for example, a file split under the line cap) now fails with the "ADDS a reader" text. When the counted total does not change, a "sites moved between files" message would be clearer.
- The spec sentence "The kill-chokepoint baseline is one total" goes stale if #37682 lands, and the two PRs merge with no textual conflict. Whichever lands second should reword it.
- The per-test column filters in the two exact tests have no committed test. A small pure helper plus one synthetic test would cover them.
Problem / Motivation
Goal: The pid-reader ratchet stays green on
mainwhen two pull requests that each change pid readers in different files both merge.test/test_pid_reader_ratchet.pyrecorded the whole tree in two numbers,_BASELINE_SITES = 143and_BASELINE_OWNER_MARKED = 13. Two PRs that each mark one reader both rewrite13to14; git merges the identical edit cleanly andmainholds 15. That turned the Static Ratchet Gate red onmainon 2026-11-08 20:17–21:57 PST (run 42561010120:9 owner-marked pid reader(s) in src, recorded 8), fixed by the re-pin #33695.Why it matters
The Static Ratchet Gate runs on every PR, so a red
mainhere fails every open PR until someone re-pins the number.Not a goal
test_kill_chokepoint_ratchet.py's singleBYPASS_BASELINEis not changed here.What changed (motivation → approach → change)
Cause: one shared number is the one line two PRs edit to the same value. Change: record the same counts one line per file.
_BASELINEis a{file: (counted, owner-marked)}table, measured on this base: 48 files, 143 counted, 13 owner-marked (the same totals as before).Scan.owner_per_file)._BASELINEline to write for each drifted file (or "delete the line"), and a rise keeps the old "this change ADDS a reader" message.(0, 0)entry (it would never go stale); the owner-marker fixture also checks the per-file pair.docs/system-specs/modules/runtime-ownership.mddescribes the per-file record.Two PRs that touch different files now edit different lines. Two PRs that touch the same file edit the same line and conflict, which is git doing the check. Residual: two PRs that move one file's entry to the same pair.
Backwards compatibility
Compatible: test and docs only; no product code changes.
Removes nothing:
_BASELINE_SITESand_BASELINE_OWNER_MARKEDare replaced by the per-file table holding the same totals, and no other file reads them (git grepon this base finds only this test and the spec updated here).Tests
Two-branch merge simulation (scratch clone; branches A and B cut from one base, each adds one owner-marked
_pidreader, A insession_pool.pyand B inconnections/mint_kas.py, and updates the record as the test asks; thengit merge):git mergeorigin/maine58284e15 owner-marked pid reader(s) in src, recorded 14Negative control on this branch: an unmarked
proc._pidadded tosession_pool.pywithout a table edit fails withthis change ADDS a place that reads a runtime's pidand"session_pool.py": (10, 2), # was (9, 2).Determinism: the file 3× serial (
-n0) and once with-n 3 --dist load: 14 passed each time. Related backend set (scripts/run_scoped_tests.py): 20 passed.Proof: not provable -- test-only change
Manual verification
N/A — test-only; the simulation above is the behavioral check.
Related Issues
Part of #37656
Checklist