Repository navigation
Fork CI health: attention - #485
Merged
Merged
Conversation
Author
|
The gatekeeper did not merge (it never merges on a failed gate).
|
nplez1
force-pushed
the
nplez1/issue-482
branch
from
November 26, 2026 08:30
458f592 to
449bc7d
Compare
… count fork-performance-contracts reddened on main at 767c078 (run 45683322849): the windows-latest leg timed out at 30s on journal-domain-operation-window.performance.test.ts:377, while the other two legs passed and the 11-23 run was green only because the file had not reached main yet. The contract counts rows returned, not time. Its fixture builds ten chats of up to 500 turns in tmpdir(), which is 1.6s here and 33,065ms on windows-2022 — Defender scans every write, so the per-turn cost is ~20x and no product code is slow. Two closing }) lines become }, 120_000): the failing test, which upstream fixed the same way in 7b6c852 (stablyai#47789) after our sync base, and the file's other fixture-heavy test, which passed by 3.5s on that runner (26,488ms of 30s on windows-2022, 18,920ms on ubuntu-24.04) and is the slowest test in the lane. No allowlist widened: both tests still run on all three legs and assert the same counts. LOCAL-PATCHES.md carries the reason and the anchors.
…t demands `pnpm check:changed` refused the two `}, 120_000)` lines: the fork's `test-timeout-needs-reason` rule requires a reason comment directly above a per-test timeout, and that rule is right — it is what stops a timeout bump from hiding a slow test. Each comment is one line marked `fork-comment-ok:`, so `check-upstream-file-comments` stays at 4764/4764 rather than growing: the reason belongs in LOCAL-PATCHES.md, and the marker is the documented way to put the pointer above upstream's code. Also corrects the entry from the review: twelve chats, not ten, and the Defender explanation is stated as the likely cause rather than a measured one.
…ster requires `gate-lint`'s `check-host-mesh-upstream-seams` refused the change: an upstream-owned file the fork touches must be a declared seam with a measured budget, so the surface a sync pays for stays visible instead of silent. Budget 6 is what this costs today (two timeouts, two reason comments, two replaced lines). It only shrinks: the next sync brings upstream's own `}, 120_000)` and comment, after which our line there is identical.
…lide with The delta review found the entry claiming the next sync "needs no decision": upstream 7b6c852 inserts its comment at exactly the spot our `fork-comment-ok:` line occupies, so that hunk collides. The resolution is now written down: keep upstream's comment, drop ours, keep the timeout. The run evidence replaces the forward reference: run 45780910456 at 803bad1 is green on all three legs, the test that reddened taking 26,610 ms against 33,065 ms on the red run.
… by line R3's minors: the entry credited only one of the two green dispatches, and the line numbers are where the tests sat on the red run — they have moved. The seam paragraph names the test it means instead of "the second".
main's #484 scoped `check-host-mesh-upstream-seams` to the host group's own diffs: an undeclared upstream file is a note for any other feature, and only a declared seam's budget fails hard either way. This diff carries no hosts path, so the row was not required — and keeping it would have put a hard budget on a test file that is not hosts work, so the next branch to grow it would red the lint gate for a reason #484 exists to remove. The register is main's file again; the entry records why, and its anchors are the two `it(...)` titles.
…repeating them R4's minors: the seam paragraph pointed at "the anchors below" when they sit above it and repeated the allowlist paragraph's sentence; and the Verified paragraph credited two of the three pre-rebase dispatches while saying three. The run at 449bc7d — the rebased branch — is green on all three legs, the test that reddened taking 26,170 ms. Rebased again onto 8293fd7 (#471), which pruned the comment baseline by one: the entry's 4764/4764 is now 4763/4763.
nplez1
force-pushed
the
nplez1/issue-482
branch
from
November 26, 2026 08:36
7c0d08a to
ed8a857
Compare
nplez1
added a commit
that referenced
this pull request
Nov 27, 2026
…o bound; the import above the bindings it precedes The delta from the adversarial review of 9a0bd1b, all of it accuracy rather than behaviour: - the static import moves up beside the other imports. Vitest hoists it either way, so this changes no runtime order — but leaving it below the `let` bindings it evaluates ahead of read as if it ran after them, and the mock factory now says why it must stay lazy. - `testTimeout: 30_000` is the project default, so removing the `}, 20_000)` lines widens the budget to 30s rather than removing it. The entry said the opposite twice. - the shard's wall clock, not a claimed collect measurement: 102s against 103s on the green run before, which is the evidence that the 17s moved instead of vanishing. - 4,828/4,828 fork comments in upstream files, measured, not #485's 4,763. - test 1 covers both card styles; test 2 pins the default one. - the warm-Mac numbers are the before-fix ones, and the six-line comment is two. Also records the follow-up the review found unrecorded: the shard-timing overlay weighs this file at 3,894ms by a metric that excludes collection, so the next regeneration would drop it while the shard still pays ~17s.
lab-agent-np Bot
added a commit
that referenced
this pull request
Nov 27, 2026
* local(test): the merge-marker card test pays its module graph at load, not in a test budget fork-main-tests reddened on main at 8308526 (run 45942815750, 2026-11-27): shard 17/24 failed `WorktreeCard.merge-marker.test.tsx` with "Test timed out in 20000ms" on the first test, then a second, false failure 281ms later. The cost is the card's module graph, not the assertions. The same file took 17,462ms on the same runner the night before and passed (run 45758341047), while here it is 1.5s warm and the two tests themselves are 20ms and 3ms. Each test did its own `await import('./workspace-card/surface/WorktreeCard')`, so the cold transform was charged to that test's timeout: 20s against a 17.5s cost. That is also what the second failure was. A timed-out test body is abandoned rather than cancelled, so the first test's continuation ran during the second, left the module-level `settings` on the experimental card style, and the metadata row the last assertion reads was never rendered — which is why it failed in 281ms having just read the marker and the glyph as expected. One static import moves that cost to module scope, where no per-test budget applies, and leaves both bodies synchronous, so a body that outlives its budget cannot resume inside the next test. The per-test timeouts go with it: nothing left in either body can await. * local(docs): the card test's module graph, and why the 20s budget was the wrong place to pay it Records the 2026-11-27 nightly red (run 45942815750), the 17,462ms measurement that made it a coin flip, and the green dispatch that replaces it (run 45953273363 at 9a0bd1b, 137ms for the same two tests). * local(test): the review's six findings — a 30s project default, not no bound; the import above the bindings it precedes The delta from the adversarial review of 9a0bd1b, all of it accuracy rather than behaviour: - the static import moves up beside the other imports. Vitest hoists it either way, so this changes no runtime order — but leaving it below the `let` bindings it evaluates ahead of read as if it ran after them, and the mock factory now says why it must stay lazy. - `testTimeout: 30_000` is the project default, so removing the `}, 20_000)` lines widens the budget to 30s rather than removing it. The entry said the opposite twice. - the shard's wall clock, not a claimed collect measurement: 102s against 103s on the green run before, which is the evidence that the 17s moved instead of vanishing. - 4,828/4,828 fork comments in upstream files, measured, not #485's 4,763. - test 1 covers both card styles; test 2 pins the default one. - the warm-Mac numbers are the before-fix ones, and the six-line comment is two. Also records the follow-up the review found unrecorded: the shard-timing overlay weighs this file at 3,894ms by a metric that excludes collection, so the next regeneration would drop it while the shard still pays ~17s. * local(docs): the overlay follow-up names a remedy that works The delta review of 2afcbbd found the one thing this entry still got wrong: `--override` refuses a file `selectEntries` already dropped (local/ci-shard-timings-overlay.mjs:302), and at 137ms this file falls under the 2,000ms threshold — so the instruction it recorded would have aborted the next import rather than kept the entry. The paragraph now says the weight has to be re-added by hand, or the metric taught to count collection. Documentation only: the test change and its green run are unchanged. --------- Co-authored-by: Nathan Plesnicher <[email protected]>
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.
Fixes #482
Summary
fork-performance-contractswas red onmainat767c078fde1(run 45683322849, 2026-11-25). Only thewindows-latestleg failed:The test is upstream's, and reached
mainwith the 2026-11-24 sync (1350 commits) — the 11-23 run of the lane was green only because the file was not here yet. Its fixture builds twelve SQLite chats of up to 500 turns (≈3,900 turns × 3 journal applies) intmpdir(). That is 1.6 s on this Mac and 26.6–34.6 s onwindows-2022, against Vitest's 30 s default: the same test on the same runner took 26,610 ms, 33,065 ms and 34,636 ms across three runs, so the cap was a coin flip. The contract counts rows returned to our code, never wall clock — the 30 s default is the only wall-clock budget in it.The change, three files and +71/−2:
src/main/native-chat/agent-session-journal/journal-domain-operation-window.performance.test.ts— two closing})become}, 120_000), on the test that failed and on the file's other fixture-heavy test, with a one-line reason above each (the fork'stest-timeout-needs-reasonratchet requires one, and it is right to).local/checks/host-mesh-upstream-seams.mjs— the six lines this costs in an upstream file are declared as a seam with a measured budget of 6, which is the register that keeps a fork hunk in upstream's tree visible and bounded.LOCAL-PATCHES.md— the audit entry: symptom, measurements, anchors, upstream precedent, and what the next sync resolves.Upstream made this exact call itself. Commit
7b6c852e2de(stablyai#47789), after our sync base, raises the same test to120_000with the comment "about 30s on a Windows runner; it counts work, not time". This PR takes that code line; the reason lives inLOCAL-PATCHES.mdrather than in a fork comment above upstream's code (the fork's comment ratchet, 4764/4764 unchanged), and the entry records the one hunk the next sync will collide with and how to resolve it.No allowlist was widened. Nothing was added to
local/nightly-linux-known-red.json,local/unit-known-red.jsonorlocal/actions-enablement-contract.mjs; the tests still run on all three legs and still assert the same operation counts.Verification
pnpm tcpnpm exec vitest run --config config/vitest.performance.config.ts src/main/native-chat/agent-session-journal/journal-domain-operation-window.performance.test.ts --maxWorkers=2pnpm run check:code-quality:changedorca-queue node local/gate-lint.mjsnode local/checks/host-mesh-upstream-seams.mjs --base origin/mainnode local/check-upstream-file-comments.mjsnode config/scripts/static-analysis/ratchets/test-quality/check-flaky-test-pattern-ratchet.mjspnpm check:changedmax-lines-ratchet, fails identically on a cleanorigin/mainworktree (three rows allowlisted inlocal/lint-known-red.jsonfor the lint gate) — pre-existing, unrelated to this diff, not fixed hereUnit gate: not required. The diff touches
src/main/**(one test file),local/checks/**(fork tooling) and*.md— no global input (package.json, the lockfiles,config/**, a roottsconfig*.json,src/packages/**,src/shared/**, or anything outside the source/test/doc/fork-tooling trees).The runner that reddened is the one that decides, so the lane was dispatched on this branch rather than trusted from a Mac:
803bad1e65f— green on all three legs:ubuntu-24.041m51s,macos-153m45s,windows-20222m45s. The test that reddened took 26,610 ms and passed. That SHA is the last commit touching code or checks; the two commits after it editLOCAL-PATCHES.mdonly.41a041bc6f2— green on all three legs, the same test at 26,777 ms.12957a82e44(the code commit alone) — green on all three legs, the same test at 34,636 ms.Those three numbers are the measurement behind the fix: the same test, on the same runner, has taken 26.6 s, 33.1 s and 34.6 s — two of three over the old 30 s cap.
Decisions
7b6c852e2de) instead of inventing a different mechanism. Upstream's maintainers reached for a per-test 120 s on exactly this test, which is the strongest available evidence about the right shape.reads the newest turns…, which passed at 26,488 ms of its 30 s budget on the runner that failed its neighbour, and 18,920 ms of it onubuntu-24.04. Upstream has not touched it. Left alone it is a red waiting for the next slightly slower runner, in this lane and in the nightly unit lane, which runs the samesrc/**/*.performance.test.*glob. A reviewer could call this scope creep; the alternative is a known 88%-of-budget flake.fork-comment-ok:rather than a plain comment. The fork'stest-timeout-needs-reasonratchet refuses a per-test timeout without one — the right rule, since it is what stops a timeout bump from hiding a slow test — and the marker is the documented way to point atLOCAL-PATCHES.mdwithout growing the comment ratchet (4764/4764 unchanged).}, 120_000)and its comment, the second test costs nothing.7b6c852e2de. It is a bots feature (fix(bots): a thread's follow-up goes back to the thread it started in stablyai/orca#47789) touching product code; it will arrive with the next sync, bringing the byte-identical timeout line with it.testTimeoutfor all ofconfig/vitest.performance.config.ts— that would have relaxed 30 contract files for one file's fixture cost.main, and this lane's cron is every other day (15 9 */2 * *). So the post-merge step isgh workflow run fork-performance-contracts.yml --ref mainrather than waiting for the clock; Fork CI health: attention #482 should close on that run's green, not on this PR's merge.Noted, not fixed here (out of scope):
pnpm check:changedis red onmainformax-lines-ratchet— three rows thatlocal/lint-known-red.jsonallowlists for the lint gate but the changed-checks gate reads raw.Reviewed by claude/opus, high: R1 no blocking (1 should-fix + 3 minor + 2 nit, all fixed), R2 no blocking (1 should-fix, docs only, fixed), R3 clean (1 minor + 2 nits fixed).