Repository navigation
Add JSON doctor reports with stable check IDs - #606
Conversation
Part of #440. Implemented by an operator-run gpt-6-astra session at the owner's request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Operator: this v2.x enhancement stays a held draft until RigForge 1.18.1 is tagged (due Fri 2026-11-06, Sat 11-07 at the latest). 1.18.1 is cut from develop, so merging this first would widen that release. After the tag: rebase on develop, run the agent review, and request the owner's approval. |
|
Operator: released to the runner (owner 2026-11-06). New work goes to the local Flash-Next model first; Claude only after three local rounds or for sensitive work. |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…budget Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
FAIL What I investigatedI reviewed PR #606 at head c74a571 against issue #440, which asks for
Reviewed head: What are the gaps
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
PASS What I investigatedRound 3 re-review of #606 (doctor --json with stable check IDs, #440). The last reviewed head is c74a571, which is in this clone. Since then the worker made one commit of their own (90670b3, which drops the dispatch comment) and merged develop-v1.19.0 at a985c6e. Both round-2 return findings are closed at head da61abe. tier4-e2e job 3561 ran on this head and passed. Its log shows all five doctor JSON rows passing. The merge kept every SHARED_HOST guard from the base, and nothing in the head's rigforge/util/tests diff against the base adds a comment beyond shellcheck directives.
Reviewed head: |
Owner brief for
|
|
FAIL What I investigatedRe-review of the diff from c74a571 to the head e2a6ce4. The worker's only commit in that range is 90670b3, which deletes the dispatch comment. The rest arrived in two base merges: a985c6e is in da61abe, and #645 (solo daemon pools) is in e2a6ce4. Both round-2 return findings are now closed. The head still fails because the latest merge breaks the PR's main claim: on a solo daemon-pool rig,
Reviewed head: What are the gaps
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
PASS What I investigatedRound-3 re-review of rigforge#606 at head 7b7eab6, covering the two worker commits since e2a6ce4 (that commit is in this clone). Every earlier return finding is fixed. All three daemon-pool doctor rows now carry
Reviewed head: |
Owner brief for
|
The base grew solo daemon pools (#645), the source-drift apply-state check (#609) and JSON doctor reports (#606) after the first sync, which the bench caught as a conflict with the tested head. Resolutions: keep the xmrig overlay alongside the new daemon-pools source and pool keys; keep the overlay doctor line next to the new apply-state check; keep the broadened util/ coverage denominator over the individually named helpers. tests/test-config-apply-state.sh gains a validator stub in its fixture because apply now requires a validation executable; its assertions are unchanged. Co-Authored-By: Claude Code <noreply@anthropic.com>
What's the problem
RigForge #440: automation must parse human prose to read worker health. Doctor has no machine report or stable check identifiers.
How I fixed it
Added
doctor --jsonwith{version, exit, summary, checks}on stdout and the existing human report on stderr. Every doctor finding has an explicit stable ID. The same probes and critical/advisory exit rules remain in use; a JSON encoding failure stops the doctor run, and the report it prints carriesexit: 1and the process exits 1, and temporary records are removed.Updated help, completion, and operations documentation. Added isolated regression coverage and a tier4 contract assertion after the existing live connection/share wait.
status --jsonis deferred, following the issue brief's default scope. Thedoctordispatch keepsdoctor_command "$@" || exit 1so an unhealthy report exits 1 without firing the ERR trap's "aborted while" line.Shortcut: critical findings are
warnrows and only the top-levelexitmarks a report critical, sosummary.failis always 0 today; upgrade when a consumer needs to know which row is critical.Here is the proof
Head
7b7eab67fb19ac15db5ce39f56748f9c59d26d78, basedevelop-v1.19.0, GitHub reports MERGEABLE. Since the last review, the head merged #645 (solo daemon pools), and #645's daemon-pool node-health rows inutil/daemon-pools.shhad no ID, so a daemon-pool rig emitted"id":"". All three of those rows (syncedok, syncingwarn,get_infounavailablewarn) now carrypool-connection. That is the same row a Stratum pool reports, so automation reads one ID in every pool mode.docs/configuration.mdnow names the ID.Regression red/green,
bash tests/test-doctor-json.sh. The new cases run the realdoctorviadoctor_json: three with the running miner reporting a daemon connection (synced, syncing, down), and one with the service stopped, where the real_active_daemon_poolandget_infoparsing run against a stubbedcurl:util/daemon-pools.shfrome2a6ce4(before the fix): exit 1, 47 passed, 4 failed. All four daemon cases fail, and their reports show{"id":"","status":"ok","message":"node connection live: height 123 (synced)"}and similar rows.Local on this head:
make test-suiterc=0, run at238a849; the follow-up commit only adds a test case totests/test-doctor-json.sh. Also passing here:FILE_BUDGET_REQUIRE_BASE=1 bash scripts/lint-file-budget.sh,make lint-topology, andshellcheck --severity=warningplusshfmt -i 4 -don the changed files.make lintstops attests/run.sh, which is unchanged from the base, only because the local shfmt is 3.13.1 and CI pins 3.14.1.GitHub checks at this head (
gh pr checks 606): all 10 pass: Lint (shellcheck + shfmt), Lint (markdownlint), Lint (yamllint), Workflow audit (zizmor), Secret scan (gitleaks), Test suite, End-to-end (Docker), Coverage (kcov + diff-cover), Stock home setup (current), Stock home setup (historical).Bench contract gate,
tier4-e2enarrowed to phaseconnect, which runse2e_doctor_jsonafter the live share wait. The job rows show the fivedoctor JSONrows passing: one schema-valid report, exit matches process status, summary matches check rows, live service check, live pool connection check.bench-ci job 3592@7b7eab67fb19ac15db5ce39f56748f9c59d26d78 · rigforge · tier4-e2e
Generated by
bench-ci evidence 3592@7b7eab67fb19ac15db5ce39f56748f9c59d26d78; re-run it to check.Not covered on the bench: the bench rig mines to the bench's Stratum stack, so the live gate never reaches the daemon-pool branch. That branch is covered by the unit cases above.
Ponytail review: nothing cut. The fix is three ID arguments plus one doc phrase, and the tests reuse the existing
run_connectedharness.Closes #440
🤖 Generated with Claude Code