node: CLI and conf share apply_kv (X-05) - #418
Merged
Merged
Conversation
rearden-grok
Bot
force-pushed
the
node/x05-shared-apply
branch
from
September 11, 2026 00:32
ffe38c7 to
28bffe9
Compare
rearden-grok
Bot
changed the base branch from
fuzz/x07-out-of-net
to
master
September 11, 2026 00:38
added 2 commits
September 10, 2026 17:51
CLI --key=value and conf key=value must share apply_kv (conf then CLI). Today --network=regtest / --chain=regtest / --noseeds=1 are unknown arguments. Pin equals-form, the --chain alias, bool form, and conf override on shipped cli_main / apply_kv before the parser rewrite.
Parse CLI flags into the same key/value stream as conf and run apply_kv after the conf file (CLI wins). Delete CliAccum and the field-by-field copy. Keep --smoke/--help/--version/--conf/--log-level as CLI-only. DatadirOpts is a path field plus path(); store/run call sites use that instead of Deref.
rearden-grok
Bot
force-pushed
the
node/x05-shared-apply
branch
from
September 11, 2026 00:51
28bffe9 to
bed8ad5
Compare
Dropping CliAccum.milestone_set made `if height == 0 { network default }`
overwrite CLI/conf `0` on mainnet/signet/testnet (840000/2000000/2500000).
OPERATOR: 0 means full scripts. apply_kv now records milestone_explicit;
assembly fills the network default only when the key was omitted.
operator_config_from_args is the shipped parse path the pin drives.
rearden-grok
Bot
force-pushed
the
node/x05-shared-apply
branch
from
September 11, 2026 00:55
bed8ad5 to
f166382
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Suggested-order step 7 / inventory X-05 (also D-01): CLI
--key[=value]and confkey=valueshareNodeConfig::apply_kvwith precedence conf then CLI.CliAccumand the field-by-field copy intoNodeConfigare gone.--smoke,--help/-h,--version/-V,--conf,--log-level(log init).DatadirOptsis a plainpathfield plusfn path()(no Deref / DerefMut /PartialEq<PathBuf>/AsRef).flag_matrix_cli_equals_conf_apply_kv) covers=value,--chainalias,--noseeds=1bool form, and conf→CLI override on shippedcli_main/apply_kv.Stacked on #416 (
fuzz/x07-out-of-net). Production default stays Mainnet. Fixtures stay Tiny. Do not merge unless asked.Test plan
cargo test -p rbitcoin-node --lib flag_matrix_cli_equals_conf_apply_kv(was red on--network=regtestunknown)cargo test -p rbitcoin-node --lib unknown_and_missing_value_errorscargo test -p rbitcoin-node --lib(75 tests)Do not merge unless asked.