Skip to content

feat(flow): add configurable swap canary - #91

Open
joshglogau wants to merge 15 commits into
masterfrom
feature/flow-swap-canary-flowscenario
Open

feat(flow): add configurable swap canary#91
joshglogau wants to merge 15 commits into
masterfrom
feature/flow-swap-canary-flowscenario

Conversation

@joshglogau

@joshglogau joshglogau commented Aug 28, 2026

Copy link
Copy Markdown

Summary

Adds flow-swap-canary for a fresh cluster and wire-cluster-tool swap-canary for a persisted cluster. Both entrypoints share the same swap PhaseGroups, route Steps, typed outputs, and native reports.

Behavior

  • Defaults to one representative asset across all six ETH, SOL, and WIRE directions.
  • Accepts repeatable endpoint, family, and direction selectors for the full configured public route catalog.
  • Runs routes serially and fail-fast over the shared SwapUserIdentities identity.
  • Correlates each UWREQ to the exact Ethereum event, Solana log, or from-WIRE request ID.
  • Verifies source custody, underwriting, reserve accounting, and destination delivery; --wait-for-challenge optionally requires terminal completion.
  • Fresh runs use the canonical cluster lifecycle and explicit mock-reserve scenario default. Connected runs discover ACTIVE public reserves and reuse existing collateral without reprovisioning.

Run

node scripts/run-flow.mjs flow-swap-canary \
  --cluster-path /tmp/wire-flow-swap-canary \
  --wire-build-path ../wire-sysio/build/release \
  --ethereum-path ../wire-ethereum \
  --solana-path ../wire-solana

node scripts/flow-heartbeat-monitor.mjs \
  --cluster-path /tmp/wire-flow-swap-canary

packages/cluster-tool/bin/wire-cluster-tool swap-canary \
  --cluster-path /path/to/running/cluster

Scenario-specific route flags follow the runner's literal --. The connected CLI accepts them directly.

Validation

  • GitHub Build and test and Jest results: green.
  • corepack pnpm lint
  • corepack pnpm build
  • Focused regression suite: 7 suites / 59 tests
  • git diff --check

The full local matrix requires chain binaries absent from this macOS host; GitHub CI provides the complete repository gate.

Review focus

  • Long-lived selector vocabulary and the default six-route boundary.
  • Destination delivery as default success, with challenge completion opt-in.
  • Reuse of shared route Steps and PhaseGroups by the fresh and connected entrypoints.

@joshglogau
joshglogau marked this pull request as ready for review September 2, 2026 13:58
@joshglogau joshglogau changed the title Add a configurable FlowScenario canary for the complete public Ethereum, Solana, and WIRE swap route surface feat(flow): add configurable swap canary Sep 2, 2026
@joshglogau
joshglogau requested a review from jglanz September 2, 2026 15:18
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