Repository navigation
Guard timeline migration and byte preflight - #1982
Merged
Merged
Conversation
ymichael
force-pushed
the
bb/review-slop-cop-comments-thr_gyrubrb35r
branch
from
August 20, 2026 03:36
372c23d to
383a7e2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
The parent-tool-call backfill added in #1976 evaluated
json_extractfor any historic event payload containing the parent key text, so malformed stored JSON aborted migration 0103 and prevented server startup. The byte-budget optimization from the same PR also aggregated every matching payload in a client-selected turn-details range before its early-stopping iterator ran, allowing a very wide range to add one or two unbounded synchronous scans.What changed
json_valid(data)so malformed historic payloads remain unbackfilled instead of aborting the upgrade.This is a database/server implementation fix only. There is no server/host-daemon wire change, so
HOST_DAEMON_PROTOCOL_VERSIONis unchanged.How you verified
pnpm exec turbo run typecheck --filter=@bb/db --forcepnpm exec turbo run test --filter=@bb/db --force— 29 files, 406 tests passedpnpm exec prettier --check packages/db/src/data/events.ts packages/db/src/migration-history.ts packages/db/test/data/events.test.ts packages/db/test/migrate.test.tsgit diff --checkFollow-up to #1976 and its migration finding and range-scan finding.