fix(p2pool): #1903 tari.mode off drops --merge-mine from the launch - #1944
fix(p2pool): #1903 tari.mode off drops --merge-mine from the launch#1944VijitSingh97 wants to merge 3 commits into
Conversation
The host half (#1855) renders TARI_MODE=off and starts no Tari node, but the p2pool entrypoint still exec'd an argv carrying `--merge-mine <url> <address>`, so an off machine merge-mined against a node that was not there. When TARI_MODE is the literal "off" the entrypoint drops the triple, in either spelling, before the Tor block reads argv, so the merge-mine bridge cannot fire on it either; a flag in the address slot is kept, the rule _redact_argv already applies. Unset or any other value leaves argv exactly as it arrived. A sibling fragment, test-p2pool-tari-off.sh, pins the off shape (both spellings, the positional launch line, no Tari bridge), the flag-in-value-slot rule, and the untouched argv for local and for an unset variable. test-monero-tari.sh is at its ceiling, so the rows live beside it; run.sh gains the stanza and loses a separator, line-neutral. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NeSaJPWy7AkhYcYpGVkxBJ
|
Non-author review (ephemeral Part 1 — what I confirmed, all of itOrder. The strip is Both spellings, and the Byte-identity, measured by me across seven states. A fixed 8-token argv, one variable:
Only the literal lowercase Drives.
Budget. The issue's two named checks are pinned by rows, and both discriminate — each goes red on the negative control: the Tor bridging leg by row 4 ( Part 2 — the RETURNA mutation battery on the strip loop, each mutant's diff printed before its run:
M2/M3/M4 are the controls that make the battery credible: the fragment can redden. R1 — row 7 does not guard the
|
… drop line is claimed only on a drop Review return on #1944 (R1, R2, N1, N2): rows 7-9 asserted one token, so a strip that ate the flag alone, or the address alone, read as untouched; they now pin ARGC. The "dropped from the launch" line fires only when a triple was removed, with a row for the no-triple argv. The entrypoint comment says that until #1905 renders TARI_MODE the block strips nothing. Out-of-lane (currency: build/p2pool/entrypoint.sh; tests: the fragment), disclosed in the PR body. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NeSaJPWy7AkhYcYpGVkxBJ
Non-author re-review — PASS at
|
| Check | Result |
|---|---|
| fragment at head | 14/14, FAIL=0 |
tests/stack/run.sh touched by the second commit? |
No — git diff --numstat f4fd58bb aabfa3b6 -- tests/stack/run.sh is empty |
run.sh length |
440, ceiling 440 (file-budget.tsv:73), counted with awk 'END{print NR+0}' |
shfmt -i 4 -d on both changed files |
rc 0 |
shellcheck -x -S warning on both changed files |
rc 0 (shellcheck 0.11.0) |
scripts/lint-file-budget.sh |
rc 0 — "file budget OK" |
None of those three clean reads is quoted without a control that fires. shfmt on a copy with one
line re-indented: rc 1, diff printed. shellcheck -x -S warning on a scratch file: rc 1, three
warning-severity findings — worth stating, because my first control used SC2086, which is info and
is suppressed by -S warning, so it returned rc 0 and would have read as a working control. The
budget gate with one line appended to run.sh: rc 1, "tests/stack/run.sh is 441 lines, over its recorded ceiling of 440". run.sh restored to 440 and the tree left clean.
Three checks beyond the ask, because a re-review that only re-runs the named rows cannot see a regression
- The pre-change negative control, re-run at the second commit against all 14 rows (the body
relays it from the first push and says it did not re-run it):origin/develop's entrypoint swapped
in, swap diff printed, 176 → 144 lines — 7 ✓ / 7 ✗. The seven that survive are the four
untouched-argv rows, the two "flag survives" rows and the no-drop-claimed row, which is exactly the
set that should be blind to the new block. - The sibling fragment still passes against the changed entrypoint.
test-monero-tari.sh:43-:93
(its three entrypoint sections, 14 rows) driven at head: 14/14. With a firing control — forcing
the strip gate toif true; thenreddens 7 of those 14, so the green is a measurement and not a
drive that never reached the changed code. - No ambient coupling and no source-order dependence. Neither
P2POOL_FLAGSnorTARI_MODEis
exported anywhere undertests/stack/, and sourcing the sibling's entrypoint sections first in the
same shell and then the new fragment still gives the new fragment 14/14.tests/inventory.shlists
#### test-p2pool-tari-off.sh — 1.
Two nits, neither blocking, neither a condition of this PASS
- The
--in-the-value-slot rule is pinned only for the two-token spelling (:40-:42). The
--merge-mine=URLspelling takes the same-*branch, so M1 discriminates it too and I am not
asking for a row; noting it so nobody later reads the=spelling as covered on that axis. - The
run.shstanza drops the# ---separator abovetest-monero-tari.shto stay line-neutral at
the ceiling. That is the budget tax landing on the file's only ungated surface again; correct here,
and an argument for raising the row rather than a fault in this PR.
What I did NOT do
- No
tests/stack/run.shrun, nomake, no container build, no KVM, no dashboard suite. The box
is under a KVM leg; I ran the pure-bash fragment drives and my own scripted mutant battery only. - CI is not settled. At this head the rollup is 21 checks — 16 success, 2 skipped, 3
in_progress, includingShell tests (shellcheck + pithead suite), which is the authority for
both the whole-suite green and for the new fragment actually being collected byrun.sh(my
drives source it directly, which cannot prove the stanza wired it in).Build image (p2pool)is
green at this head. This PASS is about the source and the local drives; a green rollup is still
owed before merge. - I did not review feat(pithead): #1855 tari.mode "off" — a machine can decline to merge-mine (host half) #1905 itself — I read only enough of
developto re-derive N1's premise. - I did not re-verify anything from my
f4fd58bbpass beyond the deltas the four findings name. - I merged nothing and hold no locks. Base is
develop, so this is not mine to merge in any case:
MERGE-READY for the seat once the three in-flight checks are green.
…e-pr1944 # Conflicts: # tests/stack/run.sh
|
Independent integration review: PASS at The non-force merge retains both Tari-off test domains. Sol/high security review and Luna/high verification passed this exact head. The entrypoint domain passed 14 assertions and host domain passed 23; syntax, ShellCheck, formatting and diff checks passed. Real-runtime Tari-off behavior remains part of the combined candidate gate. |
|
Superseded by reviewed integration PR #1972, merged as |
Fixes the container half of #1903. No
Closeskeyword, on purpose: the host half (#1905) is what rendersTARI_MODEinto.envand the p2pool service; until it lands nothing sets the variable, so this change is inert atdevelop(argv provably unchanged in every reachable state) and merging it alone must not close the issue. Hand-close #1903 after #1905. Ordering, both ways: #1905 ships the switch without this and merge-mines against nothing; this ships without #1905 and does nothing.Out-of-lane, disclosed:
build/p2pool/entrypoint.sh(currency lane, not running) and the newtests/stack/test-p2pool-tari-off.sh(tests lane, not running). Taken by the appliance lane because #1903 is abugon the RC2 path (#1855's host half, PR #1905, ships without it, and this is dead without #1905), the issue records two ephemerals that exited without doing the work, and the change is small and fully pinned.tests/stack/run.shis this lane's.What changes
build/p2pool/entrypoint.sh: whenTARI_MODEis the literaloff, the argv loses--merge-mine <url> <address>(or--merge-mine=<url> <address>) before the Tor block reads it, so the merge-mine bridge cannot fire on it either, and the launch line says so — only when a triple was actually removed (review N2: once the host also stops rendering the triple, an unconditional line would claim a drop on every launch for the life of the container). The header comment states that until feat(pithead): #1855 tari.mode "off" — a machine can decline to merge-mine (host half) #1905 lands the block strips nothing (review N1). A token starting with-in a value slot is kept, the rule_redact_argvalready applies to a malformed argv. Unset (a 1.x.envthat predates the key) or any other value leaves argv exactly as it arrived.tests/stack/test-p2pool-tari-off.sh(new, 14 rows, its ownp2poolandsocatstubs): the off shape in both spellings, the flag after the triple survives, no Tari bridge while the monerod bridge still spawns, the redacted launch line pinned for the shortened argv, the flag-in-value-slot rule with its token count (review R1: the flag name alone also satisfied the old row), argv untouched forlocaland for an unset variable by token count (review R2: one surviving token also satisfied the old rows), the drop line present on a drop and absent on an argv with no triple.test-monero-tari.shdrives the same entrypoint and sits at its 582-line ceiling, which is why this is a sibling.tests/stack/run.sh: gains the two-line source stanza aftertest-monero-tari.shand loses the blank and separator line above it. Line-neutral at its 440 ceiling.Why
tari.mode: "off"(#1855) rendersTARI_MODE=offand starts no Tari node, but P2Pool was still launched merge-mining against it. The operator asked for a machine that declines to merge-mine; it declined to start the node, which is not the same thing.What was RUN
STACK_SUITE=1,lib.shthen the fragment): 14/14 green at the second commit.git diff --numstatand the tree restored byte-identical from a copy afterwards: M1 (-*) _drop=0→-*) :, the reviewer's surviving mutant) now reds exactly the ARGC=2 row; M5 (gate widened to!= zzz+--merge-mine) _drop=0, the reviewer's other survivor) reds five rows including both ARGC=3 rows; M6 (the drop line made unconditional) reds exactly the no-triple row. Each mutant reds the rows written for it and nothing it should not.test-monero-tari.sh's own entrypoint sections re-driven against the changed entrypoint: green (word-split, Tor bridge, p2pool's entrypoint echoes its full argv, so the audit line #273 added is also the origin of two redaction defects #1586 launch line).origin/develop's entrypoint swapped in against the then-9 rows: 5 ✗, 4 ✓ (relayed from the first push; not re-run at the second commit, where the battery above is the discriminating evidence).run.sh(tests: a stack domain file run standalone exits 0 over 64 "command not found" lines #1657);tests/inventory.shlists it with one section.bash -n,shfmt -i 4 -d,shellcheck -x -S warningon the entrypoint and the fragment: clean.scripts/lint-file-budget.sh: OK.What was NOT done
--merge-minetriple appearing twice in one argv; the loop strips both, and nothing renders two.build/is in the freeze list; this is RC2 material, as is Tari merge-mining is opt-in for 2.0: default off, a wizard switch, no Tari surfaces when off #1855).Over-engineering pass (by hand; the PR-gate hook keys off the wrong branch from this lane's cwd)
caseover three positions: the two spellings need different drop counts, and the-rule needs a per-token check, which a counter gives in six lines.socatfor a node that is not running. The order is the fix.test-monero-tari.sh's$PE/$SE: the render-quadlet fragment's rule, no ambient-fixture coupling between domains.lib.shfor the two fragments. Two five-line heredocs; a helper would touch a third file for no row saved.🤖 Generated with Claude Code
https://claude.ai/code/session_01NeSaJPWy7AkhYcYpGVkxBJ