OPS-197: import prelaunch bootstrap JSON during cluster creation - #47
OPS-197: import prelaunch bootstrap JSON during cluster creation#47huangminghuang wants to merge 22 commits into
Conversation
Change-Id: I3893e9cc8026ad7cdf574fc6cdf8e917cd7e6ef5
jglanz
left a comment
There was a problem hiding this comment.
You need to repo sync and have claude take a pass with rules,STYLE.md and lint enabled from the wire-platform root.
Plus there's a note about using the changes I made to David's PR #25 (not landed), but you will see the pattern.
There are many rules being ignored - I was reviewing manally and saw the scope.
| * Retry connection-level failures. Disable for additive actions whose | ||
| * delivery is ambiguous after a reset. Default `true`. | ||
| */ | ||
| retryTransport?: boolean |
There was a problem hiding this comment.
remove, nothing is regarded as ambiguous any longer, this goes agiinst the phase/steps model
There was a problem hiding this comment.
Addressed in ec868e23. Removed retryTransport from ClioRunOptions. ClioRunner.run keeps the normal transport policy, while the explicit runOnce primitive performs one subprocess attempt; the dclaim orchestration Step owns that choice and reconciliation instead of passing ambiguity/retry flags through the client.
| * Absolute Ethereum prelaunch balance-dump path used during `create`, or | ||
| * `null` when no Ethereum dclaim bootstrap input was supplied. Persisted as | ||
| * provenance; reload paths never reread the source file. | ||
| */ |
There was a problem hiding this comment.
Checkout PR #25 - while its a work in progress, it introduces enclosed interfaces for Cluster{Ethereum,Solana}Config leafs & types
There was a problem hiding this comment.
Addressed in ec868e23 following the enclosed chain-config pattern from PR #25. Added ClusterConfigEthereumSchema / ClusterConfigEthereum and ClusterConfigSolanaSchema / ClusterConfigSolana, moved the persisted fields to ethereum.bootstrapJsonFile and solana.bootstrapJsonFile, and added matching nested caller options. The resolver, CLI mapping, consumers, fixtures, and schema default/validation tests were updated; the existing CLI flag names remain unchanged.
| * Resend after finality observation failure. Disable for additive or | ||
| * irreversible actions and reconcile their state instead. Default `true`. | ||
| */ | ||
| retryFinality?: boolean |
There was a problem hiding this comment.
remove as well - Phase/Step system must be aware of all this
There was a problem hiding this comment.
Addressed in ec868e23. Removed retryFinality and retryTransport from WireClient.InvocationOptions. The client now exposes explicit one-attempt primitives (invokeOnce / invokeViaFileOnce); the dclaim Phase/Step owns their use and performs exact-transaction plus expected-state reconciliation after a finality error.
| } | ||
|
|
||
| /** One pre-batching credit set contributed for one native chain. */ | ||
| export interface DistributionClaimBootstrapCreditSet { |
There was a problem hiding this comment.
Addressed in ec868e23. Replaced the hand-written bootstrap output interfaces with Zod schemas and z.infer types in DistributionClaimBootstrapOutput.ts. Core, contribution, per-chain result, and final result values are parsed at their merge/finalization boundaries.
| /** Steps for `sysio.dclaim` (distribution claims) actions. */ | ||
| export namespace DclaimContractSteps { | ||
| /** Compact per-chain totals copied into every batch's report input. */ | ||
| export interface ImportSeedChainSummary { |
There was a problem hiding this comment.
Addressed in ec868e23. Added ImportSeedChainSummarySchema and now derive ImportSeedChainSummary with z.infer. The nested batch-input schema composes it, so sources, counts, and atomic totals are validated at the orchestration boundary.
| * Compact input for one `importseed` Step. The bulk payload remains in | ||
| * `ctx.outputs` and is selected by chain plus batch index at run time. | ||
| */ | ||
| export interface ImportSeedBatchInput extends StepInput { |
There was a problem hiding this comment.
Addressed in ec868e23. Replaced the hand-written batch Step input interface with ImportSeedBatchInputSchema and z.infer, including kind, chain, batch index, credit count, and summary validation. The planner parses the input before creating the Step.
Change-Id: I31acf510362ea8e24c09d6ae531acaad7f87c73c
…launch-bootstrap Change-Id: Ib00584cfe7c21727708655917f9f20b0eea4edab # Conflicts: # packages/cluster-tool/src/orchestration/ClusterBuildDefaults.ts
Change-Id: Id060bb94b2703b1b9c2a4fc1d55f273248131617
Change-Id: Id8282ddbdfd66aadaf7f7dd5dfe0731041df0f09
|
Addressed the review in follow-up commits |
Change-Id: I562ff1ab5777e373655758263729de9a144957bd
jglanz
left a comment
There was a problem hiding this comment.
I don't see any tests OR test data/fixtures (unit tests); also please run a fresh flow suite. I'd suggest delaying this work till wednesday as there is a very large changeset coming that this will need to be rebased on to as well
jglanz
left a comment
There was a problem hiding this comment.
There are quite a few potential conflicts with a PR stack that I'm wrapping up myself (time critical cluster build related); this thursday, please fetch & rebase on to master and resolve any gaps.
Additionally, this requires a new flow-with-bootstrap-data to be created.
Change-Id: I3893e9cc8026ad7cdf574fc6cdf8e917cd7e6ef5
Change-Id: I31acf510362ea8e24c09d6ae531acaad7f87c73c
Change-Id: Id060bb94b2703b1b9c2a4fc1d55f273248131617
Change-Id: Id8282ddbdfd66aadaf7f7dd5dfe0731041df0f09
Change-Id: I562ff1ab5777e373655758263729de9a144957bd
…launch-bootstrap Change-Id: Iad24f69894715f19b62de073ba2fa44564eecf67
Change-Id: Ic88cd60d2cd842517c7d0a36b6504554a57ddcf6
Change-Id: Ic58f8611e8e4af1cfdf563934985cfcb30165753
Change-Id: Ifc6b594277d707b1e3067e05c8831ff95f91462c
…rap' into feature/ops-197-prelaunch-bootstrap Change-Id: I24f9fdbc63b2866935c2276360b62343d4d10bb1 # Conflicts: # README.md # eslint.config.mjs # packages/cluster-tool/README.md # packages/cluster-tool/src/clients/wire/WireClient.ts # packages/cluster-tool/src/clients/wire/clio/ClioRunner.ts # packages/cluster-tool/src/config/ClusterBuildOptions.ts # packages/cluster-tool/src/config/ClusterConfigProvider.ts # packages/cluster-tool/src/orchestration/ClusterBuildDefaults.ts # packages/cluster-tool/src/orchestration/outputs/DistributionClaimBootstrapOutput.ts # packages/cluster-tool/src/tools/wire/WireDclaimSeedTool.ts # packages/cluster-tool/tests/cli/ClusterBuildOptionsArgs.test.ts # packages/cluster-tool/tests/clients/wire/WireClient.test.ts # packages/cluster-tool/tests/flow/contexts/SwapScenarioContext.test.ts # packages/cluster-tool/tests/orchestration/ClusterBuildDefaultsDclaim.test.ts # packages/cluster-tool/tests/tools/wire/WireDclaimSeedTool.test.ts # packages/cluster-tool/tests/tools/wire/WireOperatorProvisioningTool.test.ts # packages/cluster-tool/tests/tools/wire/WireReserveTool.test.ts
…launch-bootstrap Change-Id: Ib2c01776d26db0f9b66aef6856d25ddca5b05ed9 # Conflicts: # packages/cluster-tool/src/orchestration/ClusterBuildDefaults.ts
Change-Id: Ib340584720c1c03be7207b6e107f62d6d80f9a01
Change-Id: I446a2d569e18d02f645c48d592e318fde9b27c81
Change-Id: I037b9099281f20af94cac02f59bb9d9502f06798
…launch-bootstrap Change-Id: I2edee3e63b26f338370ee3030907eb28dd0af3a3
Change-Id: I1979ce4da5d3a45304025cbef77def739b0bb4bb
jglanz
left a comment
There was a problem hiding this comment.
I stopped reviewing at FlowScenario as the approach as mentioned in the comments is not adherent to the design pattern the system is built on
| /** | ||
| * Normalize the process arguments pnpm appends to a flow package script. | ||
| * `run-flow.mjs` intentionally reinserts a pnpm delimiter; pnpm passes that | ||
| * literal token through to `node`, while yargs would otherwise treat it as the | ||
| * end of options and ignore every forwarded flow flag. | ||
| * | ||
| * @param args - Process arguments following the flow entrypoint. | ||
| * @returns A fresh array with at most one leading delimiter removed. | ||
| */ | ||
| export function normalizeFlowCLIArguments( | ||
| args: readonly string[] | ||
| ): string[] { | ||
| return args[0] === "--" ? args.slice(1) : [...args] | ||
| } | ||
|
|
| options, | ||
| this.scenario.createContext?.bind(this.scenario) | ||
| this.scenario.createContext?.bind(this.scenario), | ||
| this.scenario.prepareDistributionClaimBootstrap?.bind(this.scenario) |
There was a problem hiding this comment.
bad design, FlowScenario shouldn't have any such member
| /** | ||
| * Optionally prepare additive distribution-claim credits after configured | ||
| * files are validated and converted but before batching and bootstrap phase | ||
| * composition. | ||
| * | ||
| * @param cluster - Resolved cluster and flow context. | ||
| * @param core - Configured-file credits already prepared by the harness. | ||
| * @returns Additive flow credit sets. | ||
| */ | ||
| prepareDistributionClaimBootstrap?( | ||
| cluster: ClusterBuild<C>, | ||
| core: DistributionClaimBootstrapCore | ||
| ): Promise<DistributionClaimBootstrapContribution> | ||
|
|
Summary
importdoneflow-with-bootstrap-datafixture flow and forward exact post---flow arguments through the canonical runner; its README documents the required runner + heartbeat-monitor pairmasterdaemon start-script support while preserving the completed dclaim bootstrap sequence before those scripts are composedSafety
runOnce/invokeOnce/invokeViaFileOncesubmission; an ambiguous finality outcome is accepted only when the exact transaction is present in a canonical irreversible block and paginated reconciliation confirms the expected contract stateunmappedid window throughnext_key, and the global finalization Step issuesimportdoneexactly onceValidation
b2900941wire-tools-tsb290094124c9abfb4a657fa45c98ef501272eb38; full Release platform build, artifact verification, pooled flows, and aggregate results completed successfullygit diff --checkJira: OPS-197