Repository navigation
[PR] fix: export CCR originals instead of reference metadata - #6727
Merged
ranxianglei merged 1 commit intoNov 14, 2026
Merged
Conversation
This was referenced Nov 14, 2026
Owner
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。 Searched open+closed issues/PRs for the export/CCR family: #3010 (closed) added the unified CCR mirror + Independent review — verified, not taken on faith:
8问 (PR review):
判定: 可合入。 单模块纯 fix,回归测试在 base 上真实复现(12 红),head 上 34/34 绿,CI 全绿,diff 干净(2 文件 1 commit,每行都与目的相关), |
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.
Closes #6726
Problem
A full JSONL export should replace a CCR placeholder with its stored original. The table renderer currently uses
getCcrEntries()as if each entry's content were that original.planIngest()actually stores serialized reference metadata there: hash, rawId, kind, token/character counts, and a short head. The original text lives underMessageContentStore.byHash.As a result, a real persisted session exports metadata JSON as the message text and adds
dereferencedFrom, even when the actual original is available in both the unified mirror and its content-store sidecar. The incorrect indexed entry also prevents the correct sidecar fallback from filling the reference. This affects full JSONL handoffs; the legacy-tail renderer already resolves the hash correctly.Change
Resolve indexed originals through the existing backend
getCcr()contract: look up each reference's hash inbyHash, and include only actual string payloads. An empty original remains a valid empty string. Missing, corrupt, or null reference data leaves the placeholder intact unless the sidecar supplies a real original.Use the same extraction for the sidecar, so a missing hash cannot be mistaken for an empty original. Preserve indexed-original priority, fill only gaps from the disk copy, and keep plain exports/non-placeholder text verbatim. This changes the generated export only; it adds no storage format or setting and does not rewrite persisted data.
Verification
SessionStore→exportSession()calls with the sidecar present and after it is removed.npm run typecheck,npm run build, andgit diff --checkpass.planIngest()'s actual entry format, andgetCcr()validation; no blocker. The reviewer did not rerun tests.Validation used Node 24.22.1,
TZ=UTC, and an isolated temporary directory. SQLite/public export paths ran locally. The existing MySQL seam tests use a typed injected backend; no live MySQL server was tested.History check
Checked the complete Afloat16 issue index and actual related PR patches, including a fresh read of #6209's current files. That change only implements output destinations. Actual #3010 adds the unified CCR mirror and
getCcr()for retrieval but does not change this exporter; #3946 adds MySQL export selection. Focused all-state searches found no previous correction of the metadata-versus-original lookup.This is independent of the separately submitted historical-null guard: that fixes an exception and whole-export fallback. This patch fixes the payload source used for healthy object placeholders.
Base: master
3858b6956abab52da781c2436c0245586ce18358, bili 0.1.214. Full-suite status is the hosted CI on the exact pushed head.