Skip to content

fix(platform-wallet): re-seed shield regression fixture for the protocol 14 fee rebalance - #4489

Open
QuantumExplorer wants to merge 1 commit into
v4.2-devfrom
claude/laughing-villani-732a0f
Open

fix(platform-wallet): re-seed shield regression fixture for the protocol 14 fee rebalance#4489
QuantumExplorer wants to merge 1 commit into
v4.2-devfrom
claude/laughing-villani-732a0f

Conversation

@QuantumExplorer

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

wallet::platform_wallet::shield_input_selection_tests::regression_reports_max_from_usable_suffix_not_total_account_balance panics on a clean checkout of v4.2-dev when run with --features shielded:

regression shape requires the leading address to stay below the reserve; re-seed the balances if the versioned reserve drops under 297_264_780

This is fixture fallout from #4467: the rebalance dropped the PV14 two-action minimum shielded fee to 114,140,000 credits, so the shield planner's input-0 reserve (2× the fee, shield_fee_reserve_credits) fell from 325,702,400 to 228,280,000. The fixture's leading address (297,264,780) was below the old reserve but is above the new one, so it no longer stays out of the usable suffix — exactly the drift the test's guard assert exists to catch.

What was done?

Re-seeded the fixture as the guard message instructs: the leading address goes 297,264,780 → 197,264,780 (back below the reserve — input-0 viability is strict > reserve, so ≤ reserve keeps it excluded), and the guard assert plus the derived account total (3,921,114,000 → 3,821,114,000) follow. The other two balances, the usable-suffix total (3,623,849,220), and the pinned capacity-error values are untouched, so the regression keeps asserting its original intent: max shieldable capacity is reported from the usable suffix, not the total account balance.

How Has This Been Tested?

  • cargo test -p platform-wallet --lib --features shielded regression_reports_max_from_usable_suffix — passes (note: the module is gated behind the shielded feature, which is why default test runs never execute it)
  • cargo test -p platform-wallet -p platform-wallet-ffi -p platform-wallet-storage --all-features — all suites pass
  • cargo fmt --all, cargo clippy --workspace --all-targets -- -D warnings, cargo check --workspace --all-features — clean

Breaking Changes

None — test-only change.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

🤖 Generated with Claude Code

…col 14 fee rebalance
The #4467 rebalance dropped the PV14 two-action minimum shielded fee to
114,140,000 credits, so the shield planner's input-0 reserve (2x the fee)
fell from 325,702,400 to 228,280,000. The usable-suffix regression fixture
seeded its leading address with 297,264,780 - below the old reserve but
above the new one - so the address no longer stays out of the usable
suffix and the test's guard assert panics on a clean checkout when run
with --features shielded.
Re-seed the leading address to 197,264,780 (back below the reserve) and
update the guard and the derived account total. The other balances, the
usable-suffix total, and the pinned capacity-error values are unchanged,
preserving the regression's intent: max shieldable capacity must be
reported from the usable suffix, not the total account balance.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 1 minute.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5ff01844-b52d-4e5f-be95-5f0f5491d1eb

📥 Commits

Reviewing files that changed from the base of the PR and between 31f5eec and e8494b8.

📒 Files selected for processing (1)
  • packages/rs-platform-wallet/src/wallet/platform_wallet.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actionsgithub-actionsBot added this to the v4.2.0 milestone Aug 26, 2026
@thepastaclaw

thepastaclaw commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

✅ Final review complete — no blockers (commit e8494b8)

@thepastaclawthepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Final validation — Codex/Sol only (Phase 2 disabled)

At exact head e8494b8, the fixture update correctly keeps the leading balance below the protocol 14 reserve while preserving the usable suffix, capacity assertions, and arithmetically correct account total. The targeted shielded-feature regression test passes, and no in-scope issues were found.
Source: reviewer backend model gpt-5.6-sol; final verifier backend model gpt-5.6-sol. Orchestration-only (not reviewer evidence): openclaw-agent/cliproxy/gpt-5.6-sol.

Validated zero-blocker Codex/Sol precheck evidence was promoted to final because Phase 2 (Sonnet/Opus) is temporarily disabled. This is Codex/Sol-only final validation, not Codex + Sonnet/Opus coverage.

Review provenance

  • Codex reviewers: gpt-5.6-sol — general (completed)
  • Verifier: gpt-5.6-sol — verifier
  • Sonnet/Opus: not run (Phase 2 disabled — temporary Codex/Sol-only final)
  • Secondary pass: disabled (temporary_phase2_sonnet_disable)

Sign up for freeto 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

@QuantumExplorer@thepastaclaw