Repository navigation
fix(lint): scope the host group's seam register to that feature's own diffs - #484
Merged
Merged
Conversation
…er feature's PR #466 wired `check-host-mesh-upstream-seams` into the lint gate, where it runs on every pull request, and it failed on any upstream-owned file a diff touched. The first branch to run it after that merge was #471, a workspace state fix touching eight upstream renderer files and no host-group seam at all, so the gate went from green to red for a whole class of work. A register of one feature's surface cannot demand a declaration from features it does not describe. The budget of a declared seam still fails hard — that is the guarantee the file exists to keep — and an undeclared upstream file is reported as a note. `--strict` restores the red for the host group's own branches, where an undeclared hook is exactly the sprawl the check was built to catch. The same change fixes a latent crash the old exit-early path hid: the verbose listing read `seam.budget` for every touched file.
nplez1
added a commit
that referenced
this pull request
Nov 26, 2026
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.
nplez1
added a commit
that referenced
this pull request
Nov 26, 2026
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.
lab-agent-np Bot
added a commit
that referenced
this pull request
Nov 26, 2026
* local(test): the perf contract Windows reddens on wall clock, not its 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. * local(test): the timeout bumps carry the reason the flaky-test ratchet 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. * local(test): declare the test file's six-line seam, as the seams register 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. * local(test): record the green Windows run, and what the sync will collide 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. * local(test): name both dispatches, and the tests by title rather than 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". * local(test): drop the seam row #484 made unnecessary, and wrong to keep 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. * local(test): record the post-rebase run, and the two anchors without 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. --------- 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.
Refs #471 — unblocks it, and every other branch that edits an upstream file.
The problem
#466 added
local/checks/host-mesh-upstream-seams.mjstolocal/gate-lint.mjs, which runs on every pull request(
.github/workflows/fork-pr-gates.yml). The register failed on any upstream-owned file a diff touched, sofrom that merge the lint gate was red for every branch that fixes an upstream bug. The first branch to run it was
#471, a workspace empty-tabs fix that touches eight upstream renderer files and no host-group seam at all:
A register of one feature's surface cannot demand a declaration from features it does not describe.
The fix
the diff also touches this feature's own code — a
host-mesh/host-graph/host-grouppath segment thatupstream's tree does not have, and that is not under
local/(the ledgers are not shipped code, and themeasured surface already ignores them). Fork-owned code is what tells the host group's branch apart from a
branch fixing an upstream bug. Any other feature's upstream edits are reported as notes.
hard, with or without the flag.
feature files as a matter of course, so the recorded sync base moving in the diff exempts it.
--strictforces the red for a diff carrying no feature file of its own (a seam-only change, or a sync judged
deliberately).
seam.budgetfor every touched file. No run reached it whilean undeclared file exited first; with notes it was the next thing to run.
local/gate-lint.mjskeeps running the check without--strict, because the diff now decides.LOCAL-PATCHES.md§local(hosts)andlocal/design/host-mesh.md§ Upstream sync surface carry the reasoning,the two limits (per-diff, not cumulative budgets; a seam-only diff needs
--strict) and the evidence.Verification
node --test local/checks/host-mesh-upstream-seams.test.mjssrc/shared/host-mesh/commit plus an undeclared upstream file is a problem, and the same diff carrying the sync-base record is notpnpm check:changedorca-queue node local/gate-lint.mjslint gate @f99741e37c8: PASS — 54 green, 1 failing: 3 known red, 0 new; 55 steps; 92.0 s(the three known reds are the host group'smax-linesrows, already inlocal/lint-known-red.json)node local/checks/host-mesh-upstream-seams.mjs --base origin/mainon #471's tree--strictstill exit 1local/**and*.mdonlyReviewed by Opus 5.5, high: R1 (1 blocking fixed), delta on R2 (1 blocking fixed)
R2's delta found that the first cut keyed on three directory prefixes, which missed
src/shared/host-mesh/,src/main/ipc/host-graph/,src/cli/specs/host-mesh.tsand the renderer'shost-group/. Matching on the pathsegment, joined with upstream ownership, is the fix, and the fixture test covers it; that round's two NITs are
in as well. A third round was not run — § PR gate 2 requires sign-off for one, so say the word and it runs
before this merges.
🤖 Generated with Claude Code