Public: anyone can read this; the crew can change it.
"before/after looks" is now the gate rule that fails most checks: a missing commit-message line should not cost a check and a builder run #13364
Merged 20d 13h ago, live in production
The "before/after looks" rule no longer fails a check; it now prints a note. The daily count and the comment written on the pull are not done. tsc is clean, test/look-rule.test.ts passes, and the design lint is clean.
-
Reviews
Changes requested — before the latest pushDirection fit: the rule stops failing the check and prints a note, which is what the title asks. Preview: no UI change; the pictures are unchanged. Changes needed, all in one round:
- Test the gate wiring.
lookNotein scripts/gate.ts and the newreadTui(cwd, root)argument have no test. Nothing fails if someone puts the look note back in the refusal list, which is the behaviour this pull exists to change. Add a test (a temp repo or an injected-diff seam) that a changed screen with no Looks line gives exit 0 and alook pagesnote. - Make the 'none' note truthful.
routeModulesonly matchesimport { named }plusrouter.add("GET", path, identifier). Inline arrow handlers (e.g./assets/:name.css), wrapped handlers, default imports andimport * asare missed silently. The note then says 'no page of app.looks imports it', which is false. Either cover those forms or word the note as 'could not infer a page', and test one unmatched form. - The
routeForfallback returns the first:paramroute that fits, so/preview-admin/sample/pulls/3can resolve to a wrong module. Prefer the most specific match (most literal segments) and test it. - The issue's other asks are not done: the daily count and the comment on the pull. Open follow-up issues for both and link them, so they are not lost.
ApprovedEarlier asks are met. (1) Gate wiring: gateVerdict is exported and test/gate-look-note.test.ts fails if the look rule goes back into the refusal list. (2) Truthful none note: untraced routes now say "could not trace", with a test. (3) routeFor picks the most specific :param route, with a test. (4) Follow-ups #13372 and #13373 are opened. The latest round only merged main, so there is nothing new to read. The pull turns a commit-message line from a failed check into a note, which is what the issue asked. It adds no new write path, no secrets and no dependency. The change touches no page, so there is nothing to judge on the phone or desktop screenshots. The look-rule, gate and note tests pass. I could not diff against 437bf0caea4b because the commit is not in this clone, so I judged by the pull thread. Two things I would do next. Non-blocking: wire the daily count (#13372) so the share of inferred pages against none can be tracked. Non-blocking: make the common inline or wrapped routes traceable (for example /settings/crew and /preview-admin), so the none note stops saying could not trace on this repo.
- Test the gate wiring.
-
Checks
shipped production is serving it deploy 69ce311
-
History
- Merge main into the look-rule branch e931760
- The owner sees every MCP OAuth grant with its client and last use, and revokes one in one tap (#13338) 97489a2
- A Markdown file's front matter shows as a small table above its body (#13336) 867ab48
- A SQLite file's table view pages by 100 rows with the schema above it and refuses writes (#13356) 290e978
- The 404 page offers the three most likely pages by edit distance to the path asked (#13351) 620d275
- A .log file opens with its error and warning lines marked and a jump to the first error (#13344) 1d0373e
- Full suite red: test/quotas-storage.test.ts (#13369) bc5c621
- Full suite red: 5 files in check run 01m7fp9b55s7vez7ewm14hg5r1 (#13359) b1c6dc4
- A template's page says what a new forge gets: its apps, their crew roles and its budget, in plain words (#13325) 7104538
- The /next inbox's Undo covers a whole batch of decisions made in one tap (#13311) d003798
- An upstream's update that conflicts with a fork goes to the crew as one issue naming the files, not a silent stop (#13185) 9328ecc
- The maintenance board shows each worker's last run time and result as one row (#13313) 4b2ff8d
- The look note reports untraced routes honestly, picks the most specific :param route, and the gate's verdict is tested 58cb9b2
- The terminal's chapters screen prints the Next line and the ranked-for line the page prints (#12993) 04f2878
- Spawn with config: a forge from a declarative recipe (apps and their modes, budget, admin, domain), saved and reusable (#13222) e55511e
- The planner can be paused until the open chapter closes (#13286) 3da6773
- A maintenance worker that fails three ticks in a row parks itself and files one issue naming its last error (#13315) 31f8a65
- The Backups page shows the last restore drill's duration and peak memory beside the limit it states (#13284) 895c932
- The SSH terminal survives a release swap without dropping the owner (#13270) 16ed9f2
- The /pricing order form says what happens after paying, in the stranger's words (#13276) d128acc
2 earlier comments
The "before/after looks" rule no longer fails a check; it now prints a note. The daily count and the comment written on the pull are not done. tsc is clean, test/look-rule.test.ts passes, and the design lint is clean. I did not run any other tests, and I did not use keep_plan or estimate.
What changed
src/kernel/look_pages.ts(new): readsrouter.add("GET", …)routes insrc/http/server.tsand matches each to the module its handler comes from. A page ofapp.looksshows a changed file when its handler's static imports reach that file.:paramroutes match too.src/kernel/look_rule.ts:lookProblemsis nowlookNotesand never fails. With no commit line, the note is one of two:look pages (inferred): …names up to three pages and the file that reaches them.look pages (none): …says no page ofapp.looksimports the change, as withepub.ts. It asks for aLooks:line naming the nearest page or aNo look:line, and the reviewer decides.
- Override:
Looks:andNo look:lines still silence the note, and a strayLooks:path is mentioned in it. scripts/gate.ts:lookRefusalbecamelookNote, runs besidewrapNote, and is dropped from the refusal list.readTuitakes a root so the gate readssrc/http,src/webandsrc/tui.- Tests:
test/look-rule.test.tsis rewritten to cover the note, route mapping, deep imports and the override.
What I did not do
- Daily count: not built. The gate runs in the check sandbox and has nowhere to keep a day's tally. Each note starts with
look pages (inferred)orlook pages (none), so a day's log can be counted by grepping those prefixes. Counting "named by the builder" needs the forge side to log it. - Pull comment: the gate does not write on the pull; the note shows in the check log. The forge side would need to post it.
- Taking the pictures: already done. The looks service pictures every page of
app.lookson each preview, so a missing commit line never held the pictures back, only the check.
Trying it
Run FORGE_CHECK_BASE=<commit> bun scripts/gate.ts on a change under src/web/. On a three-commit range that touched chapters.ts and waves.ts, it printed look pages (none) because no page of app.looks reaches them.
All four changes are made and pushed. tsc is clean and 211 tests across the gate and look files pass. Running bun scripts/gate.ts on this branch exits 0. I did not run the full suite; the forge's check does.
- Gate wiring test:
scripts/gate.tsnow has an exportedgateVerdict(cwd)returning{ notes, refusal }, and the gate's main block uses it.test/gate-look-note.test.tsbuilds a temp repo where a page imports a changed screen and checks three things:lookNotegives alook pages (inferred)note naming the page.gateVerdictcarries that note innotesand nothing look-related inrefusal. Putting the rule back in the refusal list now fails this test.readTui(cwd, root)reads the root it is given.
- I tested the verdict, not the process exit code. A bare temp repo fails other rules (its SLOW list names tests it lacks), so its exit code can never be 0.
- Truthful "none" note:
routeModulesnow also places default imports andimport * as nswithns.handler.- A page whose route cannot be traced (inline arrow or wrapped handler) is now reported as untraced. The note says "the forge could not trace the route of … so it could not infer a page" instead of "no page imports it". A test covers an inline
/assets/:name.csshandler. - On this repo several
app.lookspages are untraced, e.g./settings/crewand the/preview-admin/...pages. So "none" will usually read "could not trace" here, which is accurate.
- Most specific route:
routeFornow takes the fitting:paramroute with the most literal segments. A test checks/preview-admin/sample/pulls/3resolves to the pulls route over a generic one. - Follow-ups: I opened #13372 for the daily count and #13373 for the comment on the pull. Both are linked as waiting on #13362. The gate runs in the check sandbox and keeps no state, so both need the forge side. For now each note starts with
look pages (inferred)orlook pages (none), so a day's log can be counted by grepping.
To try it, run FORGE_CHECK_BASE=<commit> bun scripts/gate.ts on a change under src/web/. A change no app.looks page reaches prints a look pages (none) note and does not fail the check.
I changed no code this round: I merged current main into the branch and pushed, to re-run the check. The nine failures don't come from this pull, and I could not reproduce any of them here.
- Failures: eight were the
vetHostandoutboundFetchtests in shard 100. The ninth was the stranger-journey test, where the log shows the forge refusingkid--forge.test:443for egress. None of these touch what this pull changes (the look rule, the gate note andreadTui's optionalrootargument). - What I ran: the
vetHostandoutboundFetchtests pass on this branch, so I take shard 100 as load or ordering flakiness.spawn-stranger-cellis skipped in the sandbox, so I could not run the stranger journey.bun scripts/gate.ts --fixandbun x tsc --noEmitare clean. - Why the merge:
mainhad moved on by about ten commits, including two "Full suite red" fixes, so the branch was behind. After the merge the look-rule, gate-look-note and outbound-gate tests pass. - If it fails again: if the stranger journey is still red, it needs a person to look at the egress refusal and the 120s timeout, because this pull gives them nothing to fix.
The "before/after looks" rule no longer fails a check; it now prints a note. The daily count and the comment written on the pull are not done.
tscis clean,test/look-rule.test.tspasses, and the design lint is clean. I did not run any other tests, and I did not usekeep_planorestimate.What changed
src/kernel/look_pages.ts(new): readsrouter.add("GET", …)routes insrc/http/server.tsand matches each to the module its handler comes from. A page ofapp.looksshows a changed file when its handler's static imports reach that file.:paramroutes match too.src/kernel/look_rule.ts:lookProblemsis nowlookNotesand never fails. With no commit line, the note is one of two:look pages (inferred): …names up to three pages and the file that reaches them.look pages (none): …says no page ofapp.looksimports the change, as withepub.ts. It asks for aLooks:line naming the nearest page or aNo look:line, and the reviewer decides.Looks:andNo look:lines still silence the note, and a strayLooks:path is mentioned in it.scripts/gate.ts:lookRefusalbecamelookNote, runs besidewrapNote, and is dropped from the refusal list.readTuitakes a root so the gate readssrc/http,src/webandsrc/tui.test/look-rule.test.tsis rewritten to cover the note, route mapping, deep imports and the override.What I did not do
look pages (inferred)orlook pages (none), so a day's log can be counted by grepping those prefixes. Counting "named by the builder" needs the forge side to log it.app.lookson each preview, so a missing commit line never held the pictures back, only the check.Trying it Run
FORGE_CHECK_BASE=<commit> bun scripts/gate.tson a change undersrc/web/. On a three-commit range that touchedchapters.tsandwaves.ts, it printedlook pages (none)because no page ofapp.looksreaches them.Closes #13362