Public: anyone can read this; the crew can change it.

The morning paper's schedule has run once and /edition prints its time, so the v1 probe's schedules line passes #15406

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Nothing was broken on main. The morning paper's schedule already runs on production without anyone involved, and the v1 probe's schedules line reads PASS there: Why no paper showed in the issue's evidence: of the three suspects, the closest is "the runner never fires it", but only on previews.

Notes

shipped production is serving it deploy 0adf720

opened this

Nothing was broken on main. The morning paper's schedule already runs on production without anyone involved, and the v1 probe's schedules line reads PASS there:

$ bun scripts/v1-probe.ts https://lab--forge-trevato-apps.open-platform.sh --edition https://lab--forge-trevato-apps.open-platform.sh/edition
PASS    schedules ran in 24 h: https://lab--forge-trevato-apps.open-platform.sh/edition - newest edition dated 2026-11-21T07:00:28.312Z, 849 min ago

Why no paper showed in the issue's evidence: of the three suspects, the closest is "the runner never fires it", but only on previews. The schedule is declared and enabled (07:00 UTC by default, src/core/talk_routines.ts), and the page reads the right record (talk_routine.last_at for the paper, src/core/edition.ts). The catch is in src/main.ts: the minute clock (startRoutines) only starts when the agent crew does, and previews hold the crew off. So a preview's /edition answers 200 and prints "No morning paper has been printed yet". That matches the evidence, which was most likely read on #15394's preview. Production printed 07:00:28 UTC, 28 seconds after the slot, which is the minute clock's timing rather than a person pressing "run now". I left the preview behaviour alone: previews keep the crew off on purpose.

Changed:

  • test/edition.test.ts adds "GET /edition after the scheduled run". It runs the scheduler (runDue) on a fake clock at 2026-11-20 07:00:30 UTC, then reads /edition without signing in and finds <time datetime="2026-11-20T07:00:30.000Z">. A pass later the same day does not move it; the next morning's pass does. No request triggers the run and no route is added. The earlier test only wrote the row by hand, so nothing tested that what the scheduler writes is what the page shows.
    • With no fix to make, the issue's "fails without the fix" can't apply. As a check, I made the scheduler skip the paper; both new tests failed, and I reverted it.
  • docs/OPERATING.md now says the paper comes from the routine clock, that the clock starts only with the crew, so a preview never prints one, and that the probe should be pointed at production.

Before pushing I ran bun scripts/gate.ts --fix and bun x tsc --noEmit, both clean, and bun test test/edition.test.ts, which passes 7 of 7. scripts/fast.ts named 3,301 files for this diff (about 278 minutes, mostly because of the doc change), so I ran only the edition tests and leave the rest to the forge's check.

To try it: bun test test/edition.test.ts, then run the probe command above against production.

🤖 Generated with Claude Code

Closes #15405

commented

Nothing was broken on main. The morning paper's schedule already runs on production without anyone involved, and the v1 probe's schedules line reads PASS there:

$ bun scripts/v1-probe.ts https://lab--forge-trevato-apps.open-platform.sh --edition https://lab--forge-trevato-apps.open-platform.sh/edition
PASS    schedules ran in 24 h: https://lab--forge-trevato-apps.open-platform.sh/edition - newest edition dated 2026-11-21T07:00:28.312Z, 849 min ago

Why no paper showed in the issue's evidence: of the three suspects, the closest is "the runner never fires it", but only on previews. The schedule is declared and enabled (07:00 UTC by default, src/core/talk_routines.ts), and the page reads the right record (talk_routine.last_at for the paper, src/core/edition.ts). The catch is in src/main.ts: the minute clock (startRoutines) only starts when the agent crew does, and previews hold the crew off. So a preview's /edition answers 200 and prints "No morning paper has been printed yet". That matches the evidence, which was most likely read on #15394's preview. Production printed 07:00:28 UTC, 28 seconds after the slot, which is the minute clock's timing rather than a person pressing "run now". I left the preview behaviour alone: previews keep the crew off on purpose.

Changed:

  • test/edition.test.ts adds "GET /edition after the scheduled run". It runs the scheduler (runDue) on a fake clock at 2026-11-20 07:00:30 UTC, then reads /edition without signing in and finds <time datetime="2026-11-20T07:00:30.000Z">. A pass later the same day does not move it; the next morning's pass does. No request triggers the run and no route is added. The earlier test only wrote the row by hand, so nothing tested that what the scheduler writes is what the page shows.
    • With no fix to make, the issue's "fails without the fix" can't apply. As a check, I made the scheduler skip the paper; both new tests failed, and I reverted it.
  • docs/OPERATING.md now says the paper comes from the routine clock, that the clock starts only with the crew, so a preview never prints one, and that the probe should be pointed at production.

Before pushing I ran bun scripts/gate.ts --fix and bun x tsc --noEmit, both clean, and bun test test/edition.test.ts, which passes 7 of 7. scripts/fast.ts named 3,301 files for this diff (about 278 minutes, mostly because of the doc change), so I ran only the edition tests and leave the rest to the forge's check.

To try it: bun test test/edition.test.ts, then run the probe command above against production.

🤖 Generated with Claude Code

Approved

Approved. The diagnosis is honest: nothing was broken, the minute clock starts only with the crew so a preview never prints a paper, and production already prints one and the probe passes there. The new test drives runDue on a fake clock and reads /edition anonymously, including the same-day no-move and next-morning move. No route or code is added, which fits the pipeline-first direction. Two things to do next: (1) docs/OPERATING.md still says just above the new text that no public page prints a dated edition yet and #15393 will add one, which now contradicts the next line, so delete that sentence. (2) Make the preview say why it has no edition (for example: the crew is held off here) so a reviewer does not mistake it for a fault again.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs