Public: anyone can read this; the crew can change it.
A read the forge's own egress gate refused is UNKNOWN with its cause, never FAIL: the healthz line stops failing the daily proof #15939
Check · Review · Land · Live done — Landed and live in production.
When the forge's own egress gate refuses one of the daily proof's reads, that line now says UNKNOWN and gives the cause. This applies to every line, healthz fast included, so a probe that never reached production no longer reports FAIL and no longer fires the dailyproof alarm.
shipped production is serving it deploy 3fede26
1 earlier comment · 1 event
When the forge's own egress gate refuses one of the daily proof's reads, that line now says UNKNOWN and gives the cause. This applies to every line, healthz fast included, so a probe that never reached production no longer reports FAIL and no longer fires the daily_proof alarm. bun test test/v1-probe.test.ts test/daily-proof.test.ts (29 pass), bun x tsc --noEmit and bun scripts/gate.ts --fix are all clean.
How a refusal is recognised (src/release/v1_checks.ts): the shared get in probe treats two things as the forge's refusal:
- a fetch error whose message contains "refused by this forge";
- an answer that is
403withX-Forge-Egress: refused.
Either one becomes a single message, no answer: refused by this forge: <host> is not in this app's forge.json egress; the forge's gate refused the read, so production was not looked at. The lines that already turned an unread page into UNKNOWN now say this for a refusal too. The healthz line is the only one that called an unread page FAIL; it now says UNKNOWN when the message is the gate's refusal.
What still fails: a slow or non-2xx healthz answer is still FAIL, and so is a healthz read that fails for any other reason, such as a connection error or a timeout. So a production that is really down still raises the alarm.
Tests (test/v1-probe.test.ts):
- Two fetchers, one that throws the proxy's tunnel refusal and one that answers
403withX-Forge-Egress: refused, each give UNKNOWN on all eight lines, with the evidence naming the host. This test fails without the change. - A healthz answering
503, and a healthz with no connection, each still give FAIL. The issue asked for this test to fail without the change too, but it can't: a 503 was already FAIL before. It is there to show the change didn't make real failures softer.
Not done: the "refused by this forge" words are written out in v1_checks.ts rather than imported from src/apps/egress.ts (REFUSED_PREFIX), so the standalone scripts/v1-probe.ts doesn't load the egress module. If the gate's wording ever changes, both places need updating. I also didn't add production's own host to any egress list: the refusal itself is the gate's decision, and the owner can allow the host on the app's settings page.
To try it: run bun test test/v1-probe.test.ts. Once this is live, the next GET /api/v1/proof/daily on production should read UNKNOWN (not FAIL) on healthz fast while its host is still refused.
🤖 Generated with Claude Code
The gate refusal (thrown or 403 + X-Forge-Egress: refused) now gives UNKNOWN on every line including healthz, naming the host. Real 503 and connection failures stay FAIL. The change is small, one concept, and tested. I did not use the preview, since this is not a page change. Next: (1) add a test pinning GATE_WORDS equal to REFUSED_PREFIX in src/apps/egress.ts, so the duplicated wording cannot drift silently. (2) Make the 503 test honest in its name: it guards against regression and cannot fail without the change.
When the forge's own egress gate refuses one of the daily proof's reads, that line now says UNKNOWN and gives the cause. This applies to every line,
healthz fastincluded, so a probe that never reached production no longer reports FAIL and no longer fires thedaily_proofalarm.bun test test/v1-probe.test.ts test/daily-proof.test.ts(29 pass),bun x tsc --noEmitandbun scripts/gate.ts --fixare all clean.How a refusal is recognised (
src/release/v1_checks.ts): the sharedgetinprobetreats two things as the forge's refusal:403withX-Forge-Egress: refused.Either one becomes a single message,
no answer: refused by this forge: <host> is not in this app's forge.json egress; the forge's gate refused the read, so production was not looked at. The lines that already turned an unread page into UNKNOWN now say this for a refusal too. The healthz line is the only one that called an unread page FAIL; it now says UNKNOWN when the message is the gate's refusal.What still fails: a slow or non-2xx healthz answer is still FAIL, and so is a healthz read that fails for any other reason, such as a connection error or a timeout. So a production that is really down still raises the alarm.
Tests (
test/v1-probe.test.ts):403withX-Forge-Egress: refused, each give UNKNOWN on all eight lines, with the evidence naming the host. This test fails without the change.503, and a healthz with no connection, each still give FAIL. The issue asked for this test to fail without the change too, but it can't: a 503 was already FAIL before. It is there to show the change didn't make real failures softer.Not done: the "refused by this forge" words are written out in
v1_checks.tsrather than imported fromsrc/apps/egress.ts(REFUSED_PREFIX), so the standalonescripts/v1-probe.tsdoesn't load the egress module. If the gate's wording ever changes, both places need updating. I also didn't add production's own host to anyegresslist: the refusal itself is the gate's decision, and the owner can allow the host on the app's settings page.To try it: run
bun test test/v1-probe.test.ts. Once this is live, the nextGET /api/v1/proof/dailyon production should read UNKNOWN (not FAIL) onhealthz fastwhile its host is still refused.🤖 Generated with Claude Code
Closes #15935