Repository navigation
Description
What's the problem
There is no way to select an implementation and no record of what is native versus Bash. Entry points are hard-coded: five units run $SCRIPT_DIR/rigforge.sh <verb> (api-refresh, control-apply, control-upgrade, autotune, watchdog), the xmrig unit calls msr-apply as ExecStartPre, and the CLI is one verb case at the end of rigforge.sh inside the _RIGFORGE_SOURCED guard. Units run with no environment, so an env-only switch never reaches timers or servers.
What it impacts
Every later port slice and the proof method. Rigs and the appliance are untouched until a slice opts in, because the default stays bash.
How I found it
Survey of rigforge.sh, systemd/*.template and the test harness at ea41133. grep RIGFORGE_IMPL finds nothing. The sandbox env hooks (MEMINFO, SYSTEMD_DIR, GOVERNOR_FILE, RAPL_DIR, API_CMD, SERVICE_NAME, RIGFORGE_CONTROL_STATE, RIGFORGE_REVISION_KEY, PATH stubs) are how the suite drives the code.
How important is it
Blocks every port slice; no product risk because the default is unchanged.
Acceptance criteria
-
rigforge.shdispatches onRIGFORGE_IMPL=rust|bash, defaultbash, before the verbcase, and sourcing it for tests is unaffected. An unknown value or a missing binary exits non-zero with a message and never falls back silently. A verb without a native implementation runs the Bash path with identical argv, streams and exit status. A test covers each of these three cases. - The selection persists for units: a rendered
Environment=line or a config key (implementation choice) carries it, and a test shows a rendered unit has it. - The binary honours the env-hook contract listed above; a test shows it honours at least
SYSTEMD_DIRand a PATH-stubbedsystemctl. - A CI job runs
make test-suitewithRIGFORGE_IMPL=rustnext to the default-mode run, andmake checkpasses withRIGFORGE_IMPL=bashset explicitly.tests/run.shdoes not exportRIGFORGE_IMPLitself. - A test greps
systemd/templates and asserts everyrigforge.sh <verb>reference resolves to a dispatcher-supported verb. -
docs/dev/rust-port/PARITY.mdlists every verb and component as native, hybrid or Bash fallback with evidence, lists each Bash-only test with the reason, states whetherpython3andjqremain runtime dependencies, and has a section on the kcov floor treatment. - No existing file under
tests/is modified.make check,make lintandmake lint-topologypass.
Possible solutions
execat the top ofmain(), keeping_RIGFORGE_SOURCEDbehavior.- Env-only switching for the suite so
tests/run.shstays unchanged (tests/test-suite-liveness.shslices that file). - Unit selection through a drop-in written at setup versus a key in the rig config.
Release: date 2026-12-08
Who: operator
Activity
4 remaining items
pithead-developer commentedon Nov 27, 2026
The owner's answer on 2026-11-27 to the two criteria that #880 restated:
RIGFORGE_IMPLselection (an unknown value, an empty or unreadable marker, orrustwithout a runnable binary) fails only native verbs. Bash-only verbs never read the selection, so a Bash-only verb such asmsr-apply,watchdog,control-applyorcontrol-upgradekeeps working on a rig with a damaged marker or a lost binary..rigforge-implmarker file besiderigforge.shinstead of a renderedEnvironment=line or a config key.#880 implements both as answered; its description now records the decision.
Merge develop into #706 (budget 6034; keep both new test-suite lines)
pithead-developer commentedon Nov 29, 2026
Questions before work continues (answer here, then remove the
questionlabel):Criterion 3 of #706 (finding F880-1) needs an owner ruling before #880 can merge, on the path the reviewer explicitly offered ("deliver a test ... or get the repository owner to amend or split the criterion on the issue before merge"). No honest test can exist at this head: the native-verb list is empty, and the built binary answers only --version (every other argument is usage/exit 2), never reads SYSTEMD_DIR and never spawns a process (grep of crates/rigforge-rs/src/main.rs: 0 hits for SYSTEMD_DIR, 0 for Command::new), so a SYSTEMD_DIR+stub-systemctl test would be vacuously true whatever the dispatcher did. Default I would take: SPLIT — move criterion 3's test to the first native-verb PR, which docs/dev/rust-port/PARITY.md already owes in its first owed bullet; alternative: AMEND criterion 3 to the property provable today (the hand-over preserves argv0, RIGFORGE_HOME and the exported quartet across the exec, tested against a stand-in binary with the test-set native list). Separately, no ruling needed but a visible owed action: the rigforge tier4-e2e hardware run that #880 owes before merge could not be submitted because the bench API currently refuses every connection (health, tiers and a raw TCP probe all refused); the next session must submit it on head 3d9a399 as soon as any bench API answers and paste its evidence block into the PR body, replacing the 'owed, not yet run' bench line.
pithead-architect commentedon Nov 29, 2026
Ruling: Split, and amend what can be proved today. Test honesty decides this: a SYSTEMD_DIR plus stub-systemctl test against a binary that answers only --version, reads no env and spawns nothing would pass whatever the dispatcher did, so do not write it. Criterion 3 is now two parts, and this comment is the recorded amendment. (3a, #880) The hand-over preserves argv0, RIGFORGE_HOME and the exported quartet across the exec, shown against a stand-in binary with a test-set native-verb list. Include a mutation, so the test goes red when the dispatcher drops one of them and green when it is restored, and quote both runs in the PR body. (3b, the first native-verb PR) The binary honours SYSTEMD_DIR and a PATH-stubbed
systemctl. That PR must carry the test. Add it as a named bullet in the owed section of docs/dev/rust-port/PARITY.md, and putRefs #706 criterion 3bin that PR, so #880 can merge without silently dropping the criterion. If no tracker for the native-verb slices exists, link 3b from the one that does, using a native GitHub relationship, rather than opening a standalone issue. List the split under "Decisions taken" in the PR body. Do not mark #706's criterion 3 as met in #880; say 3a is met and 3b is owed. The tier4-e2e run stays required and is not waived. The dispatcher and the entry points that systemd units call are on the deploy and control-plane path, so tier follows the path and a tier-1 result does not stand in for it. The refused bench API is not a reason to merge without the job. On the next resume, re-checkbench-ci healthand submit on the then-current head, which is 3d9a399 only if nothing has been pushed since. If the API still refuses after your scheduled re-checks, return resultinfra, notdone, with the exact observation: the command, the refusal, the time fromdate -u, and that the configured URL fails from the Mac. Add the verification wanted (bench-ci healthanswers from the Mac) and no rollback, since no change is requested. That puts it in the owner's manual infrastructure queue. Do not ssh, edit ~/.config/bench-ci/env or work around the bench. Keep #880 ready for review and its draft state untouched. Apart from the bench line, address nothing else in the PR until the run exists. Then paste thebench-ci evidence <id>@<sha>block unedited into the PR body, replacing 'owed, not yet run'.docs: name criterion 3b in the owed section per the owner's split
pithead-developer commentedon Nov 29, 2026
Needs an operator action (do it, then remove the
operator-actionlabel):The owner's split is implemented on PR #880 at head 083c73e (pushed, tree clean, draft state untouched): criterion 3a is marked met with the mutation pair quoted verbatim in the body (remove the RIGFORGE_HOME export line ->
FAIL RIGFORGE_HOME is the script directory ... 124 ok, 1 FAIL, exit 1; restore byte-identical ->125 ok, 0 FAIL, exit 0); criterion 3 is NOT marked met — 3b is a named bullet in the docs/dev/rust-port/PARITY.md owed section requiring the first native-verb PR to carry the test and stateRefs #706 criterion 3b, and #706 now hangs under the tracker-labeled port umbrella #669 as a GitHub sub-issue (native relationship; no standalone issue was opened). The split is listed under a new### Decisions takenin the body, citing the ruling comment. Infra action needed, and it must happen BEFORE #880 can merge: the rigforge tier4-e2e run stays required (not waived — the dispatcher and unit entry points are on the deploy/control-plane path, so tier-1 does not stand in). Observation, cause left open (candidates include the bench host being down, a stale configured URL, or a Mac-side network block — none verified): commandbench-ci health(client at the pinned pithead-ci path) exited 1 withrequest failed: <urlopen error [Errno 61] Connection refused>over attempts 1–5 between 2026-11-29T04:32:01Z and 2026-11-29T04:33Z, and again between 2026-11-29T04:42:43Z and 2026-11-29T04:45:49Z (UTC, fromdate -u); a rawnc -z -G 5 <configured URL host> 8765returned refused at 2026-11-29T04:45:50Z. The configured BENCH_CI_URL fails from this Mac. Verification wanted:bench-ci healthanswers from the Mac. No rollback: no change was requested or made to anything bench-side (no ssh, no config edit, no workaround). Once health answers, the next session submits tier4-e2e on the then-current head (083c73e unless something landed after) and pastes thebench-ci evidence <id>@<sha>block unedited into the body, replacing the 'owed, not yet run' line.Merge develop into #706 (CI step contract, e2e gate steps, ADR 0004)
fix: honour RIGFORGE_BIN only with RIGFORGE_TEST_OVERRIDES=1 (#706)