Skip to content

Cursor/agcli audit merged e2e7#6

Merged
unarbos merged 87 commits into
mainfrom
cursor/agcli-audit-merged-e2e7
May 27, 2026
Merged

Cursor/agcli audit merged e2e7#6
unarbos merged 87 commits into
mainfrom
cursor/agcli-audit-merged-e2e7

Conversation

@unarbos

@unarbos unarbos commented May 27, 2026

Copy link
Copy Markdown
Owner

No description provided.

cursoragent and others added 30 commits May 27, 2026 11:24
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
…s/delegate.md

- 15 parse-surface + error-classify tests, 1 ignored integration test
- Documents all 4 DelegateCommands subcommands with pallet refs, storage keys, events, exit codes
- Audit findings: List 50-cap, Show ignores --output, DelegateTxRateLimitExceeded not hinted, hardcoded 18% cap, no CLI surface for admin-utils sudo_set_min_delegate_take

Co-authored-by: Arbos <unarbos@users.noreply.github.com>
- tests/audit_config.rs: 28 parse-surface + handler tests for all 6
  ConfigCommands variants (Show, Set, Unset, Path, CacheClear, CacheInfo),
  spending-limit validation, TOML round-trip, and one #[ignore] localnet stub.
- docs/commands/config.md: add CacheClear and CacheInfo subcommands (were
  undocumented); add exit-code tables; document finalization_timeout and
  mortality_blocks as TOML-only fields with no config-set surface; note that
  config show ignores --output json.

Co-authored-by: Arbos <unarbos@users.noreply.github.com>
- tests/audit_contracts.rs: 15 parse-surface tests covering all 4 subcommands
  (upload, instantiate, call, remove-code) plus one #[ignore]-gated localnet
  integration test (green_path_contracts)
- docs/commands/contracts.md: full rewrite with clap flags+types, exit codes,
  SCALE encoding notes, on-chain events, pallet index, storage keys, and
  missing-surface audit findings (instantiate_with_code, set_code, dry-run RPC)

Co-authored-by: Arbos <unarbos@users.noreply.github.com>
- tests/audit_proxy.rs: 32 parse-surface tests covering all 11 proxy subcommands (add, remove, remove-all, create-pure, kill-pure, list, announce, proxy-announced, reject-announcement, list-announcements, remove-announcement) + 1 #[ignore] localnet integration test
- docs/commands/proxy.md: complete rewrite with all 11 subcommands, full flag tables, JSON output schemas, exit codes, pallet refs, storage keys, events, proxy type table (18 types vs 11 previously documented)

Co-authored-by: Arbos <unarbos@users.noreply.github.com>
…et.md docs

- tests/audit_wallet.rs: parse-surface tests for all 13 WalletCommands variants,
  handler-level green-path tests, error-path tests, and one ignored localnet test
- docs/commands/wallet.md: complete rewrite with all subcommands, exit codes,
  JSON output schemas, pallet refs, storage keys, and events
- Fix doc error: coldkeypub.txt stores raw hex pubkey (not SS58 address)

Co-authored-by: Arbos <unarbos@users.noreply.github.com>
- tests/audit_view.rs: 53 parse-surface tests covering all 15 ViewCommands
  subcommands (Portfolio, Network, Dynamic, Neuron, Validators, History,
  Account, SubnetAnalytics, StakingAnalytics, SwapSim, Nominations,
  Metagraph, Axon, Health, Emissions) plus the top-level Audit command,
  argument-encoding unit tests, and one #[ignore] localnet integration test.
- docs/commands/view.md: full rewrite documenting every subcommand with
  clap flags + types, exit codes, output JSON schema, CSV header, pallet
  storage references, and audit findings inline.

Co-authored-by: Arbos <unarbos@users.noreply.github.com>
…md docs

- tests/audit_completions_update.rs: 23 parse-surface tests + 1 #[ignore] localnet stub
  covering Commands::Completions (all 4 shells, invalid shell rejection, missing shell
  rejection), Commands::Update (parse, extra-arg rejection, global flag), utils convert
  (RAO↔TAO, TAO→RAO --to-rao, TAO↔Alpha with --netuid, no-flags), utils latency
  (defaults, --extra, --pings), and command_name_audit variants.

- docs/commands/utils.md: full refresh with clap flag tables, exit-code tables for
  every subcommand (convert, latency, completions, update), JSON output schemas,
  pallet reference notes (all no-chain-write), and findings notes on latent bugs.

Co-authored-by: Arbos <unarbos@users.noreply.github.com>
- tests/audit_swap_keys.rs: 15 parse-surface tests covering all 3 SwapCommands
  variants (hotkey, coldkey, evm-key) + 1 ignored localnet green-path stub
