fix(forge): make the chain's first-run and recovery checks tell the truth #764

Merged
binjovi-bot merged 1 commit from fix/forge-chain-drill into trunk 2026-09-14 19:21:45 +00:00
Owner

What

Follow-up to #762 from the first live run of the chain.

  • Drill, first run: sean/forge-drill has no cluster origin, so Binjovi's hop-2 mirror create fails closed (denied) at boot and heals 30 min later. The drill now asks Binjovi to create it at once (binjovictl service create forgejo/packettown/forge-drill/mirrors/kript --expected-revision N — measured: mirror present one second later) when the CLI has the service verb, otherwise waits for the heal (MIRROR_WAIT default 2400 s). Binjovi still writes the mirror; the drill never does.
  • Clone from the snapshot path names the branch. Binjovi creates destinations with default branch trunk, the mirror pushes main, Forgejo moves its DB default to main, and the on-disk HEAD still says trunk — a plain clone checked out nothing. Drill: --branch main; guard: origin/main^{tree} before HEAD.
  • Guard vs hourly cadence: a repository newer than the newest snapshot is reported as not-yet-covered (with the snapshot name) instead of failing; a repository older than the newest snapshot and absent from it still fails.
  • README: measured facts (9–13 s delivery through both hops, 1 s RTO, Argo's no-retry of a failed revision → binjovi v0.1.741, denied-then-heal, first-use token refusal).

Verified

  • make forge-restore-drill: DRILL PASSED — retention, delivery code.packet.town -> code.kri.pt in ~13 s through Binjovi's mirror, destroy + restore from rpool/forge/data@auto-… with identical refs, clean fsck, canary byte-for-byte from a clone of the snapshot path, Forgejo serving the restored repository; RTO 1 s.
  • make test-forge-packet-town, make test-forge-kri-pt: PASS.
  • bash tests/check.sh: CHECK EXIT=0 (109 guards).

https://claude.ai/code/session_01XdBRc9CHgFhAxCyHbdVtt6

## What Follow-up to #762 from the first live run of the chain. - **Drill, first run:** `sean/forge-drill` has no cluster origin, so Binjovi's hop-2 mirror create fails closed (`denied`) at boot and heals 30 min later. The drill now asks Binjovi to create it at once (`binjovictl service create forgejo/packettown/forge-drill/mirrors/kript --expected-revision N` — measured: mirror present one second later) when the CLI has the `service` verb, otherwise waits for the heal (`MIRROR_WAIT` default 2400 s). Binjovi still writes the mirror; the drill never does. - **Clone from the snapshot path names the branch.** Binjovi creates destinations with default branch `trunk`, the mirror pushes `main`, Forgejo moves its DB default to `main`, and the on-disk HEAD still says `trunk` — a plain clone checked out nothing. Drill: `--branch main`; guard: `origin/main^{tree}` before HEAD. - **Guard vs hourly cadence:** a repository newer than the newest snapshot is reported as not-yet-covered (with the snapshot name) instead of failing; a repository older than the newest snapshot and absent from it still fails. - README: measured facts (9–13 s delivery through both hops, 1 s RTO, Argo's no-retry of a failed revision → binjovi v0.1.741, denied-then-heal, first-use token refusal). ## Verified - `make forge-restore-drill`: **DRILL PASSED** — retention, delivery `code.packet.town -> code.kri.pt` in ~13 s through Binjovi's mirror, destroy + restore from `rpool/forge/data@auto-…` with identical refs, clean `fsck`, canary byte-for-byte from a clone of the snapshot path, Forgejo serving the restored repository; RTO 1 s. - `make test-forge-packet-town`, `make test-forge-kri-pt`: PASS. - `bash tests/check.sh`: `CHECK EXIT=0` (109 guards). https://claude.ai/code/session_01XdBRc9CHgFhAxCyHbdVtt6
fix(forge): make the chain's first-run and recovery checks tell the truth
All checks were successful
binjovi/ci Binjovi completed the frozen plan
a11f77766a
Three things the first live run of the chain taught, all measured today.

1. The drill's standing lane, sean/forge-drill, has no cluster origin, so its
   hop-2 mirror is declared by Binjovi at boot before the packet.town
   repository exists. That create fails closed (`denied`) and Binjovi heals it
   thirty minutes later. The drill waited 600 s and gave up. Now it asks
   Binjovi to create the mirror at once when a binjovictl with the `service`
   verb is present (`binjovictl service create
   forgejo/packettown/forge-drill/mirrors/kript --expected-revision N`;
   measured: the mirror existed one second later), and otherwise waits long
   enough for the heal (MIRROR_WAIT default 2400 s). Nothing in the drill
   writes a mirror itself; Binjovi still does.

2. A bare repository's HEAD is Forgejo metadata. Binjovi creates destination
   repositories with default branch `trunk`, the mirror pushes `main`, Forgejo
   moves its database default to `main`, and the on-disk HEAD still says
   `trunk`. A plain clone from the snapshot path therefore checked out
   nothing and the drill reported CANARY='nothing'. The drill clones
   `--branch main`; the guard verifies `origin/main^{tree}` before HEAD.

3. A repository that arrived after the newest hourly snapshot is not in it
   yet. The guard reported that as "recovery without Forgejo does not work".
   It now names the snapshot and says not-yet-covered, and fails only when a
   repository OLDER than the newest snapshot is missing from it.

Measured and recorded in the README: 9-13 s delivery through both
Binjovi-configured hops, 1 s to restore one repository from the snapshot
path, Argo CD's refusal to auto-sync a failed revision (fixed in binjovi
v0.1.741), the denied-then-heal behaviour of a push-mirror create whose
source is absent, and a freshly minted token being refused on first use.

The drill passes end to end; both guards pass; tests/check.sh is green.

Claude-Session: https://claude.ai/code/session_01XdBRc9CHgFhAxCyHbdVtt6
binjovi-bot deleted branch fix/forge-chain-drill 2026-09-14 19:21:45 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sean/seanfarm!764
No description provided.