Repository navigation
Description
What's the problem
Config parsing and validation and the control-writable allowlist live in Bash and lean on jq (about 200 mentions in rigforge.sh): parse_config, _validate_host_port, _validate_pool_url. The Rust servers, the tick and the CLI all need this logic, and jq stays a runtime dependency until it is replaced. Most helpers have no dispatcher verb, so without a hidden subcommand the unchanged oracle cannot reach a Rust port and it would be dead code.
What it impacts
Every later slice, plus rig correctness: validation errors and the allowlist.
How I found it
Function map of rigforge.sh at ea41133 and tests that pin the behavior (tests/test-config-ownership.sh, the allowlist-subset guard in tests/run.sh). Unknown: whether jq-free parsing changes any error text asserted by tests/run.sh.
How important is it
Medium; shared base for the high-value slices.
Acceptance criteria
- A library exposes config load and validation and the writable allowlist.
- A hidden helper subcommand is called by the Bash functions when
RIGFORGE_IMPL=rust(hybrid, listed in the ledger), so both sourced-function and black-box tests reach the Rust code. - With
RIGFORGE_IMPL=rust,tests/test-config-ownership.shand the allowlist guard pass with no edits. - Native unit tests cover each validator with accepted and rejected inputs lifted from the Bash tests; error messages that tests assert are byte-identical.
- The allowlist is generated from or checked against the same source as the
tests/run.shguard so the sets cannot diverge. -
PARITY.mdlists each helper native, hybrid or Bash fallback.make checkpasses.
Possible solutions
- Port
parse_configand validators one function per PR. - JSON via
serde_jsonor a smaller crate; decided by dependency audit. - Keep
jqfor anything not yet ported; the ledger tracks it.
Release: issue rigforge#856 closed
Who: operator
Activity