What
Nothing in tests/ pins the property _writable_config_canonical exists to hold: that the feed
serves a pool's stored fields as stored, inventing neither user nor pass. The property is
currently carried by a comment in _control_commit (rigforge.sh:4368-4375), and a comment does
not redden.
Why it needs a guard rather than a note
parse_config normalizes pools on the way to XMRig: a missing pass becomes the literal "x"
(rigforge.sh:488) and a missing user becomes "" (rigforge.sh:487, with the rig name filled
later, in generate_xmrig_config). _api_config_json then masks any non-empty string pass to a
__secret__ sentinel (rigforge.sh:5290).
Point the canonical view at the normalized array and the two compose into a live defect: every pool
that stores no password is advertised to the consumer as holding one; the sentinel comes back;
stored finds nothing to keep; the marker survives the merge; and the commit is rejected
unresolvable-secret-marker. Every pools edit on such a rig fails, and the failure names a secret
the operator never set.
That is exactly the substitution a future refactor makes for good-looking reasons — "use the parsed
pools, we already have them" — and today the only thing standing in its way is a paragraph.
Shape the test should take
Tier 1, in tests/run.sh beside the existing _api_config_json rows: drive
_writable_config_canonical / _api_config_json on a config whose pool carries only a url,
and assert the served pool has no user key and no pass key — not that it has empty ones. Assert
absence, not a placeholder value, or a later // "" default passes the test while reintroducing the
defect.
It needs a fired control to be worth anything: a second pool that DOES store a pass must come back
carrying the __secret__ sentinel in the same run, or the row cannot distinguish "serves nothing"
from "serves nothing because the fixture never reached the mask".
Provenance
Raised as a non-blocking finding by the non-author reviewer of PR #427, whose blocking finding was
that the comment describing this hinge named the wrong key. The comment is corrected there; this is
the part that makes it a guard instead of prose. Filed rather than folded into #427: it is a
separate change with its own suite run, and #427 is test-and-comment only.
What
Nothing in
tests/pins the property_writable_config_canonicalexists to hold: that the feedserves a pool's stored fields as stored, inventing neither
usernorpass. The property iscurrently carried by a comment in
_control_commit(rigforge.sh:4368-4375), and a comment doesnot redden.
Why it needs a guard rather than a note
parse_confignormalizes pools on the way to XMRig: a missingpassbecomes the literal"x"(
rigforge.sh:488) and a missinguserbecomes""(rigforge.sh:487, with the rig name filledlater, in
generate_xmrig_config)._api_config_jsonthen masks any non-empty stringpassto a__secret__sentinel (rigforge.sh:5290).Point the canonical view at the normalized array and the two compose into a live defect: every pool
that stores no password is advertised to the consumer as holding one; the sentinel comes back;
storedfinds nothing to keep; the marker survives the merge; and the commit is rejectedunresolvable-secret-marker. Every pools edit on such a rig fails, and the failure names a secretthe operator never set.
That is exactly the substitution a future refactor makes for good-looking reasons — "use the parsed
pools, we already have them" — and today the only thing standing in its way is a paragraph.
Shape the test should take
Tier 1, in
tests/run.shbeside the existing_api_config_jsonrows: drive_writable_config_canonical/_api_config_jsonon a config whose pool carries only aurl,and assert the served pool has no
userkey and nopasskey — not that it has empty ones. Assertabsence, not a placeholder value, or a later
// ""default passes the test while reintroducing thedefect.
It needs a fired control to be worth anything: a second pool that DOES store a
passmust come backcarrying the
__secret__sentinel in the same run, or the row cannot distinguish "serves nothing"from "serves nothing because the fixture never reached the mask".
Provenance
Raised as a non-blocking finding by the non-author reviewer of PR #427, whose blocking finding was
that the comment describing this hinge named the wrong key. The comment is corrected there; this is
the part that makes it a guard instead of prose. Filed rather than folded into #427: it is a
separate change with its own suite run, and #427 is test-and-comment only.