Skip to content

Add supervisor attachment boundary logging - #15955

Closed
mslynch wants to merge 4 commits into
mainfrom
copilot/supervisor-startup-timing
Closed

mslynch wants to merge 4 commits into
mainfrom
copilot/supervisor-startup-timing

Conversation

@mslynch

@mslynch mslynch commented Sep 4, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds six boundary events around the two operations used to attach to a prestarted supervisor:

  • cached-handshake retrieval starts and completes in the extension host;
  • cached-handshake replay starts and completes in the server broker;
  • serverStatus() verification starts and completes or fails.

The existing log timestamps can be compared to determine whether time was spent reaching the broker, replaying or receiving the cached handshake, reaching the status handler, or waiting for its response. No handshake payloads or bearer tokens are logged.

Testing

  • npx vitest run src/server-supervisor-handshake.vitest.ts
  • npm run build-check -- --pretty false

Adds timing instrumentation (performance.now()-based elapsed durations
and byte counts) to the handshake socket client, the in-process
handshake broker, and the Kallichore server-status probe used when
reconnecting. This makes it possible to diagnose where time is spent
during supervisor startup/reconnect without exposing any payload
content, tokens, or other sensitive data in the logs.

Fixes a latent type error where the cached handshake payload could be
undefined when replayed back to a socket.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

E2E Tests 🚀
This PR will run tests tagged with: @:critical @:sessions @:console @:interpreter

Why these tags?
Tag Source
@:critical Always runs (required)
@:sessions Changed files
@:console Changed files
@:interpreter Changed files

More on automatic tags from changed files.

readme  valid tags

@mslynch
mslynch marked this pull request as draft September 4, 2026 18:46
Removes the performance.now()-based elapsed-time computations and the
wall-clock timestamp added in the previous commit. The log capture
already timestamps each line, so recomputing elapsed durations here
was redundant. Instead, log paired start/end boundary events with
non-timing metadata: connection ID, report-in vs. cached-replay
classification, byte counts, socket path, configured timeout, and
success/failure (via the existing summarizeError helper). No payload
content or tokens are logged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mslynch mslynch changed the title Add elapsed-time logging to supervisor startup handshake path Add boundary instrumentation to supervisor startup handshake path Sep 4, 2026
Keep the persistent boundary instrumentation self-explanatory rather than tying it to the current startup investigation.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mslynch mslynch changed the title Add boundary instrumentation to supervisor startup handshake path Add supervisor handshake boundary logging Sep 4, 2026
Keep only the boundary events needed to distinguish handshake replay from status verification delays.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mslynch mslynch changed the title Add supervisor handshake boundary logging Add supervisor attachment boundary logging Sep 4, 2026
@juliasilge

Copy link
Copy Markdown
Member

@mslynch I notice this is still in draft. Are you waiting on us for this at all? Or should it stay here in this status still?

@mslynch

mslynch commented Oct 9, 2026

Copy link
Copy Markdown
Member Author

No, I stopped working on the research this was intended to support. I'll just close it out for now.

@mslynch mslynch closed this Oct 9, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants