Public: anyone can read this; the crew can change it.
The v1 proof's schedule probe is unproven when no schedule exists, and passes only after one has run #13269
Check · Review · Land · Live done — Landed and live in production.
On a forge with no schedules, the v1 proof's item "no schedule is past its period" (#11595) now reads unproven. Before, overdue: 0 let it pass with nothing to check. It passes only when at least one schedule exists, at least one has a recorded run, and none is overdue.
shipped production is serving it deploy 59903fa
On a forge with no schedules, the v1 proof's item "no schedule is past its period" (#11595) now reads unproven. Before, overdue: 0 let it pass with nothing to check. It passes only when at least one schedule exists, at least one has a recorded run, and none is overdue.
- Health answer (
src/core/timers.ts,overdueSchedules):schedulesgainstotal(unpaused schedules) andran(how many of those have at least one recorded run), next tooverdueandoldestSeconds. Those two are unchanged and not renamed. The new fields are still just counts and name no app or repository. Theranlookup uses the existingtimer_run_appindex. The description in the OpenAPI route (getApiV1Health.ts) says what each field means. - Probe (
src/core/v1_proof.ts):
- It fails when overdue > 0, naming how late the oldest one is, as before.
- It is unproven when total is 0, when no schedule has run yet, or when the forge is too old to send total/ran.
- Otherwise it passes. "Under its period" is checked as overdue === 0: the health answer gives no period, and a schedule counts as overdue once it is more than five minutes past due.
- Tests:
- test/v1-proven.test.ts feeds the probe zero schedules, one fresh schedule that has run, and one overdue schedule, and expects unproven, pass and fail. It also covers a schedule that has never run and a health answer without the new fields. The default "healthy forge" stub now has one schedule that has run, because zero schedules no longer passes.
- test/health-schedules.test.ts checks that total and ran go up when a schedule is set up and when it runs, and its exact matches now include the two new fields.
- The issue expected the tests in test/chapters-v1.test.ts, but the probe's tests live in test/v1-proven.test.ts, so they went there.
gate --fix and tsc are clean. fast.ts said the change was too broad to pick tests from, so I chose them by hand: the health, timers, schedules, OpenAPI/contract and v1/release-proof suites (221 tests) all pass. The forge's check runs the full suite.
To try it, run curl /api/v1/health and read schedules.total and schedules.ran. Then run bun scripts/v1-proven.ts <forge>: on a forge with no schedules, #11595 shows as unproven.
🤖 Generated with Claude Code
The v1 proof's #11595 probe now says unproven when the forge has no schedule, or when none of its schedules has run yet. It passes only when the forge has at least one unpaused schedule with a recorded run and none overdue. To support this, /api/v1/health's schedules gains total (unpaused schedules) and ran (how many have a recorded run), beside overdue and oldestSeconds. It still gives counts only, with no app, repository or schedule name.
- Check fix: in
test/security-floor-paths.test.ts, "bun scripts/v1-proven.ts's proof passes 20 times in a row against a booted forge" failed because its test forge had no schedule. That was correct behaviour, so the test needed fixing, not the probe. The test now gives its forge one app with an hourly schedule and one recorded run before proving, so #11595 has to pass rather than being added to the skip list. - Other red test:
test/looks-owner.test.tstimed out after 90 s on the check while waiting for screenshots. It passes locally (22 of 22, 8 s), and nothing in this diff is used by it, so it looks like load on the check machine. Nothing was changed for it. - Checks run:
bun scripts/gate.ts --fixandbun x tsc --noEmitare clean.test/security-floor-paths.test.ts,test/v1-proven.test.tsandtest/health-schedules.test.tspass (44 of 44).scripts/fast.tsnamed 2271 files for this branch's diff, too many to run here, so I picked those three by hand.
Try it: curl /api/v1/health and read schedules.total and schedules.ran. On a forge with no schedule, bun scripts/v1-proven.ts reports #11595 as unproven.
🤖 Generated with Claude Code
Approved. The preview's /api/v1/health now carries schedules {overdue, oldestSeconds, total, ran} (0/0/0/0 on this empty preview), counts only. The probe is unproven with no schedule, with none run, or on an older forge. It fails when overdue>0 and passes otherwise. Tests cover zero, fresh and overdue, and the 20-run proof test seeds a ran schedule. No README or both-doors issue: it is an API field, not a feature. Next: (1) add a docs/features note on what the health schedules counts mean; (2) the ran subquery counts a run from any time, so a schedule that ran once a year ago still proves; consider requiring a run within its period.
On a forge with no schedules, the v1 proof's item "no schedule is past its period" (#11595) now reads
unproven. Before,overdue: 0let it pass with nothing to check. It passes only when at least one schedule exists, at least one has a recorded run, and none is overdue.src/core/timers.ts,overdueSchedules):schedulesgainstotal(unpaused schedules) andran(how many of those have at least one recorded run), next tooverdueandoldestSeconds. Those two are unchanged and not renamed. The new fields are still just counts and name no app or repository. Theranlookup uses the existingtimer_run_appindex. The description in the OpenAPI route (getApiV1Health.ts) says what each field means.src/core/v1_proof.ts):- It fails when
overdue > 0, naming how late the oldest one is, as before. - It isunprovenwhentotalis 0, when no schedule has run yet, or when the forge is too old to sendtotal/ran. - Otherwise it passes. "Under its period" is checked asoverdue === 0: the health answer gives no period, and a schedule counts as overdue once it is more than five minutes past due.-
test/v1-proven.test.tsfeeds the probe zero schedules, one fresh schedule that has run, and one overdue schedule, and expectsunproven,passandfail. It also covers a schedule that has never run and a health answer without the new fields. The default "healthy forge" stub now has one schedule that has run, because zero schedules no longer passes. -test/health-schedules.test.tschecks thattotalandrango up when a schedule is set up and when it runs, and its exact matches now include the two new fields. - The issue expected the tests intest/chapters-v1.test.ts, but the probe's tests live intest/v1-proven.test.ts, so they went there.gate --fixandtscare clean.fast.tssaid the change was too broad to pick tests from, so I chose them by hand: the health, timers, schedules, OpenAPI/contract and v1/release-proof suites (221 tests) all pass. The forge's check runs the full suite.To try it, run
curl /api/v1/healthand readschedules.totalandschedules.ran. Then runbun scripts/v1-proven.ts <forge>: on a forge with no schedules, #11595 shows as unproven.🤖 Generated with Claude Code
Closes #13252