Repository navigation
Description
Summary
main stopped compiling for 34 minutes on 7 Nov, and the first thing to notice was an unrelated pull request. #369 and #370 each added one const hasRealPointer = useHasRealPointer() to src/components/organisms/Mapbox/Map.tsx: neither branch held a duplicate, so both were green on their own, and the two squash merges landed both copies — TS2451, twice. The merge queue is what found it, and it is also what would have stopped it: both merges went past the queue.
Approach
Both decisions are settled below. The work splits in three parts, and the first is not a commit.
What actually failed, measured
All times UTC, 2026-11-07.
| Time | Event | Evidence |
|---|---|---|
| 17:13 | #371 merged by hand | aaa9818, merged_by: Ardnived, no merge_group run |
| 21:12 | #369 merged by hand, adding the declaration | 70990fd, merged_by: Ardnived, no merge_group run |
| 21:18 | #370 merged by hand on top of it, adding it again — main no longer compiles |
c2d5351, base 70990fd, head never updated |
| 21:45 | #372's queue entry fails pnpm typecheck |
CI run 42417331658, merge_group, gh-readonly-queue/main/pr-372-c2d5351…, failure |
| 21:52 | #372 lands the one-line deletion beside its re-sync | 805f675 |
So main was broken for 34 minutes, unnoticed for 27 of them, and the finder was a contract re-sync that had nothing to do with it.
The only gate that reads a merge result is the queue
Each trigger reads a tree somebody chose. pull_request reads the PR head. merge_group reads the PR merged onto main as it will be — the only one of the two that could have seen two hasRealPointer declarations, because neither branch contained both.
merge_group is configured (.github/workflows/ci.yml:7) and it works: it caught this defect on #372's entry. The hole is which merges reach it. #366, #369, #370 and #371 — the four merged by hand in that window — have no merge_group run at all, while #364, #372, #373 and #376 around them each have one.
Part 1 — require the merge queue for every merge (repository Settings, attended)
No loop run can do this part. Settings → Rules is not in the repo, no mcp__github__* tool reads or writes a ruleset, and a cloud session may not reach the GitHub API any other way. A repo admin makes the change by hand; @sydevs-bot implement does Parts 2 and 3 only.
In the ruleset covering main:
- turn Require merge queue on;
- leave no actor bypassing the ruleset, since a bypass is the hole this ticket is about;
- confirm the required status checks are the three
ci.ymlposts —Lint, Typecheck & Build,Dependency Review / review,Smoke. The queue runs exactly the checks the ruleset requires, so requiring the queue with no checks required gates nothing.
Nothing in .github/ changes, and nothing stalls. All three jobs already handle a queue entry: the gate runs in full, Dependency Review compares github.event.merge_group.base_sha, and Smoke skips itself with exit 0 and an annotation, because a queue entry has no pull-request number to key a preview on (.github/workflows/ci.yml:108, docs/testing.md). The dispatcher is built for it too — it arms auto-merge and keeps no merge verdict of its own, the ruleset and the merge queue decide that now (sydevs/claude-workflow, dispatcher/gather.mjs:330) — so an approved bot pull request enqueues instead of merging.
Two costs. A merge waits one queue run, measured 2m23s–2m50s across runs 42417964616, 42528479577 and 42534049552. And every merge then creates a gh-readonly-queue/main/pr-<n>-<sha> branch, which starts a sahajatlas-design preview build: that site's Workers Builds branch rules take only a literal branch name or a lone * and cannot exclude the prefix (docs/rules/deployment.md). About half of merges do that today; after this, all of them.
Part 2 — enable @typescript-eslint/no-redeclare
One line in the TypeScript block's rules, beside 'no-unused-vars': 'off' (eslint.config.js:85):
'@typescript-eslint/no-redeclare': 'error',Re-measured on 4f804c1, eslint 9.39.5 and @typescript-eslint/eslint-plugin 8.11.0:
- rule on,
mainas it stands:pnpm lintexits 0. Zero existing violations, so enabling it needs no other change. - rule on, a second
const hasRealPointer = useHasRealPointer()put back intoMap.tsx:Map.tsx 406:9 error 'hasRealPointer' is already defined @typescript-eslint/no-redeclare, exit 1.pnpm typecheckreports TS2451 twice on the same tree.
The base no-redeclare needs no 'off' entry: eslint.config.js never extends js.configs.recommended, so the base rule set is already inert.
⚠ It would not have caught #370. The duplicate existed only in the merged tree; no per-edit hook and no PR lint run ever sees that. The rule's whole gain is that a redeclaration written by hand fails the PostToolUse eslint --fix hook instead of waiting for pnpm typecheck in the lean gate.
⚠ Enable the one rule, not the whole recommended set. Turning on js.configs.recommended across this repo is its own change with its own fallout, and the two should not be confused.
Part 3 — write down what the repo cannot hold
docs/testing.mdgains a short section: the merge queue is the only gate that reads the merged tree,mainis protected by requiring it rather than by apushtrigger, andci.yml'smerge_grouptrigger is what lets a queue entry complete. Record what the ruleset was set to, including its bypass list. Nothing in the repo records the requirement today, so the ruleset is the only place it exists.scripts/ci-workflows.test.ts, in itsdescribe('ci.yml')block (scripts/ci-workflows.test.ts:75), gains one case pinningci.yml'son:keys as exactlypull_requestandmerge_group, with nopush. Acceptance criterion 3 has no mechanism today, deletingmerge_groupstalls the queue silently, and this spec already reads workflow text throughreadRepoSource.
Decisions
- Should CI run the gate on
mainitself? → No. There is no clear way to handle or respond to a red run onmain, so the breakage is to be stopped before it lands (Ardnived, 2026-11-08) - How should a merge result be verified before it lands? → A — require the merge queue for every merge, bypass included (Ardnived, 2026-11-10)
- Enable
@typescript-eslint/no-redeclareas well? → A — yes, one line ineslint.config.js(Ardnived, 2026-11-10)
Acceptance criteria
- The ruleset covering
mainrequires the merge queue, no actor bypasses the ruleset, and the required checks are the threeci.ymlposts. - A pull request that compiles alone but not when merged with
maincannot reachmainwithout a red check on the merge result. -
.github/workflows/ci.ymlstill triggers onpull_requestandmerge_group, and on nopush— and a spec goes red if that changes. -
docs/testing.mdrecords the merge-queue requirement and the bypass list it was set to, since no other file in the repo does. - A duplicate
constin one scope failspnpm lint, naming@typescript-eslint/no-redeclare.
Verification checklist
- Open Settings → Rules → the ruleset covering
main. Record in this ticket whether "Require merge queue" is on, which actors may bypass the ruleset, and which status checks it requires. Nomcp__github__*tool reads a ruleset, so this is a browser step for a person. - Open a scratch pull request and confirm the merge control offers "Merge when ready" instead of merging at once.
- Add a second
const hasRealPointer = useHasRealPointer()atsrc/components/organisms/Mapbox/Map.tsx:404.pnpm lintexits non-zero naming@typescript-eslint/no-redeclareat that line. Remove it, and.claude/skills/pr-prep/check.shis green. -
pnpm test:run scripts/ci-workflows.test.tspasses, and goes red whenmerge_groupis deleted from.github/workflows/ci.ymlor apush:trigger is added. -
grep -A6 '^on:' .github/workflows/ci.ymllistspull_requestandmerge_grouponly.
Notes
- Parts 2 and 3 are the whole of what a run can build. An
@sydevs-bot implementrun does those two and says the ruleset is still outstanding; it must not try to reach the API for Part 1. - Found implementing fix(registration): give the collapsed captcha slot no gap of its own #367. fix(registration): give the collapsed captcha slot no gap of its own #373 branched from
c2d5351, so it carried its own copy of the deletion; by the time it squashed onto amainthat chore(contracts): re-sync copied contracts from SahajCloud #372 had already fixed, its diff touchedMap.tsxnot at all. chore(contracts): re-sync copied contracts from SahajCloud #372 is the commit that fixedmain, 7 minutes after the queue reported it. - A
push: branches: [main]trigger was the first proposal here and is declined above.docs/testing.md§ "A red run files its own ticket, because no handler is reachable from here" is where the prior art for routing such a failure would have come from — the production smoke lane'sproduction-redissue. Nothing in this ticket needs it. - Not in scope: whether
js.configs.recommendedshould be on at all, and whether the three-PR sweep should have been one PR.
🤖 Written by the sydevs autonomous loop — see what this is
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Hold Until
Projects
- StatusShow more project fieldsDone
Activity
Ardnived commentedon Nov 8, 2026
@sydevs-bot Revise. We don't want to run the gate on main itself because we don't have a clear way to handle and respond to that. We want to avoid the problem before that. Give me options.
sydevs-bot commentedon Nov 8, 2026
🤖 no session running
recent dispatches
Written by the sydevs dispatcher. Sessions never edit this comment.
[-]fix(build): typecheck main itself, not only pull requests[/-][+]fix(ci): verify the merge result, not only each pull request[/+]sydevs-bot commentedon Nov 8, 2026
Reshaped, and the
push: branches: [main]trigger is gone.The merge queue would have prevented this. It reads each PR merged onto
main— the only tree that ever held twohasRealPointerdeclarations, since neither branch held both. It proved that by failing #372's queue entry at 21:45Z, 27 minutes after #370 landed.The hole is which merges reach it. #366, #369, #370 and #371 were merged by hand and have no
merge_grouprun; #364, #372, #373 and #376 each have one. Whether the rule is off or bypassed is in Settings → Rules, which no MCP tool reads.Two questions in the body:
@typescript-eslint/no-redeclare(recommended: one line, zero existing violations). It would not have caught fix(ui): dark-theme and display fixes from the 6 Nov bug sweep #370 — no branch held the duplicate.Also corrected: #372 fixed
main, not #373. Retitled tofix(ci):. Type stays Bug.@sydevs-bot implementstarts the work once 1 is answered.🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
Ardnived commentedon Nov 10, 2026
@sydevs-bot revise 1A 2A
3 remaining items
Ardnived commentedon Nov 11, 2026
@sydevs-bot implement
sydevs-bot commentedon Nov 11, 2026
Nothing left to build. #390 carries Parts 2 and 3, pushed at
aed88d7and already through a critic round.@typescript-eslint/no-redeclareenabled — criterion 5.docs/testing.mdrecords the merge-queue requirement,observedcolumn blank — criterion 4, half met.scripts/ci-workflows.test.tspinsci.yml'son:keys — criterion 3.Part 1 is yours. Criteria 1 and 2, and the
observedhalf of 4, need Settings → Rules. No run reaches a ruleset, so #390 saysRefs #375and merging it leaves this ticket open.This run was a reconcile re-fire. The 16:44Z implement session opened #390 but left no comment here, so the verb read as unanswered and the approval stayed live —
dispatcher/decide.mjs:1124counts an implement verb answered only when a PR closes the issue. Journalled as friction.The approval is spent. Say
@sydevs-bot implementagain only if something here needs rebuilding.🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
Ardnived commentedon Nov 11, 2026
Implemented by #390