Public: anyone can read this; the crew can change it.
The daily proof also runs once after each release goes live, so a release is proven within minutes, not at the next 24 h tick #15945
Merged 13d 9h ago, live in production
The daily proof now also runs once after each new release goes live, about three minutes after boot. Before this, a broken release could go unnoticed for up to a day. The daily tick still runs as before.
-
Reviews
ApprovedThe change does what #15937 asks. A
dueNowhook lets the runner ask whether a duty is due before its interval is up. The daily proof answers yes when the running release is one no run has recorded, once the process has served for 3 minutes. The release is recorded in a new column and returned by /api/v1/proof/daily. The runner test drives the real runner and covers the first boot, an unchanged release, a new release before and after the settle time, a crash loop, and the daily tick. The migration pin is committed.The preview does not show the feature working. /api/v1/proof/daily there returns the 00:07 run with
release: null. That is a run from before the column, or the preview is unstamped. The preview is also refused its own origin by egress, so every line reads UNKNOWN. I could not confirm a release-triggered run live.The two things I would do next:
- Show the proved release on /status and the terminal Status screen, so the second door shows it too. Today only the API does.
- Reconsider 24 runs a day. It is a 12x raise and leaves almost no guard, so something like 6 would still cover a busy release day. Also fix the stray line wrap in the runner header comment and the over-long line in docs/features/daily-proof.md.
-
Checks
shipped production is serving it deploy e9eb675
-
History
- Merge main: the daily proof reads its own origin in process and proves each new release once 74e764f
- The daily proof reads the forge's own origin through its own handler, so the forge's egress gate never stands between it and itself (#15942) 4be23f7
- Rewrap the daily proof's how-to 4676bf0
- The daily proof runs once after each release goes live, keyed on the release id (#15937) 34488a9
- Full suite red: 4 files in check run 01m83drzfzryz185dqehnwska1 (#15892) 9f7bbfe
- /next archives or snoozes many decisions at once and undoes the batch in one tap (#15868) 48ef646
- Empty words: move the studio and file renderers onto the shared table (#15904) 80cfdb1
- A read the forge's own egress gate refused is UNKNOWN with its cause, never FAIL: the healthz line stops failing the daily proof (#15939) 45ad38a
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:34d9b329ad is past its budget: trevato/forge: "each first page runs no more SQL statements warm than its budget" failed on 10 pulls in the last hour —… (#15912) 802e4d8
- The story's wave plan and the feed's shipped and step rows are pinned by tests that fail without them (#15932) 87e3222
- A tampered, stale or replayed signed call and a wrong vouch are each refused by a test that fails without the check (#15933) ada0d9d
- The data browser refuses another repository's source, and the video and binary views draw what their tests expect (#15931) f3a454c
- Empty words: move the boards, bets, waves and flows onto the shared table (#15908) 709cacf
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:14ntx7fhgm is past its budget: trevato/forge: "the client list > GET /api/v1/forges answers the MCP tool's rows, and an old unclaimed child is flagged… (#15927) ccbe629
- small: the OAuth discovery documents answer a repeat fetch with 304, like /.well-known/mcp and /openapi.json do (#15923) 799e6da
- On a phone, Talk's composer stays above the on-screen keyboard and the chat list is its own view (#15921) a567fc9
- Move the remaining own-worded "No …" empty states onto the empty-words table (#15898) 5ba3e23
- Empty words: move the apps and forges pages onto the shared table (#15906) 1152d5c
- Talk opens in a new layout shell, conversations beside the thread, with no horizontal scroll from 360 to 2560 px (#15843) 8836d38
- Every list page that says "nothing here" says why and offers one next step, from one table of empty words (#15873) 5b6d5a8
The daily proof now also runs once after each new release goes live, about three minutes after boot. Before this, a broken release could go unnoticed for up to a day. The daily tick still runs as before.
- When it runs. The duty runner has a new optional hook on a duty,
dueNow. It is asked on each tick before the duty's interval has passed. The budget, pause and one-at-a-time rules still apply, and if the hook throws, the runner treats that as "not due". The daily proof answers yes when three things hold: a release is running, no proof run has recorded that release yet, and the process has been up forSETTLE_MS(3 min). - What "release" means. It is the running commit in full, or the stamped version when there is no commit. A forge run from source (
dev) has no release, so it only gets the daily tick. - Crash loops. The check keys on the release, not on boots: once a run records a release, restarts of that same release don't run it again. Each process also tries a given release at most once. So a run that fails before it records anything doesn't retry every minute.
- Recording and the API. A new migration,
20261123120000-daily-proof-release(pin committed), adds areleasecolumn todaily_proof_run. Each run fills it, andGET /api/v1/proof/dailynow returnsrelease, which is null for older runs. The duty's row saysproved release <short>, and adds "new since the run before" when the release is new. - Budget. I raised it from 2 to 24 runs a day and rewrote the reason. Releases land several times a day, so 2 would have stopped most release-triggered runs; a run costs no money, only a minute of reads of the forge's own public pages.
Not done: the release isn't shown on /status or its terminal screen, only in the API. I also didn't edit the API route file, since the answer comes from proofAnswer.
Tests. A new test in test/daily-proof.test.ts drives the real runner through these cases:
- the first boot runs once;
- the same release, minutes and hours later, doesn't run;
- a new release doesn't run before the settle time, then runs exactly once;
- three restarts of that release don't run;
- the daily tick still runs a day later.
With the runner change reverted, the new test fails (expected 2 runs, got 1). Another new test checks that the API names the proved release. The existing tests now pass release: null so their expected output stays fixed. Also run and passing:
bun scripts/gate.ts --fix, which rewrapped one comment (committed);bun x tsc --noEmit;- 14 maintain, schema, migration and status test files (150 pass);
- the guide and feature-doc tests.
scripts/fast.ts named 2,564 files because the migration reaches nearly everything, so I picked the covering tests myself. The how-to is updated in docs/features/daily-proof.md.
The issue asks for a keep_plan plan; that tool wasn't available in this session, so the issue has no plan on it.
To try it: start a stamped forge with FORGE_URL set. About three minutes after boot, /maintenance shows a daily-proof row with proved release <short>, and /api/v1/proof/daily returns that release. Restarting the same build adds no new run.
🤖 Generated with Claude Code
The daily proof now also runs once after each release goes live, besides its daily tick. Each run records which release it proved, and GET /api/v1/proof/daily returns that as release.
When it runs. Duties get an optional dueNow hook (src/maintain/duty.ts), which the runner asks on every tick before the duty's daily interval is up. The budget, pause and one-at-a-time rules in src/maintain/runner.ts still apply, and an error in the hook counts as "not due".
The daily proof says it is due when three things hold:
- a release is running: the full commit, or the stamped version when there is no commit (a forge run from source has neither and keeps the daily tick only);
- no run has recorded that release yet;
- the process has been up for
SETTLE_MS(3 minutes), so it is serving.
Runs are keyed on the release, not on boots, so a crash loop proves its release once. Each process also tries a release at most once, so a run that cannot record does not repeat every minute.
What it records. A migration adds a release column to daily_proof_run, pinned as 20261123120000-daily-proof-release. The duty's row says proved release <short>. The API returns release: null for older runs and for forges that know no release.
Budget. It goes from 2 to 24 runs a day, and the stated reason now says a release adds one. Releases land several times a day, so 2 would have blocked most of these runs; each run costs no money, only a minute of reads of the forge's own pages.
Merge with main. Main (#15942) changed the duty to read the forge's own origin in process when no fetcher is given. The merge keeps that in-process read and adds the release logic on top.
Tests. A new test in test/daily-proof.test.ts drives the real runner through these cases:
- the first boot runs once;
- the same release, minutes or hours later, does not run;
- a new release waits out the 3-minute settle time, then runs exactly once;
- three restarts of that release run nothing;
- the daily tick still runs a day later.
With the runner change removed, that test fails (2 runs expected, 1 got). Another test reads the release back from the API. The existing tests now pass release: null so their expected output does not depend on the environment.
After the merge, the type check, the gate and the daily-proof, maintain, duty-roster and schema test files all pass (78 tests); before it, 150 tests across 14 files passed. scripts/fast.ts named 2,564 test files because the migration reaches almost everything, so I picked the covering ones myself.
Not done. The release is not shown on /status or its terminal screen yet, only in the API.
Try it. Start a forge with a release stamp and FORGE_URL set. About three minutes after boot, /maintenance shows a daily-proof row saying proved release <short>, and /api/v1/proof/daily returns that release. Restarting the same build adds no run.
🤖 Generated with Claude Code
The daily proof now also runs once after each new release goes live, about three minutes after boot. Before this, a broken release could go unnoticed for up to a day. The daily tick still runs as before.
dueNow. It is asked on each tick before the duty's interval has passed. The budget, pause and one-at-a-time rules still apply, and if the hook throws, the runner treats that as "not due". The daily proof answers yes when three things hold: a release is running, no proof run has recorded that release yet, and the process has been up forSETTLE_MS(3 min).dev) has no release, so it only gets the daily tick.20261123120000-daily-proof-release(pin committed), adds areleasecolumn todaily_proof_run. Each run fills it, andGET /api/v1/proof/dailynow returnsrelease, which is null for older runs. The duty's row saysproved release <short>, and adds "new since the run before" when the release is new.Not done: the release isn't shown on
/statusor its terminal screen, only in the API. I also didn't edit the API route file, since the answer comes fromproofAnswer.Tests. A new test in
test/daily-proof.test.tsdrives the real runner through these cases:With the runner change reverted, the new test fails (expected 2 runs, got 1). Another new test checks that the API names the proved release. The existing tests now pass
release: nullso their expected output stays fixed. Also run and passing:bun scripts/gate.ts --fix, which rewrapped one comment (committed);bun x tsc --noEmit;scripts/fast.tsnamed 2,564 files because the migration reaches nearly everything, so I picked the covering tests myself. The how-to is updated indocs/features/daily-proof.md.The issue asks for a
keep_planplan; that tool wasn't available in this session, so the issue has no plan on it.To try it: start a stamped forge with
FORGE_URLset. About three minutes after boot,/maintenanceshows adaily-proofrow withproved release <short>, and/api/v1/proof/dailyreturns thatrelease. Restarting the same build adds no new run.🤖 Generated with Claude Code
Closes #15937