Skip to content

Confirmed alerts: a project's confirmed.json for detector findings that are intended - #110

Merged
ZLHad merged 6 commits into
mainfrom
claude/confirmed-alerts
Oct 18, 2026
Merged

ZLHad merged 6 commits into
mainfrom
claude/confirmed-alerts

Conversation

@ZLHad

@ZLHad ZLHad commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

What and why · 改了什么、为什么

检测器按阈值判断,有些结果是有意的:分镜要的一帧闪、谱子里写好的留白。以前没有能留下来的说法:每次 check 都报同样几条,--allow 只管一次运行;作品被改过去迁就误报。这个 PR 给这类结果一条正规的路,范围很窄,要证据,内容一变就失效。底线不在里面。

  • <project>/confirmed.json(新的 tools/confirm.py,只用标准库):每条写出结果的时间或区间、为什么是有意的(why)、项目里证明它的文件(evidence),以及工具印出的 key,也就是那里画面或声音的粗指纹。
  • 读它的两个工具:bin/vh check 的孤立帧扫描(check.iso),bin/vh qa scan 的掉音、抽吸和按区间的 click(qa.dropout、qa.pump、qa.click,click 要写 n,即确认时有几处)。
  • 报告:原始结果照列,标 confirmed (已确认),不计入退出码;那里的画面或声音变了,标 LAPSED (已失效),重新算失败;那个时刻已经没有结果,标 unused。没确认的每处印一行 confirm? {…},可以直接粘贴。
  • 不收(列成 not taken):缺 why、evidence 的文件不在项目里、写了底线类(数字静音、读时、关卡、规格),以及运动警告。cue check 的 OFF 暂不开放。文件读不出来时检查失败,不会跳过。同一种结果确认到 5 处以上,加一行提示:检测器本身可能有问题。
  • check --allow 保留,只管这一次运行,输出里也这么写(declared (--allow, this run only)),并指出长期保留要写进哪里。
  • 检测器修正:qa scan 的掉音在给了 --stems 时,不再算音乐 stem 自己也一样深的凹陷(按它自己的段中位数比,差不超过 1 dB),和抽吸早就用的规则一样。谱子里写好的稀疏段落以前会被报成掉音。
  • 文档:playbook/02-verification.md 加了一小节"确认告警"(standard 读量 +456 字符,quick 不变);tools/audio/README.md、qa.py 和 isoframes.py 的帮助、bin/vh 的帮助行、CHANGELOG。

Measured thresholds · 量过的阈值

