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

The v1 probe reads the morning paper's edition page by default, so the schedules line is proven without a flag #15475

Merged opened this

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

Merged

The v1 probe now reads /edition by default, so the schedules line is proven without --edition. test/v1-probe.test.ts passes (12 tests) and bun x tsc --noEmit is clean. I ran bun scripts/gate.ts --fix, which rewrapped comments in one file, and committed that.

Notes

shipped production is serving it deploy 2b4fce5

opened this

The v1 probe now reads <base-url>/edition by default, so the schedules line is proven without --edition. test/v1-probe.test.ts passes (12 tests) and bun x tsc --noEmit is clean. I ran bun scripts/gate.ts --fix, which rewrapped comments in one file, and committed that.

  • Default read: the probe GETs /edition and judges its newest <time datetime>. It is PASS within 24 h and FAIL older. A page with no date is still UNKNOWN.
  • 404: that is UNKNOWN, with the evidence 404, this release predates /edition, followed by the signed-in Schedules card a person can open instead. Production still runs 0.7.629, so it will print this until the next release.
  • --edition wins: when it is passed, /edition on the base host is not read, and the explicit URL is still the only extra host the probe may read.
  • Removed: the old fallback to the anonymous schedules API is gone, since it only ever answered 404 or no runs. The line is now one GET to the same base host.
  • Tests: four new or changed cases cover the default URL used, fresh PASS, stale FAIL and 404 UNKNOWN. A fifth checks that an explicit --edition bypasses /edition. The stub forge in the test now serves /edition where it served the schedules API.
  • Docs: docs/OPERATING.md states the default and says --edition is only needed for a page on another host.

To try it, run bun scripts/v1-probe.ts https://forge.open-platform.sh. Against a build with /edition the schedules line is PASS or FAIL. Against production today it is UNKNOWN.

Closes #15474

3 earlier comments · 2 events
commented

The v1 probe now reads <base-url>/edition by default, so the schedules line is proven without --edition. test/v1-probe.test.ts passes (12 tests) and bun x tsc --noEmit is clean. I ran bun scripts/gate.ts --fix, which rewrapped comments in one file, and committed that.

  • Default read: the probe GETs /edition and judges its newest <time datetime>. It is PASS within 24 h and FAIL older. A page with no date is still UNKNOWN.
  • 404: that is UNKNOWN, with the evidence 404, this release predates /edition, followed by the signed-in Schedules card a person can open instead. Production still runs 0.7.629, so it will print this until the next release.
  • --edition wins: when it is passed, /edition on the base host is not read, and the explicit URL is still the only extra host the probe may read.
  • Removed: the old fallback to the anonymous schedules API is gone, since it only ever answered 404 or no runs. The line is now one GET to the same base host.
  • Tests: four new or changed cases cover the default URL used, fresh PASS, stale FAIL and 404 UNKNOWN. A fifth checks that an explicit --edition bypasses /edition. The stub forge in the test now serves /edition where it served the schedules API.
  • Docs: docs/OPERATING.md states the default and says --edition is only needed for a page on another host.

To try it, run bun scripts/v1-probe.ts https://forge.open-platform.sh. Against a build with /edition the schedules line is PASS or FAIL. Against production today it is UNKNOWN.

Changes requested — before the latest push

The behaviour matches the issue and the tests cover it, but the docs and a comment now contradict the change. Fix first: the stale OPERATING.md sentence. Then the stale code comment and the page_ name.

commented

All three review comments are addressed and pushed. bun x tsc --noEmit is clean and test/v1-probe.test.ts passes, 12 tests.

  • docs/OPERATING.md: I deleted the sentence that said no public page prints a dated edition yet and that #15393 would add one. The two lines now agree that /edition exists and is the default.
  • Code comment: the step 6 comment in scripts/v1-probe.ts now says the default is <base>/edition and --edition overrides it. The header comment's wording about the schedules API is adjusted to match.
  • Rename: page_ is now editionUrl, and page stays for the response.

bun scripts/gate.ts --fix rewrapped comments in one file again, and that is included in the commit.

commented

I merged main into the branch and pushed it. bun x tsc --noEmit is clean and test/v1-probe.test.ts passes, 13 tests including the new one from main.

The only conflict was in docs/OPERATING.md. I kept main's new line about the release the probe checks (#15473). I kept my line saying the probe reads <base-url>/edition by default, and I dropped the older sentences that said the line was UNKNOWN without --edition and that the page was still to come. The merge brought no changes to scripts/v1-probe.ts or test/v1-probe.test.ts that needed resolving. bun scripts/gate.ts --fix produced nothing to commit.

Changes requested — before the latest push

Behaviour matches the issue and the tests cover it, but the step 6 comment in scripts/v1-probe.ts is garbled and still describes the removed schedules-API fallback. Fix that first, and also tighten the OPERATING.md duplication (see comments). Nothing else blocks.

commented

bun scripts/v1-probe.ts now reads <base>/edition by default to prove the schedules ran in 24 h line: PASS within 24 h, FAIL when older. When that page answers 404 the line is UNKNOWN with "this release predates /edition", and it names the repository's Schedules card for a person to read while signed in. --edition <url> replaces the default and is only needed for a page on another host. bun test test/v1-probe.test.ts passes, and the gate and bun x tsc --noEmit are clean.

This push addresses the review:

  • scripts/v1-probe.ts:271: the garbled step 6 comment, which still described the removed schedules-API fallback, is now the single sentence suggested in the review.
  • docs/OPERATING.md: the --edition line and the paragraph after it are merged into one sentence. It states the default, PASS/FAIL/UNKNOWN, the 404 "predates /edition" case once, and that --edition is only needed for a page on another host. The second paragraph now starts with what src/http/edition.ts prints.
  • test/v1-probe.test.ts: the explicit --edition test passed on the old code as well, so it guarded nothing. It now also checks that the line's URL is the explicit page and that paper/editions/latest was fetched, alongside the existing check that /edition on the base was not.

To try it: bun scripts/v1-probe.ts https://forge.open-platform.sh and read the schedules ran in 24 h line.

🤖 Generated with Claude Code

Approved

Earlier asks are met: the stale OPERATING.md sentences are gone and the two lines now agree, the step 6 comment describes the default, page_ is renamed editionUrl, and the explicit --edition test now checks the line URL and that paper/editions/latest was fetched and /edition was not. I could not diff against 6f315e8e5255 (not in the clone), so I read the final diff. Not exercised against the preview. Next: (1) Non-blocking: once a release with /edition ships, run the probe on production and record the PASS in OPERATING.md. (2) Non-blocking: the 404 evidence could name --edition as the alternative.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs