chore(deps): upgrade @parity product-sdk stack to latest + migrate to Result API#470
Open
ReinhardHatko wants to merge 3 commits into
Open
chore(deps): upgrade @parity product-sdk stack to latest + migrate to Result API#470ReinhardHatko wants to merge 3 commits into
ReinhardHatko wants to merge 3 commits into
Conversation
…to Result API Bump all @parity/product-sdk-* to latest published: host 0.14.1 (now built on @parity/truapi instead of the @novasamatech in-container host-api), cloud-storage 0.8.1, contracts 0.9.2, descriptors 0.8.0, keys 0.3.16, terminal 0.6.2, tx 0.3.2; drop the vendored headless-host prerelease. Bump polkadot-app-deploy 0.13.1, dotns-cli 0.8.0, cdm-builder 3.2.0, cdm-codegen 0.6.23, cdm-env 2.1.0; align polkadot-api to 2.2.1 as a single runtime instance. Migrate command handlers to the product-sdk Result-based error API (submitAndWatch, contract .tx/fromLiveClient, cloud-storage checkAuthorization) while preserving user-facing error messages; add src/utils/tx.ts::unwrapTx. Retire the summit/w3s env (dropped upstream by polkadot-app-deploy 0.13.x and product-sdk-descriptors 0.8.0). Re-pin the statement-store pnpm patch to 0.8.11. Refs #465.
… unwrap Rename tx.ts's unwrapTx -> unwrapResult (it already handles any @parity/result Result, not just tx submits) and use it in registry.ts::liveManager instead of an inlined `if (!result.ok) throw result.error; return result.value`. Pure refactor: the helper body and every call site's semantics are unchanged. Follow-up to the #465 code review (reuse finding).
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
Contributor
|
Dev build ready — try this branch: |
Contributor
E2E Test Pass · ❌ FAILTag:
Sentry traces: view spans for this run |
The publish path threw a generic "Registry publish transaction reverted" and discarded the typed error, hiding the actual reason (e.g. NotRevealed, Unauthorized). A single classifyRevert() now decodes the reason from the contracts .tx() err value (ContractRevertedError.reason/.data, a dry-run/dispatch .dispatchError, or a TxError's .formatted) and decides whether the failure is a deterministic revert. Deterministic reverts fail fast — the identical tx reverts the same way every retry, so surface it immediately instead of burning the 3-attempt / ~18s retry budget; transient failures (RPC drops, timeouts) carry no revert marker and still retry. Adds a regression test and refreshes the changeset bullet.
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.
Completes #465 — upgrades the full
@paritydependency stack to latest published and migrates the CLI to the product-sdkResult-based error API.Commits
chore(deps): upgrade @parity product-sdk stack to latest and migrate to Result APIrefactor: reuse the unwrapResult helper for the fromLiveClient result unwrapDependency bumps
0.14.1(now built on@parity/truapi, replacing the former@novasamatechin-container host-api), cloud-storage0.8.1, contracts0.9.2, descriptors0.8.0, keys0.3.16, terminal0.6.2, tx0.3.2. Vendored headless-host prerelease dropped.0.13.1, dotns-cli0.8.0, cdm-builder3.2.0, cdm-codegen0.6.23, cdm-env2.1.0.2.2.1(single runtime instance — cdm-builder 3.2.0 pulled a second 2.x copy alongside 2.1.6).Notable changes
submitAndWatch, contract.tx()/ContractManager.fromLiveClient, and cloud-storagecheckAuthorizationnow return aResultinstead of throwing. Newsrc/utils/tx.ts::unwrapResultre-throws theerrchannel so existing throw-based control flow (deploy aborts, drip/fund error surfacing, the Invalid-Payment retry loop) is preserved unchanged.registry.publishDevfolded intopublish(…, is_dev_signer).0.8.11; CLAUDE.md dependency notes refreshed.Verification
pnpm typecheck✓ ·pnpm test(995) ✓ ·pnpm format:check✓ ·pnpm lint:license✓ ·pnpm build✓checkAuthorizationread failure being conflated with an unauthorized slot, aborting valid deploys) is fixed and regression-tested.Not in this PR / follow-ups
init+ install + deploy against a live env) has not been run. Two residual live-only risks worth a manual pass: the deploy log-string → progress-bar parser against pad 0.13.1's actual banners, andisInvalidPaymentErroragainst a real tx@0.3TxDispatchErrorshape.@novasamatechhost transport) — blocked upstream until a truAPI-backedproduct-sdk-terminalships; terminal 0.6.2 still rideshost-papp.envarg — silent wrong-descriptor risk if a second env is wired #469 —descriptors.tsignored-env hardening (latent footgun), filed as a follow-up.