Wire ppPublicKey + register entities in testnet flow scripts#104
Merged
Conversation
The CI flow's `e2e/setup.sh` was updated to include the URL-scoped PP key, but the local `./test.sh e2e` runner uses a separate `test/setup-e2e.ts` writer that produces /config/contracts.env from the setup container. Without E2E_PP_PUBLIC_KEY in that file, the test-runner's loadConfig() throws before any bundle is submitted.
lifecycle/ci-test.ts is the test runner invoked by lifecycle's docker compose (and by provider-platform's lifecycle-reusable CI). Two fields were missed when lifecycle/main.ts was updated for the URL-scoped bundles work: - e2eConfig was missing ppPublicKey, so lib/client/bundle.ts composed /providers/undefined/bundles, which the resolver couldn't service. - Alice and Bob weren't registered as APPROVED entities before deposit/send, tripping the SUBMITTER_NOT_APPROVED gate. Mirrors the equivalent fixes already in lifecycle/main.ts.
provider-platform PR #103 (events dashboard redesign) renamed councilMembership (singular) → councilMemberships (plural array) on the dashboard /pp/list response. The governance e2e test was never updated to match. Now reads [0]?.status for the approved/rejected checks and .length === 0 for the no-council case.
Pay-platform submits bundles to provider-platform under its PAY_SERVICE_SK identity. provider-platform now gates bundle admission on the submitter being an APPROVED entity (SUBMITTER_NOT_APPROVED), so the pay-service keypair needs an entity record before the instant payment flow can run. New [1b/5] step calls POST /api/v1/entities with keys.payService right after funding.
testnet/main.ts and lifecycle/testnet-verify.ts are the suites driven by ./testnet/run-all.sh (and ./testnet/run-local.sh). Both were on the pre-URL-scoped client shape, so deno-check failed and a real run would have died at the first deposit: - e2eConfig was missing the now-required Config.ppPublicKey field (the resolver couldn't dispatch the bundle to a PP). - Alice and Bob were never registered as APPROVED entities, so even with the URL fixed the platform's SUBMITTER_NOT_APPROVED gate would have rejected every bundle. Adds a registerEntity helper to each file and seeds the PP key on Config. Mirrors the equivalent fixes already in lifecycle/main.ts and lifecycle/ci-test.ts. Verified locally against the running stack via: ./testnet/run-local.sh 1 # payment flow — 88.7s green ./testnet/run-local.sh 3 # lifecycle — 85.3s green
1 task
AquiGorka
added a commit
that referenced
this pull request
May 29, 2026
## Summary `testnet/run-all.sh` exports `E2E_TRACE_IDS_PATH=\$REPO_ROOT/e2e/e2e-trace-ids.json` so suite 3 (lifecycle flow) writes the trace IDs to the same path suite 4's verifier reads from. `run-local.sh` was missing the equivalent export — suite 3 fell back to the CWD default (`<repo>/e2e-trace-ids.json`), suite 4 still looked in `e2e/`, and the local Jaeger verifier failed with: \`\`\` NotFound: No such file or directory (os error 2): readfile '<repo>/e2e/e2e-trace-ids.json' \`\`\` Pre-existing — independent of the dashboard-rework work that landed in #104. Surfaces only when running suite 4 via `./testnet/run-local.sh`. ## Test plan - [x] \`./testnet/run-local.sh all\` against local stack — all four suites green (payment ~73s, OTEL verify, lifecycle ~72s, OTEL verify lifecycle)
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.
Summary
./testnet/run-all.sh(and the local equivalent./testnet/run-local.sh) was the last set of harness scripts that still spoke the pre-URL-scoped client shape. Bothtestnet/main.tsandlifecycle/testnet-verify.tsfailed at deno-check and would have crashed at the first deposit:e2eConfigwas missing the now-requiredConfig.ppPublicKeyfield — the resolver couldn't dispatch the bundle to a PP, surfaces as a 500.POST /api/v1/entities, so even with the URL fixed the platform'sSUBMITTER_NOT_APPROVEDgate would have rejected every bundle.Adds a
registerEntityhelper to each file and setsppPublicKey: ppOperator.publicKey()/ppKeypair.publicKey()one2eConfig. Mirrors the equivalent fixes already inlifecycle/main.tsandlifecycle/ci-test.ts.Test plan
Local stack (./up.sh + setup), then:
./testnet/run-local.sh 1— payment flow, 88.7s green./testnet/run-local.sh 3— lifecycle, 85.3s greendeno fmt --check+deno lintclean intestnet/andlifecycle/deno check testnet/main.ts+deno check lifecycle/testnet-verify.tsclean