Skip to content

fix: bug-hunt wave — transport, persistence, and approval teardown - #133

Merged
jkyberneees merged 4 commits into
mainfrom
fix/bug-hunt-2026-09-25
Sep 25, 2026
Merged

jkyberneees merged 4 commits into
mainfrom
fix/bug-hunt-2026-09-25

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

9 validated bugs from a 3-agent hunt, fixed RED-first.

Transport/server

  • IPv6 literal URLs now get scheme-default ports (u.Port() + net.JoinHostPort)
  • splitTokenURL strips only the token — other attach-URL params survive
  • Stop refuses to signal a reaped (possibly recycled) PID's group
  • stderr tail reassembles lines split across pipe writes
  • REST JSON decodes bounded at 256 MiB

Persistence

  • Token stores converge across concurrent instances (wholesale disk adoption on mutation; peer deletions win)
  • .corrupt quarantine rotates to .corrupt.1; failed workspace quarantine stops persisting with a warning

TUI

  • /clear and error teardown drop approvals, deadlines, bells, and clarify — keyboard no longer gated by dead requests; bell lockstep invariant restored

7 new test files; make fmt/vet/lint/test clean, 3-judge adversarial review passed.

…decodes

hostPortAddr treated every IPv6 literal as already-ported (it contains
':'), so ws://[::1]/ws dialled an address with no port. Use u.Port() and
net.JoinHostPort so bracketed literals and empty-port forms get the
scheme default.

getJSON now decodes through a 256 MiB LimitReader like ExportSession —
a broken or hostile server streaming unbounded bytes must not OOM the
client.
…ble split stderr lines

splitTokenURL cleared the whole RawQuery, silently dropping non-token
parameters from pasted attach URLs — strip only the token.

Stop signalled the process group without checking whether the reaper
had already observed the child's death, risking a SIGINT into a
recycled PID's group.

appendTail recorded a stderr line straddling two pipe writes severed in
half — merge the buffered partial line before splitting.
…orrupt-file backups

Tokens' persist rewrote the whole map from the in-memory snapshot, so
concurrent bodek instances erased each other's minted tokens; adopt the
on-disk map wholesale on mutation (caller's own id re-applied) the way
workspace's reloadLocked already does, so peer deletions converge too.

The corrupt-store quarantine used a fixed .corrupt name, so a second
corrupting write destroyed the first quarantined evidence — rotate to
.corrupt.1 in both stores. Workspace's failed quarantine also left the
path set, letting the next Save overwrite unrecoverable bytes; mirror
tokens and stop persisting with a warning.
…down

/clear mid-turn wiped the transcript but left approvals, deadlines,
bells, and clarify armed over a dead request, keeping the keyboard
gated; errMsg's teardown cleared approvals and deadlines but not the
bell latch, breaking the documented lockstep invariant. Both paths now
tear down the full set, matching done/disconnect.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 25, 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 a5b9444 Commit Preview URL

Branch Preview URL
Sep 25 2026, 02:51 PM

@jkyberneees
jkyberneees merged commit 77b326c into main Sep 25, 2026
8 of 9 checks passed
@jkyberneees
jkyberneees deleted the fix/bug-hunt-2026-09-25 branch September 25, 2026 14:52
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