test(api_remote): rename second-send test to carry _roundtrip_ substring - #137
Merged
Merged
Conversation
PR #132 added `second_send_succeeds_without_prev_commitment_pubkey_field` as the fourth mutating roundtrip in `node/tests/api_remote.rs`, but its name did not contain the `_roundtrip_` substring relied on by `deploy-prd.yaml`'s `--skip _roundtrip_` filter. The PRD api-e2e job therefore executed this mutating test against the live PRD node, where it produced a 422 "Unable to get merkle proofs for provided public key" because the scanner had not yet ingested the test's send-#1 commit inscription on a slow Mainnet block-time when send-#2 fired. Rename to `second_send_roundtrip_succeeds_without_prev_commitment_pubkey_field` so the test name conforms to the established `<flow>_roundtrip_<assertion>` pattern used by `mint_roundtrip_lands_balance_and_proof` and `send_commit_roundtrip_moves_balance`. This restores the substring-filter contract: every name with `_roundtrip_` mutates publisher UTXOs and the PRD SMT/MMR, every name without it is read-only. Also update the live-server-analogue cross-reference in the unit test docstring at `node/src/account_node_tests.rs:774`. The unit test itself (`test_send_coins_second_send_succeeds_without_prev_commitment_pubkey`) is not renamed — it is not under the substring-filter contract. No behavioural change. The test body, the wallet, and the workflow `--skip` filter are unchanged. Signed-off-by: TaprootFreak <142087526+TaprootFreak@users.noreply.github.com>
TaprootFreak
marked this pull request as ready for review
May 29, 2026 07:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR #132 added
second_send_succeeds_without_prev_commitment_pubkey_fieldto the api_remote suite. It's a fully mutating roundtrip test (mints via the publisher, broadcasts commit inscriptions, writes into the SMT/MMR) — structurally identical tosend_commit_roundtrip_moves_balancein terms of side effects.The Deploy PRD workflow excludes mutating roundtrips with
--skip _roundtrip_(substring match, see.github/workflows/deploy-prd.yaml:103-145). The new test's name doesn't contain_roundtrip_, so it slipped through the filter and ran against the live PRD node — failing with422 Unable to get merkle proofs for provided public keybecause Mainnet block-times are slow enough that the scanner hadn't yet ingested send-#1's commit inscription into the SMT when send-#2 fired.DEV e2e passes the same test on the same image (Mutinynet block-times are fast enough that the scanner catches up in-window). The PR #135 protocol fix is verified there. This PR is a pure naming-convention restoration — no behavioural change, no production impact, just putting the test back inside the substring-filter contract that's been in place since the suite was first split into PRD-skip vs DEV-full.
Change
Rename in
node/tests/api_remote.rs:1957:second_send_succeeds_without_prev_commitment_pubkey_fieldsecond_send_roundtrip_succeeds_without_prev_commitment_pubkey_fieldUpdate the live-server-analogue docstring cross-reference in
node/src/account_node_tests.rs:774to match. The unit test itself (test_send_coins_second_send_succeeds_without_prev_commitment_pubkey) stays — it isn't under the substring-filter contract and the unit-test naming style differs from the e2e style.Verification
grep -E '^(async )?fn [a-z_]+_roundtrip_' node/tests/api_remote.rsafter the rename:mint_roundtrip_lands_balance_and_proofsend_commit_roundtrip_moves_balancesecond_send_roundtrip_succeeds_without_prev_commitment_pubkey_fieldThree matches.
username_claim_resolve_lnurlp_roundtripends with_roundtrip(no trailing underscore) and therefore doesn't match either the regex above OR the workflow's--skip _roundtrip_filter — it's currently masked byZKCOINS_E2E_ALLOW_FEATURE_TRIMMED_SERVERbecause LNURL is off on the PRD MVP image. Not in scope for this PR; flagged for follow-up.Test plan
cargo fmt --checkcargo clippy -p node -p shared -- -D warningscargo clippy -p node --all-features -- -D warningscargo check --workspace --all-features --testscargo test -p node --lib account_node::tests::test_send_coins_second_send_succeeds_without_prev_commitment_pubkey -- --test-threads=1— 1 passedci:fullneeded)second_send_roundtrip_succeeds_without_prev_commitment_pubkey_fieldruns on DEV and passes; PRD skips it (no 422 from Mainnet timing race)Follow-up (out of scope)
username_claim_resolve_lnurlp_roundtripshould either be renamed to carry_roundtrip_as a substring (e.g.,username_claim_roundtrip_resolves_lnurlp) or the workflow's filter relaxed toroundtripwithout trailing underscore.deploy-prd.yaml:103-108comment claiming "three roundtrip tests" needs updating once the substring contract is canonical across all four.