Skip to content

[PR] fix(storage): skip non-object JSONL entries when locating archives - #6245

Closed
Afloat16 wants to merge 1 commit into
ranxianglei:masterfrom
Afloat16:2026-11-11_archive-scalar-lines
Closed

Afloat16 wants to merge 1 commit into
ranxianglei:masterfrom
Afloat16:2026-11-11_archive-scalar-lines

Conversation

@Afloat16

Copy link
Copy Markdown
Contributor

Fixes #6230

Problem

A syntactically valid null line causes the archive lookup scanners to dereference a null value. Both session backends stop before later valid archives, and SQLite block restore throws outright.

Change

Parse lookup entries as unknown and match identifiers only on non-null objects. The three scanners now continue past unrelated scalar values just as they already do for malformed JSON. Stored archive formats, message/block identities and the restore transaction logic remain unchanged.

Validation

  • Unchanged master: three new regressions fail for SQLite session restore, SQLite block restore and the MySQL scanner.
  • Cases cover null/scalar/array/truncated lines before valid records, byte-equivalent SQLite restored messages/blocks, preservation of another archive record, and missing-record behavior.
  • MySQL validation uses an injected driver contract; it verifies begin/INSERT/commit/release without claiming a live-server integration test.
  • 10/11 targeted tests passed; 1 existing gated test skipped. npm run typecheck, npm run build, npm run check:test-import-graph and git diff --check passed on this independent branch.
  • Full-suite verdict remains with repository CI.

@ranxianglei

Copy link
Copy Markdown
Owner

Landed via batch PR #6439 (merged) — closing as superseded.

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.

[Bug][storage] A null JSONL entry blocks later valid archive restores

2 participants