Skip to content

test: repair the reconcile fixtures broken by #182 — main's CI is red - #186

Merged
dcccrypto merged 1 commit into
dcccrypto:mainfrom
0x-SquidSol:fix/reconcile-poc-accounts
Sep 2, 2026
Merged

test: repair the reconcile fixtures broken by #182 — main's CI is red#186
dcccrypto merged 1 commit into
dcccrypto:mainfrom
0x-SquidSol:fix/reconcile-poc-accounts

Conversation

@0x-SquidSol

Copy link
Copy Markdown
Contributor

main's CI has been red for two days and this fixes it. Small, test-only, no production changes — please take this ahead of my other open PRs.

What broke

CI on main has failed since fix(nft): ReconcileBurnedNft reclaims mint and ExtraAccountMetaList rent (#182) merged on 2026-08-31. The four commits before it are green:

failure  2026-08-31T14:20  fix(nft): ReconcileBurnedNft reclaims mint and Extra…
success  2026-08-31T14:19  fix(nft): make GetPositionValue fail-CLOSED on stale
success  2026-08-31T14:19  fix(nft): hand closed PDAs back to the System progra
success  2026-08-31T14:19  fix(nft): gate the devnet wrapper id behind a devnet
success  2026-08-31T14:19  fix(nft): record last_holder on CPI-mediated transfe

#182 changed ReconcileBurnedNft's account contract, and two older PoC fixtures were not updated with it. Both are mine, from #179 and #175 — this is my regression to fix.

Three changes, all fixtures

  1. Two accounts added. [LOW] ReconcileBurnedNft abandons the NFT mint and ExtraAccountMetaList PDA — ~0.0068 SOL per NFT, unrecoverable (the #102 leak, on the path added later by #138) #182 made extra_metas (7) and token_program (8) required rather than optional, so the mint and ExtraAccountMetaList rent can be reclaimed while nft_pda is still alive. The fixtures passed 7 and failed NotEnoughAccountKeys.
  2. nft_mint is now writable. Reconcile closes it to reclaim rent and rejects a read-only one — which surfaced as InvalidAccountData once the count was right.
  3. The expected payout doubled. Reconcile now sweeps the ExtraAccountMetaList rent to last_holder alongside the nft_pda rent, so PDA_RENT became PDA_RENT + PDA_RENT. Named RECONCILE_PAYOUT with the reason rather than repeating the arithmetic at three call sites.

These are fixtures catching up to a deliberate behaviour change, not being relaxed: each now asserts strictly more than before — two extra accounts pinned, writability pinned, a larger payout pinned.

Why it went unnoticed for two days

cargo test cannot build as shipped. solana-sdk and proptest are declared in [dev-dependencies], referenced nowhere in src/ or tests/, and solana-sdk drags in openssl-sys, which fails without a system OpenSSL. So the suite aborts before compiling a single test on any machine without one — nobody running it locally would have seen this, and CI was the only signal.

That is #184 item 4.1. It is fixed in my follow-up hardening PR rather than here, to keep this one reviewable at a glance.

Verification

Both feature configurations, zero failures:

  • cargo test --lib --tests — 54 lib + all four PoC binaries green
  • cargo test --lib --tests --features devnet — green

(Run locally with the unused dev-deps temporarily stripped, since that is the only way the suite builds today; CI has OpenSSL and will run them as-is.)

🤖 Generated with Claude Code

…CI is red

CI on main has failed since `fix(nft): ReconcileBurnedNft reclaims mint and
ExtraAccountMetaList rent (dcccrypto#182)` merged; the four commits before it are green.
dcccrypto#182 changed ReconcileBurnedNft's account contract and two older PoC fixtures
were not updated with it. Both are mine, from dcccrypto#179 and dcccrypto#175.

Three changes, all in test fixtures -- no production code:

1. Two accounts added. dcccrypto#182 made `extra_metas` (7) and `token_program` (8)
   REQUIRED rather than optional, so the mint and ExtraAccountMetaList rent can
   be reclaimed while nft_pda is still alive. The fixtures passed 7 accounts and
   failed with NotEnoughAccountKeys.

2. `nft_mint` is now writable. Reconcile closes it to reclaim its rent and
   rejects a read-only one, which surfaced as InvalidAccountData once the
   account count was right.

3. The expected payout doubled. Reconcile now sweeps the ExtraAccountMetaList
   rent to `last_holder` alongside the nft_pda rent, so the fixtures' PDA_RENT
   expectation became PDA_RENT + PDA_RENT. Named as RECONCILE_PAYOUT with the
   reason, rather than repeating the arithmetic at three call sites.

These are the fixtures catching up to a deliberate behaviour change, not a
relaxation: each one now asserts MORE than it did (two extra accounts pinned,
writability pinned, a larger payout pinned).

Worth noting how this went unnoticed for two days: `cargo test` cannot build as
shipped, because `solana-sdk` and `proptest` are declared as dev-dependencies,
used nowhere, and drag in openssl-sys. So nobody running the suite locally would
have seen it -- only CI, which nobody was watching. That is dcccrypto#184 item 4.1 and it
is fixed separately.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 31 minutes.

Check out review usage here.

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: defaults

Review profile: CHILL

Plan: Team

Run ID: 7e0afc52-b69e-4d72-b816-5020588b4114

📥 Commits

Reviewing files that changed from the base of the PR and between 985f523 and 75a7fd8.

📒 Files selected for processing (2)
  • tests/poc_pda_revival_brick.rs
  • tests/poc_stale_last_holder.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.

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