Skip to content

fix: thread sync stalls on nul characters, and updates skip migrations - #249

Merged
shabirkhan-dev merged 3 commits into
mainfrom
claude/sync-nul-and-update-migrate
Oct 11, 2026
Merged

shabirkhan-dev merged 3 commits into
mainfrom
claude/sync-nul-and-update-migrate

Conversation

@shabirkhan-dev

Copy link
Copy Markdown
Collaborator

Two bugs found while deploying #237–#248 to the always-on machine:

  • Sync stalls on NUL. Postgres can store \u0000 in neither text nor jsonb, and agents' terminal output contains it. On the live machine, one such event made every round fail with unsupported Unicode escape sequence. Only 4 of 54 threads ever reached the database. The API now swaps NUL for U+FFFD in strings and keys before writing. A new test in routes.test.ts fails without the fix and passes with it.
  • Updates skip migrations. scripts/bash/update-grid.sh (Settings → Machines → Update) installed and built the new release but never ran db:migrate, and bun run start doesn't migrate either. An update that adds tables (such as 0014/0015 for thread sync) would therefore start against a database without them. There's now a migrating step after the build and before the switch. A failure there leaves the running version untouched, as with a failed build.

🤖 Generated with Claude Code

shabirkhan-dev and others added 3 commits October 11, 2026 23:52
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ew version

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shabirkhan-dev
shabirkhan-dev merged commit 63ee000 into main Oct 11, 2026
9 checks passed
@shabirkhan-dev
shabirkhan-dev deleted the claude/sync-nul-and-update-migrate branch October 11, 2026 19:07
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