Skip to content

feat(deploy): zero-tap dev-mode playground publish#193

Merged
UtkarshBhardwaj007 merged 2 commits into
mainfrom
feat/dev-publish-zero-taps
May 22, 2026
Merged

feat(deploy): zero-tap dev-mode playground publish#193
UtkarshBhardwaj007 merged 2 commits into
mainfrom
feat/dev-publish-zero-taps

Conversation

@UtkarshBhardwaj007
Copy link
Copy Markdown
Member

Summary

  • dot deploy --signer dev --playground now requires zero phone taps when a phone session is active. Every on-chain step — Bulletin storage, DotNS register/setContenthash, and registry publish — is signed by a synthesised dev signer derived from bulletin-deploy's DEFAULT_MNEMONIC bare-root account (5DfhGyQd…). The user's session H160 is passed as the registry contract's new owner parameter, so their app still appears in MyApps even though Alice signed the tx.
  • resolveSignerSetup reshape: dev+session → synthesised Alice publishes with claimedOwnerH160 = session.addresses.productH160. dev+--suri → SURI signer publishes as itself. dev+nothing → Alice publishes + owns; stderr warning + telemetry tag fire (covers the "forgot dot init" footgun). Phone mode unchanged.
  • Sign-event proxy is now skipped when publishSigner.source === "dev" so the "check your phone" callout doesn't flash for in-process Alice signing.
  • Summary card surfaces both the actual signer (Alice's SS58) AND a new "App owner" row showing the user's H160, in both TUI and headless paths.
  • ResolvedSigner gains an optional addresses field forwarded from SessionHandle. Regression test pins the forwarding so a refactor can't silently drop it.
  • New signerModeAlice.test.ts snapshot pins three independent equivalences: signerMode's publish address, bulletin-deploy's bare-root, and the canonical SS58 literal. Catches both upstream churn and a CLI-side revert to createDevSigner("Alice") (which would be Substrate //Alice = 5Grwva…, a different account).

Pairs with playground-app#193 — the contract change that adds the 4th Option<Address> owner arg to publish() and the publisher field on AppInfo. Must merge + redeploy first; this CLI change calls registry.publish(domain, cid, vis, owner) with the 4-arg signature.

Changeset: playground-cli: minor. CLAUDE.md updated in two places (Deploy/Bulletin invariants).

Behaviour matrix

--signer --suri session Bulletin storage / DotNS signer Registry publish signer Recorded as owner Phone taps
phone yes session session session H160 3 (DotNS) + 1 (publish) = 4
dev yes * SURI SURI SURI H160 0
dev yes Alice (bulletin-deploy default) Alice (synthesised) session H160 (claimed) 0
dev no Alice Alice Alice H160 0 (with stderr warning)

Test plan

  • pnpm test — 555 passing locally (2 new — signer.test.ts addresses forwarding, signerModeAlice.test.ts snapshot).
  • pnpm format:check, pnpm lint:license, pnpm build — green.
  • After playground-app#193 merges and the registry is redeployed:
    • dot deploy --signer dev --playground --suri //Alice against Paseo Next v2 — expect zero phone taps, getOwner(domain.dot) returns SURI account's H160. E2E test frontend-only deploy completes end-to-end covers this.
    • dot deploy --signer dev --playground with an active dot init session — manual smoke. Expect zero phone taps, app appears in MyApps under the user's account on the phone.
    • dot deploy --signer dev --playground with NO session and NO --suri — stderr warning fires, app is published under Alice; verify via getOwner.
    • dot deploy --signer phone --playground — unchanged behaviour, 4 taps.
  • Re-deploy from dev mode of a previously-dev-published app — expect success (publisher branch of is_authorized_to_republish).
  • Re-deploy from dev mode of a previously-phone-published app — expect Unauthorized revert (intentional asymmetric lock-in; documented in the contract and CLAUDE.md).

Notes / deferred

  • E2E coverage of the dev+session+claimed-owner flow needs SSO session mocking infrastructure; a placeholder .skip test is in place with a clear comment pointing at unit-level coverage (run.test.ts).
  • Five .skip-gated write-test stubs added to the contract suite in playground-app#193 to document the on-chain assertions for when the local-target wiring lands.
  • Mainnet allowlist on the owner parameter is deferred — testnet-only relaxation per spec.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

Dev build ready — try this branch:

curl -fsSL https://raw.githubusercontent.com/paritytech/playground-cli/main/install.sh | VERSION=dev/feat/dev-publish-zero-taps bash

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

E2E Test Pass · ❌ FAIL

Tag: e2e-ci-pr · Branch: feat/dev-publish-zero-taps · Commit: 70c6283 · Run logs

Cell Result Time
pr-install ✅ PASS 1m31s
pr-deploy-cdm ✅ PASS 2m06s
pr-preflight ✅ PASS 1m13s
pr-init-session ✅ PASS 1m45s
pr-deploy-foundry ✅ PASS 2m00s
pr-mod ❌ FAIL 2m17s
pr-deploy-frontend ✅ PASS 2m55s
${{ matrix.cell }} ⏭️ SKIP 0m-1s
${{ matrix.cell }} ⏭️ SKIP 0m-10s

Sentry traces: view spans for this run

`dot deploy --signer dev --playground` now requires zero phone taps
when a phone session is active. Every on-chain step (storage, DotNS,
registry publish) is signed by a synthesised dev signer derived from
bulletin-deploy's DEFAULT_MNEMONIC bare-root account; the user's
session H160 is passed as the registry contract's new `owner` arg so
their app still appears in MyApps.

`resolveSignerSetup` reshape:
  - dev + session: publishSigner = synthesised Alice (source `dev`),
    claimedOwnerH160 = session.addresses.productH160. No phone tap.
  - dev + `--suri`: publishSigner = SURI signer. SURI account is
    recorded as owner; claimedOwnerH160 stays null.
  - dev + nothing: publishSigner = synthesised Alice; Alice owns.
    stderr warning + telemetry tag surfaced — "forgot dot init" case.
  - phone: unchanged.

Sign-event proxy now skipped when publishSigner.source === `dev`, so
the "check your phone" callout doesn't flash for in-process Alice
signing. Summary card gains an "App owner" row when claimedOwnerH160
is set. Both the TUI and headless code paths source the signer row
from setup.publishSigner.address so dev+session shows Alice, not a
blank.

`ResolvedSigner` gains an optional `addresses` field forwarded from
SessionHandle so signerMode can read the user's productH160 without
re-deriving from the raw session. Snapshot test pins the dev-publish
address against the canonical bulletin-deploy bare-root SS58.

Pairs with playground-app feat/registry-claimed-owner (the new 4-arg
`publish(domain, metadata_uri, visibility, owner)`). Requires that
contract to be redeployed on Paseo Next v2 before this can run end-
to-end against the live network.
@UtkarshBhardwaj007 UtkarshBhardwaj007 force-pushed the feat/dev-publish-zero-taps branch from 266fb24 to 9459445 Compare May 22, 2026 14:06
The DotNS availability check accepts an `ownerSs58Address` that MUST
match whoever will sign the DotNS `register()` extrinsic, otherwise a
re-deploy of an already-owned name fails the preflight as "taken".
For `mode === "dev"` without `--suri`, that signer is bulletin-deploy's
DEFAULT_MNEMONIC bare-root (5DfhGyQd...) — passing `undefined` made the
preflight skip the ownership check and fall through to `register`,
causing the deploy to revert at the DotNS commit step. Pass
DEV_PUBLISH_ADDRESS instead so the "owned by you — will update" branch
fires correctly. Applies to both the headless and interactive paths.

Also caches the `seedToAccount(DEFAULT_MNEMONIC, "")` derivation at
module load instead of re-running BIP-39 + sr25519 on every
`resolveSignerSetup` call.
@UtkarshBhardwaj007 UtkarshBhardwaj007 merged commit b166f11 into main May 22, 2026
19 of 20 checks passed
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