chore(e2e): surface mokosh-apps SPA bundle hash in timeout diagnostic #122
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
psa-systems/mokosh-server!122
Loading…
Reference in a new issue
No description provided.
Delete branch "chore/e2e-capture-spa-build-hash"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When the
capture bearer from the SPA loginsetup times out, the failure output now includes the SPA bundle URLs the browser actually loaded, e.g.https://msp.a8n.systems/assets/mokosh-apps-dxh3ab569d76469a98.js. Each mokosh-apps build emits a content-hashed filename and the deployed asset is served straight off the OCI image, so the hash uniquely identifies which build of mokosh-apps the browser ran against.The reason for adding it: when a mokosh-apps fix that affects the auth-callback / post-login navigation flow lands on main but staging hasn't redeployed yet, this setup will keep failing in a way that looks identical to a fresh regression. Today the only way to tell "the fix is live" from "still on the old build" is to dig into the trace zip and read the script src out of the HTML. With this change, the bundle hash appears on the first line of the diagnostic alongside the URL trail. Compare the hash to whatever the latest mokosh-apps CI produced for the commit on main; if it doesn't match, the deploy lags, not the code.
Implementation: a small regex matches the bundle filename pattern (
mokosh-apps-<hash>.{js,wasm}), the request listener collects matching URLs into aSetfor dedup (1-2 entries per run in practice, JS shell + WASM blob), and the catch block dumps them sorted into the error message. No change to the happy path; the regex test runs on every request but is cheap and the listener was already iterating per-request for theAuthorization: Bearercheck.