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

The v1 probe proves schedules ran in the last 24 hours from a public read, not a 404 on an owner-only route #15390

opened this

Merged 11d 10h ago, live in production

The v1 probe now has --edition : a public page a scheduled app prints, such as the morning paper's latest edition. The probe sends one GET to that URL and takes the newest or Atom on it as the time the schedule last ran. PASS: that date is within 24 h.

Notes

opened this

The v1 probe now has --edition <url>: a public page a scheduled app prints, such as the morning paper's latest edition. The probe sends one GET to that URL and takes the newest <time datetime> or Atom <updated> on it as the time the schedule last ran.

  • PASS: that date is within 24 h.
  • FAIL: it is older.
  • UNKNOWN: the page is not public (anything but a 200), or it carries no date. The line names the URL a person must open.

Without --edition, the probe still tries the schedules API. When that answers 404 to an anonymous read, the line now names the exact page: <base>/<repo> signed in, its Schedules card.

What to look at:

  • Date reading: editionDate in scripts/v1-probe.ts skips stamps more than an hour in the future. A bare date (2026-11-20) counts as the end of that day in UTC, so a daily paper dated today or yesterday passes in any time zone. The cost: a missed print is caught up to about 11 h late.
  • Second host: the probe's request guard allows one host besides the base: GET only, and only the exact --edition URL.

Not done:

  • The default run still prints UNKNOWN on this line. trevato/morning-paper answers 404 to a stranger on the forge, and its own host is outside my sandbox. So I could not confirm that any public app prints a dated edition, and I did not hard-code a URL. If the paper does publish one, run with --edition <that page>. As the issue says, I added no route.
  • Full suite: scripts/fast.ts named 3301 test files for this change because of the docs edit, so I didn't run them. I ran test/v1-probe.test.ts and test/footing.test.ts (which reads docs/OPERATING.md): both pass, along with bun scripts/gate.ts --fix and bun x tsc --noEmit.

Tests: test/v1-probe.test.ts gets a second stub server standing in for the paper's host. It covers PASS, FAIL, UNKNOWN for a 404 and for a page with no date, the UNKNOWN wording without --edition, how dates are read, and argument checks. The send-only-reads test now also checks that the paper's host gets exactly one GET. The file fails against the old script, which has no editionDate.

Try it: bun scripts/v1-probe.ts https://forge.open-platform.sh --edition <the paper's public edition URL>

docs/OPERATING.md documents the option.

🤖 Generated with Claude Code

Closes #15388

2 earlier comments
commented

The v1 probe now has --edition <url>: a public page a scheduled app prints, such as the morning paper's latest edition. The probe sends one GET to that URL and takes the newest <time datetime> or Atom <updated> on it as the time the schedule last ran.

  • PASS: that date is within 24 h.
  • FAIL: it is older.
  • UNKNOWN: the page is not public (anything but a 200), or it carries no date. The line names the URL a person must open.

Without --edition, the probe still tries the schedules API. When that answers 404 to an anonymous read, the line now names the exact page: <base>/<repo> signed in, its Schedules card.

What to look at:

  • Date reading: editionDate in scripts/v1-probe.ts skips stamps more than an hour in the future. A bare date (2026-11-20) counts as the end of that day in UTC, so a daily paper dated today or yesterday passes in any time zone. The cost: a missed print is caught up to about 11 h late.
  • Second host: the probe's request guard allows one host besides the base: GET only, and only the exact --edition URL.

Not done:

  • The default run still prints UNKNOWN on this line. trevato/morning-paper answers 404 to a stranger on the forge, and its own host is outside my sandbox. So I could not confirm that any public app prints a dated edition, and I did not hard-code a URL. If the paper does publish one, run with --edition <that page>. As the issue says, I added no route.
  • Full suite: scripts/fast.ts named 3301 test files for this change because of the docs edit, so I didn't run them. I ran test/v1-probe.test.ts and test/footing.test.ts (which reads docs/OPERATING.md): both pass, along with bun scripts/gate.ts --fix and bun x tsc --noEmit.

Tests: test/v1-probe.test.ts gets a second stub server standing in for the paper's host. It covers PASS, FAIL, UNKNOWN for a 404 and for a page with no date, the UNKNOWN wording without --edition, how dates are read, and argument checks. The send-only-reads test now also checks that the paper's host gets exactly one GET. The file fails against the old script, which has no editionDate.

Try it: bun scripts/v1-probe.ts https://forge.open-platform.sh --edition <the paper's public edition URL>

docs/OPERATING.md documents the option.

🤖 Generated with Claude Code

commented

The v1 probe can now prove schedules ran, using a public printed edition passed with --edition <url>. The probe answers PASS or FAIL by the edition's date. When it can't tell, it answers UNKNOWN and names the page it read. --edition only takes an http(s) URL with no username or password in it.

This push fixes the one red test in the last check, "review rule: write } else, not } and else on separate lines". The argument loop in scripts/v1-probe.ts:71 had the closing } and the next else if on separate lines, and they are now on one line. No behaviour changed. The type check passes, and so do test/review-dangling-else.test.ts and the v1-probe tests.

To try it: bun scripts/v1-probe.ts <base> --edition <url-of-a-printed-edition>.

🤖 Generated with Claude Code

commented

The v1 probe can now prove schedules ran, using a public printed edition passed as --edition <url>. It reads the page's newest <time datetime> or Atom <updated>. PASS means that date is within the last 24 h and FAIL means it is older. UNKNOWN means the page is not public, and the line names the page a person must open. The second host is read with a GET only, matched exactly, and sent no credentials.

This push fixes a bug where a paper dated today was skipped. In editionDate, a date with no time counted as the end of its day (UTC), which put today's date over the one-hour future limit, so yesterday's edition was read as the newest. A bare date now counts once its day has begun, as the end of its day capped at now. A new test checks that a page with both yesterday's and today's dates reads today's, and that tomorrow's date is still ignored. The type check passes, and so do test/v1-probe.test.ts and test/review-dangling-else.test.ts.

No public page prints a dated edition yet, so by default the schedules line still prints UNKNOWN. The morning paper is posted only in the signed-in Captain thread, and the schedules API answers 404 to an anonymous read. I opened #15393 for a public page that prints only the newest print's timestamp. docs/OPERATING.md now says that and names that page as the --edition URL to pass. No route is added here.

To try it: bun scripts/v1-probe.ts https://forge.open-platform.sh --edition <public-edition-url>.

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs