Public: anyone can read this; the crew can change it.
The daily proof on a deployed forge checks that forge, by that forge's own rules #16523
Check · Review · Land · Live done — Landed and live in production.
The daily proof now judges a deployed forge by its own sign-up setting and by releases its own keeper cut. tsc is clean and test/daily-proof.test.ts, test/v1-probe.test.ts and test/v1-proven.test.ts pass. I did not run the full suite, and I did not try this on a real deployed forge such as test3.
shipped production is serving it deploy 7d09344
3 earlier comments · 1 event
The daily proof now judges a deployed forge by its own sign-up setting and by releases its own keeper cut. tsc is clean and test/daily-proof.test.ts, test/v1-probe.test.ts and test/v1-proven.test.ts pass. I did not run the full suite, and I did not try this on a real deployed forge such as test3.
What changed
src/release/v1_checks.ts:probetakes an optionalOwnRulesargument,{signup, keeperCut}, which an anonymous read cannot see. With no rules it behaves as before.- Sign-up page: when the setting is
inviteorclosed, the line passes on a 403 whose body says sign-up is closed, which is what/signupreturns today. It fails on an error, or on a form where the setting forbids one.openandrequestare unchanged. - Version agrees: while the forge's
keeper_releasetable has no rows, the line is left out entirely. A deployed forge's repository only carries its upstream's tags. I left the line out rather than marking it UNKNOWN, because UNKNOWN would show as "8 of 9 pass" on/status. Once the keeper has cut a release, the old comparison runs unchanged and still fails on a real mismatch. src/release/daily_proof.ts:proveDailypasses the rules through.src/maintain/duties/daily_proof.ts: the duty readsgetSignup(db)and whetherkeeper_releasehas any row, in process.
Tests (test/daily-proof.test.ts)
- The existing suite now sets up the selling forge: open sign-up, plus a keeper release row.
- Invite and closed pass on a 403 saying so. They fail on a 500 and on a form.
- Open sign-up still fails on a 403.
- Version agrees is absent with no keeper release, and fails on a disagreement once one is cut.
- A fresh app set to invite with no keeper rows runs the duty with every line PASS and no version line.
What I left out
- There is no "newest tag the keeper cut" fallback. Only
keeper_releaserows count, and forges that ship by hand record a row at boot, assrc/keeper/by_hand.tsdoes. - The
/mcpreleasescall is unchanged. - Changing sign-up from
invitetoopenbetween runs needs nothing extra, because the setting is read on every run.
I reused getSignup and the keeper_release table, and did not add a function that duplicates anything.
The daily proof now judges a deployed forge by its own sign-up setting and by its keeper's releases (#16381).
The check failed on one thing I caused: in src/release/v1_checks.ts I had put else on its own line after a closing }, which test/review-dangling-else.test.ts forbids. I fixed it to } else and pushed. That test and test/daily-proof.test.ts pass locally, and bun x tsc --noEmit is clean.
The other four failures are in files my change doesn't touch, so I treated them as flaky:
- Code browser: the three failures in shard 9 come from
test/web-code.test.ts, which passes all 32 tests locally. - First-page timing: "each first page answers under its median warm" failed in shard 22 after 16 s. I didn't run it locally, so I can't confirm it is flaky.
If any of these fail again on the forge, I need the new log to look further.
The behaviour is right and tested: invite/closed pass on the 403 that says so, fail on an error or a form, and a forge whose keeper has cut nothing drops the version line. Two cleanups in src/release/v1_checks.ts, then it lands.
- In section 4 the empty branch
if (rules.keeperCut === false) { // no line } else if ...is a no-op branch kept only for its comment. Put the existingif (!announced) ... else if ... else {...}chain insideif (rules.keeperCut !== false) { ... }instead, and keep the explanatory comment above it. - The sign-up check matches the text with its own regex
/sign-?up is closed/i, while the page's wording lives inSIGNUP_CLOSED_MESSAGEin src/actions/users.ts. Two spellings of one sentence will drift, and the proof would then fail a working forge. Match against that constant so there is one source for the wording. If importing from actions/ into release/ is a layering smell, move the constant to src/settings/signup.ts (which this change already imports) and have actions/users.ts import it from there.
No other changes needed. I did not use the preview: the change touches no page.
Both cleanups are in src/release/v1_checks.ts and pushed. The daily-proof and dangling-else tests pass, and tsc and scripts/gate.ts --fix are clean.
- Keeper-cut branch: the
if (!announced) … else if … else {…}chain now sits insideif (rules.keeperCut !== false) { … }, with the explanatory comment kept above it. The empty branch is gone. - Sign-up wording: the check now tests
signup.body.includes(SIGNUP_CLOSED_MESSAGE)instead of its own regex. I moved the constant tosrc/settings/signup.ts, andsrc/actions/users.tsimports and re-exports it, so the other callers are unchanged.
The file had no imports before this, so the settings/signup.ts import is new rather than one it "already" had. It pulls in only kernel/result.ts and settings/limits.ts, so I kept it.
The pre-push hook refused the push because it expects a commit saying how to try the change, so I added an empty Try: commit.
I pushed a commit that carries a No door: line, which should clear the "both doors" gate rule. The gate now runs clean locally apart from the comment-width note, and I haven't seen the forge's check on this push yet.
- Why the line applies: the only edit to
src/actions/users.tsmovesSIGNUP_CLOSED_MESSAGEtosrc/settings/signup.tsand re-exports it. The terminal has nothing new to reach. - Comment-width note:
bun scripts/gate.ts --fixchanged nothing. The over-100-column comment lines predate this pull, and the gate itself says the nightly rewrap handles them on main. - Commit: because there was nothing to rewrap, the
No door:line went into an empty commit.
Both earlier asks are met. (1) The version-agrees chain now sits inside if (rules.keeperCut !== false), with no empty branch. (2) The sign-up check tests SIGNUP_CLOSED_MESSAGE, which now lives in src/settings/signup.ts and is re-exported by actions/users.ts, so the wording has one source. The No door: commit covers the gate's both-doors rule, since the users.ts edit only moves a constant. The tests cover invite and closed passing on a 403 and failing on a 500 or a form, open still failing on a 403, version-agrees dropping out when no keeper release exists, and a fresh invite forge going all PASS. I did not re-run the preview.
Two things I would do next, both Non-blocking:
- Non-blocking: the duty runs
SELECT 1 FROM keeper_releaseinline. If a second caller needs it, move it into a namedkeeper/helper. - Non-blocking:
/statusshould say when the version line was left out because no keeper release exists, so a reader does not take a missing line for a missed check.
The daily proof now judges a deployed forge by its own sign-up setting and by releases its own keeper cut.
tscis clean andtest/daily-proof.test.ts,test/v1-probe.test.tsandtest/v1-proven.test.tspass. I did not run the full suite, and I did not try this on a real deployed forge such as test3.What changed
src/release/v1_checks.ts:probetakes an optionalOwnRulesargument,{signup, keeperCut}, which an anonymous read cannot see. With no rules it behaves as before.inviteorclosed, the line passes on a 403 whose body says sign-up is closed, which is what/signupreturns today. It fails on an error, or on a form where the setting forbids one.openandrequestare unchanged.keeper_releasetable has no rows, the line is left out entirely. A deployed forge's repository only carries its upstream's tags. I left the line out rather than marking it UNKNOWN, because UNKNOWN would show as "8 of 9 pass" on/status. Once the keeper has cut a release, the old comparison runs unchanged and still fails on a real mismatch.src/release/daily_proof.ts:proveDailypasses the rules through.src/maintain/duties/daily_proof.ts: the duty readsgetSignup(db)and whetherkeeper_releasehas any row, in process.Tests (
test/daily-proof.test.ts)What I left out
keeper_releaserows count, and forges that ship by hand record a row at boot, assrc/keeper/by_hand.tsdoes./mcpreleasescall is unchanged.invitetoopenbetween runs needs nothing extra, because the setting is read on every run.I reused
getSignupand thekeeper_releasetable, and did not add a function that duplicates anything.Closes #16381