Skip to content

Add read-only deployed-cluster swap readiness - #53

Draft
joshglogau wants to merge 12 commits into
masterfrom
feature/cluster-readiness
Draft

Add read-only deployed-cluster swap readiness#53
joshglogau wants to merge 12 commits into
masterfrom
feature/cluster-readiness

Conversation

@joshglogau

@joshglogau joshglogau commented Aug 4, 2026

Copy link
Copy Markdown

Summary

Adds a manual, read-only wire-cluster-tool readiness preflight for an already deployed Wire/Ethereum/Solana network group. It reuses the existing Steps, PhaseGroups, orchestration Report, and typed sdk-core clients; it is not wired into bootstrap, FlowScenarios, Hub, or CI.

Independent verdicts

The report keeps four proof levels separate:

  • clusterLive: required endpoints, chain identities, fresh heads, and observed head/slot advancement passed;
  • swapPreflightReady: depot configuration, epoch, reserve, underwriter, route, and quote checks passed;
  • swapReady: remains false until a funded transaction canary settles; and
  • per-route preflightReady / transactionallyVerified evidence.

Endpoint-catalog and Hyperion failures are advisories when the three required RPCs are available.

Optional sdk-outpost compatibility

An ordinary chain-id/RPC run evaluates cluster and swap health without sdk-outpost deployment verification.

When --outpost-deployment-profile-file is supplied, a separate non-gating section checks the profile's exact Wire binding, Ethereum EIP-1967 implementations and code hashes, Solana ProgramData identity and hashes, and external reserve custody. Missing/incompatible sdk-outpost inputs remain advisories and do not turn an otherwise healthy cluster or feature verdict red.

Swap checks

  • required depot contracts, actions, tables, and active registry rows;
  • epoch scheduling with the protocol's 30-second delivery extension;
  • recent sequential sysio.msgch::envlog evidence for valid scheduler catch-up;
  • collateral net of active locks and pending withdrawals;
  • active underwriter coverage for every advertised route leg;
  • all public reserves, including zero-depth or incompletely bound rows;
  • depot reserve depth, token bindings, custody identities, and live quotes; and
  • expired pending underwriting requests without inventing a retention rule absent from sdk-core.

The epoch result distinguishes on-time, demonstrably advancing-late, and stalled-or-unproven. Wire head movement is independent evidence and is never treated as proof of epoch progression.

Run it

corepack pnpm --filter @wireio/cluster-tool exec ./bin/wire-cluster-tool readiness \
  --feature swap \
  --wire-chain-id <wire-chain-id>

Add --outpost-deployment-profile-file <profile.json> only for the optional exact-deployment section. RPC overrides remain available immediately after a respin.

Proof boundary

This command does not fund wallets, execute swaps, mutate deployments, or prove OPP circulation, destination payout, retry/idempotency, terminal Solana behavior, or durable/partial refunds. Those require funded transaction canaries.

Verification

  • focused readiness tests: 4 suites / 17 tests passed;
  • cluster-tool and cluster-tool-shared compilation passed;
  • targeted ESLint passed; and
  • git diff --check passed.

The broad local process suite requires platform binaries unavailable in the current macOS environment and later exhausted Node's 4 GB heap. The current GitHub build is not green, so this PR intentionally remains a draft local operator tool rather than a merge candidate.

@joshglogau joshglogau changed the title Add read-only cluster readiness checks and report bundles Add read-only cluster readiness checks and report archives Aug 4, 2026
@joshglogau
joshglogau marked this pull request as ready for review August 4, 2026 15:18
@joshglogau
joshglogau requested review from a team, bearcubsvet and jglanz August 4, 2026 15:18
@joshglogau joshglogau changed the title Add read-only cluster readiness checks and report archives Add SDK-aligned cluster readiness checks and portable reports Aug 4, 2026

@jglanz jglanz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are recreating functionality with your readiness tool, the correct approach is to add new Steps and PhaseGroups to cluster-tool and then refactor your tool into FlowScenario(s) which already have reports, tooling and infrastructure; this approach would mean that running e2e-tests includes you hub readiness data and validation.

@siliconswampio
siliconswampio force-pushed the feature/cluster-readiness branch from 0136a2e to 2db8ce4 Compare August 4, 2026 18:49
@joshglogau joshglogau changed the title Add SDK-aligned cluster readiness checks and portable reports Add cluster-tool-native swap readiness preflight Aug 4, 2026
@joshglogau

joshglogau commented Aug 4, 2026

Copy link
Copy Markdown
Author

Refactor complete:

  • Standalone readiness package and runner are removed
  • Readiness now consists of native cluster-tool Steps and PhaseGroups executed by ClusterBuild with the existing Report infrastructure
  • fail-fast remains the default and collect mode is opt-in for diagnostics.
  • The manual CLI is the MVP entrypoint, and future swap FlowScenario/GHA integration can compose the same PhaseGroups without duplicating checks.
  • The branch history was rewritten from current master into three cohesive commits.

@joshglogau joshglogau changed the title Add cluster-tool-native swap readiness preflight Add cluster-native swap and outpost deployment readiness Aug 5, 2026
@joshglogau

joshglogau commented Aug 5, 2026

Copy link
Copy Markdown
Author

Status: swap readiness and exact outpost deployment-profile verification are implemented. This PR consumes wire-libraries-ts#56; its final frozen dependency update follows that SDK publication.

Architecture: readiness stays read-only and uses the existing orchestration/Report system. It delegates ETH/SOL runtime identity checks to the SDK instead of duplicating verifier logic, keeps mutable endpoints separate from immutable deployment identity, and reports preflight readiness separately from a future funded transactional canary.

Producers: Ethereum artifacts #176 · Solana artifacts #414

@siliconswampio
siliconswampio force-pushed the feature/cluster-readiness branch from e16f086 to 879cd0e Compare August 13, 2026 16:25
@joshglogau joshglogau changed the title Add cluster-native swap and outpost deployment readiness Add read-only deployed-cluster swap readiness Aug 18, 2026
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.

2 participants