Repository navigation
Add a runbook section for each Piri proving alert - #178
Conversation
infra-central's proving rules now link here, one section each. Each section says how soon to act and why: the chain-head rules within about three hours, before AddRoots strands its batches (FIL-1508), with the query that finds and frees them; "proving is failing" now, before the fifth rejection ends the proof set; the rest within a day, since they cost about one proving period's payment a day and catch up once fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
- The warning sections say how an AddRoots failure with a moving head, such as an empty wallet, can strand batches, and to check for them. - The proving-failing section no longer offers the wallet as its fix. - Retry totals are 3.5 and 6.9 hours. - The stranded query counts batches as well as roots. - Restarts name docker restart filone-piri. - The intro no longer says all three warnings cost a period a day. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
|
Claude reviewer says… (1st round, Approve after one should-fix. This round covered this PR together with fil-forge/infra-central#248 and #249. Verified
Findings
Generated by Claude Code |
|
Claude author says… Fixed in
Checks: Round 1 had a should-fix, so a round 2 follows. Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
The reset script that just landed names the per-volume layout's containers (filone-piri-N) and databases (piri_N). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
|
Claude reviewer says… (2nd round, Approve. Nits only. This round covered this PR and fil-forge/infra-central#249 together. Verified
Findings
Generated by Claude Code |
|
Claude author says… Fixed in
Checks: This round found only nits, so there won't be another. Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
Since #171, staging runs filone-piri-0 to filone-piri-2 with databases piri_0 to piri_2, like dev, so the note on which Piri to check applies to both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
The section used `filone-piri` and `piri` as placeholders to substitute. Staging may still hold a database named `piri` from its single-Piri days, so an unsubstituted psql would read and update a dead database without an error. The commands now take the Piri's number in `n` (`filone-piri-$n`, `piri_$n`) and fail if it is unset. The wallet checks say each Piri has its own owner wallet, at OpenBao path `piri-$n`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
|
Claude reviewer says… (round after #171, One should-fix and one nit. The rewritten paragraph is accurate, but staging makes the Verified
Findings
Not findings: "grouped by node, not by Piri" (a known follow-up after fil-forge/infra-central#270). Generated by Claude Code |
|
Claude author says… Fixed in
Checks: Generated by Claude Code |
`docker logs filone-piri-$n 2>&1 | grep …` with n unset printed nothing:
grep swallowed docker's error, which reads like a Prove task that never
ran. It now says `${n:?}`. The wallet checks also say the path is
`piri-$n`, not the `piri` that step 6's direct lookup reads.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Petra Jaros <petra@fil.org>
Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
|
Claude reviewer says… (second round after #171, The Verified
Findings
Generated by Claude Code |
|
Claude author says… All three are fixed in
Checks: Generated by Claude Code |
grep now also matches 'No such container', so a wrong `n` prints docker's error rather than nothing. The Prove-task entry's wallet check says to read `piri-$n` in place of step 6's `piri`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
|
Claude author says… Fixed in
I also added a line telling the reader to keep a host terminal open, with the same Checks: Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
infra-central#270 merged, so the chain-head and Prove-task alerts now carry the Piri's instance, and the proving alerts already carry its proof set. Say how to get n from each, and keep "work through each Piri" for the unrecoverable alert, which names only the node. Review round 5 of the step rewrite: - A working key check prints the 101 line and then curl's timeout, so only a missing HTTP line counts as unreachable. - piri status makes the same call as proofset state and is never unhealthy when it answers. Its errors, and the "any other error" branches, now go to one list in Before you start that says where each one points: the chain endpoint, Piri's database, or the Piri not answering. - A Current Epoch of 0 also covers a proof set Curio has given up on. - The no-head entry runs only the stale entry's key check, not its go-to steps, and the Prove-task entry's reused step no longer names the other entry's step number. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
|
Claude reviewer says… (5th round,
Verified
Findings
Generated by Claude Code |
|
Claude author says… All six are fixed in
After #270: the chain-head and Prove-task alerts now carry the Piri's Checks: Generated by Claude Code |
Review round 6 found the error list routing two cases wrong: - "no proof set found" is a database that answered without the row: a proof set ID from another Piri, or a data set Curio deleted. Check the ID against proofset list, and record a deleted data set. - The chain branch sent readers into the stale-head entry's later steps from entries where no head alert is firing. Run only the key check, restart Piri, and return to the entry the reader came from. Everything else is now a restart, with how long health: starting lasts, the reboot case, and what to record if the error survives it, instead of guessing which component failed. Also: n=1 is now an example tied to its instance, and the loop that finds a proof set's Piri is spelled out, with its own variable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
|
Claude reviewer says… (6th round, Round 5's six findings are fixed. The new error list in "Before you start" step 4 has two minor should-fixes, and there are three nits. Nothing is blocking. Verified
Findings
Generated by Claude Code |
|
Claude author says… Fixed in
Checks: Generated by Claude Code |
Review round 7: Piri's healthcheck has a 180 s start period and 30 retries 10 s apart, so health: starting can last about eight minutes, not three. A restart that ends unhealthy or keeps restarting now goes to docker logs, where a missing file or "is a directory" means the node rebooted. Each branch of the error list ends by saying where to go next, a container that isn't running points at the restart, and the proving-failing entry reads proofset state errors like the others. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
|
Claude reviewer says… (7th round, Round 6's two should-fixes are fixed. There's one new minor should-fix in the "Anything else" branch, and three nits. Nothing is blocking. Verified
Findings
Generated by Claude Code |
|
Claude author says… All four are fixed in
Checks: Generated by Claude Code |
A reboot's missing bind-mount source fails in the Docker daemon before Piri starts, so it shows in docker restart's output and State.Error, not in docker logs. Also name the step-4 bullet step 2 points at, and say Docker marks the container unhealthy rather than giving up on it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
|
Claude reviewer says… (8th round,
Verified: the healthcheck in both compose files (
Generated by Claude Code |
|
Claude author says… Fixed in
Ran Round 8 had a should-fix, so a round 9 follows. Generated by Claude Code |
Rounds 8 and 9 disagreed on the exact error a restart prints after a reboot, and neither was run on a node. Whether piri-$n.pem is missing or a directory on the host answers the question without depending on Docker's wording. Also cover a container that is restarting, and send a reader from step 2 back to step 2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
|
Claude reviewer says… (9th round, The round-8 fixes landed, but round 8's diagnosis looks wrong, so the new wording still misroutes a rebooted node. One should-fix and two nits; nothing blocking. Verified:
Generated by Claude Code |
|
Claude author says… Fixed in
Ran Round 9 had a should-fix, so a round 10 follows. Generated by Claude Code |
With n unset, the key-file check reported the file missing and sent the
reader to a reboot fix on a node that hadn't rebooted. Guard it with
${n:?} like the other host commands, and check all three files a Piri
mounts from the tmpfs, printing only the ones missing or a directory.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Petra Jaros <petra@fil.org>
Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
|
Claude reviewer says… (10th round, The file check is a sound signal in the normal case, and the step-2 ↔ step-4 handoffs have no loop. One should-fix and two nits; nothing blocking. Verified: both compose files mount
Generated by Claude Code |
|
Claude author says… Fixed in
Ran Round 10 had a should-fix, so a round 11 follows. Generated by Claude Code |
The tmpfs check's verdict counted any output, so the ${n:?} error
itself would send the reader to the reboot fix. Name the line that
means a reboot, and say what to do on the unset-n error. Staging's
root shell is Fish, which can't run the section's host commands, so
step 1 now says to run bash first. Guard the remaining $n commands.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Petra Jaros <petra@fil.org>
Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
|
Claude reviewer says… (11th round, The new check is valid shell and renders correctly, but its verdict and the section's shell assumptions each leave a wrong or stuck path. Two should-fixes and a nit; nothing blocking. Verified: the loop runs in bash and dash, script and interactive, against a temp directory: it prints for a missing file, a directory or a dangling symlink, and nothing when all three are present;
Generated by Claude Code |
|
Claude author says… Fixed in
Ran Round 11 had should-fixes, so a round 12 follows. Generated by Claude Code |
Round 12 nits: the second host terminal on staging also opens in Fish, and dash words the unset-n error differently from bash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
|
Claude reviewer says… (12th round, All three round-11 fixes are correct. Only two nits. Verified: bash prints
Generated by Claude Code |
|
Claude author says… Fixed in
Ran This round found only nits, so there won't be another. @Peeja, it's ready for another look. Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Petra Jaros <petra@fil.org> Claude-Session: https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
Written by Claude.
This adds a "Piri's proving alerts" section to
docs/RUNBOOK.md, under "When something is wrong", with one subsection per Piri proving rule. Each subsection says how soon to act and why, then gives numbered steps: what to run, how to read the result, and what to do for each outcome. A "Before you start" subsection holds the setup every entry shares, and "Free stranded batches" is its own subsection that the others link to. As Petra asked in review, this is a pilot for the step-list style; the rest of the runbook can follow in a separate PR.The companion change, fil-forge/infra-central#249, merged on 2026-10-20 and points each rule's
runbook_urlat its subsection. Until this merges, those live links land at the top of the runbook."Free stranded batches" has a query that counts stranded AddRoots batches (and their roots) and an
UPDATEthat frees them. The tables are in thecurioschema of each Piri'spiri_<n>database (HarmonyDBSchemain piri'spkg/curiopdp/schema/schema.go), reached the way this runbook's existingpsqlexample does. I haven't run either statement on a node. TheUPDATEonly touches rows whose task no longer exists, so it doesn't free a batch a running task holds.Checks:
make check-shell,git diff --check. Docs only.✴️
https://claude.ai/code/session_01JCF8gyb8jNRmHmWqQmVhRJ
Generated by Claude Code