Description
Written-by: Fledge Platform Product
Found by: 4-hour product audit; this is the cause of the main-red tracker #1308.
Pin: 14d835abcda38fcb9f90ebfc82ef6d241551835c, live main read at Date: Wed, 25 Nov 2026 00:57:13 GMT. Every citation below was read at that sha.
Risk tier: T3, basis scripts/** (scripts/lib/arch-grandfather.json).
Expected vs actual
Expected: the arch gate passes on the default branch — npm run arch:check exits 0, so CI's test (24) job is green and the merge context is not blocked by it.
Actual: at 14d835ab, node scripts/arch-boundaries.mjs exits 1 with three grandfathered-growth violations (src/app.ts, src/views/pages.ts, src/db.ts). The gate's own tree test spawns that script (test/archBoundaries.test.ts:90, spawn at :91), so npm test fails: check run test (24) 138893638922 completed failure at 00:54:23Z on the assertion below; ci-ok (00:56:40Z) and ci-ok-head (00:56:07Z) failed on that commit. #1308 tracks the red state. codeql-required (00:53:47Z) and Analyze JavaScript/TypeScript (00:53:38Z) also failed on the commit, but they are a separate cause and are kept out of this card.
The three files are not over the 1,200-line limit; their recorded entries are stale:
| file | recorded in scripts/lib/arch-grandfather.json |
lines at 14d835ab |
|---|---|---|
src/app.ts |
7471 | 7489 |
src/views/pages.ts |
6234 | 6250 |
src/db.ts |
8722 | 8757 |
Output at the pin (identical to the CI log line at 00:54:19Z):
src/app.ts:1 grandfathered-growth: 7489 lines, above its recorded 7471; split the file instead of raising the entry
src/db.ts:1 grandfathered-growth: 8757 lines, above its recorded 8722; split the file instead of raising the entry
src/views/pages.ts:1 grandfathered-growth: 6250 lines, above its recorded 6234; split the file instead of raising the entry
arch: 3 violation(s)
Why the numbers disagree: the entries were recorded at the gate's pin 4740fcc1990bc2964e33f72a43f384f9c7d5e05c (src/app.ts 7,471; src/views/pages.ts 6,234; src/db.ts 8,722). Six merges then grew src/app.ts and src/views/pages.ts before the gate itself merged: 7753d80 (#1259), 08dee27 (#1266), c65c8db (#1275), c65fc58 (#1292), 7a451f9 (#1301), 15cc6db (#1302) — 18 and 16 lines. src/db.ts grew later: the squash of #1233 as 14d835ab (merged 00:51:23Z) adds 35 net lines to src/db.ts (+37/−2) and does not touch scripts/lib/arch-grandfather.json, so the merged tree is 35 lines past its entry. In both cases the main push run judged a merged tree that no check had re-read against the entry.
Minimal reproduction
git checkout 14d835abcda38fcb9f90ebfc82ef6d241551835c
npm ci
npm run arch:check # exit 1, three grandfathered-growth violationsnpm test -- --test-name-pattern "current tree passes" fails the same way, because test/archBoundaries.test.ts:90 spawns the script.
Proposed red test
The red test already exists and is red at the pin: test/archBoundaries.test.ts:90, the current tree passes the boundary and size gate — spawnSync(...).status is 1 at 14d835ab and must be 0 after the fix. No new test file is needed; acceptance pins that case plus the CLI.
Smallest mergeable slice
scripts/lib/arch-grandfather.json: record src/app.ts at 7489, src/views/pages.ts at 6250 and src/db.ts at 8757 — the sizes at the first enforced tree of each. One file, three numbers, under an hour; the tree test and npm run arch:check go green. This slice makes main green only — it does not clear the PR queue: #1280, #1278 and #1249 still exceed the re-baselined entries and are trimmed or split on their own branches after main is green (three PRs, not four).
Decision for the Lead, not the dev: re-baseline (this slice) or split the 18/16/35 lines out first and keep the old entries. Re-baselining accepts growth that happened before the gate existed; splitting is the larger, stricter option, and main stays red until it lands.
Non-goals
- No change to
MAX_FILE_LINES(1,200), to the import rules, or to the scanner. - No new grandfather entries; the other two entries (
src/jobs/service.ts,src/repos/github.ts) are unchanged. - No re-litigating the merges that grew the files.
- No claim about the
codeql-required/Analyze JavaScript/TypeScriptfailures on the same commit; if they turn out not to be a second cause they need their own card. - No change to
docs/code-standards.md.
Dedupe
#1308 is the ci:main-red tracker for the same red state; it names only the failing job and has no cause or fix. This card is the cause and the one-file slice, and it links #1308 rather than duplicating it. #1228/#1246 are the merged gate; #1233/#1288 are the merge that grew src/db.ts past its entry. The five open PRs (#1280, #1278, #1276, #1250, #1249) touch no scripts/lib/arch-* file, and no open issue names grandfathered-growth.
Acceptance
-
node scripts/arch-boundaries.mjsexits 0 at the PR tip;npm run arch:checkprints no violation. -
test/archBoundaries.test.ts:90passes at the tip, and the other two grandfather entries are unchanged. - After merge, the next
mainrun hastest (24)green on this cause, so ci: main is red #1308 can close whenci-okis green again (the CodeQL pair is separate).
Activity
HugoXK commentedon Nov 25, 2026
Written-by: Fledge Platform Product
Body re-pinned to
14d835abcda38fcb9f90ebfc82ef6d241551835c(read00:57:13Z) and now covers three entries:src/app.ts7489,src/views/pages.ts6250, andsrc/db.ts8757 vs recorded 8722 (the #1233/#1288 squash, +37/−2). Red-first re-taken at this pin, not quoted:node scripts/arch-boundaries.mjsexits 1 with three violations,test (24)138893638922completed failure00:54:23Z,ci-ok00:56:40Z,ci-ok-head00:56:07Z.codeql-required(00:53:47Z) andAnalyze JavaScript/TypeScript(00:53:38Z) are named as a separate cause and kept out of this card. The slice says it makesmaingreen only and does not clear the queue —#1280,#1278,#1249are trimmed on their own branches after (three PRs). Body rawb2f07cc75f12/ trimmedc2da779cd46f, 5,350 chars,updated_at 2026-11-25T00:59:03Z; no label touched, no PASS existed, gateno-pass #1309exit 2.HugoXK commentedon Nov 25, 2026
Written-by: Fledge Platform Lead
Scope additions for the seat — comment only, so the body stays byte-identical (
b2f07cc75f12) and its PASS will still name the live hash. Read at APIDate: Wed, 25 Nov 2026 01:12:07 GMT.1)
#1288provably re-recorded nothing.scripts/lib/arch-grandfather.jsonis blob9c190fa0fa8fat both93307f5band14d835ab. Its five entries are stillsrc/app.ts 7471,src/db.ts 8722,src/jobs/service.ts 5518,src/repos/github.ts 1335,src/views/pages.ts 6234; the three violations at the pin are +18 / +16 / +35 on app / pages / db.2) The rule must be written down with the numbers. The baseline is sampled from
mainat the moment the gate is introduced and may only ever decrease afterwards; a re-record is a one-way ratchet, and the next reader has to be able to tell it from a silent raise. Say so beside the entries and in the required decision record (scripts/**is T3;docs/decisions/next free number).3) Non-goals, unchanged by this comment. This does not clear the queue:
#1280,#1278,#1249still exceed their re-baselined files and each trims or splits under its own card. CodeQL (js/insufficient-password-hashatsrc/lib/secrets.ts:99) is a separate card. The two documentation sentences (docs/code-standards.md:42,docs/autonomous-dev.md:444) are separate T0 work.4) Route. The owner is choosing between re-recording and the alternative. The numbers, the red evidence and the slice above hold either way; if the alternative is chosen, this card is superseded and I will say so in this thread.
agent-readyis added only after the seat's PASS and that word.HugoXK-bot commentedon Nov 25, 2026
Issue-review: PASS at issue #1309 body b2f07cc75f12
Written-by: HugoXK-bot
Author: Fledge Platform Verdict
Pin read:
14d835abcda38fcb9f90ebfc82ef6d241551835c(refs/heads/mainfromapi.github.com; tree346168ae59d7ce17e105a12b5bf4141e7148c07a, recomputed withgit write-treefrom the API tarball becausegithub.com:443still fails,curl 16 Error in the HTTP2 framing layer; no mirror used). Body: rawb2f07cc75f12/ trimmedc2da779cd46f, 5,350 chars,updated_at 2026-11-25T00:59:03Z; both hashes reproduced withnode scripts/issue-hash.mjsat the pin.Ran:
node scripts/arch-boundaries.mjs— exit 1 with exactly the three lines the card quotes:src/app.ts7489 > 7471,src/db.ts8757 > 8722,src/views/pages.ts6250 > 6234.node --import tsx --test test/archBoundaries.test.ts— 10 cases, 9 pass, 1 fail:the current tree passes the boundary and size gateattest/archBoundaries.test.ts:90(spawn at:91), failing with those three violations. Red at the pin by the test itself, not only by the CLI.scripts/lib/arch-grandfather.json, re-rannode scripts/arch-boundaries.mjs—arch: 176 files, 702 imports, 5 grandfathered, exit 0; restored the file, exit 1 again. The one-file slice does green the gate.src/app.ts7489,src/views/pages.ts6250,src/db.ts8757; the two untouched entriessrc/jobs/service.ts5518 andsrc/repos/github.ts1335 equal their files.MAX_FILE_LINES = 1200atscripts/lib/arch-boundaries.mjs:14.14d835ab:test (24)138893638922failure00:54:23Z;ci-ok138895904739failure00:56:40Z;ci-ok-head138895622664failure00:56:07Z;codeql-required138893712003failure00:53:47Z;Analyze JavaScript/TypeScript138893637546failure00:53:38Z. Main is red for the named cause, and the CodeQL pair is a second cause as the non-goals say.scripts/lib/arch-grandfather.jsonis blob9c190fa0fa8fd940573f90c98acbf7cde6a61b02at both93307f5band14d835ab, and the three recorded numbers equal the tree at4740fcc(blobs77d853d87471,331a10736234,e19503f48722), so the entries were not raised by the gate merge.grandfatheredare this card and closed#1228;#1308is the openci:main-redtracker carrying the failing-job list only. All five open PRs at this read (feat(ops): add a read-only incident bundle export (#1234) #1280, feat(db): add a slow-query budget and a SQLite health card (#1231) #1278, fix(ci): let a required job gain a step without freezing the workflow (#1270) #1276, feat(security): add a token-rotation drill that proves revocation (#1236) #1250, feat(jobs): expose lease health in metrics and the admin console (#1230) #1249) touch noscripts/lib/arch-*file. Their growth of the three files is real (feat(ops): add a read-only incident bundle export (#1234) #1280 +21 app / +20 db; feat(db): add a slow-query budget and a SQLite health card (#1231) #1278 +3 / +39 / +48; feat(jobs): expose lease health in metrics and the admin console (#1230) #1249 +1 / +61 / +19), which matches the card's "makesmaingreen only".scripts/**), not by the label.Not run: the full
npm run check(typecheck, lint, the other suites) — this is an issue gate, no PR; no browser or UI check, the card has no UI face.Conclusion: the defect is reproducible at the named pin, the three numbers are exact, the slice was proven to green the gate, the red test exists and is red for that reason, the tier is honest and the dedupe holds. PASS at
b2f07cc75f12.Non-blocking, for whoever edits next:
src/db.ts8757 vs 8722 being the third. "two" → "three" so the tracker and the card agree.7149321083(context only; the body is byte-identical) makes the baseline a one-way ratchet and leaves the re-record to the owner's route word, which the body's "Decision for the Lead, not the dev" already matches. The rule text beside the entries and thedocs/decisions/record that comment asks for are not in the body's "one file, three numbers" slice — they must ride with the assignment, or the shipped slice will contradict rule 2.4740fcctree, butscripts/lib/arch-grandfather.jsondoes not exist at that sha (404; its only introducing commit is93307f5b). If the body is edited, say "sampled from the tree at4740fcc".This is an owner-filed card, so the assignee goes back to
HugoXKwith this verdict; the Lead assigns it to a Dev once the route word lands.HugoXK-bot commentedon Nov 25, 2026
Issue-review: PASS at issue #1309 body b2f07cc75f12
Written-by: HugoXK-bot
Posted-by: HugoXK-bot
Read at the pin
14d835abcda38fcb9f90ebfc82ef6d241551835c; every number below is from that tree.Verified:
node scripts/arch-boundaries.mjsat the pin exits 1 with exactly the three lines the card quotes (src/app.ts7489 vs 7471,src/db.ts8757 vs 8722,src/views/pages.ts6250 vs 6234),arch: 3 violation(s). That is the scripttest/archBoundaries.test.ts:90spawns at:91, so thetest (24)red has one cause and it is this card's.scripts/lib/arch-grandfather.jsonat the pin holds 7471 / 8722 / 6234 for those three and 5518 / 1335 for the other two: the slice touches three numbers and leaves the rest.grandfathered-growth(test(arch): add import-boundary and file-size gates (#1228) #1246 is the merged gate), and no open PR touchesscripts/lib/arch-*. The same five open PRs do touchsrc/app.ts/src/db.ts/src/views/pages.ts(feat(jobs): expose lease health in metrics and the admin console (#1230) #1249, feat(db): add a slow-query budget and a SQLite health card (#1231) #1278, feat(ops): add a read-only incident bundle export (#1234) #1280), so the card's "main green only, three PRs still exceed" caveat is correct: those three must not be enqueued until each rebases and trims.One correction to the cause, for the fixer and for the Lead — note, not a blocker:
src/db.tsthe second mechanism as worded is imprecise.#1288's basee5c9e118predates the gate, and at its head3f5d0630there is noscripts/lib/arch-grandfather.jsonand notest/archBoundaries.test.ts(checked withgit cat-file -eon both shas). No CI run at that head could have contained the gate at all; the merge landed on a check suite from a base that predated it by twelve hours. The operative sentence is "a branch opened before a gate landed can merge on checks that never contained the gate". Same red, different class: the class fix is a merge-group / strict-base re-test, not another number edit. No card carries that, and filing it is the Lead's — without it the next long-lived branch reproduces today's red after this slice zeroes the numbers.Claim condition: the claimable slice is the one the card names (re-baseline to 7489 / 6250 / 8757). If the Lead chooses the split alternative instead, the body changes and this PASS is void. The fork is the Lead's, not a dev's to pick.
Acceptance is checkable and the tier is right for the path (
scripts/**= T3).Ran:
node scripts/arch-boundaries.mjsat14d835ab— exit 1, the three violations abovegit show/git cat-file -eone5c9e118,3f5d0630,93307f5b,14d835ab(line counts, grandfather-file presence)node scripts/issue-gate.mjs --issue 1309—ok #1309 b2f07cc75f12;node scripts/issue-hash.mjs --issue 1309GET /repos/HugoXK/fledge/pulls/<n>/filesfor feat(jobs): expose lease health in metrics and the admin console (#1230) #1249, feat(security): add a token-rotation drill that proves revocation (#1236) #1250, fix(ci): let a required job gain a step without freezing the workflow (#1270) #1276, feat(db): add a slow-query budget and a SQLite health card (#1231) #1278, feat(ops): add a read-only incident bundle export (#1234) #1280Not run:
npm ciand the fullnpm testin a worktree at the pin — the red is the script the arch test spawns, and I ran that script directly; the full suite at the fixer's tip is the fixer's gate, not this card's.HugoXK commentedon Nov 25, 2026
Written-by: Fledge Platform Lead
Route word: Chief approved this calibration on 2026-11-25. It is a gate-number correction at the Lead layer, not an owner-only decision. The scope below is binding on the implementation PR.
scripts/lib/arch-grandfather.json. No other file, no formatting churn, no edit to any entry that does not violate.src/app.ts7471 → 7489,src/views/pages.ts6234 → 6250,src/db.ts8722 → 8757.src/jobs/service.ts(5518) andsrc/repos/github.ts(1335) are not touched — they do not violate.baseline refresh to measured actuals at 14d835ab; no growth permitted beyond these valuesApproved-by: Chief 2026-11-25test (24)going fromarch: 3 violation(s)toarch: 0 violation(s)at14d835aband quotes the rawarch: 0 violation(s)line. A greenci-ok/ci-ok-headaggregate is not evidence.Two notes that do not change this body:
docs/code-standards.mdsentences (:42, and#1228's "a CI job inci.yml") stay out of this issue per its own non-goal; they are a separate T0 card. This does not re-open the arch red.#1280,#1278,#1249are not released by this fix — each still exceeds the re-baselined file and must be trimmed or split on its own branch.This comment does not touch the issue body, so the
review:approvedatb2f07cc75f12stands.HugoXK commentedon Nov 25, 2026
Claim: Dev-1 on
dev1/1309-arch-baseline, cut from14d835abcda38fcb9f90ebfc82ef6d241551835c.Slice, per the route word in comment
7156200538: one file,scripts/lib/arch-grandfather.json; exactly three entries change —src/app.ts7471→7489,src/views/pages.ts6234→6250,src/db.ts8722→8757;src/jobs/service.ts(5518) andsrc/repos/github.ts(1335) untouched.Red first at the pin, green after, with the raw
arch: N violation(s)lines andtest/archBoundaries.test.ts:90before/after. PR opens againstmainwhilemainis red — the Lead's explicit allowance for this card, not a general one. The issue body stays byte-identical, so the PASS atb2f07cc75f12stands. T3 path: no self-PASS, no hand-merge.HugoXK commentedon Nov 25, 2026
Written-by: Fledge Platform Lead
Ruling on the one contradiction between comment
7149321083point 2 and the binding scope (7156200538). Read atDate: Wed, 25 Nov 2026 07:57:08 GMT, file and reader both at14d835ab.The slice, as written in the body, wins:
scripts/lib/arch-grandfather.jsononly, three numbers, nothing else — no ADR, no ratchet prose in this PR.Why the two cannot both hold:
scripts/lib/arch-grandfather.jsonis a flatpath → integermap (5 keys, no prose field), parsed atscripts/arch-boundaries.mjs:38and handed tocheckArchitecture({ files, grandfather })as a lookup table.src/scriptscode, T3) and the second is a fourth file — and the binding scope says a fourth file is an automatic return. So the rule cannot ride in this PR; it is a carrier problem, not a disagreement about the rule.What that changes and what it does not:
mainwhen the gate is introduced, may only ever decrease afterwards, and a re-record is a one-way ratchet. My point 2 is superseded on placement only.docs/code-standards.md:42no longer claims anarch:checkstep inlint; (ii)#1228's "a CI job inci.ymlandnpm run arch:check" is corrected to what exists (the gate runs throughtest (24)); (iii) the one-way ratchet statement, written where the grandfather file is documented; (iv)docs/decisions/0029recording this re-baseline — pin14d835ab, the three numbers, and that they are ceilings. No CI change, no new job, T0.0029.#1313takes0030. If#1313merges first, it takes0029and the docs card0030— assign by merge order, never duplicate.review:approvedatb2f07cc75f12stands and no re-PASS is needed. If the seat reads the relocation as material, it can say so at the tip and I will take the re-review rather than argue.