Repository navigation
test(flaky): marathon census reds on 297f50c7 (gh telemetry in fixture HOME, /autoplan handoff) and two free flakes (GST-1793) - #4128
Merged
Conversation
…ccepts /autoplan (flaky pass 2026-11-07) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…otes grant names both shas after review_loop_grant (flaky pass 2026-11-07) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…t HARNESS_VERSION 6 (flaky pass 2026-11-07) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…026-11-07 Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Review-Finding: p1/specialist-batched#1 reader=testing Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Merged
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
No visible surface changed: every edit is a test, a test helper, a harness pin or a changelog fragment, so this PR carries a text before/after instead of an image.
test/helpers/hermetic-env.ts: the hermetic branch ofbuildHermeticEnvnow setsGH_TELEMETRY=0after the allowlist scrub; a per-test override still wins.scripts/harness-pins/test/helpers/hermetic-env.ts.json: the shared-harness pin records that change as non-behavioral at HARNESS_VERSION 6, with its reason.test/helpers/office-hours-completion.ts: the handoff check accepts/autoplan|/plan-(ceo|design|devex)-reviewinstead of/plan-(ceo|eng|design|devex)-review.test/release-cut.test.ts: two slow exception cases take a 30 s per-test timeout.test/ship-finish-ruled-notes.test.ts: the grant ask names both shas afterreview_loop_grant.Why
The marathon census on main 297f50c (run 42371706491) went red twice: autoplan-ceo-only reported "wrote 1 file(s) outside its roots, under .local/state: .local/state/gh/device-id", and office-hours-section-loading reported "Handoff lacks the next-skill recommendation" after a correct
/autoplanhandoff. Two free tests also failed at random. After this PR the eval children run gh with telemetry off, the office-hours check accepts the menu the skill now offers, and the two free tests stop flaking.Blast radius
buildHermeticEnvbuilds the env for every hermetic eval child (agent-sdk, PTY, session and codex runners all reach it throughhermeticChildEnv), soGH_TELEMETRY=0reaches every paid case; that is why the shared-harness pin needed a HARNESS_VERSION decision, recorded here as non-behavioral (gh's stdout, stderr and exit code do not change with the variable). The eval selector does not read that non-behavioral flag, so the pin selects all 252 dependent gate cases; this PR ran the two hermetic probes and reuses one earlier pass instead of the 108 selected PR cases (see Eval Results). The other edits are test-only and touch no shipped code.Approvals
No approvals recorded for branch capy/flaky-2026-11-07.
Plan: exempt: flaky (daily flaky pass repairs)
Plan check: exempt flaky
Summary
Daily flaky pass for 2026-11-07 (GST-1793). It repairs both marathon census reds on main 297f50c (run 42371706491, #4125) and two free-suite flakes. The census reds were a launch-environment defect (gh 2.103.0 writing a telemetry device-id into the fixture HOME) and an invalid test expectation (the validator still required the retired
/plan-eng-review). The free flakes were an all-digit short sha read as a phone number by the approval scanner, and two release-cut cases that need more than Bun's 5 s default. During /ship the branch took origin/main (cfabbbb, the v1.98.0.0 release fold), recorded the harness pin, and relabeled the live gh spawn in the new wiring test as a smoke check after review.Census reds
gh auth status. gh 2.103.0, which the CI image installs unpinned from the stable apt channel, writes a telemetrydevice-idunder$HOME/.local/state/ghon any command run with telemetry on, and that file lands inside the fixture HOME. WithGH_TELEMETRY=0, gh writes nothing.buildHermeticEnvnow pinsGH_TELEMETRY=0in the hermetic branch, after the allowlist scrub, and a per-test override can still replace it. The new wiring test checks the pin and the override, and smoke-checks a real gh spawn into an empty HOME./autoplanthe default next-skill recommendation inoffice-hours/sections/design-and-handoff.md, and the model recommended/autoplanas the skill says. The validator still accepted only/plan-(ceo|eng|design|devex)-review. It now accepts/autoplan|/plan-(ceo|design|devex)-reviewand no longer accepts the retired/plan-eng-reviewalone. A new test reads the menu's A–C options from the section file, so the next menu change fails here instead of in a paid run.Free flakes
passHead's 12-character sha after the word "after". About one sha in 300 is all digits, andpii.phone.e164reads that as a phone number, sogstack-approvalsrefused the row. Only a sha right afterreview_loop_grantis exempt from the scanner. The ask now names both shas afterreview_loop_grant. ship-release's grant match reads every hex sha in the row, so the test still checks the same thing.bun test, while CI uses 30 s. Both cases now carry the free suite's own 30 s per-test timeout.No threshold, trial count, case kind or model budget changed.
Test Coverage
Coverage: skipped (no runtime file changed; no audit reader). The diff adds tests:
test/hermetic-wiring.test.tsgains the GH_TELEMETRY pin, override and smoke case, andtest/office-hours-completion.test.tsgains the menu-driven next-skill case.Tests ran: focused 192
Tests ran: test 1627 (files, carried from CI run 42385155841/1)
Pre-Landing Review
Pass 1 (light depth, frozen scope) dispatched one batched specialist (testing, security, state-machines, red-team checklists). It raised one INFORMATIONAL test-gap at
test/hermetic-wiring.test.ts:117: the live gh spawn could not fail on unfixed code, because /ship's offlinegh auth statusprobe in a fresh HOME wrote nothing with or withoutGH_TELEMETRY=0. That probe went through this machine's authenticated gh wrapper; the unwrapped, unauthenticated gh does write the device-id (see Exploratory QA). /ship auto-fixed it in 549f3e0 by relabeling the case as a smoke check; the two pin assertions remain the regression guard. Pass 2 re-read the fix range on the frozen tree a744fa98901d and found nothing.Pre-Landing Review: 1 issue — 1 auto-fixed, 0 asked, 0 deferred, 3 noted
REVIEW_LOOP: passes=2 blocking_found=0 deferred=0 noted=0 fixed=1 scope=frozen ledgers_read=3 dispatches=2
Gate edits: none detected (GATE_SCAN tagged=0 at 549f3e0)
Outside review: openai/gpt-6.1-sol (host subagent) completed with no findings; recommendation: approve. The native adversarial pass found four low, non-blocking items: one duplicates the pass-1 smoke-check finding, and three are listed under Review notes.
Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
test/helpers/hermetic-env.ts:127GH_TELEMETRY=0 is pinned only in the hermetic branch; the EVALS_HERMETIC=0 legacy branch re-pins DISABLE_AUTOUPDATER but not GH_TELEMETRY, and the header comment does not say hermetic-only.test/helpers/office-hours-completion.ts:226The next-skill regex stops accepting /plan-eng-review but does not reject a handoff naming it beside /autoplan, still accepts /plan-devex-review which the menu no longer offers, and \b lets /autoplan-anything match.changelog.d/capy-flaky-2026-11-07.md:1The changelog says a bare local bun test stops timing out at 5 s, but only two release-cut cases got the 30 s timeout; other cases were not timed by the reviewer.Exploratory QA
Not applicable as a product surface: the diff changes only tests, test helpers, a harness pin and a changelog fragment, so no shipped CLI, API or page changed. Two probes of the riskiest assumption gave different results. /ship's probe found no device-id with or without
GH_TELEMETRY=0. On this machineghis a Capy wrapper that setsGH_CONFIG_DIRto an authenticated config, which likely explains it. The lane re-ran the reproduction at 549f3e0 with the unwrapped binary (/usr/bin/gh.real, gh 2.103.0) andGH_CONFIG_DIR/GH_HOSTunset, which is the unauthenticated gh a hermetic fixture gets in CI.gh auth statusin a fresh HOME wrote$HOME/.local/state/gh/device-id, and the same command withGH_TELEMETRY=0wrote nothing. stdout, stderr and the exit code were identical either way.Design Review
No frontend files changed — design review skipped.
Eval Results
The PR-profile selector chose 108 paid gate cases (82 shards) because the shared-harness pin
scripts/harness-pins/test/helpers/hermetic-env.ts.jsonis a derived reference for 252 dependent cases. That is far over the lane's $10 paid cap, so the Captain chose to run only the two probes that exercise the hermetic env directly:Reused evidence: autoplan-ceo-only focused PASS 1/1 ($5.16) at 4bfa70a with the same hermetic-env change.
Named gap: the other 106 selected gate cases did not run on this PR. The eval selector does not read the pin's
nonBehavioralflag (onlylib/ship-release.tsreads it), so the harness pin selects every dependent gate case; that follow-up is with the Captain. The release gate covers these cases after merge.Review bot comments
No review bot comments.
Scope Drift
Scope Check: CLEAN
Intent: repair the two census reds on 297f50c and two free-suite flakes.
Delivered: the GH_TELEMETRY hermetic pin with its harness-pin decision, the office-hours next-skill check, two release-cut timeouts, the ruled-notes grant wording, tests for each, and a changelog fragment.
Plan Completion
Plan completion audit: not run (no plan is bound to this branch and no docs/designs/ file matches). The Plan line is
Plan: exempt: flaky (daily flaky pass repairs).Verification Results
No plan-specific verification items (plan-exempt flaky pass). Focused lane 192 pass at the final tree; CI free-tests run 42385155841/1 green at 549f3e0.
TODOS
No TODO items completed in this PR.
Documentation
undefined
Test plan
bun test --timeout=30000 test/hermetic-wiring.test.ts test/office-hours-completion.test.ts test/release-cut.test.ts test/ship-finish-ruled-notes.test.ts: 192 pass, 0 failbun run testcarried from CI free-tests run 42385155841/1 at tree a744fa98901d: 1627 files greenbun test test/harness-version.test.ts: 12 pass, 0 fail