Repository navigation
fix(ci): verify the merge result, not only each pull request - #390
Conversation
#369 and #370 each added one `const hasRealPointer = useHasRealPointer()` to Map.tsx. Neither branch held a duplicate, both were green alone, and the two squash merges landed both copies — TS2451, twice, for 34 minutes on main. What this rule buys is the redeclaration written by hand, which now fails the PostToolUse `eslint --fix` hook instead of waiting for `pnpm typecheck` in the lean gate. It is not blind to a merged tree — the gate job runs `pnpm lint` on a `merge_group` entry too — but it did not catch #370, because that merge went past the queue entirely. Measured on this tree, eslint 9.39.5 with @typescript-eslint 8.11.0: the rule on, `pnpm lint` exits 0 — zero existing violations, so enabling it needs no other change. With the duplicate put back at Map.tsx:405, lint exits 1 naming `@typescript-eslint/no-redeclare` and typecheck reports TS2451 on both lines. The base `no-redeclare` needs no `'off'` entry: this config never extends `js.configs.recommended`, so the base rule set is already inert. The whole recommended set stays off — that is its own change with its own fallout. Refs #375 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXaYsVN3SZo9GicDh1
…riggers The requirement lives in Settings → Rules, which no `mcp__github__*` tool reads and no cloud session can reach another way, so the repo had no record of it at all. docs/testing.md gains that section. ⚠ It states the mechanism more narrowly than #375 did: `pull_request` does NOT read the pull request's bare head — `github.ref` is `refs/pull/<n>/merge` and ci.yml's bare `actions/checkout@v7` takes it — so the gate already reads a merged tree. The trap is that the base it merged against is whatever `main` was when the run fired, and a base that moves afterwards fires nothing. #370 is exactly that: its head was never re-pushed after #369 landed six minutes earlier. The queue closes the window rather than narrowing it, by building each entry against the `main` it will land on and serialising them. The section also records why main is protected by requiring the queue rather than by a `push` trigger (a run on main resolves to no pull request, so a red one reaches no handler), what the ruleset is to be set to including its empty bypass list, and the two measured costs — one queue run per merge, and a `sahajatlas-design` preview build per `gh-readonly-queue/` branch. ⚠ The ruleset table is marked as not yet confirmed. Setting it is an attended browser step; whoever makes it records the date and the values they observed. The spec covers acceptance criterion 3, which had no mechanism: deleting `merge_group` stalls every merge in the queue with no red anywhere. Watched to fail at both sites before keeping it — `merge_group` deleted gives ['pull_request'], and a `push: branches: [main]` trigger added gives three keys. Both red; restored, green. Refs #375 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXaYsVN3SZo9GicDh1
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The diff matches the ticket: Parts 2 and 3, nothing smuggled in. The ladder found nothing the repo already had. The correction in § Notes for reviewer is right and worth your eye — pull_request does check out refs/pull/<n>/merge, so the gap is a stale base, not an absent merge.
Two things to settle. Closes #375 closes the ticket while criteria 1 and 2 are unmet, and the ruleset is the actual gate. Separately, this PR writes the push-vs-queue rationale four times over.
Findings
- should-fix —
Closes #375in the body. The PR says itself that criteria 1 and 2 stay open. Merging closes the ticket and drops Part 1. UseRefs #375and tick only what shipped. - should-fix —
docs/testing.md:342repeatsdocs/testing.md:277-281almost word for word, samedispatcher/resolve.mjscitation. - consider —
docs/testing.md:359records the ruleset as set. Criterion 4 asks for the values it was set to. - consider —
scripts/ci-workflows.test.ts:190restatesci.yml:5-7, three lines above the trigger it describes.
What was checked
- Ticket #375 against the diff — 3 files, 77 lines, all additions.
eslint.config.js:29-95— no@eslint/jsimport and nojs.configs.recommended, so baseno-redeclareis inert, as claimed.- The new spec, traced against
ci.yml:1-10. It passes, and reddens on a deletedmerge_groupor an addedpush. Flow style or a quoted"on":throws loudly rather than passing by vacuum. claude-workflowdispatcher/resolve.mjs:136-155—pr.head.sha !== shaskips, so the no-handler claim holds.ci.yml:22,94-95,109— the three check names in the table are right,Dependency Review / reviewincluded.docs/rules/deployment.md— thegh-readonly-queuepreview-build cost checks out.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
The new merge-queue section repeated the paragraph above it almost word for word — the same dispatcher/resolve.mjs citation, the same conclusion that a red run on main reaches no handler. Two copies drift. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjWtRd5ZrvnJSpVYdAk
Criterion 4 asks for the values the ruleset was set to, which is a record. The table held only targets, with nothing to tell a reader that nobody had read the dashboard back yet. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjWtRd5ZrvnJSpVYdAk
The first half restated ci.yml's own comment three lines above the trigger it describes, and the rest restated the docs/testing.md section it already points at. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjWtRd5ZrvnJSpVYdAk
|
All four review points are adopted. Pushed at
🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
sahajatlas-design | aed88d7 | Nov 11 2026, 05:15 PM |
Summary
docs/testing.md, the only place the repo can hold it, and pinsci.yml'son:keys so deletingmerge_groupgoes red instead of stalling the queue.@typescript-eslint/no-redeclare, so a redeclaration written by hand fails the edit hook rather thanpnpm typecheck.⚠ Part 1 of the ticket is not in this PR and cannot be. Requiring the merge queue is a repository Settings edit: no
mcp__github__*tool reads or writes a ruleset, and a cloud session may not reach the GitHub API another way. Acceptance criteria 1 and 2 stay open, and so does theobservedhalf of criterion 4. So this PR saysRefs #375, notCloses— merging it must not close the ticket. The ticket says so under § Notes.Change outline
Behaviour — the rule, and what it can reach
Base
no-redeclareneeds no'off': this config never extendsjs.configs.recommended, so it is already inert.Contract — what
docs/testing.mdnow holdsThe ruleset is the contract here, and it lives somewhere the repo cannot read. Paraphrased, one rule per line, § "The merge queue is the only gate that reads the tree a merge will produce":
Flow — what each trigger reads, and where the window is
Preview
Nothing deployed changes. The diff is an eslint rule, a docs section and a spec case — no
src/file and no build output is touched, so neither the app nor the-designplayground preview can show it. The three verification runs below are the observation instead.Test results
Re-run on
aed88d7, after the review round and a clean merge oforigin/main(44781f6, a contracts re-sync that touches no file this branch does)..claude/skills/pr-prep/check.sh— lint, typecheck,test:run(165 files, 1998 tests)scripts/ci-workflows.test.ts15 passed (14 before this branch)comment-lint.mjs --base origin/main)securityReview.triggerPatternand nosrc/changeEach new assertion was watched to fail at the site that causes it, per
docs/testing.md§ "A regression spec is not finished until it has FAILED":The three failures, measured
merge_group:deleted fromci.ymlexpected [ 'pull_request' ] to deeply equal [ 'merge_group', 'pull_request' ]push: branches: [main]added toci.ymlexpected [ 'merge_group', 'pull_request', …(1) ] to deeply equal [ 'merge_group', 'pull_request' ]const hasRealPointer = useHasRealPointer()atMap.tsx:405405:9 error 'hasRealPointer' is already defined @typescript-eslint/no-redeclare, exit 1;pnpm typecheckreports TS2451 on lines 404 and 405With the rule on and the tree as it stands,
pnpm lintexits 0 — zero existing violations.Manual verification
The first two are the ticket's Part 1, and nothing in this PR can do them.
main: turn Require merge queue on, leave the bypass list empty, and confirm the required checks areLint, Typecheck & Build,Dependency Review / reviewandSmoke. The queue runs exactly the checks the ruleset requires, so requiring the queue with none required gates nothing.observedcolumn ofdocs/testing.md's ruleset table with what the dashboard actually showed, and date it. Every cell in it is blank today. A scratch PR's merge control should offer "Merge when ready" instead of merging at once.Notes for reviewer
The review pass changed what this PR claims, and the correction is worth your eye. The ticket states that
pull_request"reads the PR head", and that the rule "would not have caught #370" because "no PR lint run ever sees" the merged tree. Both are wrong, and I verified it rather than shipping the ticket's wording:github.refisrefs/pull/<n>/mergeon apull_requestevent andci.yml'sactions/checkout@v7carries noref:, so the gate already reads a merged tree.gatejob has noif:, sopnpm lintruns on amerge_groupentry too — the rule does fire against a merged tree there.So the real gap is a stale base, not an absent merge, and the ticket's own evidence is that case exactly: #370's head was never re-pushed after #369 landed six minutes earlier. The docs section says that; the ticket's § Approach does not, and is superseded by this PR.
That reading makes "Require branches to be up to date before merging" a cheaper-looking alternative. It is not equivalent — it leaves the race between the green check and the merge open, which the queue closes by serialising — and the choice is settled anyway (Ardnived, 2026-11-10). Raised here only because the corrected mechanism is what makes the question askable at all.
Detail
Why the rule is one line and not
js.configs.recommended. Turning the whole recommended set on across this repo is its own change with its own fallout; the ticket rules it out and ⚠ marks it. Measured on this tree with eslint 9.39.5 and@typescript-eslint/eslint-plugin8.11.0.Why the ruleset table is in
docs/testing.md, and why itsobservedcolumn is empty. Writing a value I cannot read back would make the table the thing it is there to prevent. Theto be set tocolumn states the target; theobservedcolumn stays blank until a person reads the dashboard, so neither can be mistaken for the other.Prettier was not run over the two changed non-spec files.
pnpm lintpasses, butprettier --checkfails ondocs/testing.mdandeslint.config.jsonmainalready, and--writemangles an existing paragraph indocs/testing.md(thescripts/**/*.mjsline collapses into backtick soup). Neither file is covered by a formatting gate. Left alone deliberately — reformatting them is a separate change.Not in scope, per the ticket: whether
js.configs.recommendedshould be on at all, and whether the three-PR sweep should have been one PR.Refs #375
Generated by Claude Code