Repository navigation
Keep RigForge in control of generated XMRig config - #608
pithead-developer[bot] wants to merge 8 commits into
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 Opus 5.5 <noreply@anthropic.com>
…a reboot Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
develop-v1.19.0 was folded back into develop (#664, squash 🤖 Generated with Claude Code |
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). 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 3493 on head 49dc9fe (phases=connect,config-ownership, basedevelop-v1.19.0), red: the first three config-ownership rows passed on the rig (autosave/watch false, byte-identical while mining, hand edit not hot-reloaded and loaded by a restart), but the setup-restart proof did not run, becausesetup --dry-runon the rig planned a rebuild (the rig's XMRig build does not satisfyxmrig_already_built; most likely it predates the zero-donation marker from #603, inferred, not read from the rig). By the operator's ruling the phase refuses to runsetupthere and the rig needs its state fixed before a re-run._cleanuprestored the rig (rig restored: yes).bench-ci job 3493@49dc9fe5dd76f627f6032b45ba3a2a2af9568db2 · rigforge · tier4-e2e
autosaveis forced on andwatchis left at its default #529) (XMRig rewrites and hot-reloads the config RigForge owns:autosaveis forced on andwatchis left at its default #529)Generated by
bench-ci evidence 3493@49dc9fe5dd76f627f6032b45ba3a2a2af9568db2; re-run it to check.Still unproven live: setup restarting the miner with a changed pool setting and no rebuild; the stub test
tests/test-e2e-config-ownership.shcovers that logic only.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