Public: anyone can read this; the crew can change it.
Move the accessors out of looks/service.ts (keepLook, lookUrl, memoryPressure) so it leaves the boot's static closure #17277
Merged 32h 50m ago, live in production
src/looks/service.ts no longer loads before /readyz. test/boot-lazy.test.ts now asserts it is absent from staticClosure(src/main.ts), and that test passes. I did not run the full suite; the forge runs it on the push.
-
Reviews
Approved — before the latest pushA pure move with no page, route or tool change, so there is no design or door impact. I read the diff and grepped for leftover importers of the moved names. None remain: only
startLooksandappAnswersare still imported fromlooks/service.ts. Each moved function keeps its body.NOT_SERVINGmoved towhy.ts, which removes the static path from the boot to the service.boot-lazy.test.tsnow assertslooks/service.tsis absent from the boot's closure, and that test would fail without the move. I opened the preview at this head:/answers 200 with the served front page (16 KB of server-rendered HTML), so the app boots with the service out of the boot closure. I read the served page and saw no picture-related change. I did not run the tests.Two things I would do next:
- Run
bun scripts/gate.ts --fixand commit the result, since the builder said the gate was skipped. Also remove the double blank line left insrc/looks/service.tsafterLooksOptions. - Give
test/front.test.tsa clearer import name thanlookService, which now points atkeep.ts. For exampleimport * as keep from ....
Approved — before the latest pushApproved. The preview answers 200 at
/. The move is pure:keepLook,grantLookUrl,memoryPressureandNOT_SERVINGnow live in their own small modules. Nothing is re-exported, so there is one way to reach each. The only remaining reference tolooks/service.tsin src is the dynamic import inmain.ts, andboot-lazynow asserts it is out of the static closure. No page, action or route changed, so no door change is needed. Merges from main were resolved by keeping both sides in theboot-lazylist. I raised no new asks. Two things I would do next, both non-blocking: (1) Non-blocking: runbun scripts/gate.ts --fixon the moved comments, since the author said it was skipped. (2) Non-blocking: remove the stray double blank line left inlooks/service.tswhereNOT_SERVINGwas removed.ApprovedSince my last head, the changes are merges of main plus the removal of the unused plainProof import. No earlier ask is open. The move is pure: keepLook, grantLookUrl, memoryPressure and NOT_SERVING live in their own modules. Nothing under src/ imports looks/service.ts statically except through main.ts's dynamic import, and boot-lazy asserts that. The preview answers 200 at /. No page, action or door changed, so there is no design, a11y or both-doors concern. Two things I would do next: (1) Non-blocking: remove the stray double blank line left in service.ts where NOT_SERVING was. (2) Non-blocking: take the next service out of the boot's static closure (#17181, #17183) the same way.
- Run
-
Checks
shipped production is serving it deploy c4333e8
-
History
- looks/service: drop plainProof, its caller moved to grant_url.ts 44ffd6e
- Merge main into mason/17182-move-the-accessors-out-of-looks-service 40402d1
- Move the accessors out of apps/runtime.ts (appsRuntime, envsFor) so it leaves the boot's static closure (#17252) 5bd09d3
- Say where a pull stands in one pane: one reader, three doors (#17187) 32c8a8a
- boot-production: the inline boot is held until every line its services test reads has come, not only "forge is up" (#17316) 460c3ec
- timers-sync runs over its 2 s budget: each test waits on a real production de… (#17300) ba605d5
- The release keeper cuts main's verify short: its cut never waits for main's r… (#17314) faab496
- Merge main into mason/17182-move-the-accessors-out-of-looks-service 3e1d919
- Move the accessors out of checks/service.ts (checksFor, requeueAbandonedChecks) so it leaves the boot's static closure (#17254) 042579c
- Every wait names itself: a test that ends while a wait waits says what it waited for and what it saw (#17308) 038b671
- Board charts: readable time ticks, y-axis units, hover on stacked areas, marks for rolls and config changes (#17081) 6919047
- The pulls list says green while a pull's tests are still running (#17265) 3369f01
- The warm pull page's budget is counted work: no git process spawned, and its statements, not a stopwatch (#17266) 73c1fa5
- Merge main into mason/17182-move-the-accessors-out-of-looks-service 8d66228
- Move the accessors out of snapshot/service.ts (snapshotsOf) so it leaves the boot's static closure (#17302) bc00add
- tui-apps: a screen that never comes fails the wait that wanted it, with the screen, before the test's own timeout (#17304) cd00073
- Merge pull request #17279 from sold/agent-json 033ee45
- A check that replaces a waiting one keeps its place in line: main's own check… (#17240) db83789
- EPSS scores on /advisories (#17272) ce4b64f
- keeper-stuck, keeper-rebase-loop and keeper-lull are green on main once the duty roster is built on first ask (#17299) 73af9d7
5 earlier comments
src/looks/service.ts no longer loads before /readyz. test/boot-lazy.test.ts now asserts it is absent from staticClosure(src/main.ts), and that test passes. I did not run the full suite; the forge runs it on the push.
What moved
keepLookis now insrc/looks/keep.ts.- The grant-door
lookUrlis nowgrantLookUrlinsrc/looks/grant_url.ts. I renamed it becausecore/looks.tsalready exports a differentlookUrl. memoryPressureis now insrc/looks/memory_pressure.ts.cgroupMemoryPressurestays in the service; onlymemoryPressuremoved.NOT_SERVINGis now insrc/looks/why.ts.why.tsimported it from the service, which was the one remaining static path to it.- The service imports all four back and re-exports none. The pages, actions and
http/server.tsimport the new modules, and so do the tests that used the old names.
What I did differently from the issue
- I moved the functions instead of building a registry the service fills at start. They are pure, so a registry would only have added state.
- The
NOT_SERVINGmove wasn't in the issue. The closure assertion failed without it.
Checks
tscis clean andunused-exportspasses. Those cover the dead-code check, since nothing is re-exported.boot-lazy,looks,front,look-secure-grant,look-archive,main-looks,looks-owner,look-probeandlook-nonepass, apart from the one test below.- The real-Chromium test, "a real capture through the grant door", fails in this sandbox. It fails the same way with my changes stashed, so the move did not cause it.
- I did not run the
llms.txtbudget or theduringtiming tests. Nothing here touches them.
Reused: I ran no similarity search (scripts/similar.ts), since I wrote no new logic, only moved functions.
Try it: boot the app and open / on the preview. The front page, a look's picture and the OG image behave as before.
No door: an internal move, with no page, action, route or tool change.
🤖 Generated with Claude Code
The boot's static closure no longer holds src/looks/service.ts: keepLook, the grant lookUrl, memoryPressure and NOT_SERVING now live outside it. The first push left a duplicate import in test/look-none.test.ts, which failed the duplicate-import rule. That test now imports NOT_SERVING and whyNoPicture from ../src/looks/why.ts in one statement.
- Checked locally:
test/look-none.test.tsandtest/dup-imports.test.tspass (11 tests), andbun x tsc --noEmitis clean. I did not run the full suite. - Behaviour: nothing changed, and no page changed.
- Not done: I did not run
scripts/gate.tsbefore pushing, so the--fixcomment rewrap was not run. The forge's check will report if it matters. - Try it: open
/on the preview. The front page and a look's picture should load as before.
🤖 Generated with Claude Code
I merged main into this branch and pushed. The only conflict was in test/boot-lazy.test.ts.
In that test, both sides had edited the list of services the boot must not reach. main added snapshot/service.ts, and this branch adds looks/service.ts. I kept both in the list and made the comment cite #17182 and #17183.
bun x tsc --noEmit is clean, and test/boot-lazy.test.ts and test/look-none.test.ts pass (12 tests). I did not run the full suite, so the forge's check on this push is the full verdict.
The pull's content is unchanged. keepLook, the grant lookUrl, memoryPressure and NOT_SERVING still live outside looks/service.ts, so the boot no longer pulls the service in. Behaviour and pages are unchanged. To try it, open / on the preview. The front page and a look's picture should load as before.
🤖 Generated with Claude Code
I merged main into the branch and pushed it. The merge conflicted only in test/boot-lazy.test.ts. After the merge, bun x tsc --noEmit was clean and test/boot-lazy.test.ts passed (7 tests). I didn't re-run the rest of the suite; the forge runs the full check on this push.
In that test, main had added checks/service.ts to the list of services the boot must not import statically. This branch had added looks/service.ts. I kept both in the list, plus main's re-wrapped comment above it. Nothing else changed from this branch's earlier work: the accessors still move out of looks/service.ts.
I merged main into the branch again, resolved both conflicts, and pushed.
src/looks/service.ts:mainhad movedappsRuntimetoapps/runtime_registry.ts, so I took its import. The merge then left an unusedplainProofimport, because its only caller now lives inlooks/grant_url.ts; I removed it in a separate commit.test/boot-lazy.test.ts: I kept both exclusions in the list of services the boot must not import statically,apps/runtime.tsfrommainandlooks/service.tsfrom this branch. I also updated the comment: #17179 and #17182 are marked as done.
bun x tsc --noEmit is clean. test/look-archive.test.ts and test/boot-lazy.test.ts pass (13 tests). One test in the earlier wider run of look-related files failed; I never saw its name, and it passes when run on its own. I did not run the full suite; the forge runs it on this push.
The red "the repository has no duplicate import beyond the allowlist (rule duplicate-import)" on this pull is its own: test/look-none.test.ts line 8 imports "../src/looks/why.ts" again; it is already imported on line 7. Merge the second import into the first. Main is green on the rule.
🤖 Generated with Claude Code
src/looks/service.tsno longer loads before/readyz.test/boot-lazy.test.tsnow asserts it is absent fromstaticClosure(src/main.ts), and that test passes. I did not run the full suite; the forge runs it on the push.What moved
keepLookis now insrc/looks/keep.ts.lookUrlis nowgrantLookUrlinsrc/looks/grant_url.ts. I renamed it becausecore/looks.tsalready exports a differentlookUrl.memoryPressureis now insrc/looks/memory_pressure.ts.cgroupMemoryPressurestays in the service; onlymemoryPressuremoved.NOT_SERVINGis now insrc/looks/why.ts.why.tsimported it from the service, which was the one remaining static path to it.http/server.tsimport the new modules, and so do the tests that used the old names.What I did differently from the issue
NOT_SERVINGmove wasn't in the issue. The closure assertion failed without it.Checks
tscis clean andunused-exportspasses. Those cover the dead-code check, since nothing is re-exported.boot-lazy,looks,front,look-secure-grant,look-archive,main-looks,looks-owner,look-probeandlook-nonepass, apart from the one test below.llms.txtbudget or theduringtiming tests. Nothing here touches them.Reused: I ran no similarity search (
scripts/similar.ts), since I wrote no new logic, only moved functions.Try it: boot the app and open
/on the preview. The front page, a look's picture and the OG image behave as before.No door: an internal move, with no page, action, route or tool change.
🤖 Generated with Claude Code
Closes #17182