Repository navigation
Description
Spun out of the multi-agent review on #1137 (type-design finding). Pre-existing, but #1137 turns it into a small fix.
Problem
AppealSlashArgs flattens the full ChainArgs (crates/common/src/cli/appeal.rs:32), so decdn appeal slash accepts — and silently ignores — every flag on it that the appeal path never reads. Verified against the built binary (decdn appeal slash --help):
--capacity-bond-address <ADDR>
--swap-venue <SWAP_VENUE>
--swap-router-address <ADDR>
--swap-quoter-address <ADDR>
--usdc-address <ADDR>
--swap-fee-tier <FEE>
--swap-balancer-pool <ADDR>
--swap-pool-address <ADDR>
All 8 parse successfully and are never read. resolve_appeal touches only chain.common, and resolve_swap is called from exactly one place — setup.rs:1061. The ChainArgs doc comment already concedes it: "The --capacity-bond-address flag is unused by this command."
An operator who passes --swap-venue uniswap-v3 to appeal slash gets no error and no effect.
Why now
Before #1137 this was unfixable without duplicating the 8-field flag list. #1137 added the shared CommonChainArgs flatten struct, so the fix is now three signature changes:
AppealSlashArgs.chain: ChainArgs→chain: CommonChainArgschain_ctx::resolve_appeal(chain: &cli::ChainArgs, …)→(&cli::CommonChainArgs, …)(chain_ctx.rs:170) — it already reads onlychain.commonchain_ctx::load_operator_signer(chain: &cli::ChainArgs, …)→(&cli::CommonChainArgs, …)(chain_ctx.rs:220) — same; it reads onlychain.common.keystore_password_file
Both signatures currently demand more authority than they use, which is the smell the flatten struct exists to remove. As a bonus, publish.rs::signer_and_provider could then call load_operator_signer instead of reaching for load_signer_with_password_file directly.
Note on scope
This is a CLI-surface break: decdn appeal slash --swap-venue … would go from silently-accepted to a hard clap error. That is why it was deliberately kept out of #1137, which was a zero-behavior-change batch. Erroring on a flag that was previously ignored is the correct outcome, but it wants its own PR and a line in the changelog.
Filed from the #1137 review; verified against the built binary.
Metadata
Metadata
Assignees
Type
Fields
Priority
Activity
chore: tech-debt batch — watcher comment rot, publish CLI dedup, watc…
refactor(cli): decdn appeal slash no longer advertises 8 ignored flags (