Skip to content

[PR] fix: retain malformed records during session garbage collection - #6143

Closed
Afloat16 wants to merge 1 commit into
ranxianglei:masterfrom
Afloat16:2026-11-10_guard-gc-corrupt-records
Closed

Afloat16 wants to merge 1 commit into
ranxianglei:masterfrom
Afloat16:2026-11-10_guard-gc-corrupt-records

Conversation

@Afloat16

Copy link
Copy Markdown
Contributor

Problem

Malformed but parseable JSON can look like empty, eligible session data to GC. Invalid compression state, block contents or token counts pass eligibility gates; non-string companion values count as zero tokens. GC then deletes content it cannot interpret despite its retain-corrupt-data policy.

Changes

Reject explicitly malformed fields when constructing the GC view and mark companions with non-string entries unrecognizable. The existing retain-on-error path keeps both files. Missing optional legacy fields retain their defaults.

Validation

  • All 26 session-GC tests passed; three new tests fail on unchanged source.
  • A real-files regression creates two old sessions: upstream deletes both; the patch retains both and their companion.
  • Unit coverage includes seven malformed state/token shapes and four non-string companion values.
  • Final-code typecheck, npm production build with dist checks and git diff --check passed. Full-suite verdict remains with CI.

Checked #1084, #1189, corruption/storage history and previous Afloat16 work. This is independent of debug-dump deletion accounting.

Base: e1e33a9.

Closes #6141

@ranxianglei ranxianglei changed the title fix: retain malformed records during session garbage collection [PR] fix: retain malformed records during session garbage collection Nov 10, 2026
@ranxianglei

Copy link
Copy Markdown
Owner

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

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

Verified the supersession claim — all checks pass:

Nothing to redo — the fix landed intact via the batch. Closing as superseded is correct.

@ranxianglei ranxianglei reopened this Nov 14, 2026
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

Re-verified live — state is unchanged since the last check, nothing new to act on:

Task is complete: the fix landed intact via the batch, the PR is closed as superseded. No further work needed on this thread.

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] Session GC deletes parseable records with malformed compression or companion data

2 participants