Skip to content

refactor(cli): decdn appeal slash no longer advertises 8 ignored flags (#1138) - #1155

Merged
alpergundogdu merged 1 commit into
mainfrom
refactor/1138-appeal-slash-drop-unused-flags
Jul 15, 2026
Merged

alpergundogdu merged 1 commit into
mainfrom
refactor/1138-appeal-slash-drop-unused-flags

Conversation

@alpergundogdu

Copy link
Copy Markdown
Contributor

Closes #1138

Summary

AppealSlashArgs flattened the full ChainArgs, so decdn appeal slash accepted — and silently ignored — 8 flags the appeal path never reads. Passing e.g. --swap-venue uniswap-v3 to appeal slash produced no error and no effect.

The fix flattens only the shared CommonChainArgs subgroup (added in #1137) into AppealSlashArgs, dropping the CapacityBond / swap flag group the appeal command doesn't touch. chain_ctx::resolve_appeal and chain_ctx::load_operator_signer are narrowed from &ChainArgs to &CommonChainArgs (they already read only chain.common); the node on-chain callers (register, bond, setup) pass &args.chain.common, and publish::signer_and_provider now routes through load_operator_signer instead of reaching for the password-file path directly.

The 8 flags removed from appeal slash

--capacity-bond-address, --swap-venue, --swap-router-address, --swap-quoter-address, --usdc-address, --swap-fee-tier, --swap-balancer-pool, --swap-pool-address

Confirmed against the built binary (cargo run -p decdn-cli -- appeal slash --help) — the Options block now lists only flags the appeal path actually reads: --slash-appeal-address, --config, --rpc-url, --chain-id, --keystore, --data-dir, --keystore-password-file, --dry-run, --json. All 8 swap/bond flags are gone.

Note on scope

This is a deliberate CLI-surface break: decdn appeal slash --swap-venue … goes from silently-accepted to a hard clap error. Erroring on a flag that was previously ignored is the correct outcome; it was kept out of the zero-behavior-change #1137 for this reason.

🤖 Generated with Claude Code

#1138)

`AppealSlashArgs` flattened the full `ChainArgs`, so `decdn appeal slash`
accepted — and silently ignored — 8 flags the appeal path never reads:
`--capacity-bond-address`, `--swap-venue`, `--swap-router-address`,
`--swap-quoter-address`, `--usdc-address`, `--swap-fee-tier`,
`--swap-balancer-pool`, `--swap-pool-address`.

Flatten only the shared `CommonChainArgs` subgroup instead. The appeal
path reads nothing from the `CapacityBond` / swap group, so `resolve_appeal`
and `load_operator_signer` are narrowed to take `&CommonChainArgs` (they
already only touched `chain.common`); the `node` on-chain callers pass
`&args.chain.common`, and `publish::signer_and_provider` now routes through
`load_operator_signer` rather than reaching for the password-file path
directly.

This is a CLI-surface break: passing one of the 8 flags to `appeal slash`
now hard-errors in clap instead of being silently accepted.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Copilot AI review requested due to automatic review settings July 15, 2026 11:00
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@alpergundogdu, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Free

Run ID: 12463990-7191-4e32-86d1-889d41706ac4

📥 Commits

Reviewing files that changed from the base of the PR and between 6b10e7a and 8c0e6e2.

📒 Files selected for processing (7)
  • crates/cli/src/commands/appeal.rs
  • crates/cli/src/commands/bond.rs
  • crates/cli/src/commands/chain_ctx.rs
  • crates/cli/src/commands/publish.rs
  • crates/cli/src/commands/register.rs
  • crates/cli/src/commands/setup.rs
  • crates/common/src/cli/appeal.rs

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors CLI argument handling for the appeal command by replacing ChainArgs with CommonChainArgs in AppealSlashArgs. This prevents exposing unused flags (such as capacity bond and swap flags) that the command silently ignores. Helper functions like resolve_appeal and load_operator_signer in chain_ctx have been updated to accept CommonChainArgs instead of ChainArgs, and other commands (bond, publish, register, setup) have been adjusted to pass the appropriate common sub-arguments. I have no feedback to provide as there are no review comments.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@github-actions

Copy link
Copy Markdown

Gas snapshot

No gas changes vs base.

@github-actions

Copy link
Copy Markdown

Contracts coverage

Line coverage: 88.71% (2452/2764 lines)
▲ +0.00pp vs base (88.71% → 88.71%)
Run: 29410111234

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the decdn appeal slash CLI surface so it no longer advertises (and previously silently ignored) CapacityBond/swap-related flags by flattening only the shared CommonChainArgs subset. This keeps the appeal command’s flags aligned with what the appeal execution path actually reads, and tightens a couple of helper APIs to accept only the arguments they use.

Changes:

  • Replaces AppealSlashArgs.chain: ChainArgs with CommonChainArgs, removing the 8 unused swap/bond flags from decdn appeal slash.
  • Narrows chain_ctx::{resolve_appeal, load_operator_signer} to take &CommonChainArgs, updating callers (setup, register, bond, appeal) accordingly.
  • Routes publish::signer_and_provider through load_operator_signer to centralize password-file/env/prompt precedence.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crates/common/src/cli/appeal.rs Flatten CommonChainArgs into AppealSlashArgs to drop unused bond/swap flags from appeal slash.
crates/cli/src/commands/appeal.rs Update appeal execution to read config/dry-run/json directly from CommonChainArgs.
crates/cli/src/commands/chain_ctx.rs Tighten helper function signatures to &CommonChainArgs and reuse resolve_common directly.
crates/cli/src/commands/publish.rs Use load_operator_signer(&chain.common, …) for publish signer loading.
crates/cli/src/commands/setup.rs Pass args.chain.common into load_operator_signer after signature narrowing.
crates/cli/src/commands/register.rs Pass args.chain.common into load_operator_signer after signature narrowing.
crates/cli/src/commands/bond.rs Pass args.chain.common into load_operator_signer after signature narrowing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

Copy link
Copy Markdown

Coverage report

Total: 80.30% (was 80.28%, ▲ +0.01%) — 45239/56339 lines

File Coverage Lines Δ
crates/cli/src/commands/appeal.rs 48.73% 96/197 ▲ +0.97%
crates/cli/src/commands/bond.rs 31.46% 67/213 ● 0.00%
crates/cli/src/commands/chain_ctx.rs 86.07% 482/560 ● 0.00%
crates/cli/src/commands/publish.rs 52.54% 259/493 ▲ +0.42%
crates/cli/src/commands/register.rs 27.66% 52/188 ● 0.00%
crates/cli/src/commands/setup.rs 43.98% 427/971 ● 0.00%
History
Commit Total Δ vs base
8c0e6e2 (HEAD) 80.30% ▲ +0.01%

@alpergundogdu
alpergundogdu merged commit a5444d8 into main Jul 15, 2026
24 checks passed
@alpergundogdu
alpergundogdu deleted the refactor/1138-appeal-slash-drop-unused-flags branch July 15, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(cli): decdn appeal slash advertises 8 flags it silently ignores

2 participants