test(frost): real-cgo multi-seat interactive 2-of-3 aggregate in one process#4099
Merged
mswilkison merged 2 commits intoJun 20, 2026
Conversation
…process The payoff of the multi-seat engine fix (signer #4098, member-keyed interactive_signing): TestRealCgoInteractiveSigning_MultiSeatAggregate drives TWO local seats through the FULL interactive flow - DeriveInteractiveAttemptContext, then per seat InteractiveSessionOpen + InteractiveRound1, then NewSigningPackage, InteractiveRound2 per seat, InteractiveAggregate - in ONE process against the real cgo engine, producing a real 2-of-3 BIP-340 signature. Before the fix the second seat's InteractiveSessionOpen returned SessionConflict, so the existing _MemberContribution test could only drive one seat (open + round 1); this completes the loop with real crypto over the cgo bridge. Extracted the linked-signer env setup into setupRealCgoSignerState (shared by both tests). Skip-guarded like _MemberContribution, so it is inert in CI builds that do not link the Rust signer and runs only against a CURRENT libfrost_tbtc (one that includes the multi-seat fix). Verified against a freshly rebuilt lib: both tests pass, repeatable under -count=2; skips cleanly without the lib; cgo vet + gofmt clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
…pt-id invariant Self-review folds (Gemini + Codex approved with no findings): - A present-but-pre-multi-seat-fix libfrost_tbtc returns SessionConflict on the SECOND seat's InteractiveSessionOpen - which maps to a bridge-operation-failed error, NOT ErrNativeCryptographyUnavailable, so skipFrostUnavailable did not catch it and the test failed instead of skipping. That is inconsistent with the file's "skip when the linked lib cannot run this" philosophy (the stale-symbol case already skips). Add isPreMultiSeatConflict and skip with a "rebuild the lib" message, so a stale local lib produces a clear skip rather than a confusing failure. (Test-only environment detection via the error text; not production control flow.) - The aggregate keys off one seat's attempt id; both seats derive the SAME id (the engine derives it member-independently), but nothing pinned it. Assert the two attempt ids are equal before aggregating, documenting the invariant and catching a regression if the engine ever made attempt ids per-member. Verified: cgo vet + gofmt clean; both real-cgo tests still pass against the rebuilt (multi-seat) lib; the multi-seat test skips cleanly without the lib. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
9816ccf
into
feat/frost-schnorr-migration-scaffold
15 of 16 checks passed
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.
What
Adds
TestRealCgoInteractiveSigning_MultiSeatAggregate: two local seats driven through the full interactive signing flow in one process against the real cgo engine —DeriveInteractiveAttemptContext, then per seatInteractiveSessionOpen+InteractiveRound1, thenNewSigningPackage,InteractiveRound2per seat,InteractiveAggregate— producing a real 2-of-3 BIP-340 signature.This is the payoff of the multi-seat engine fix (signer #4098, member-keyed
interactive_signing). Before it, the second seat'sInteractiveSessionOpenreturnedSessionConflict, so the existing_MemberContributiontest could only drive one seat (open + round 1). This completes the loop with real crypto over the cgo bridge.Notes
setupRealCgoSignerState(shared by both tests).frost_native && frost_tbtc_signer && cgo): inert in CI builds that don't link the Rust signer; runs only against a currentlibfrost_tbtcthat includes the multi-seat fix.-count=2; skips cleanly without the lib; cgo vet + gofmt clean.🤖 Generated with Claude Code