Repository navigation
paid screens: narrow screens derive setup instead of running the full gate (GST-1575) - #4056
Conversation
…ves through its reader (GST-1575) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…tion only) (GST-1575) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…edits wait for the train census (GST-1575) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
E2E Evals: ✅ PASS52 executed, 0 reused rule/judge records | 0 manual accepted (unscored; no score-cache credit) | $18.02 rule/judge cost | reconcile exit: 0 Profile: pr / mode Rule and judge shards
Fail-closed reconciliationSliced lane: planner → duration-packed executors → fail-closed report. Behavior cases run a pre-registered 3-trial panel (PASS at 2/3 with no contract violation); a PASS 2/3 is shown with its failed trial, never as a clean pass. Reused results retain their original provenance and expiry. Dispatched narrow screen (gstack-ship-queue ready --screen) of merge commit |
What changed
The three failing-first selector tests: red on main, green on this branch (a narrow screen of a setup edit selects only the cases that test it).
Before/after as text
Why
PRs #4045 and #4047 each touched
setupand paid for a narrow screen of all 113 gate cases, about $37 each.setupsat on the list of inputs every paid case is assumed to consume, but no paid CI run executes it. A narrow screen now treatssetuplike any other file and picks only the cases that test it, so those two diffs would have screened 5 cases.Blast radius
The change touches only paid-case selection. Under
--screen-policy narrow,setupleaves the full-gate list (NARROW_DERIVED_FULL_GATE_FILESinscripts/test-pr-profile.ts), andscripts/pr-dependencies.tsnow countsmodules/references, somodules/loadouts.jsonis placed throughscripts/modules.tsinstead of being an unknown file. That is safe becausepull_requestruns, broad screens,--profile fulland the train gate's full census (evals_all=true,scripts/train-gate.ts:114) still run every case before a merge. Evidence: the focused tests ran (23 pass), and the adversarial reviewer compared the old and newREPO_PATHderivation on the tree: the only file whose gate reach changed ismodules/loadouts.json(0 to 113 cases).Approvals
No approvals recorded for branch capy/paid-screens-narrow-screens.
Summary
Narrow paid screens stopped treating a
setupedit as a reason to run every gate case. Before, any PR that touchedsetuppaid for the full gate on its pre-train screen. Now the screen runs the cases that testsetup, and broad screens,pull_requestruns and the train census keep full coverage.modules/loadouts.jsonalso stops counting as an unknown file. The harness pin forscripts/test-pr-profile.tsrecords the change as non-behavioral, because it changes which cases a narrow screen picks and never how a case runs.Test Coverage
All new code paths have test coverage (Step 7 audit: 6 of 6 paths, all ★★★, in
test/pr-shared-input-selection.test.ts).Tests: 1726 → 1726 (+0 new files; one existing file extended)
Coverage: 100% value-weighted (100% including 0 weakly covered paths)
Test value: 0 tests written, 0 rejected by the authoring gate, 1 existing test extended, 0 paths weakly covered.
Regression proof: the three new tests fail on main 8d712d6 and pass on this branch (image above).
Tests ran: focused 23
Tests ran: harness-version 12 (
bun test test/harness-version.test.ts, 12 pass after the pin repair; 4 failed before it, matching CI run 42169812331)Earlier lane checks on this diff:
bun run typecheckclean; 56 selector-dependent test files plus the module-size ratchet and parity suite gave 1478 pass and 4 fail, all 4 intest/ship-skip-actor.test.ts(5 s timeouts), which fail the same way on main 8d712d6 with the diff stashed.Pre-Landing Review
Pre-Landing Review: 1 issue — 0 auto-fixed, 1 skipped (informational, below the crew's blocking floor), 0 deferred, 4 noted
REVIEW_LOOP: passes=2 blocking_found=0 deferred=0 noted=0 fixed=0 scope=frozen ledgers_read=5 dispatches=8
Gate edits: none detected (GATE_SCAN tagged=0 at fab51d4 and 916d5df)
Outside review: openai/gpt-6.1-sol (host subagent), completed, no findings: "approve because the setup exemption remains narrow-screen-only, while broad selection and unknown-input fallbacks retain full-gate coverage."
Pass 1 (full panel on fab51d4: batched specialist with testing, security, state-machines and red-team checklists, plus the Step 7 coverage audit) found one informational test gap. Between pass 1 and Step 11, CI found
test/harness-version.test.tsred (the pinnedscripts/test-pr-profile.tschanged with no HARNESS_VERSION decision); 916d5df records it as non-behavioral. Pass 2 (batched specialist and Red Team on the fab51d4..916d5df range) found nothing. Step 11 (native adversarial and outside voice on the whole diff at 916d5df) found four items below the floor, listed below.Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
test/pr-shared-input-selection.test.ts:143The "every other shared input" test loops over a six-entry fixture, not everyPR_FULL_GATE_FILESentry minussetup, so widening the narrow exemption to another real full-gate input would stay green. Proposed test: iterate the concretePR_FULL_GATE_FILESentries and assertNARROW_DERIVED_FULL_GATE_FILESequals['setup'].scripts/test-pr-profile.ts:331The doc comment onNARROW_DERIVED_FULL_GATE_FILESsaysscripts/pr-dependencies.tsmapssetupto the cases that invoke it. It does not:setupreaches its 2 cases through touchfiles. UnderEVALS_HOST=codexevery case runs./setup --host codex, so a local narrow screen of asetupedit under-selects there. CI'sevals.ymlsets noEVALS_HOST, and the train census runs every case. The changelog fragment was corrected in 2ce98bf.changelog.d/capy-paid-screens-narrow-screens.md:1A narrow screen of a loadouts-only edit now runs zero paid cases, because its reader reaches every gate case. Fixed in 2ce98bf: the fragment now says so.docs/TESTING_INTERNALS.md:1203The doc saysmodules/references count, whileDERIVABLE_PREFIXESomitsmodules/. An unreachedmodules/file still restores the full gate, which fails safe.scripts/test-pr-profile.ts:563shadowSelectionandcheckoutExercisedstill skipPR_FULL_GATE_FILES, so narrow-screen shadow numbers for asetupedit leave out its exercised consumers. This affects only the shadow numbers.Exploratory QA
Report-only smoke on the selector (no browser surface):
bun test test/pr-shared-input-selection.test.ts(23 pass), covering a narrow screen ofsetupalone, the #4045 and #4047 diffs, broad and--profile fullfallbacks and a loadouts-only edit. The adversarial reviewer also probed asetup-only edit directly: a narrow screen selects 2 gate cases (gstack-upgrade-happy-path,skillmd-setup-discovery), and a broad screen still falls back to the full gate.bun test test/harness-version.test.ts12 pass. No checks failed, were blocked or were left unrun.Design Review
No frontend files changed — design review skipped.
Eval Results
No prompt-related files changed — evals skipped.
Review bot comments
No review bot comments.
Plan Completion
Plan completion audit: not run (no plan is bound to this branch and no docs/designs/ file matches). This is a bug fix with failing-first tests (R65: no autoplan for fixes).
Verification Results
No Step 8.1 obligations (no plan bound). The failing-first tests are the verification: 3 FAIL on main, 3 PASS on this branch.
TODOS
No TODO items completed in this PR.
Documentation
Scope: the branch diff against main, plus the working tree, which had no uncommitted changes. The docs changed in the diff (
docs/TESTING_INTERNALS.md,docs/ship-policy.md, and thechangelog.dfragment) were read against the code inscripts/test-pr-profile.tsandscripts/pr-dependencies.ts. Result: current. The docs nameNARROW_DERIVED_FULL_GATE_FILES, the exemption that lets a narrow screen derivesetuplike any other file, and saypull_requestruns, broad screens and--profile fullkeep the full gate. They also saymodules/data references now count, somodules/loadouts.jsonis placed throughscripts/modules.ts. The remainingPR_FULL_GATE_FILESmentions (the 'full-gate input' triage entry and the closure note) are still accurate. Debt: none found.Test plan
bun test test/pr-shared-input-selection.test.ts: 23 pass, 0 failbun test test/harness-version.test.ts: 12 pass, 0 failbun run typecheck: clean (lane run, unchanged product code since)