Skip to content

test(frost): real-cgo multi-seat interactive 2-of-3 aggregate in one process#4099

Merged
mswilkison merged 2 commits into
feat/frost-schnorr-migration-scaffoldfrom
feat/frost-multiseat-interactive-e2e
Jun 20, 2026
Merged

test(frost): real-cgo multi-seat interactive 2-of-3 aggregate in one process#4099
mswilkison merged 2 commits into
feat/frost-schnorr-migration-scaffoldfrom
feat/frost-multiseat-interactive-e2e

Conversation

@mswilkison

Copy link
Copy Markdown
Contributor

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 seat InteractiveSessionOpen + InteractiveRound1, then NewSigningPackage, InteractiveRound2 per 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'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.

Notes

  • Extracts the linked-signer env setup into setupRealCgoSignerState (shared by both tests).
  • Skip-guarded (frost_native && frost_tbtc_signer && cgo): inert in CI builds that don't link the Rust signer; runs only against a current libfrost_tbtc that includes the multi-seat fix.
  • Verified against a freshly rebuilt lib: both real-cgo tests pass, repeatable under -count=2; skips cleanly without the lib; cgo vet + gofmt clean.

🤖 Generated with Claude Code

…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>
@coderabbitai

coderabbitai Bot commented Jun 20, 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: 8992f580-158d-4afa-89f0-e8ecebfe84e1

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 feat/frost-multiseat-interactive-e2e

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.

…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>
@mswilkison mswilkison merged commit 9816ccf into feat/frost-schnorr-migration-scaffold Jun 20, 2026
15 of 16 checks passed
@mswilkison mswilkison deleted the feat/frost-multiseat-interactive-e2e branch June 20, 2026 23:26
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