Skip to content

kit-1256-presence-front-logs-upgrades: presence-pages' front logs WebSocket upgrades too - #1014

Merged
hhff merged 3 commits into
mainfrom
ticket/kit-1256-presence-front-logs-upgrades
Dec 5, 2026
Merged

hhff merged 3 commits into
mainfrom
ticket/kit-1256-presence-front-logs-upgrades

Conversation

@hhff

@hhff hhff commented Dec 5, 2026

Copy link
Copy Markdown
Member

Follow-up to kit-1250 final-1 F1. test/presence-pages.test.mjs's front (the test's own proxy in front of the dashboard or hub) logged only plain HTTP requests in the log a first-card timeout prints; WebSocket upgrades take Node's upgrade path and weren't logged. So if test 2 ("socket refused") hangs again, its diagnostic couldn't say whether or when the page asked for /presence.

  • The upgrade handler now pushes a row into the same log: { url, in, answered, status, upgrade: true }, status refused 403, proxied or 502 <code> (the target couldn't be reached).
  • Test 1 asserts its log holds a proxied /presence upgrade; test 2 a refused one.

Test-only, one file; no timeout or flaky.json change.

How to verify

node --test --test-concurrency=2 test/presence-pages.test.mjs (Node 22+, Chrome): 5 pass. With the upgrade handler's asked.push(row) removed, tests 1 and 2 fail with the front logged the /presence upgrade as proxied: [] and ... as refused 403: []. With the page made to hang at its first card, the # front: diagnostic lists the /presence upgrade rows.

One-way doors

None.

🤖 Generated with Claude Code

hhff and others added 3 commits December 5, 2026 06:39
…Socket upgrades too

The test's front logs every WebSocket upgrade (refused 403, proxied or
502) in the request log a first-card timeout prints, so a repeat of test
2's hang shows the /presence attempts. Tests 1 and 2 assert the rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hhff
hhff merged commit b147583 into main Dec 5, 2026
45 checks passed
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