Repository navigation
Keep RigForge in control of generated XMRig config - #608
Conversation
Part of #529. 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>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
FAIL What I investigatedReviewed PR #608 at head ef155c2 against issue #529 and the owner's 2026-10-06 ruling on it. The scope is correct. The fix does what it claims: the new regression test is red at base (14 passed, 8 failed) and green at head (22 passed, 0 failed), and all GitHub checks pass. The PR changes config rendering in generate_xmrig_config and the systemd restart decision in install_service, but no bench-ci tier4-e2e job exists on the head. The PR body itself lists that proof as still needed.
Reviewed head: What are the gaps
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
|
PASS What I investigatedRe-review of PR #608 (issue #529: RigForge owns the generated XMRig config; autosave/watch off, and setup restarts the miner when the generated config changes). Since the last reviewed head 2c0c4fd, the only change is a merge of develop (#604, XMRig overlays) into c149e6e. That merge's conflict resolutions touch only docs and keep both sides. The one standing return was the missing tier4-e2e proof. It is now closed: bench-ci job 3994 ran on head c149e6e with phases connect and config-ownership, concluded success, and passed 12 of 12 rows. Those rows include no autosave write-back, no hot reload of a hand edit, and setup restarting the miner without a rebuild. CI is green, the new unit tests pass, the file budget is OK and topology is clean.
Reviewed head: |
Owner brief for
|
Keep autosave:false and watch:false beside develop's print-time, health-print-time and Linux colors:false render defaults, and run the config-ownership suites through the shared run.sh loop so tests/run.sh stays under its file-budget ceiling. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
PASS What I investigatedI re-reviewed PR #608 (issue #529) at head f302c94, starting from the last reviewed head 2c0c4fd, which is present in this clone. Since that head, the worker made one commit: tests/test-config-ownership.sh now runs the e2e stub rows even when a unit check fails. The rest arrived through two merges from develop (#604, #693). The resolution keeps {autosave: false, watch: false, "print-time": 60, "health-print-time": 60} in a single render object, plus colors false on Linux. The blocking rule-8 finding is fixed: tier4-e2e job 4002 ran phases=connect,config-ownership on f302c94 and succeeded, and I re-derived its evidence and log myself. All ten GitHub checks pass on the head, the local regression and file-budget gates pass, and topology is clean. The branch has no commits behind develop and the base is now develop.
Reviewed head: |
Owner brief for
|
What's the problem
XMRig can rewrite and hot-reload the config RigForge generates. Disabling those defaults alone
would strand config edits on an already-built appliance worker: setup previously only started
the service, which does not reload a running miner.
Closes #529
How I fixed it
autosave: falseandwatch: false.including when no rebuild is needed. An unchanged setup still ensures the service is started;
reboot deferral and caller-owned restart guards retain precedence.
Add isolated regressions to the main suite and the pinned Linux container runner.
Doctor/apply-stamp changes remain in #445 and general overlay opt-back-in remains in #526,
as directed by the owner. This addresses #529 without changing versions or file permissions.
Here is the proof
The new regression suite exercises real setup, config generation, and service installation with
privileged actions stubbed in a disposable directory. It covers fresh and existing configs,
unchanged reruns, a one-byte edit, legacy defaults, inactive services, reboot deferral, and failures.
Commands executed before and after the production fix:
The pristine script returned exit 1: 14 passed, 8 failed. The fixed script returned exit 0:
22 passed, 0 failed. The baseline scratch directory was removed afterward.
Completed checks:
PATH=/private/tmp/rigforge-529-tools/bin:$PATH make test— exit 0: 2431 passed, 0 failedin the main suite; contract credentials, access-token readiness, docs clone pins, and tool-pin
watcher suites also passed.
PATH=/private/tmp/rigforge-529-tools/bin:$PATH make lint— exit 0 using repository-pinnedshfmt 3.14.1 and ShellCheck 0.11.0; includes topology and file-budget gates.
FILE_BUDGET_REQUIRE_BASE=1 bash scripts/lint-file-budget.sh— exit 0.shellcheck --severity=warning tests/test-config-ownership.sh— exit 0./private/tmp/rigforge-529-tools/bin/shfmt -i 4 -d tests/test-config-ownership.sh— exit 0.make test-e2e— exit 0 in the repository's digest-pinned Linux container: 88 standard +28 appliance assertions passed, plus all 22 ownership regressions in each pass.
npm_config_cache=/private/tmp/rigforge-529-tools/npm-cache npx --yes markdownlint-cli2@0.23.3 --no-globs docs/configuration.md docs/operations.md PR-BODY.md— exit 0, no issues in the two changed documents or this proof file.
git diff --check— exit 0.Initial
make teststopped at formatting because the installed shfmt 3.13.1 disagreed with therepository's pinned version on existing lines. The pinned lint run above passed.
npm_config_cache=/private/tmp/rigforge-529-tools/npm-cache make lint-mdreturned exit 2 solelyfor four formatting errors in the supplied, unchanged
ISSUE.md. A retry withnpm_config_cache=/private/tmp/rigforge-529-tools/npm-cache npx --yes markdownlint-cli2@0.23.3 '!ISSUE.md'still included that file because of the configured globs; the explicit changed-document check
above passed.
The first
make test-suiterun completed with 2430 passed, 1 failed (make exit 2): theexisting appliance dry-run assertion still expected unconditional
enable --runtime --now.It now strictly checks the new conditional restart/start/reboot wording required by this issue,
and the final
make testrun above passed.The Mac suite explicitly skips Linux-only tuning timing tests.
A diagnostic
timeout -k 5 60 bash tests/test-control-replay.shreturned 124 before thatCPU-heavy matrix finished; the complete replay matrix subsequently passed in the full suite.
Merged develop-v1.19.0 (one
main()declaration conflict). Merged currentorigin/developfor mergeability: the service restart condition becamerebuild || shared-host || config-changed, the re-own helper keeps develop's Linux early return and shared-host log handling under the sameMINER_USERguard, and themain()locals, thee2e-pithead.shsource lines, phase dispatch and phase lists, and the docs list item are unions of both sides; targeted suites re-run on the merged head (test-config-ownership.sh22/22,test-e2e-config-ownership.sh18/18,test-config-apply-state.sh,test-shared-host.sh,test-randomx-mode.sh) pass and the file-budget gate exits 0. Earlier GitHub reds, fixed:tests/test-sister-reconcile.shstubsgenerate_xmrig_config, so the after-hash of a missingconfig.jsonabortedmain()underset -e(now guarded like the before-hash); diff-cover missed the two jq-literal linesautosave/watch(now set on the already-covered render line,rigforge.sh:1179). Localmake lintfails on 7 shfmt hunks intests/run.shthat the base has too.Live proof (reviewer finding on
rigforge.sh:1179,rigforge.sh:1270): a new explicittier4-e2ephase,config-ownership(tests/e2e-config-ownership.sh, not inall), regenerates the config with the miner stopped, then requires (1)autosave=false/watch=falseand byte-identical generated bytes after the miner is live plus 30 s; (2) a handdonate-leveledit of the generated file to leave the PID and reporteddonate_levelunchanged for 20 s, with a restart then loading it as the positive control; (3)setupon an already-built worker to log "recompile will be skipped" and "Restarting XMRig service", change the PID, render a toggled poolkeepalive, keep the binary hash and go live again. The phase refuses to runsetup(row red, plan lines quoted) whensetup --dry-runplans a rebuild, a package install, a GRUB change or a reboot. Thekeepalivetoggle is written only to$CFG, which the harness_cleanuprestores.tests/test-e2e-config-ownership.sh(inmake test-suite) drives the phase against stubs: the pass path and nine failure modes each produce the expected row and the guarded modes never run setup.Bench proof,
tier4-e2ejob 3994 on headc149e6e(phases=connect,config-ownership, basedevelop), green: all fourconfig-ownershiprows passed on the rig — autosave/watch off, the generated config byte-identical while mining, a hand edit not hot-reloaded until a restart loads it, andsetupon the already-built worker restarting the miner with a changed poolkeepaliveand an unchanged binary._cleanuprestored the rig (rig restored: yes). The earlier job 3985 passed identically on the pre-merge head2c0c4fd.bench-ci job 3994@c149e6e3227e81e5e20c26f6e11578225f670474 · rigforge · tier4-e2e
Generated by
bench-ci evidence 3994@c149e6e3227e81e5e20c26f6e11578225f670474; re-run it to check.The head is a base merge of
origin/developthrough910f107(the validatedxmrigoverlay): the two doc/README conflicts resolved keeping this PR'sautosave: false, watch: falserender item andconfig-ownershiprows alongside the overlay docs.tests/test-xmrig-overlay.shfails 7 of 77 identically on pristineorigin/developon this host (macOS; develop's own CI runs it green on Linux).Current head
f302c94mergesorigin/developthroughd225dd8(#693, plain XMRig logging). The render conflict keeps both sides in one object:{autosave: false, watch: false, "print-time": 60, "health-print-time": 60}plus Linux-onlycolors: false;docs/configuration.mditem 3 lists all of them. Develop filledtests/run.shto its file-budget ceiling, so the overlay, logging and config-ownership suites now run in onerun.shloop, andtests/test-config-ownership.shchainstest-e2e-config-ownership.sh(run even when a unit check fails, exit non-zero if either fails; checked by injecting a unit failure: rc 1, e2e rows still printed). On this head:FILE_BUDGET_REQUIRE_BASE=1 bash scripts/lint-file-budget.shOK;tests/test-config-ownership.sh22/22 + e2e 18/18,test-xmrig-logging.sh11/11,test-config-apply-state.sh,test-shared-host-lifecycle.sh,test-worker-proof.shpass locally; all ten GitHub checks pass (Test suite, Coverage, End-to-end (Docker), lints). Bench proof on the current head:tier4-e2ejob 4002 onf302c94(phases=connect,config-ownership, basedevelop, fleet-routed) succeeded; job 3994 above is on the previous head.bench-ci job 4002@f302c942ac11999a9261658fbc196b8ef93b8e6a · rigforge · tier4-e2e
Generated by
bench-ci evidence 4002@f302c942ac11999a9261658fbc196b8ef93b8e6a; re-run it to check.Not covered: reboot-deferred setup on real hardware, and the least-privilege follow-up that
_reown_workerstill givesMINER_USERwrite access toxmrig/build/config.json(rigforge.sh:1812); this PR leaves file permissions unchanged.Draft from an operator-run gpt-6-astra session (owner request, 2026-11-01). The operator reviews and gates it before it leaves draft.
🤖 Generated with Claude Code