Skip to content

fix: session-lifecycle, heartbeat, update-check, and settings bugs - #142

Merged
jkyberneees merged 2 commits into
mainfrom
fix/bughunt-wave1-session-lifecycle
Sep 30, 2026
Merged

jkyberneees merged 2 commits into
mainfrom
fix/bughunt-wave1-session-lifecycle

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

Fixes 5 validated bugs from the wave-1 bug hunt, RED-first with regression tests:

  • /copy-session-id can no longer copy the connect-time placeholder id during the window before the post-prompt session frame; resumed sessions unaffected
  • /new no longer has its workspace session mapping restored by the reconnect session frame
  • heartbeat no longer pings a dead client or pairs RTT across a reconnect swap
  • bodek upgrade no longer reports prerelease latest releases as always up-to-date
  • a broken settings file is left untouched instead of being overwritten with a near-empty file

Gates: fmt/vet/lint clean, go test -race ./... green. Adversarially reviewed; review findings addressed.

- /copy-session-id: ordering-based awaitSessionConfirm gate so the
  connect-time placeholder id cannot be copied before the post-prompt
  session frame confirms the real id; resumed sessions keep copying
- /new: one-shot suppressRemember stops the reconnect session frame
  from re-persisting the placeholder id into workspaces.json
- heartbeat: skip ping and pingSentAt stamp while disconnected; reset
  the stamp on reconnect swap so RTT pairs with the live socket
- update: Newer parses the latest tag via pseudoBase so prerelease
  latest releases no longer read as always up-to-date
- settings: refuse persistence for the run when the config file fails
  to parse instead of overwriting it with a near-empty file
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bodek 5cb606e Commit Preview URL

Branch Preview URL
Sep 30 2026, 10:35 AM

The fake banner carried ?token=cafef00d, so waitSpawned returned as soon
as line 1 was scanned — Stop() then closed the pipe while lines 2-3 were
still in flight, failing the passthrough assertions on fast runners.
The banner now omits the token so the wait ends on the WS token line,
which also makes the token assertion prove the WS-token path instead of
the banner fallback.
@jkyberneees
jkyberneees merged commit d76ca3e into main Sep 30, 2026
9 checks passed
@jkyberneees
jkyberneees deleted the fix/bughunt-wave1-session-lifecycle branch September 30, 2026 10:38
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