Repository navigation
章节梗概 (1/9):统一 segments 带时间片段读取适配器(T3) - #15
Merged
Merged
Conversation
TDD 先写 33 条失败测试覆盖时间解析(数字/HH:MM:SS/MM:SS/垃圾值/负数)、
segments 规范化("文本永不丢失"铁律、start_time|start 与 end_time|end
双命名兼容、speaker 缺失不编造)、以及从缓存目录按优先级
(transcript_funasr.json > transcript_capswriter.json)加载并在损坏/
空结果时降级到下一来源,再实现至全绿。全新文件,不改动任何既有模块。
via [HAPI](https://hapi.run)
Co-Authored-By: HAPI <noreply@hapi.run>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Reviewed commit: 🤖 Review 门禁 — 判定:
|
📒 Review ledger state
完整数据保存在 |
"1e309" 等超大数字字符串在 Python 里会静默溢出为 float('inf'),之前被当作合法
时间戳放行,下游对返回值做 int() 转换时会直接崩溃。用 math.isfinite 收口所有
数值入口(int/float 直传、纯数字字符串、HH:MM:SS 字符串),非有限值一律视为
非法时间返回 None。
via [HAPI](https://hapi.run)
Co-Authored-By: HAPI <noreply@hapi.run>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
via [HAPI](https://hapi.run) Co-Authored-By: HAPI <noreply@hapi.run> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 20, 2026
zj1123581321
added a commit
that referenced
this pull request
Jul 23, 2026
- 260723-0214 HANDOFF 头部标注已被 260723-0246 取代(范围锁定 Stage 1) - 章节 plan §12:接线批 T1/T6-T10 与计划外 T11 实际已于 2026-07-19 全部完成并部署生产(stacked PR #15-#25),checkbox 此前未同步 via [HAPI](https://hapi.run) Co-Authored-By: HAPI <noreply@hapi.run> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
zj1123581321
added a commit
that referenced
this pull request
Oct 15, 2026
章节梗概 (1/9):统一 segments 带时间片段读取适配器(T3)
zj1123581321
added a commit
that referenced
this pull request
Oct 15, 2026
- 260723-0214 HANDOFF 头部标注已被 260723-0246 取代(范围锁定 Stage 1) - 章节 plan §12:接线批 T1/T6-T10 与计划外 T11 实际已于 2026-07-19 全部完成并部署生产(stacked PR #15-#25),checkbox 此前未同步 via [HAPI](https://hapi.run) Co-Authored-By: HAPI <noreply@hapi.run> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
范围
Stacked PR 系列第 1 个(共 9 个,feat/chapters-wiring 拆分)。本 PR 只交付 T3:统一「带时间片段」读取适配器
segments.py(load_segments 多来源回退、normalize_segments 防御式解析、parse_time_to_seconds 严格校验),为后续 ChaptersProcessor 提供输入契约。字幕解析三路时间戳保留(T2)与 ChaptersProcessor(T5)在第 2 个 PR。
配置/Schema 触点
无配置变更。
验证证据
uv run --frozen --extra dev pytest tests/unit全绿(2016 passed @ 本 PR head)Stacked 结构
3-4. gate 安全加固 r1–r28
合并顺序需按栈序。