fix(trajectory): export count=0 当 sourceDir 无 manifest — 回退定位汇聚库 (#58) - #59
Merged
Conversation
根因: ExportOptions.sourceDir 命名暗示 "session 源目录", 但语义实为 "汇聚库目录" (manifest.json + raw/ 所在)。调用方按字面传 session 源目录时, readManifest 找不到 manifest → loadAll 返回 [] → 三格式 count=0。 修复: - ExportOptions 新增可选 storeDir (汇聚库, 优先) - exportTrajectories 按 storeDir > sourceDir > destDir 顺序解析首个含 manifest 的目录 (resolveStore), 避免静默返回空 - loadAll 参数语义明确为 storeDir - 新增 2 回归用例 (#58 场景 + storeDir 显式优先), 共 13 pass Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Merged
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.
修复 #58
exportTrajectories在 SFT/DPO/GRPO 三格式下返回count=0。根因
ExportOptions.sourceDir命名暗示"session 源目录",但语义实为"汇聚库目录"(manifest.json + raw/ 所在)。调用方按字面把 session 源目录传给sourceDir时,readManifest找不到 manifest →loadAll返回[]→ 三格式 count=0。本地 CLI/测试因传对了目录(汇聚库)所以 11 pass,但 fusion-autotest 直接调 API 按字面传参 → 触发 bug。
修复
ExportOptions新增可选storeDir(汇聚库,优先使用)exportTrajectories按storeDir > sourceDir > destDir顺序解析首个含 manifest 的目录(resolveStore),不再静默返回空loadAll参数语义明确为storeDir测试
Closes #58
🤖 Generated with Claude Code