Repository navigation
Warn when source configuration changes after generation - #609
Conversation
Part of #445. 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>
|
FAIL What I investigatedPR #609 implements most of #445's acceptance shape. Both source files are fingerprinted,
Reviewed head: What are the gaps
|
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
PASS What I investigatedRe-review of PR #609 (#445, config-apply provenance stamp) at head 32e85ec, covering the worker's one commit since 0caa65e, which is present in this clone. Staged generation now skips the stamp helpers. A new tier-1 test fails with the fix reverted and passes on the head. tier4-e2e job 3478 ran on this head, upgraded and applied the branch on a rig, and succeeded with 4/4 rows. All 10 GitHub checks are green. Both round-1 return findings are closed.
Reviewed head: |
Co-Authored-By: Claude Code <noreply@anthropic.com>
|
PASS What I investigatedThis is a round-2 re-review of 0caa65e..41223ca. The worker's only own commit is 32e85ec; the rest arrived with the develop-v1.19.0 merge, and 0caa65e is present in this clone. Both round-1 return findings are fixed. Staged generation no longer touches the live apply stamp, and a tier-1 test that goes red with the fix reverted backs this up. The quoted tier4-e2e job 3563, rerun by me with
Reviewed head: |
Owner brief for
|
Co-Authored-By: Claude Code <noreply@anthropic.com>
|
PASS What I investigatedRound-3 re-review of #609 (closes #445) at head 95725e5. 0caa65e is in this clone. The worker's only new commit since then is 32e85ec. Everything else arrived through merges of develop-v1.19.0. Both earlier return findings are fixed. The stage path no longer touches the live apply stamp, and a tier-1 test covers it: red with the fix reverted, green on the head. tier4-e2e job 3589 ran on the head and succeeded, including a staged rebuild. All ten GitHub checks are green.
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>
The #609 generated-configuration report was the only doctor output emitted without a check ID, so the #645 daemon-pool doctor-JSON assertions (all IDs nonempty) turned red once both landed on the base. Label it apply-state; human messages and exit codes unchanged. Co-Authored-By: Claude Code <noreply@anthropic.com>
What's the problem
Editing the source config or tune overlay and restarting the service leaves the previously
generated XMRig config in use, without a diagnostic explaining that
applyis needed (#445).Closes #445
The existing API revision covers the control allowlist and cannot identify overlay drift.
How I fixed it
Record source-file SHA-256 fingerprints and a UTC timestamp beside each generated config.
Share one advisory check between
doctorandstatus: matching sources are OK, changed sourceswarn with the apply command, and missing or invalid provenance is informational. Generation
invalidates the old stamp and records a new one only when the input fingerprints still agree.
The generated config and existing API revision retain their current shapes and semantics.
Add regressions to the aggregate suite and include the new helper in kcov instrumentation.
Document that this checks source files, including whitespace and watchdog-only edits, rather than
proving which config a running process loaded. Concurrent edits that change and revert during
generation remain outside this check; avoid editing the sources while generation runs.
Here is the proof
git show HEAD:rigforge.sh > /tmp/rigforge-445-head.sh, followed bybash tests/test-config-apply-state.sh /tmp/rigforge-445-head.sh: FAIL, exit 1,FAIL: apply stamp has config_hashbecause the original generation writes no stamp.bash tests/test-config-apply-state.sh: PASS. Covers both source files, reapply, overlayaddition/removal, autosaves, API revision compatibility, both status paths, the doctor row,
missing/invalid provenance, ordinary generation races, concurrent stamp removal, and FIFOs.
PATH=/tmp/rigforge-445-tools:$PATH make lint: PASS using the repository-pinned shfmt 3.14.1.PATH=/tmp/rigforge-445-tools:$PATH make test: PASS, exit 0; 2,431 aggregate checks withzero failures, plus all four additional suites.
make test-e2e: PASS in the pinned Linux container; 88 normal-deploy checks and 28 appliancechecks, zero failures.
make coverage: FAIL, exit 2; 2,349 aggregate checks passed and one failed. The new apply-stateregression passes, but the existing donation regression fails because the pinned image's
lscpuoutput lacks the expected
Model name:row. The coverage-floor check was not reached.FILE_BUDGET_REQUIRE_BASE=1 bash scripts/lint-file-budget.sh: PASS; ceilings unchanged.shellcheck --severity=warning util/config-apply-state.sh tests/test-config-apply-state.shand
/tmp/rigforge-445-tools/shfmt -i 4 -d util/config-apply-state.sh tests/test-config-apply-state.sh tests/coverage.sh:PASS, including the new files that remain untracked in this session.
npm_config_cache=/tmp/rigforge-445-npm-cache npx --yes markdownlint-cli2@0.23.3 --no-globs README.md tests/README.md docs/configuration.md docs/operations.md:PASS, zero issues in the four changed documentation files.
git diff --check: PASS.Earlier
make testattempts stopped on a cross-file ShellCheck warning (fixed), then on thehost's older shfmt 3.13.1 formatting unchanged test lines. The pinned version passes. An interim
make test-suitewas interrupted after the harness changed and is not claimed as proof.make lint-mdfirst failed on the default npm cache permissions; using a temporary cache thenexposed two pre-existing blank-line errors in untracked
ISSUE.md. The focused command aboveuses the same pinned linter and repository rules without changing that issue record.
The donation failure was reproduced on both the changed tree and original
HEADinside thissession's verified coverage container (
COVERAGE_CONTAINERbelow). Both commands exited 1 atthe same CPU-model parsing pipeline, before any donation success assertion:
The comparison file was removed. Native macOS tests use the Darwin probe; Ubuntu e2e supplies
fixture CPU output. Neither pass establishes that this kcov image's CPU probe works.
Review round 1 (stage path):
generate_xmrig_config stage(run fromcompile_xmriginxmrig.new/build)used to call the stamp helpers against the live
xmrig/buildpath, so a firstsetupprinted amktemperror and a rebuild cleared the live stamp._config_apply_beginand_config_apply_stampnow take the generation mode and return at once for
stage; the non-stage generation that followsstamps as before (rigforge.sh and util/config-apply-state.sh). New tier-1 cases in
tests/test-config-apply-state.sh run
generate_xmrig_config stageagainst an existing live stamp(unchanged, stderr empty, staged config written) and against a worker root with no
xmrig/(stderr empty, nothing created). With the rigforge.sh and util changes stashed the test fails with
FAIL: stage generation leaves the live apply stamp untouched; with them it printsconfig apply state: PASS.Review notes: the doctor/status paragraph in docs/operations.md is now its own paragraph, and the
Makefile coverage description names util/config-apply-state.sh. The ci.yml comment is left as is
(adding a source comment is not allowed here). The unguarded
sourceof the util file matches agit checkout, where util/ always ships. The warn row stays advisory by design (documented).
Merge of develop-v1.19.0 made an invalid tune overlay fail
apply; the last step of the test nowexpects that and still asserts the old stamp is gone.
Round 3: merged develop-v1.19.0 again at 41223ca.
doctorkeeps the hoisted counter declarationand the shared-host report alongside the apply check;
statuskeeps both added lines. The threetargeted tier-1 files (
tests/test-config-apply-state.sh,tests/test-shared-host.sh,tests/test-shared-host-lifecycle.sh) each exit 0 on the merged tree, and all ten GitHub checks(tiers 1 to 3) pass at this head.
Round 4: merged develop-v1.19.0 again at 95725e5 (base #645: solo daemon pools and node health).
The one conflict was the util
sourceblock besideSCRIPT_DIR: the merged tree keeps thisbranch's
source util/config-apply-state.shline and the base'ssource util/daemon-pools.shwith its shellcheck directive, and the explanatory comment this PR removes in that hunk stays
removed. Everywhere else the merge brought the base's content byte-for-byte (a combined
--ccdiff and a base-diff comparison show only that one hunk and no lost lines). shellcheck 0.11.0 and
the pinned shfmt 3.14.1 pass on
rigforge.sh; the file-budget gate passes;tests/test-config-apply-state.sh,tests/test-shared-host.sh,tests/test-shared-host-lifecycle.shand the base's newtests/test-daemon-pools.sheach exit 0on the merged tree; and all ten GitHub checks (tiers 1 to 3) pass at this head.
Bench on the previous head (41223ca): tier4-e2e job 3563, phases
connectanddev-fee, whichregenerate the config through apply:
bench-ci job 3563@41223ca896342d7a4ea3ad820e0ebbe270da7f7c · rigforge · tier4-e2e
Generated by
bench-ci evidence 3563@41223ca896342d7a4ea3ad820e0ebbe270da7f7c; re-run it to check.Bench on the current head (95725e5): tier4-e2e job 3589, phases
connectanddev-fee, whichregenerate the config through apply:
bench-ci job 3589@95725e5445d77e2726bf78c269f366334f071984 · rigforge · tier4-e2e
Generated by
bench-ci evidence 3589@95725e5445d77e2726bf78c269f366334f071984; re-run it to check.Ponytail review of the diff: nothing cut; every hunk is the stamp, its check, or its test and docs.
🤖 Generated with Claude Code