Merge pull request 'fix: health-checks.ts reads deployments-local.json directly, bypassing all env var overrides (#412)' (#500) from fix/issue-412 into master

This commit is contained in:
johba 2026-03-06 12:12:42 +01:00
commit 4daabe335d
2 changed files with 9 additions and 7 deletions

View file

@ -59,8 +59,8 @@ export async function checkRpcFunctional(rpcUrl: string, kraikenAddress?: string
}
// Step 2: Resolve the Kraiken address for the eth_call probe.
// Use the address supplied by the caller; fall back to deployments-local.json.
let resolvedKraikenAddress = kraikenAddress;
// Priority: caller-supplied address → STACK_KRAIKEN_ADDRESS env var → deployments-local.json.
let resolvedKraikenAddress = kraikenAddress ?? process.env.STACK_KRAIKEN_ADDRESS;
if (!resolvedKraikenAddress) {
const deploymentsPath = resolve(repoRoot, 'onchain', 'deployments-local.json');

View file

@ -12,9 +12,11 @@ export async function navigateSPA(page: Page, path: string): Promise<void> {
window.history.pushState({}, '', p);
window.dispatchEvent(new PopStateEvent('popstate'));
}, path);
// waitForURL would resolve immediately (pushState already updated the URL
// synchronously), so wait for networkidle instead: that fires once Vue Router
// has processed the popstate event, mounted the new view, and any route-
// triggered data fetches have settled.
await page.waitForLoadState('networkidle', { timeout: 10_000 });
// Vue Router processes the popstate event synchronously within evaluate(),
// so the route transition has already started by the time we return here.
// Callers must assert on a route-specific element (e.g. a heading) to confirm
// the view has mounted — that assertion is the readiness signal.
// waitForLoadState('networkidle') is not used because persistent WebSocket
// connections (blockchain event subscriptions) prevent the network from ever
// going idle, causing spurious timeouts.
}