- docs/commands/swap.md: full rewrite documenting all 3 subcommands with clap
  flags, types, exit codes, pallet refs, SCALE argument tables, events emitted,
  and a new §Missing CLI Surface table listing 7 unimplemented dispatchables

Key findings documented:
- swap coldkey calls deprecated schedule_swap_coldkey (always Err::Deprecated)
- swap evm-key missing --netuid arg; block_number type is u32 vs pallet u64
- swap_hotkey_v2, announce_coldkey_swap, swap_coldkey_announced, dispute_coldkey_swap,
  reset_coldkey_swap, clear_coldkey_swap_announcement, swap_coldkey have no CLI surface

Co-authored-by: Arbos <unarbos@users.noreply.github.com>
- Add tests/audit_balance_transfer.rs: 30 parse-surface + validation tests,
  1 #[ignore] localnet integration test
- Rewrite docs/commands/transfer.md: all 4 subcommands documented with clap
  flags, exit codes, JSON output schema, pallet ref, storage key, events,
  and 7 concrete audit findings

Co-authored-by: Arbos <unarbos@users.noreply.github.com>
- Add tests/audit_safe_mode.rs (17 parse-surface tests + 1 ignored
  localnet integration test)
- Refresh docs/commands/safe-mode.md with full subcommand reference:
  clap flags/types, exit codes, SCALE encoding, pallet call indices,
  storage keys, events emitted, pallet-vs-CLI coverage table, and
  missing subcommand stubs (force_extend, release_deposit, status)

Co-authored-by: Arbos <unarbos@users.noreply.github.com>
- tests/audit_identity.rs: 20 parse-surface tests covering all 4
  IdentityCommands subcommands (show, set, clear, set-subnet); field-
  surface negative tests confirming absent flags; 1 ignored localnet
  green-path placeholder.
- docs/commands/identity.md: complete rewrite documenting all 4
  subcommands with clap flags+types, exit codes, pallet refs, storage
  keys, events, and 10 concrete audit findings.

Co-authored-by: Arbos <unarbos@users.noreply.github.com>
…h.md

- tests/audit_batch.rs: 28 parse-surface + exit-code tests, 1 ignored localnet stub
  - Parse all --file, --no-atomic, --force, --yes, --output, --batch flag combinations
  - validate_batch_file unit tests: empty, too-many-calls, missing fields, non-array
  - Exit-code classification tests for IO/VALIDATION/GENERIC/CHAIN paths
  - Green-path #[ignore] integration test via process::Command for localnet

- docs/commands/batch.md: full refresh
  - Clap flag table with types and required/optional
  - Batch mode table mapping flags to Utility dispatchables
  - JSON format spec with field requirements, type mapping, limits
  - On-chain events emitted (BatchCompleted, ItemCompleted, BatchInterrupted, etc.)
  - Exit-code table covering IO/VALIDATION/CHAIN/AUTH/NETWORK/TIMEOUT/GENERIC
  - Utility pallet dispatchable coverage table noting as_derivative/dispatch_as/
    with_weight/if_else have no agcli surface
  - Audit Findings section with 6 concrete observations

Co-authored-by: Arbos <unarbos@users.noreply.github.com>
…k.md

- 33 parse-surface tests covering BlockCommands (Info, Latest, Range) and
  DiffCommands (Portfolio, Subnet, Network, Metagraph) with realistic args,
  boundary checks (u32::MAX, zero, overflow), required-flag rejection, global
  flag threading (--yes, --wallet, --output, --network), and range-guard
  arithmetic verification
- One #[ignore]-gated green_path_block tokio test for localnet (Docker unavailable)
- Compile-time guard test documenting the get_block_header 4-vs-5-field drift
- Documentation test recording block latest best-vs-finalized head discrepancy
- docs/commands/block.md: full rewrite with clap flags+types, exit codes cross-
  referenced to src/error.rs, JSON schemas, pallet/storage refs, on-chain events,
  coverage table, and findings for all 6 identified audit observations

Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
…e.md

- tests/audit_stake.rs: 50 parse-surface tests covering all 22 StakeCommands variants,
  validation helpers, error classification, and one #[ignore] localnet integration test
- docs/commands/stake.md: full rewrite documenting all 22 subcommands with clap flags+types,
  exit codes, output JSON schema, pallet ref + storage keys, events emitted, and 8 audit findings

Co-authored-by: Arbos <unarbos@users.noreply.github.com>
cursoragent and others added 29 commits May 27, 2026 15:04
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
Co-authored-by: Arbos <unarbos@users.noreply.github.com>
@unarbos unarbos merged commit e9885fe into main May 27, 2026
3 of 5 checks passed
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.

2 participants