Skip to content

test(tbtc/signer): pin concrete coordinator vector in order-independence test#4027

Merged
mswilkison merged 1 commit into
extraction/frost-signer-mirror-2026-05-26from
test/signer-coordinator-vector-pin
Jun 11, 2026
Merged

test(tbtc/signer): pin concrete coordinator vector in order-independence test#4027
mswilkison merged 1 commit into
extraction/frost-signer-mirror-2026-05-26from
test/signer-coordinator-vector-pin

Conversation

@mswilkison

@mswilkison mswilkison commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Stacked on #4005 (base: extraction/frost-signer-mirror-2026-05-26). Companion to #4026 on the Go branch.

What

select_coordinator_is_input_order_independent in pkg/tbtc/signer/src/go_math_rand.rs asserted only that two input orderings of the member set agree — not what they agree on. This pins the concrete result (Some(4) for (members=[1..6], seed=333, attempt=4)), matching the value now pinned on the Go side in TestSelectCoordinator_CrossLanguagePinnedVectors (#4026).

Why

Coordinator selection must agree byte-for-byte between Go's SelectCoordinator and this Rust port of Go's math/rand shuffle, or honest nodes elect different coordinators and the ROAST liveness path fractures. With the vector sets symmetric across both test suites, either implementation drifting fails its own unit tests instead of surfacing in mixed-version soak testing.

Verified locally: cargo test --lib go_math_rand passes, cargo fmt --check clean.

The order-independence test asserted only that two input orderings
agree, not what they agree on. The Go side now pins the concrete
result for the same (members, seed, attempt) tuple, so pin Some(4)
here as well to keep the cross-language vector sets symmetric.

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

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: cc4f46ac-7060-41dc-8db1-3a4629693a8e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/signer-coordinator-vector-pin

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 and usage tips.

@mswilkison mswilkison merged commit ac2d5e8 into extraction/frost-signer-mirror-2026-05-26 Jun 11, 2026
19 checks passed
@mswilkison mswilkison deleted the test/signer-coordinator-vector-pin branch June 11, 2026 17:16
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.

1 participant