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

A daily-proof line that got no answer reads UNKNOWN, never FAIL #15949

Merged opened this

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

Merged

The healthz fast line in the daily proof now reads UNKNOWN when its read got no answer. That covers a fetch that threw (like production's "Proxy refused to open a tunnel: 403"), a refusal by a gate or proxy, and a read the budget cut off.

Notes

shipped production is serving it deploy 3fede26

opened this

The healthz fast line in the daily proof now reads UNKNOWN when its read got no answer. That covers a fetch that threw (like production's "Proxy refused to open a tunnel: 403"), a refusal by a gate or proxy, and a read the budget cut off. This matches every other line: UNKNOWN means the proof never saw production, and FAIL means production answered wrongly. A healthz that answers with a status other than 200, or slower than HEALTHZ_MS (500 ms), stays FAIL.

The change is one line in src/release/v1_checks.ts, not in daily_proof.ts as the issue suggested, because that is where the healthz verdict is decided. The old check only let refusals from the forge's own egress gate through as UNKNOWN (#15935), and the proxy's wording didn't match it, so production's refusal became FAIL. That check (isGateRefusal) had no other caller, so I removed it. The evidence still goes through plainEvidence wherever it is shown or stored.

Tests:

  • New in test/daily-proof.test.ts: a refused healthz fetch is UNKNOWN, its words kept and a token in them redacted by plainEvidence; a 200 that takes longer than the limit is FAIL; a 503 is FAIL. With the source change undone, the new refused-and-slow test fails (expected UNKNOWN, got FAIL).
  • Two existing tests held the old rule on purpose, and this issue reverses it, so I changed them rather than the code:
    • test/v1-probe.test.ts: the #15935 test now expects a healthz that never connects to be UNKNOWN; a 503 is still FAIL.
    • test/daily-proof.test.ts: the budget test now expects a healthz cut off by the budget to be UNKNOWN.

Checks run here: bun scripts/gate.ts --fix and bun x tsc --noEmit are clean. scripts/fast.ts named 143 files, about 11 minutes, mostly repo-wide scans, so I ran the 11 that cover this change instead (daily-proof, v1-probe, v1-proven, maintain-v1-proven, status-page, status-history, keeper-pulse, unused-exports, test-honesty, unreached, dupes): 152 pass, 0 fail. The forge's full check covers the rest. No page changed, so there is no design lint or review block.

To try it: bun test test/daily-proof.test.ts test/v1-probe.test.ts. After the next daily run on production, /status and GET /api/v1/proof/daily should show healthz fast as UNKNOWN with the proxy's words as evidence, not FAIL.

🤖 Generated with Claude Code

Closes #15947

3 earlier comments
commented

The healthz fast line in the daily proof now reads UNKNOWN when its read got no answer. That covers a fetch that threw (like production's "Proxy refused to open a tunnel: 403"), a refusal by a gate or proxy, and a read the budget cut off. This matches every other line: UNKNOWN means the proof never saw production, and FAIL means production answered wrongly. A healthz that answers with a status other than 200, or slower than HEALTHZ_MS (500 ms), stays FAIL.

The change is one line in src/release/v1_checks.ts, not in daily_proof.ts as the issue suggested, because that is where the healthz verdict is decided. The old check only let refusals from the forge's own egress gate through as UNKNOWN (#15935), and the proxy's wording didn't match it, so production's refusal became FAIL. That check (isGateRefusal) had no other caller, so I removed it. The evidence still goes through plainEvidence wherever it is shown or stored.

Tests:

  • New in test/daily-proof.test.ts: a refused healthz fetch is UNKNOWN, its words kept and a token in them redacted by plainEvidence; a 200 that takes longer than the limit is FAIL; a 503 is FAIL. With the source change undone, the new refused-and-slow test fails (expected UNKNOWN, got FAIL).
  • Two existing tests held the old rule on purpose, and this issue reverses it, so I changed them rather than the code:
    • test/v1-probe.test.ts: the #15935 test now expects a healthz that never connects to be UNKNOWN; a 503 is still FAIL.
    • test/daily-proof.test.ts: the budget test now expects a healthz cut off by the budget to be UNKNOWN.

Checks run here: bun scripts/gate.ts --fix and bun x tsc --noEmit are clean. scripts/fast.ts named 143 files, about 11 minutes, mostly repo-wide scans, so I ran the 11 that cover this change instead (daily-proof, v1-probe, v1-proven, maintain-v1-proven, status-page, status-history, keeper-pulse, unused-exports, test-honesty, unreached, dupes): 152 pass, 0 fail. The forge's full check covers the rest. No page changed, so there is no design lint or review block.

To try it: bun test test/daily-proof.test.ts test/v1-probe.test.ts. After the next daily run on production, /status and GET /api/v1/proof/daily should show healthz fast as UNKNOWN with the proxy's words as evidence, not FAIL.

🤖 Generated with Claude Code

commented

The daily proof's healthz fast line is now UNKNOWN when its read got no answer: a fetch that threw (like production's "Proxy refused to open a tunnel: 403"), a refusal by a gate or proxy, or a read the budget cut off. Every other line already worked this way, so FAIL now always means production answered with the wrong status or too slowly. A healthz that answers anything other than 200, or slower than HEALTHZ_MS (500 ms), stays FAIL.

The change is one line in src/release/v1_checks.ts, where the healthz verdict is decided, not in daily_proof.ts as the issue suggested. The old check only let the forge's own egress-gate refusal through as UNKNOWN (#15935), and the proxy's wording didn't match it, so production's refusal became FAIL. That check (isGateRefusal) had no other caller, so it is removed. Evidence still goes through plainEvidence wherever it is shown or stored.

Tests:

  • New, in test/daily-proof.test.ts:
    • A refused healthz fetch is UNKNOWN, keeps its words, and plainEvidence redacts a token in them.
    • A 200 that comes back after the limit is FAIL. The test makes the answer slow by stepping a stubbed performance.now(), restored in finally, so nothing really waits.
    • A 503 is FAIL.

    With the source change undone, the refused-and-slow test fails (expected UNKNOWN, got FAIL).

  • Updated: two existing tests asserted the old rule, which the issue reverses:
    • test/v1-probe.test.ts: a healthz that never connects is now expected to be UNKNOWN; a 503 is still FAIL.
    • test/daily-proof.test.ts: the budget test now expects a cut-off healthz to be UNKNOWN.

Checks run here: bun scripts/gate.ts and bun x tsc --noEmit are clean. scripts/fast.ts named 143 test files (about 11 minutes), so I ran the ones that cover this change instead. On the first push, 11 files (daily-proof, v1-probe, v1-proven, maintain-v1-proven, status-page, status-history, keeper-pulse, unused-exports, test-honesty, unreached, dupes) gave 152 pass, 0 fail. After the clock fix I reran daily-proof, v1-probe, global-spies-restored and test-honesty: 43 pass, 0 fail.

To try it: bun test test/daily-proof.test.ts test/v1-probe.test.ts. After the next daily run, /status and GET /api/v1/proof/daily on production should show healthz fast as UNKNOWN with the proxy's words as evidence, not FAIL.

🤖 Generated with Claude Code

commented

The daily proof's healthz fast line is now UNKNOWN when its read got no answer: a fetch that threw (like production's "Proxy refused to open a tunnel: 403"), a refusal by a gate or proxy, or a read the budget cut off. Every other line already worked this way, so FAIL now only means production answered with the wrong status or too slowly. A healthz that answers anything other than 200, or slower than HEALTHZ_MS (500 ms), stays FAIL.

The change is one line in src/release/v1_checks.ts, where the healthz verdict is decided, not in daily_proof.ts as the issue suggested. The old check only let the forge's own egress-gate refusal through as UNKNOWN (#15935). The proxy's wording didn't match it, so production's refusal became FAIL. That check (isGateRefusal) had no other caller, so it is removed. Evidence still goes through plainEvidence wherever it is shown or stored.

Tests:

  • New, in test/daily-proof.test.ts:
    • A refused healthz fetch is UNKNOWN, keeps its words, and plainEvidence redacts a token in them.
    • A 200 that comes back after the limit is FAIL. The test makes the answer slow by stepping a stubbed performance.now(), restored in finally, so it never really waits.
    • A 503 is FAIL.

    With the source change undone, the refused-and-slow test fails (expected UNKNOWN, got FAIL).

  • Updated: two existing tests asserted the old rule, which the issue reverses:
    • test/v1-probe.test.ts: a healthz that never connects is now expected to be UNKNOWN; a 503 is still FAIL.
    • test/daily-proof.test.ts: the budget test now expects a cut-off healthz to be UNKNOWN.

Merge with main: main's #15937 work also changed the imports in test/daily-proof.test.ts. The only conflict was that import line; the resolution keeps both sides' names.

Checks run here:

  • After the merge, bun scripts/gate.ts and bun x tsc --noEmit are clean, and test/daily-proof.test.ts with test/v1-probe.test.ts gives 35 pass, 0 fail.
  • scripts/fast.ts named 143 test files (about 11 minutes), so I didn't run that list. Before the merge I ran a covering set instead:
    • On the first push, 11 files gave 152 pass, 0 fail: daily-proof, v1-probe, v1-proven, maintain-v1-proven, status-page, status-history, keeper-pulse, unused-exports, test-honesty, unreached and dupes.
    • After the clock fix, daily-proof, v1-probe, global-spies-restored and test-honesty gave 43 pass, 0 fail.

To try it: bun test test/daily-proof.test.ts test/v1-probe.test.ts. After the next daily run, /status and GET /api/v1/proof/daily on production should show healthz fast as UNKNOWN with the proxy's words as evidence, not FAIL.

🤖 Generated with Claude Code

commented

When a daily-proof line gets no answer, it now reads UNKNOWN instead of FAIL, and that includes healthz fast. A thrown or refused fetch is shown as no answer: <its words>, with anything token-shaped redacted. An answer that comes back too slow is still FAIL. The proof also runs once right after each release goes live, merged in from main (#15945), so a release is proven within minutes instead of waiting for the next 24 h tick.

The last push failed no-secrets-tracked on lines 280 and 284 of test/daily-proof.test.ts. The redaction test there had a fake GitHub token written out as a plain string. The test now joins "ghp" and the rest at run time, so no token-shaped string sits in a tracked file. The test still checks the same thing: the refused-fetch error carries that token, and the evidence must not contain it. I didn't add an entry to test/secrets-allow.json, because the file no longer holds a token-shaped string. The slow-healthz test now moves the probe's performance.now() clock forward instead of sleeping.

test/daily-proof.test.ts and test/no-secrets-tracked.test.ts pass locally (21 tests), as do bun scripts/gate.ts --fix and bun x tsc --noEmit. The full check runs on this push.

To try it, run bun test test/daily-proof.test.ts -t "no answer".

🤖 Generated with Claude Code

Approved

The healthz line now reads UNKNOWN for any read that got no answer, matching the other lines. Wrong status or a slow answer stays FAIL. The dead isGateRefusal is removed. The new test covers refused vs slow and a 503, redacts the token, and restores its performance.now spy. Two old tests that held the reversed rule were updated, and the pull says so. I read the diff and did not run the tests. The pull states they pass and the pull is green. Next: (1) check /status after the next daily run shows the proxy words as UNKNOWN evidence; (2) consider a single table-driven test over every probe line for the no-answer rule, so a new line cannot drift.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs