style(e2e): separate the login retry comment blocks #484

Merged
Claude-Run merged 2 commits from fix/PMS-721-e2e-login-response-diagnostics into main 2026-08-02 21:44:47 +02:00
Member

The PMS-721 response-log note ran straight on from the PMS-654 rate-limit note, reading as one paragraph.

#PMS-721

The PMS-721 response-log note ran straight on from the PMS-654 rate-limit note, reading as one paragraph. #PMS-721
A webkit cold login parked on bunyip's /oauth2/authorize and the CI log showed nothing but a locator timeout on the hub credential form: `attachPageDiagnostics` recorded request URLs and frame navigations only, so an authorize or hub-login response that was a 5xx, a 429 or an HTML error page was invisible, and fj cannot download the Playwright trace that would have shown it.

`attachPageDiagnostics` now records every main-frame document response (status + URL, plus the first 500 chars of the body for non-2xx) and `snapshot()` prints them as a `mainFrameResponses` block alongside the URL trail and request list. The log lives in a per-page WeakMap so the login helper and a spec's diagnostics share one listener instead of double-recording. Each hop is its own entry, so a redirect chain reads as `302 .../oauth2/authorize` then `200 https://a8n.systems/login?...&checked=1`.

`submitCredentialsOnce` no longer throws a raw locator timeout when the credential form never appears. It returns a classified outcome (advanced / rejected / no-form / unclear); the no-form case carries the current location, the last main-frame response and any rendered hub banner, and `loginViaSpa` decides whether to back off and retry (the rate-limit backoff when the hub names one, otherwise 3s) instead of the wait bypassing the retry loop entirely. A definite credential rejection still fails fast.

#PMS-721
style(e2e): separate the login retry comment blocks
All checks were successful
E2E / Playwright against staging (pull_request) Successful in 1m40s
Check / fmt + clippy + build + tests (pull_request) Successful in 1m46s
Integration / integration tests (pull_request) Successful in 8m28s
Create release / Gate (release-branch merges only) (pull_request) Successful in 1s
Create release / Create release from merged PR (pull_request) Has been skipped
4fad0e7279
The PMS-721 response-log note ran straight on from the PMS-654 rate-limit note, reading as one paragraph.

#PMS-721
Claude-Run deleted branch fix/PMS-721-e2e-login-response-diagnostics 2026-08-02 21:44:47 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-server!484
No description provided.