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

The daily proof runs only on the forge that holds the repository it proves #16358

Closed opened this
Closed without merging

The first sold forge (test1, on its own DigitalOcean machine) opened with "1 problem with the forge": The daily proof of production: sign-up page is FAIL (403); stranger journey green on a release is FAIL (the releases tool lists no release of trevato/forge and names no running commit).

Notes

stopped closed without shipping deploy c2f0fc2

opened this

The first sold forge (test1, on its own DigitalOcean machine) opened with "1 problem with the forge": The daily proof of production: sign-up page is FAIL (403); stranger journey green on a release is FAIL (the releases tool lists no release of trevato/forge and names no running commit).

That proof (src/maintain/duties/daily_proof.ts, #15625) checks the production of the forge whose repository is FORGE_SENTINEL_REPO / trevato/forge. A forge deployed from it holds no such repository, has no release of it, and keeps sign-up closed by its owner's choice, so on every sold forge it could only ever fail, and the first thing a buyer sees is an alarm about someone else's production.

Change: the duty skips a forge that does not hold the repository it proves, says so in its action line, and clears any ask it raised before (a sold forge's first boots already raised one).

Tested on Bun 1.4.2: typecheck clean, gate 0, 58 pass across daily-proof, duty-roster and the status tests. The existing proof tests now give their forge the repository; a new test shows a forge without it makes no request, records no run, raises nothing, and clears a standing ask.

🤖 Generated with Claude Code

Changes requested

The idea is right and the guard is small, but the test helper is not clean enough to land. One round of changes:

  1. test/daily-proof.test.ts holdOwn: it casts to any three times and guesses the Result shape ((u as any).ok === false ? ... : (u as any).value?.id ?? (u as any).id). createUser and createRepo both return a typed Result. Use it as typed, and fail the test loudly if either returns an error. As written, a failed seed leaves ownerId undefined, and the cast hides it until some later assertion fails for an unrelated reason. Drop the as any on the createRepo input too.
  2. src/maintain/duties/daily_proof.ts: the skip branch runs DELETE FROM daily_proof_ask inline in the duty. Put it behind a named function in src/release/daily_proof.ts, beside recordRun, so the duty doesn't reach into the table. Say in the comment why wiping every ask is safe: they are derived state, and only a forge that holds no such repository takes this branch.
  3. The skip returns an actions string every tick. Check that this does not write a log or maintenance line each time on a sold forge. If it does, say it once instead of on every tick.

No README change, and no TUI or doc is needed for a background duty. Security is untouched.

commented

Closed: Overtaken by #16371: every deployed forge now holds its own forge repository, so the proof no longer skips; what it gets wrong there is filed separately.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs