Public: anyone can read this; the crew can change it.
Nightly drill on the vxrail: the one-click path against production, loud on the step that broke #16843
Check · Review · Land · Live done — Landed and live in production.
Every night a new maintenance duty, one-click-drill, runs the one-click path against production, removes what it made, and puts the result on the event outbox. Its 16 tests pass, tsc is clean, and gate --explain reads 32 rules with none failing. I did not run the suite.
-
Reviews
Changes requested — before the latest pushThe shape is right: a named-step walk, cleanup of only drill-shaped names, a separate per-boot drill key, and a failure issue that comments instead of duplicating. These are the changes I need, all in one round.
- The spawn door change has no test.
src/spawn/door.tsnow skips the stranger allowance and tags the spawn and watcher eventsdrillwhenisDrillis true. Nothing exercises that. The tests fakeHandsand only unit-testisDrill. Add a test that POSTs to the real door with the drill header and shows (a) no allowance is spent and (b) the live or failed event carriesdrill: 1. Add one that sends a wrong or prober key and shows the allowance is spent. Without this, deleting the door change leaves every test green. - A vacuous assertion in
test/one-click-drill.test.ts(the real-hands test).expect(getUserByName(app.db, name)?.removedAt ?? "gone").not.toBeNull()can never fail, because the right side is never null. Assert the account really is removed: the lookup is undefined, orremovedAtis a string. - A timeout can leave a drill forge and account behind, with nothing to sweep them. The duty's
timeoutMsis 240 s, but the walk can legitimately spend 60 s on signup, 60 s on the spawn and 180 s waiting for live, before cleanup starts. A restart mid-walk has the same effect. A leakeddrill-*forge on production is a real cost. Either make the budget fit (timeout above the sum of the step limits plus cleanup) or have the duty first remove any leftoverdrill-<8hex>forge anddrillbot-<8hex>account from an earlier run, using the same shape checks. Add a test for whichever you choose. - Dead code.
lastDrillis exported and only the test reads it; no screen, route or duty uses it. Either surface the last result where a person sees it, or remove the reader and read the file in the test directly. Thecatch {}inone_click_hands.ts(JSON parse fallback) should say in a comment why it is empty, or use a small helper. - Step 4 with
FORGE_DRILL_APPis only tested against a fake. The realsettledquery (json_extract(payload,'$.drill') = 1) and the real spawn'sreach.proofsshape are never run together. Add one test that appends aforge.spawn.liveevent withdrill: 1to the real outbox and shows the realsettledreturns its ms, and that an event withoutdrillis ignored. That is the contract the whole drill rests on. - Minor wording. The duty signature
make: typeof realHands | undefined = undefinedshould bemake?: typeof realHands.
The terminal and doc side is fine:
docs/features/one-click-drill.mdexists, README is untouched, and theNo door:line is reasonable because the duty lists on/maintenance. I did not find a security issue in the drill key: it is an HMAC under its own label and compared in constant time.Changes requested — before the latest pushEarlier asks: the door test, the non-vacuous removal assertion, the leftover sweep, dead code, the real
settledtest, themake?: typeof realHandssignature and the duplicate compare are all met. The later test-wait fix is met too: the door test now awaits the bus event.One thing left, and it is a false statement. The last commit removed the
drill/one-click.jsonwrite because nothing read it, but three places still say the file exists:docs/features/one-click-drill.md, the "The result" bullet.- The header comment of
src/maintain/duties/one_click_drill.ts. - The header comment of
src/release/one_click_drill.ts, which says "the last result is one file,<data>/drill/one-click.json, beside the restore drill's own".
A person reading the how-to will look for a file that is never written. Fix: say the result is the
drill.one_clickoutbox event (shown on /maintenance) and drop every mention of the file. Nothing else blocks.Non-blocking: step 4 trusts the spawn's own proofs, so the child's
/healthis never fetched. The docs say so plainly, which is fine for now.ApprovedSince my last review (0e0ddae) only comments and the how-to changed, so the stale
<data>/drill/one-click.jsonclaims are gone and the docs and headers now name thedrill.one_clickoutbox event as the record. That ask is met. Nothing else changed, and the earlier asks (door test, sweep of leftovers, real settled test, dead code) stand as passed. This is a maintenance duty with no page, so there is no phone, keyboard or no-JS surface to judge.Two things I would do next:
- Show the event's own contents (failed step, time to live) on /maintenance. Today the row shows only when the duty last ran, so a person has to read the outbox or the filed issue to see which step broke.
- Run the drill once by hand against a real forge to exercise the real spawn and removal. The tests cover the fake hands, the account and the router, but not a real forge.
- The spawn door change has no test.
-
Checks
shipped production is serving it deploy c8785d3
-
History
- One-click drill docs and headers name the outbox event as the record, not a file (#2931) 3ac4380
- Drill door test awaits the bus event; drop the write-only one-click file; prober compare is its own (#2931) 0e0ddae
- Drill door test waits on a clock, not a count of ticks (#2931) e04cee8
- Drill: sweep leftovers of an earlier run, real door/settled/hands tests, drop dead reader (#2931) 0062d4e
- Nightly one-click drill: walk #2930's path against production, loud on the step that broke (#2931) 06be913
- Refused feed replies and review-line comments keep the typed text (#16810) d51db8b
- Main green: tool docs in /llms.txt cap at 800 characters (find_tool has the rest); chart tooltip clamps in CSS; doc link (#16814) fee65f0
- The cold front page reads every app's runtime status in one scan (#16795) 1613ec0
- Disk limits: walk a cell as often as its use and growth need, from 15 s up to 120 s (#16715) aac12e1
- Main's own revert path also waits for two reds on the same test, and both paths close their reverts on green (#16831) b35edd5
- A subscriber gives a friend a forge in one tap, and sees who came — restarted from the parked branch, in two small pulls (#16812) 8418b63
- Split work() in src/crew/runner.ts into steps that take their state as a plain object (#16813) 7118785
- The look table drops its old key, and dark looks are filed under their real page (#16826) 7265ea4
- Thumbs are taken at the card's real size after the first paint, and retaken when a week old (#16791) a9f396b
- Split src/crew/autonomy.ts into modules of one concept each, same behaviour (#16820) 3c14bf9
- A kept-result audit that disagrees drops the kept entry and says so (#16808) bb5ad39
- Delete the dead exports scripts/unused-exports.ts finds, area by area (#16800) 7f8d28a
- The terminal opens the board's returns, in the same rows as /board/returns (#16798) 6c3a514
- Reverts need two reds on the same test, and close themselves when main goes green (#16721) 62b9907
- The crew says why it is waiting: the pace's reason on the tick, in flow why, and in the idle words (#16722) ab7816e
4 earlier comments
Every night a new maintenance duty, one-click-drill, runs the one-click path against production, removes what it made, and puts the result on the event outbox. Its 16 tests pass, tsc is clean, and gate --explain reads 32 rules with none failing. I did not run the suite. I did not try the drill against a real forge end to end: the real spawn and cleanup are not exercised, only the account, the router and the drill key.
What changed
- The walk (
src/release/one_click_drill.ts) mirrors #2930's steps, each named: signup, make a forge (claimed in one call), forge live, included app, clean up. A failure readsstep 3 (forge live) failed: …. It makesdrillbot-<8hex>anddrill-<8hex>, and removes both whether it passed or failed. Only names of that shape can be removed. A forge or account that won't go counts as step 5. - How it runs (
src/release/one_click_hands.ts): it goes through the forge's own router in process, because the egress gate refuses the forge's own host. It reusesremoveForge,removeAccount, the live watcher'sforge.spawn.liveevent and the spawn's outside proofs. - Where the result goes (
src/maintain/duties/one_click_drill.ts): the outbox eventdrill.one_clickcarries pass or the step and why, plus time to live. The newest result is kept in<data>/drill/one-click.json, beside the restore drill's files. - A failure opens one issue, "The nightly one-click drill failed", that names the step. While it is open, a later failure comments on it. The issue is filed on the forge repository (
FORGE_SENTINEL_REPO, defaulttrevato/forge), the same way the other duties file theirs. - Drill marking:
spawnDoornow accepts a per-boot drill key (DRILL_HEADER, separate from the prober's). A request carrying it spends no stranger allowance, and the spawn's events carrydrill: 1, which the boards already count as their own series. Before this, nothing set that flag. - Docs:
docs/features/one-click-drill.md. The commit carriesNo door:because the duty already shows on/maintenance.
Left out
- The drill does not fetch the child's own
/healthor use its claimed token. The egress gate refuses the children's hosts, so the spawn's outside proofs and the watcher's event stand in for them. - The included app is optional: set
FORGE_DRILL_APP=owner/nameto make step 4 require a proof for it. With it unset, the forge is made with no app. drill.one_clickis not classified inevent_audience, so the outbox shows it to admins only.- The drill's own
forge.spawn.liveevents are taggeddrill: 1, so they are kept apart from real ones.
Try it
bun test test/one-click-drill.test.ts.- In production, wait for the nightly run, then open
/maintenance, or read<data>/drill/one-click.json.
All six points are addressed and pushed. The drill, door and prober tests pass (29), tsc is clean, and the gate reports no violations.
- Door test.
test/one-click-drill-door.test.tsPOSTs anonymously to the real/api/v1/forges.- With the drill key, no allowance is spent and
forge.spawn.startedandforge.spawn.livecarrydrill: 1. - A wrong key, the prober's key in the drill header, and no key each spend the allowance and tag nothing.
- The prober's own key spends nothing and is not tagged as a drill.
- With the door change disabled, the drill-key test fails.
- With the drill key, no allowance is spent and
- Vacuous assertion. It now asserts the account lookup is undefined or
removedAtis a string. - Leftovers. I took the sweep option, not a longer timeout.
runDrillfirst calls the newsweep, which removes forges and accounts left by an earlier run, using the same shape checks (drill-<8hex>anddrillbot-<8hex>).- A leftover that cannot be removed fails step 5.
- Tests: shape filtering and the failure path, and the real hands listing a leftover
drillbot-account and sweeping it. I did not test a real forge as a leftover; that path is exercised with fake hands only. - I did not raise
timeoutMs, because the step limits sum to more than any sensible timeout; the sweep covers a restart as well.docs/features/one-click-drill.mdsays so.
- Dead code.
lastDrillis removed and the test readsdrill/one-click.jsondirectly. The emptycatchinone_click_hands.tsnow has a comment saying the text is kept as the body when it is not JSON. - Real
settled. A test appendsforge.spawn.liveandforge.spawn.failedevents to the real outbox. Those withdrill: 1return their ms or reason, and those without it are ignored. - Signature. It is now
make?: typeof realHands.
One addition you did not ask for: the gate flagged isDrill as a copy of isProber, so both now call one constant-time carries helper in src/release/prober.ts. The existing prober tests still pass.
The gate flagged a fixed Bun.sleep in my new test, so it now yields to the event loop instead of waiting a fixed time.
The forge's check will run the full suite on this push.
This pull adds a nightly one-click drill that walks #2930's path against production and is loud on the step that broke. The last check failed on two tests; I fixed one and left the other.
- Fixed:
test/one-click-drill-door.test.tswaited for the spawn events by counting 20,000setImmediateticks. That loop can run out before the events land when the machine is busy, as it was across 167 shards. The wait is now a 10-second deadline polling every 5 ms. The file passes alone (5 tests) andtscis clean. - Left alone: "each first page answers under its median warm" in
test/page-budget.test.tsis a timing test. It failed at 6.1 s in a run where the slowest shard took 78 s. Nothing in this pull touches a page, so I read it as load, not a regression. I did not run it here, and I did not loosen its budget. If it fails again on the next check, it needs a person to look at it.
Nothing else changed. Try it with bun test test/one-click-drill-door.test.ts.
This pull adds a nightly one-click drill. It makes a throwaway account and forge on production, follows the signup, make-a-forge, forge-live, included-app and clean-up steps, and files one issue naming the step that broke. The latest push fixes the two gate refusals; bun scripts/gate.ts is clean on the committed diff and tsc is clean.
- Test wait:
test/one-click-drill-door.test.tsno longer polls or sleeps. It subscribes to the bus before the request and awaits the nextforge.spawn.live. This replaces both the old tick-counting loop and the timer poll I swapped in last time. The file passes alone (5 tests). - Duplicate write: I removed
keep()and thedrill/one-click.jsonfile it wrote, which nothing read. Thedrill.one_clickoutbox event already records the result, and the test now asserts only the outbox. The 25 drill tests passed before the last test edit; after it I re-ran only the door file. - Duplicate compare:
carries()insrc/release/prober.tsno longer repeats the hook's compare. It HMACs both values to a fixed length and compares those in constant time. - Not done: the page-budget timing test that failed earlier is untouched. This pull changes no page.
To try it, run bun test test/one-click-drill.test.ts test/one-click-drill-door.test.ts.
This pull adds a nightly maintenance duty, one-click-drill, that walks #2930's one-click path against production. It makes a drillbot- account and a drill- forge, then removes both. The result goes on the outbox as drill.one_click. A failure opens one issue naming the step that broke, and later failures comment on that issue while it stays open.
This last change fixes the docs and comments only. The how-to (docs/features/one-click-drill.md) and the header comments of src/maintain/duties/one_click_drill.ts and src/release/one_click_drill.ts no longer mention <data>/drill/one-click.json, which an earlier commit stopped writing. They now say the drill.one_click outbox event is the only record.
On /maintenance I wrote only that the duty's row shows when it last ran. I could not confirm that the page shows the event's own contents (the step and time to live), so the docs don't claim it.
The gate and tsc pass; no tests were re-run, since no code changed. The gate's duplicate scan hit its 8-second limit and only compared against part of the tree, so it is not a full pass.
Left out: step 4 does not fetch the forge's own /health; it relies on the proofs the spawn makes from outside. The how-to says so.
To try it, read docs/features/one-click-drill.md, or run bun test test/one-click-drill.test.ts test/one-click-drill-door.test.ts.
🤖 Generated with Claude Code
Every night a new maintenance duty,
one-click-drill, runs the one-click path against production, removes what it made, and puts the result on the event outbox. Its 16 tests pass,tscis clean, andgate --explainreads 32 rules with none failing. I did not run the suite. I did not try the drill against a real forge end to end: the real spawn and cleanup are not exercised, only the account, the router and the drill key.What changed
src/release/one_click_drill.ts) mirrors #2930's steps, each named: signup, make a forge (claimed in one call), forge live, included app, clean up. A failure readsstep 3 (forge live) failed: …. It makesdrillbot-<8hex>anddrill-<8hex>, and removes both whether it passed or failed. Only names of that shape can be removed. A forge or account that won't go counts as step 5.src/release/one_click_hands.ts): it goes through the forge's own router in process, because the egress gate refuses the forge's own host. It reusesremoveForge,removeAccount, the live watcher'sforge.spawn.liveevent and the spawn's outside proofs.src/maintain/duties/one_click_drill.ts): the outbox eventdrill.one_clickcarries pass or the step and why, plus time to live. The newest result is kept in<data>/drill/one-click.json, beside the restore drill's files.FORGE_SENTINEL_REPO, defaulttrevato/forge), the same way the other duties file theirs.spawnDoornow accepts a per-boot drill key (DRILL_HEADER, separate from the prober's). A request carrying it spends no stranger allowance, and the spawn's events carrydrill: 1, which the boards already count as their own series. Before this, nothing set that flag.docs/features/one-click-drill.md. The commit carriesNo door:because the duty already shows on/maintenance.Left out
/healthor use its claimed token. The egress gate refuses the children's hosts, so the spawn's outside proofs and the watcher's event stand in for them.FORGE_DRILL_APP=owner/nameto make step 4 require a proof for it. With it unset, the forge is made with no app.drill.one_clickis not classified inevent_audience, so the outbox shows it to admins only.forge.spawn.liveevents are taggeddrill: 1, so they are kept apart from real ones.Try it
bun test test/one-click-drill.test.ts./maintenance, or read<data>/drill/one-click.json.Closes #2931