Repository navigation
fix(identity): gate the signer actually in use; 'Log in first' when not logged in - #559
Merged
Merged
Conversation
…en not logged in The builder-identity gate always resolved the phone session, so headless runs with --suri / --signer dev and no session were shown 'Join the competition first' and blocked. It now checks the account that will sign when one is chosen explicitly, and a missing login gets its own notice. E2E setup also tops up the deployer's Bulletin allowance (a spent quota surfaced as Invalid.Payment), and the mod test uses the funded deployer.
Contributor
|
Dev build ready — try this branch: |
Contributor
E2E Test Pass · ✅ PASSTag:
Sentry traces: view spans for this run |
The E2E getApp helper (and the fixture tool's readback) still narrowed on
the pre-v2 Option shape, so every app read as missing: globalSetup
re-registered the template on every run in every cell at once (the source
of the Invalid.Stale nonce collisions), and deploy tests asserting the
registry entry could never pass. Both now use getAppMetadataUri.
Two tests still asserted pre-gate behaviour. The no-login mod test and the
corrupted-session deploy test now pin the gated outcome ('Log in first',
nothing signed), and the latter corrupts the live SsoSessionsV3 file
instead of the long-unread SsoSessions name.
cdm setup runs cargo install from outside the clone, so cargo-pvm-contract's rust-toolchain.toml (1.92) is ignored and the build used the floating nightly. Nightly 1.101 changed never-type fallback (rust#148922) and trie-db stopped compiling, failing pr-deploy-cdm at toolchain install on every run. Read the pinned channel from upstream and build with it; contract builds stay on nightly.
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.
Unblocks the E2E suite, which has been red on
mainsince at least 2026-08-28, and fixes a misleading notice for real users.The gate checked the wrong account
enforceIdentityGatealways resolved the phone login session, whatever signer the command was told to use. A headless run with--surior--signer devand no session was therefore blocked asnot-logged-in— and that status was titled "Join the competition first", so it read as an identity problem rather than a missing login. Every E2E deploy/mod test hit it.The registry's
require_revealedis decided onenv::caller(), the account that actually publishes. The gate now asks about that account:--suri <key>(deploy,deploy-all,decentralize,mod)--signer dev(no--suri)DEV_PUBLISH_ADDRESS)resolveActingH160inidentityGate.tsis the single place that maps flags to an account;checkIdentityGatetakes an optionalaccountand skips the session lookup when given one.playground mod --suriwas a documented no-op (mod never signs). It now only selects which account the gate checks; the help text says so."Log in first"
The
not-logged-innotice now has its own title, "Log in first", and leads withplayground login.anonymousandunverifiablecopy is unchanged.E2E setup
remainingTxs: 0, and the template-registrationstorewas rejected asInvalid.Payment— at a 6000 PAS balance, so funding did not help.globalSetupnow callsensureAllowancefor the deployer before registering the template (soft-fail, like the registration itself).//Alice.Verified live on paseo-next-v2: the wired verifier returns
revealedfor the E2E deployer,//Bob, and the dev publish account.E2E registry reads used the pre-v2 shape
e2e/cli/fixtures/registry.ts::getApp(and the readback intools/register-e2e-fixtures.ts) still narrowedgetMetadataUrion a pre-v2Option'sisSome. The v2 registry returns a plain string, so every app read as missing:globalSetupre-registered the template on every run, in every cell at once — the source of theInvalid.Stalenonce collisions;Both now decode through
getAppMetadataUri, the CLI's single decoder for this call (it throws on an unexpected shape rather than reading as "not found"). Verified live: the template fixture reads as registered with the CID CI wrote.Tests that asserted pre-gate behaviour
mod.test.ts— the no-login, no---suricase expected mod to go straight to the registry lookup. It now pins the gated outcome: "Log in first", exit 0, no lookup. The--suriregistry-miss test still covers "not found in registry".session.test.ts— the corrupted-session test corrupteddot-cli_SsoSessions.json, a name nothing has read since host-papp 0.8.7, so it tested an empty home. It now corruptsdot-cli_SsoSessionsV3.json(which reads as "no session") and asserts "Log in first" with nothing signed. Ran the exact command locally against that home to confirm.pr-deploy-cdm: build cargo-pvm-contract on its pinned toolchaincdm setuprunscargo installfrom outside its clone, so cargo-pvm-contract's ownrust-toolchain.toml(1.92) is ignored and the build used the workflow's floating nightly. Nightly 1.101 (2026-09-28) changed never-type fallback (rust#148922) andtrie-dbstopped compiling — the toolchain step has failed on every run since at least 2026-08-30. The workflow now reads the pinned channel from upstream and runs the install under it; contract builds stay on nightly (the fixture contracts do not depend ontrie-db). Built the samemaincommit locally on 1.92 with--lockedto confirm.Follow-up, not in this PR
A blocked gate exits 0 (a soft outcome, by design since #413). For non-interactive use that means a script running
deploy --signer phonewith no login sees success. Worth deciding separately whether headless runs should exit non-zero.Testing
pnpm test1039 passed (new cases for the explicit-account path andresolveActingH160) ·tsc --noEmitclean ·format:check✓ ·lint:license✓.