Skip to content

fix: log failed saves and dropped frames; plugin.version matches deno.json - #4

Merged
zumbrunn merged 2 commits into
mainfrom
fix/log-swallowed-errors
Nov 4, 2026
Merged

zumbrunn merged 2 commits into
mainfrom
fix/log-swallowed-errors

Conversation

@zumbrunn

@zumbrunn zumbrunn commented Nov 4, 2026

Copy link
Copy Markdown
Member

Fixes #3

What

Failures in the collaborative editing path were swallowed by empty catches: a failed save of the Y.js document, a failed flush, a throwing onPageUpdate hook, and any error while handling a websocket frame. A user could lose edits with nothing in the log. plugin.version also reported 2.1.4 against 2.2.3 in deno.json.

Change

  • New src/log.ts: warnThrottled(key, message, err) logs at most one line per key per minute, so a misbehaving client cannot flood the log.
  • ws-server.ts, manager.ts, commit.ts: the swallowing sites now call it (persist, flush, hook, frame). Behaviour is otherwise unchanged; none of these failures break the session.
  • src/mod.ts: version set to 2.2.3.

Testing

tests/log_test.ts: throttling per key and over time, and plugin.version equals deno.json's version. deno task test passes (43) and deno task check passes.

Not changed: the intentional catch for a new or missing content file in manager.ts.

🤖 Generated with Claude Code

zumbrunn and others added 2 commits November 4, 2026 08:19
….json

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@zumbrunn
zumbrunn merged commit f296e87 into main Nov 4, 2026
4 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.

Failed saves and dropped websocket frames are swallowed silently; plugin.version is stale

1 participant