Repository navigation
Add validated XMRig configuration overlays - #604
pithead-developer[bot] wants to merge 8 commits into
Conversation
Part of #526. 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>
|
FAIL What I investigatedReviewed rigforge PR 604 (head 551c922) against issue 526. The tier 1-3 evidence holds: the new overlay test fails on develop's rigforge.sh and passes on the head, and CI at the head is green. The PR is a RETURN because it has no bench-ci tier4-e2e job on the head, and the PR body says that proof is still needed.
Reviewed head: What are the gaps
|
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
…rows Co-Authored-By: Claude Code <noreply@anthropic.com>
|
PASS What I investigatedRe-review of PR 604 (issue 526) at head eba5d0d: the worker's commits since 551c922 are 342ae6e, cfd1f3e and eba5d0d. They delete the four flagged comments and add five xmrig-overlay rows to the worker-api tier4 phase. The round-1 RETURN (no tier4-e2e job on the head) is fixed: bench-ci job 3509 ran on eba5d0d and every row is green. That includes the overlay apply through the real XMRig validation and a unit restart. The remaining round-1 items are notes and stay notes.
Reviewed head: |
Owner brief for
|
Shared-host resource profile and the staged overlay apply now coexist: apply prepares the shared-host budget before the run and re-renders the unit only after a staged config validates; autotune re-enters the slice before honoring an overlay-pinned prefetch knob. The worker-api overlay rows moved to e2e-pithead-xmrig.sh to stay under e2e-pithead.sh's file budget. Co-Authored-By: Claude Code <noreply@anthropic.com>
What's the problem
RigForge discards XMRig settings it does not map, so an operator's edits to the generated config disappear on apply. Tuning can also overwrite a deliberately pinned value, and apply does not ask XMRig to validate the result before restarting.
How I fixed it
Added the optional
xmrigobject, merged after tuning and before the thread ceiling. Protected keys are rejected; undocumented names warn. Manual and scheduled tuning preserve overlay pins, history and doctor identify them, and the read feed includes a nonempty overlay without adding control write access.Apply and its preview validate a private staged copy with XMRig before publishing it or changing the unit. The validation copy cannot daemonize, write logs, or allocate the CPU memory pool; an all-disabled pool set is rejected before XMRig can fall back to another config. Publication preserves miner ownership before restart. Updated documentation, fixtures, and coverage inclusion for the new helper.
Here is the proof
Before/after regression commands:
Original code: exit 1, 17 passed, 57 failed. Updated code: exit 0, 74 passed, 0 failed, including byte-identical generated output without an overlay. The tests also cover protected keys, merge order, tuning seeds/grid (including array and named-profile pins), parser failures, preview isolation, ownership/publication failures, a missing validation executable, doctor, and feed visibility.
Additional checks:
PATH="/tmp/rigforge-526-tools:$PATH" make test: passed, exit 0; 2,430 main-suite checks and 70 overlay checks, zero failures, plus passing credential, readiness, clone-pin, and tool-pin suites. The temporary tool directory supplies repository-pinned shfmt 3.14.1. The native run explicitly skips Linux-only timing cases. Three validator assertions were subsequently added and passed in the final before/after run above; product code was unchanged.make test-e2e: passed, 88 deployment checks and 28 appliance checks, zero failures.make coverage: not a pass on this Mac. The emulated image hit a pre-existing donation fixture failure; that run was stopped. The environment-adjusted run below passed.FILE_BUDGET_REQUIRE_BASE=1 bash scripts/lint-file-budget.sh: passed.shellcheck --severity=warning rigforge.sh util/xmrig-overlay.sh tests/test-xmrig-overlay.sh: passed.npm_config_cache=/tmp/rigforge-526-npm npx --yes markdownlint-cli2@0.23.3 --no-globs PR-BODY.md README.md tests/README.md docs/configuration.md docs/pithead-integration.md: passed, zero issues.make lint-actions: passed.UV_CACHE_DIR=/tmp/rigforge-526-uv UV_TOOL_DIR=/tmp/rigforge-526-uv-tools UV_TOOL_BIN_DIR=/tmp/rigforge-526-uv-bin uv tool run --from yamllint==1.38.0 yamllint --strict $(git ls-files '*.yml' '*.yaml'): passed. The Make target initially failed because yamllint was not installed; this temporary tool environment ran the same inputs successfully.jq empty config.reference.json,bash -n rigforge.sh tests/run.sh util/xmrig-overlay.sh tests/test-xmrig-overlay.sh, andgit diff --check: passed.The installed shfmt 3.13.1 reported unrelated formatting differences; the pinned version was used instead. Broad Markdown lint also reads the supplied untracked
ISSUE.md, which has three existing lint errors; the changed documents pass the focused command above.The donation fixture failure also occurs on untouched
HEADbecause the emulated image'slscpuomitsModel name. Its existing test was left unchanged. Baseline command (exit 1):For coverage, the same pinned container and full suite were rerun with a temporary CPU-model fallback confined to the container:
The full Linux suite passed, exit 0: 2,349 main-suite checks and 69 overlay checks, zero failures. The final overlay module was then rerun under kcov and merged with that report; this includes the three subsequently added missing-executable assertions without changing product code:
Final module: 72 passed, 0 failed, exit 0. Merge and both gates passed, exit 0: 95.12% overall coverage (3,238/3,404 lines; floor 80%) and 90.30% patch coverage (121/134 lines; floor 90%). Report parsing used native jq on macOS. No coverage thresholds or exclusions were weakened.
The pinned image lacks Python, so it explicitly skipped the overlay receiver allowlist, API wire/IPv6, receiver/applier lockstep, control-server wire, and server-driven contract checks. Those passed in the native suite. The Linux-only tune timing checks passed in the coverage run.
Bench proof on the pre-merge head (eba5d0d), phase
worker-api, which carries the overlay rows (overlay merged into the generated config, unit restarted by the apply, worker mining afterwards, feed carries the overlay, removal restores the generated config). Printed bybench-ci evidence 3509@eba5d0d90569cdbef55ede98afc2f808c2b86385:bench-ci job 3509@eba5d0d90569cdbef55ede98afc2f808c2b86385 · rigforge · tier4-e2e
Generated by
bench-ci evidence 3509@eba5d0d90569cdbef55ede98afc2f808c2b86385; re-run it to check.The base branch then grew the shared-host profile, which conflicted with this branch's apply path. Head 5b1611b merges the base in; the staged overlay apply and the shared-host unit lifecycle coexist (profile preparation before the runtime apply, the staged config validated before the unit is re-rendered, the reload through the shared-host helper), and the
worker-apioverlay rows moved byte-identically into a split file to respect the file budget. On the merged head the offline suite passes 2,446 checks with zero failures. A fresh bench job3567@5b1611bc99c03e5cc90cce1666e340bffbf4cfd8(same phase and options as the block above) covers this head; its evidence block will be pasted here when it completes. The block above is from the pre-merge head and does not cover it.The apply ran against the rig's real XMRig and the unit restarted, so the staged
--dry-runvalidation was accepted by the real binary. Not run: other tier4-e2e phases (the change touches only the worker-api feed and apply path), KVM, and the Pithead editor/applyallowlist round trip forxmrig(companion side, not exercised here).Closes #526
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