fix(testnet): bump PER_PP_OPEN_TIMEOUT_MS 60 → 300s + wire run-all.sh URL exports#114
Merged
Merged
Conversation
… URL exports
Two related wiring fixes that 5x deployed-testnet sweep evidence required.
## subscribe.ts — PER_PP_OPEN_TIMEOUT_MS 60 → 300 s
60 s was sufficient on local stack (`testnet/run-local.sh` flow ~80 s
end-to-end). On deployed testnet the flow regularly runs 4–9 minutes
under council-platform load:
Tempo trace 44207a4b4cacf8c1101cc4332076ee2c:
`✅ Testnet E2E passed in 539.4s`
individual handler spans hitting 30 s ceiling (postgres-js
connect_timeout — fix landing separately on council-platform).
PP registration sits behind those slow handlers (steps 8–9 of the flow),
so the per-PP subscriber's 60 s open-patience expired before the PP
existed in provider-platform's dashboard view. Captured shape:
[events-capture] subscriber error:
perPp:GCBPHSN4...: per-PP WS gave up after 60000ms:
PP GCBPHSN4... never appeared in dashboard view
300 s covers the observed worst-case testnet latency, still fails loud
rather than hanging.
## run-all.sh — export PROVIDER_URL / COUNCIL_URL / NETWORK_DASHBOARD_PLATFORM_URL
Harness defaults to `localhost:3010/3015/3035`. The deployed-testnet
flow scripts default to testnet URLs internally, so without an explicit
export the harness and script disagree on which backend to talk to.
Symptom on a fresh shell with no local stack running: harness's
`acquireOperatorJwt` call fails with `Connection refused` to localhost
while the script silently uses testnet for everything else.
Setting them at the wrapper level keeps the harness and script in lock
step against deployed testnet. Caller can still override any one for
mainnet / local debugging via `${X:-default}` shape.
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.
Two wiring fixes evidenced by 5x deployed-testnet sweep
1.
events-capture/subscribe.ts: PER_PP_OPEN_TIMEOUT_MS 60 → 300 sSweep 5 of today's deployed-testnet run:
Script flow took 539 s end-to-end. PP registration sits at steps 8–9 of the 12-step flow — well past the 60 s the per-PP WS subscriber was willing to wait. Local stack (
./testnet/run-local.sh) runs in ~80 s, so 60 s was fine there; deployed testnet is naturally 5–10× slower because of the upstream council-platform load issues (Tempo trace44207a4b4cacf8c1101cc4332076ee2cshows individual handler spans hitting the 30 spostgres-jsconnect_timeoutceiling — council-platform fix landing in a separate PR there).300 s gives the harness 5 minutes of patience — covers the observed worst-case testnet latency, still fails loud rather than hanging indefinitely.
2.
testnet/run-all.sh: exportPROVIDER_URL/COUNCIL_URL/NETWORK_DASHBOARD_PLATFORM_URLThe events-capture harness (
harness.ts:316-319) defaults itsproviderUrlandnetworkDashboardUrltohttp://localhost:3010andhttp://localhost:3035. The flow scripts (testnet/main.ts:163-166,lifecycle/testnet-verify.ts) default theirPROVIDER_URL/COUNCIL_URLconstants to the deployed-testnet URLs.Without an explicit export, the harness and the script disagree on which backend to talk to. Symptom on a fresh shell with no local stack running:
Setting them at the wrapper level keeps the harness and script in lock step against deployed testnet. Caller can override any one for mainnet / local-debugging via the
${X:-default}shape.Test plan
deno fmt,deno lint,deno check events-capture/subscribe.tsclean./testnet/run-all.sh5x against deployed testnet. Expect the per-PPgave upfailure to be gone; combined with the council-platform fix, expect the council-platform 401/500 endpoints to land in normal time too.Companion PR
Paired with council-platform PR (postgres pool size 10 → 30, root cause of testnet's slow handlers). Both are needed for the deployed-testnet 5x sweep to clear.