Conversation
helsome
approved these changes
Sep 19, 2026
helsome
left a comment
Owner
There was a problem hiding this comment.
代码范围很小且与 #120/#123 独立;从首个非空逻辑记录识别表头的实现与问题根因一致。验证材料充分:Windows 11 / Bun 1.4.2,portfolio-import 78/0、shared 1003/0,且包含草稿→真实临时存储→新 repository 重载;PR CI 的 Focused tests、Full unit tests (advisory)、Secret scan 也都通过。Typecheck 的唯一失败已核对为当前 main 同一处 experiment-service.ts:534 的 TS2741,本 PR 未修改该文件,因此按 baseline failure 处理,不归因于本 PR。当前 main 自身仍红,所以这里只 APPROVE,暂不合并;main 恢复后可直接进入合并队列。
7 tasks
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.
问题与修复
文件开始包含空白记录时,CSV 表头检测使用了空白首行,实际表头变成一条持仓记录;重排列的真实数据也会被错误映射。现在查找第一个含非空单元格的逻辑记录,再识别表头和决定数据起点。
Closes #128
新增测试覆盖空格、分隔符空记录、tab 空记录、BOM+CRLF、重排列、显式 headerMapping、无表头、空文件、多行引号字段及草稿→真实文件保存→新 repository 实例重载。不涉及 UI 修改,无可见 UI 变化;不改动分隔符策略,不包含其他待合并 PR。
可复现测试报告
环境:Windows 11 / Bun 1.4.2 (744846f84),基于 main ff3ed3d。
没有声称全项目类型检查通过。未运行桌面 E2E 或全仓 unit suite;导入正确性已通过真实持久化集成测试覆盖。不自动修复历史已保存的错误持仓。
2026-09-20 类型检查修复复验
补齐 experiment-service.ts 配置应用失败返回值的 runtimeUnusable: false。此时尚未启动运行任务,因此不应标记运行时不可用。该主分支遗漏也是旧版 CI 的 TS2741 根因。本 PR 增加此最小修复以解除检查阻塞(与在审 #122 对此字段的修正一致,无需引入其余改动)。无可见 UI 变化。
环境:Windows / Bun 1.4.2。实际执行:
1003 pass
0 fail
3952 expect() calls
Ran 1003 tests across 92 files. [29.36s]
上述结果替代此前测试报告中类型检查失败的状态;远端检查以本次提交的 CI 为准。未额外运行桌面 E2E。