Skip to content

Get the devnet e2e harness running again - #367

Draft
gyorgybalazsi wants to merge 3 commits into
mainfrom
fix/devnet-e2e-harness
Draft

Get the devnet e2e harness running again#367
gyorgybalazsi wants to merge 3 commits into
mainfrom
fix/devnet-e2e-harness

Conversation

@gyorgybalazsi

Copy link
Copy Markdown
Contributor

What this does

The devnet e2e and integration-test harness could not reach devnet at all. This
gets it running again. Issue #366 has the full findings; this PR carries the
five fixes I have working code for.

Why

Devnet moved. The old EKS cluster ibtc-devnet no longer exists, and Keycloak
moved with it. The harness still pointed at both.

One bug hid the rest. devnet.env.sh piped curl into jq, and both run.sh
and bring-up.sh set -o pipefail. A failing curl therefore killed the script
before its own diagnostic could print, so the caller saw exit 6 and nothing
else. curl -f compounded it by discarding the response body and, on HTTP/2,
turning a plain 401 into exit 56 — which reads as a network fault rather than a
rejected login.

That is why this went undiagnosed, and why #348 and #214 both shipped saying
the suite had not been run live. Nobody could run it.

Changes

Commit Fix
Retarget the devnet harness cluster coordinates, token-URL shape, smoke-check diagnostics, credential overrides
Match production on the token URL e2e/fixtures/auth.ts stops forcing /auth
Filter before asserting test 04 no longer counts paginated rows

The participants now run one per namespace:

Was Is
Context ieu-devnet devnet
Namespace catalyst-canton canton-node-{1,2,3}
Service participant-ibtc-devnet-$idx participant

The justfile port-forward recipe already used this layout, down to the port
pairs. The migration updated it and missed devnet.env.sh.

How tested

Brought the stack up against live devnet and ran the Playwright suite. 8 of
12 passed
, up from not starting at all.

e2e stack up: P1=:8081 P2=:8082 P3=:8083
8 passed  1 failed  3 did not run  (3.7m)

All three nodes serve the SPA and report the new Keycloak host. The login phase
mints a real ROPC token and DecMan accepts it, which is the direct check on the
token-URL change. Test 04 went from a 57.5s timeout to passing in 3.1s, which
is the check on the pagination change.

npm run typecheck is clean. Both shell scripts pass bash -n.

The run needed the current Keycloak password from 1Password, because the value
in development/remote/participant-*/.env is stale. Those files are not
touched here — see #366.

What this does not fix

Phase 05 still fails, so phases 05-08 do not run. The Deploy Contracts dialog
renders the Governance Core card disabled even though phase 04 has just
confirmed both peers hold the DAR. That is defect 9 in #366, in the frontend
rather than the harness, and I have not pinned down the cause.

Also left alone: crates/decman/tests/common/auth.rs:75 has the same /auth
bug and will fail the same way, build.rs never refreshes a stale
node_modules, and the README documents the old cluster and a run command that
fails under zsh. All in #366.

Note for the reviewer

Commit 1 groups four changes to one file. They are facets of one fix rather
than separate concerns — none of them alone makes the harness work, so
splitting them would produce commits that cannot be tested independently.
Happy to split if you would rather.

🤖 Generated with Claude Code

gyorgybalazsi and others added 3 commits August 19, 2026 15:54
The EKS cluster ibtc-devnet no longer exists. The Canton participants
now run one per namespace, as canton-node-{1,2,3}/svc/participant. The
justfile port-forward recipe already used that layout, but
devnet.env.sh was missed, so every run died opening the tunnels.

Compose the Keycloak token URL the way the runtime auth path does,
{url}/realms/{realm}. The old form stripped a trailing /auth and then
re-added it unconditionally, so no configured value could reach a
KeycloakX server.

Report the smoke-check failure instead of hiding it. Piping curl into
jq under `set -o pipefail` killed the script before the diagnostic
printed, and `-f` turned a 401 into exit 56, which reads as a network
fault rather than a rejected login.

Add DECPM_KEYCLOAK_{URL,USERNAME,PASSWORD}_OVERRIDE so a credential can
come from a secret manager without editing the per-participant .env
files.

Refs #366

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The fixture stripped a trailing /auth and then re-added it, so both
`https://host` and `https://host/auth` produced /auth/realms/... The
migrated devnet Keycloak is KeycloakX, which serves no /auth prefix, so
the fixture could not authenticate and no configuration could fix it.

DecMan's runtime path already builds {url}/realms/{realm}, in
src/auth/validators/common.rs::oidc_issuer_of. Follow that, and let a
deployment which still serves the legacy prefix carry it in the
configured URL.

The stale comment claimed to mirror src/auth/mod.rs::token_url. No such
function exists.

crates/decman/tests/common/auth.rs:75 has the same bug. This commit
does not touch it.

Refs #366

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The comparison table pages its rows 25 at a time. Devnet vets 324
packages, so governance-core sorts onto a later page and is never
mounted. The count saw 0 and polled for the full 60s against something
that could not appear, while the table itself was healthy and showing
matches on both peers.

Search narrows comparison.local_packages ahead of pagination, in
PackagesPanel.tsx:92, so filtering first puts the matches on page 1.
The assertion then resolves in about 3 seconds.

Refs #366

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@gyorgybalazsi
gyorgybalazsi requested review from a team and sosaucily August 19, 2026 13:55
@gyorgybalazsi
gyorgybalazsi marked this pull request as draft August 19, 2026 14:43
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