Repository navigation
Conversation
Claude Code 对同一次 API 响应按 content block 写多行 assistant 记录 (同 message.id/requestId,usage 逐位相同),日报逐行累加把 claude 来源 虚高 44%–84%(近 7 天实测,10-13 当天 14.9 亿中重复 12.5 亿)。 - transcript_usage 按 message.id 只计一次(去重放在窗口过滤之后) - REPORT_VERSION 8→9;定稿合并改为同版本不降级:版本升级即口径重建, 旧版本报告与 reports.v7.bak/ 不再作为合并基线(否则 max 合并把虚高值 永久固化);v7 迁移机件随 v9 退役 - 真实数据重算与独立重算逐位一致:10-13 合计 1,652,632,283→406,245,394, 10-15 合计 459,311,517→448,527,796(证据 scratch/2026-10-16-claude-dup-audit/) - 同步更新 daily-report.md / usage-cost.md §3.1.4(版本升级即重建); 重放用例锚点随合并代码重构一并更新(R3,经用户批准) Defect: H1016-1
独立评审(Standards/Spec 双轴)发现并实测确认的问题: - _merge_day_report 以任务数判等做短路,纯 max 调整(任务数不变)时把 cap 结果连同差额 unknown 一起丢弃,同版本 --refresh 部分清理场景磁盘 降级为重扫值,违反 §3.1.4 不降级长期约束;改为逐位置比对 total。 - test_partial_cleanup_diff_becomes_unknown 因夹具升 v9 命中定稿缓存而 空转(断言值与夹具巧合相等);改走 refresh=True 真实合并路径并断言 落盘不降级。 - claude 去重从文件内升级为同一扫描内全局(id 服务端全局唯一,resume 复制历史行到新文件也不双计);实测 182 天重算数值零变化。 - 补 H1016-1 回放用例(delivery-harness §2 每修复必须可回放)。 - 规格勘误:daily-report.md 标题 schema v9、v7→v8 迁移措辞改退役、 Claude 行括号配平;usage-cost.md §3 示例去 migrated_from、§3.1 编号 顺延、补「max 合并必须真正落盘」条款。 Defect: H1016-1
This branch has not been deployed
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.
缺陷(H1016-1)
Claude Code 对同一次 API 响应按 content block 写多行 assistant 记录(同
message.id/requestId、usage 逐位相同、apiBlockIndex不同),日报transcript_usage逐行累加,claude 来源虚高 44%–84%(近 7 天实测;10-13 当天 14.9 亿中重复 12.5 亿)。逐项排查确认其余来源(Zcode/Codex/Kimi/Pi/OpenCode)与聚合、定稿路径均无重复计数。修复
transcript_usage按message.id去重(同一扫描内全局;去重在窗口过滤之后,跨零点边界块行不互相压制)REPORT_VERSION8→9;定稿合并改为同版本不降级:版本升级即口径重建,旧版本报告与reports.v7.bak/不作基线(否则 max 合并把虚高值永久固化);v7 迁移机件退役dd87220):合并关口短路改为逐位置比对 total(任务数判等会把纯 max 调整连同差额 unknown 丢弃,同版本 refresh 部分清理会磁盘降级);空转的test_partial_cleanup_diff_becomes_unknown改走refresh=True真实路径;补 H1016-1 回放用例;规格文本勘误(标题 v9、§3.1 编号、括号配平)验证
bin/verify全绿(555 项 Python + Swift 两项 + zcode 自检);回放自检含新用例全绿scratch/2026-10-16-claude-dup-audit/(不入库)备注
.harness/project/replay_cases.py:3 个既有用例锚点随合并代码重构更新 + 新增 H1016-1 用例(R3,经用户批准执行)Defect: H1016-1