在 31 个风格样片(styles/*/media/swatch.mp4,720p30,各 5 s,共 4650 帧,带 AAC 音轨)上量的:

key 拷贝(不该失效) 改过(该失效)
画面 pic::联系表那次解码(192×108 灰度)里,结果前一帧和差得最大的一帧,各取 8×6 的格子均值,64 级(每级 4 个灰度);没有格子差超过 1 级、平均不超过 0.25 级算同一个 CRF 16 重编码:100 % 的帧认得;1080p 放大 CRF 18:100 %;CRF 28:99.98 %(4650 帧丢 1 帧)。任何拷贝里格子最多差 1 级(最大实际漂移 3.1 灰度) 0.5 s 之后的那帧被当成同一个的有 8.05 %,下一帧 65.7 %(运动慢的样片;时间挪了本来就对不上,时间要在一帧以内)
scratched-type、neon-step-print 里设计好的两处闪 CRF 16 和 1080p 两个拷贝下,key 都只差一个字符一级,确认仍然有效 —
声音 env::那段前后各 0.5 s,每 0.1 s 一个 RMS,减去中位数,1.5 dB 一档;90 % 的点差不超过一档算同一个 341 段 1 s 的区间:AAC 128k 降 3 dB 的拷贝 100 % 认得,AAC 96k 100 % 区间里有 0.5 s 降 6 dB:0 %;整段挪 0.3 s:5.6 %,挪 1 s:2.6 %

调过的取舍:16 级的缩略图在拷贝下也是 100 %,但"0.5 s 之后"能有 19 % 被当成同一个;3 dB 一档、截在 ±24 dB 的声音 key,在一段更深的凹陷上不会失效(中位数跟着移,截断吃掉了差别)。所以画面改成 64 级,声音改成 1.5 dB 一档、±45 dB。

How it was verified · 怎么验证的

  • tools/ci.sh --committed(VH_BASH=/bin/bash,shellcheck、pyflakes 按 CONTRIBUTING 的办法真的跑了)通过,193 项;跳过 1 项(这份检出里没有 HyperFrames 运行时,以前就是这样)。
  • 新增的 CI 用例(tools/ci.sh,跟在 check --allow 那几条后面):
    • check:项目里的孤立帧会印出 confirm?;粘贴进去以后通过,标"已确认",CRF 28 的拷贝也通过;同一时刻换一种闪是已失效、退出 1;闪挪到 1.5 s,原来那条是 unused、新的那处退出 1;没有 evidence 文件、没有 why、写了 check.static 的条目都不收;文件写坏,check 失败;--allow 输出 "this run only"。
    • qa:音乐 stem 有同样的凹陷,不算掉音;stem 是平的,照样算(这是检测器修正的用例);掉音和 click 串印出 confirm?;确认以后通过,AAC 128k 降 3 dB 的拷贝也通过;qa.silence 不收;凹陷更深是已失效、退出 1;多出第 4 个 click,区间失效(只是警告)。
  • 合成片段上手动跑过:check 和 qa scan 在 WAV、m4a、CRF 16/28、1080p 拷贝上都跑了,结果是上面四种状态。

Review fixes · 按 Codex 的评审改的(4fb1a17,并合入 main dd786af)

  • [P2] stem 的凹陷只解释它盖住的那几个窗口。 以前比的是两段的最低点,没有看 stem 的凹陷有没有盖住混音的掉音。复现:混音 3–6 s 降约 26 dB,音乐 stem 只在 3–3.3 s 有同样深的凹陷。不给 --stems 报一处掉音 3.05–5.95 s,给了以后一处都不报。现在逐个 0.1 s 窗口比,只排除 stem 自己的凹陷解释得了的窗口,剩下的照样是掉音(需要时拆成几段):结果是 1 (1 more that the music stem has too),掉音 3.35–5.95 s。抽吸有同样的毛病:混音 3.0–3.25 s 降 10 dB,stem 只在 3.0–3.06 s 有凹陷,以前整段放过。现在逐帧(10 ms,±2 帧)比,剩下 60 ms 以上的照样报,结果是 3.06–3.23 s 深 10.0 dB。两处各有一条 CI 用例。
  • [P2] evidence 必须是项目里的普通文件。 以前写个文件夹("evidence": "out/")也能确认一处掉音。现在先去掉定位部分(STORYBOARD.md S12、STORYBOARD.md#S12、out/check/strip.png#t=8.5),解析符号链接以后,必须是项目里的普通文件;文件夹、../ 跑到项目外、链接指到项目外,都列成 not taken 并写出原因。CI 用例:文件夹、../outside.md、指到项目外的符号链接。
  • 文档:isoframes.py 的帮助、playbook/02 和 CHANGELOG 都写明了:画面 key 很粗(8×6 的格子),帧里的小改动(错一个字、一条细线)可能不会让确认失效。
  • 合入了 main(Canvas-film readcheck: real browser remedies, export hint keeps the Pace, page reader failures exit 2; Ctrl-C while a profile is removed #108)。CHANGELOG 两条都留着,tools/ci.sh 自动合并成功。完整 CI 通过:shellcheck、pyflakes 都真的跑了,195 项;HyperFrames 运行时那一项照旧跳过。

Review focus · 请重点看

  1. key 的容差(tools/isoframes.py 里的 PIC_*,tools/audio/qa.py 里的 ENV_*):认得拷贝和发现改动之间怎么取舍。画面 key 是 8×6 的粗格子,有意不管很小的改动(错一个字的帧认不出来);挪了时间靠位置那一项抓。
  2. 哪些能确认:tools/confirm.py 里的 KINDS 和 NOT。底线和运动警告不收,cue check 先不开放。
  3. 掉音的 stem 排除:音乐 stem 自己渲染出了问题(一个真的掉音),给了 --stems 以后就看不到了。抽吸早就是这样取舍的,评审时看一下能不能接受。
  4. confirm? 行会不会招来盖章式的确认:提示里写了"捕获出错要修,不要确认"、"一个故障要修,不要确认",还有 5 处以上的提示;reviewer 读确认清单这一步是下一个 PR。

Not in this PR · 不在这个 PR 里

  • textcheck 的确认,REVIEW.md 里的用户放宽(读时、静音、字号),reviewer 的输入清单和审阅页显示"已确认",cue check 和混音报告的硬指标。
  • 看到一处没改的不一致:软字幕短于读时,subcheck 退出 1,check 却只当警告(bin/vh 的 subtitles 那一段);而清单 Document auto-merge; match the ruleset file to the live ruleset #5 把字幕的 1.8 s 下限列为底线。

Checklist · 自查

  • tools/ci.sh --committed passes · 通过
  • User-visible change noted in CHANGELOG.md → Unreleased · 已记进 CHANGELOG
  • CLAUDE.md unchanged · 没改 CLAUDE.md,不用 sync-agents

ZLHad added 6 commits October 18, 2026 02:45
…at are intended

bin/vh check's isolated-frame scan and bin/vh qa's scan (dropouts, pumping,
click spans) read <project>/confirmed.json (tools/confirm.py). An entry names
the finding's time, why it is intended, the project file that shows it, and
the key the tool printed: a coarse fingerprint of the picture or sound there.
A confirmed finding stays listed, marked confirmed, and no longer fails; it
lapses when the picture or sound there changes, and an entry with nothing at
its time is listed as unused. Floors (digital silence, the reading floor, the
gates, the spec), cue-check OFFs and motion warnings are not confirmable; an
unreadable file fails the check.

check --allow stays for one run only and says so. qa's dropout scan now
leaves out a dip the music stem has too, the rule pumping already used.

Keys measured on the 31 style swatches: copies (CRF 16, 1080p CRF 18,
CRF 28, AAC 128k -3 dB, AAC 96k) keep them; a frame 0.5 s later matches 8 %
of the time, a 6 dB dip inside a span never.
…must be a file inside the project

qa scan: a short dip of the music stem no longer excuses a longer dropout or
pumping dip; the comparison is window by window (frame by frame for pumping)
and what is left is still reported. confirmed.json: evidence must be a regular
file inside the project once symlinks are resolved. Docs say the picture key
is coarse.
# Conflicts:
#	CHANGELOG.md
#	tools/audio/README.md
#	tools/audio/qa.py
@ZLHad
ZLHad marked this pull request as ready for review October 18, 2026 14:18
@ZLHad
ZLHad enabled auto-merge (squash) October 18, 2026 14:19
@ZLHad
ZLHad merged commit 3811691 into main Oct 18, 2026
2 checks passed
@ZLHad
ZLHad deleted the claude/confirmed-alerts branch October 18, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant