Skip to content

軌道修正C-6/C-8全件・C-7一部是正: 反証16件+11件+2件を解消 - #99

Merged
rahiseko-alt merged 3 commits into
mainfrom
claude/checkin-v9yb0x
Aug 12, 2026
Merged

rahiseko-alt merged 3 commits into
mainfrom
claude/checkin-v9yb0x

Conversation

@rahiseko-alt

@rahiseko-alt rahiseko-alt commented Aug 12, 2026 •

Copy link
Copy Markdown
Owner

概要

軌道修正チェックリスト(docs/roadmap.html GOAL detail参照)に残っていた項目のうち、以下を是正しました。

C-8(G-EDIT-REFRAME、11件中残り1件)→ 全件完了・[x]

  • G-EDIT-REFRAME-A の近黒しきい値 Y≤24 は、letterbox方式の帯色を真っ黒からRGB(28,28,28)/(32,32,32)/(40,40,40)へ変えるだけの適応的な実装にすり抜けられていました。Y≤55 へ引き上げ、この3色を実際にpad色へ使った対照テストを追加。

C-6(G-EDIT-CAPTION、16件中残り2件)→ 全件完了・[x]

  • 用語辞書の「12文字」の数え方(UTF-16 / コードポイント / 見た目)が未凍結だった問題を、UTF-16コード単位に凍結し、サロゲートペア文字・結合文字の境界テストを追加。
  • G-EDIT-CAPTION-E が「合言葉なし・他サイト由来・他人のジョブID」という独立して落ちうる3つの安全装置を1つのcriteriaに束ねていた問題を、前例(P1-2-A/P1-2-B/P1-4-B)にならい E1(合言葉)/E2(Origin)/E3(ジョブの所有権)の3葉へ分割。

C-7(G-EDIT-TRIM、14件中残り7件)→ 2件を解消(5件は大規模再設計が必要なため次回へ)

  • tests/trim-plan-check.mjs の対照が実装のFILLERS配列を経由するだけの堂々巡りだった問題を、独立したハードコード期待値による検査へ書き換え。
  • G-EDIT-TRIM-E のverifyが音声認識(ASR)・AIによる区間選定という非決定的な処理を経由するか未凍結だった問題を、G-EDIT-TRIM-A と同じ考え方(ASR/AI呼び出しを迂回し凍結済み区間表を直接使う)で凍結。

残る5件(部分残置検出のDTW再設計・重複語fixtureの作り直し・0.9秒ヒューリスティックの弱点・字幕タイミング検証の恒真式懸念・karaoke重なり)は、いずれもfixture(音声素材)の再合成やアルゴリズムの再設計を要するため、無理に完成させず正直に申し送りとしました(詳細は G-EDIT-TRIM のdetail参照)。

副産物: verify-criteria-freeze.mjs のバグ修正

G-EDIT-CAPTION-E の削除を宣言する際、削除直前のcriteriaHashが前日の別件の文面修正で既にmeta.basisChangesに記録済みだったハッシュと偶然一致し、既存の「BASE側に同じid/criteriaHashの宣言が存在するか」という単純な存在チェックが誤って「既出」と判定するバグを発見しました。件数比較方式へ修正し、回帰テスト2件を追加しています。

テスト

pnpm --filter video-shorts lint
pnpm -r --if-present typecheck
pnpm --filter video-shorts test     # 全件PASS
pnpm --filter scripts test          # 47+8+16 PASS/0 FAIL
node scripts/verify-criteria-freeze.mjs   # OK
node scripts/verify-roadmap-evidence.mjs  # OK
node scripts/verify-done-gate.mjs         # 対象外(newly doneなし)

CI(ci-green / roadmap-required 含む)は全て緑です。

Summary by CodeRabbit

  • Bug Fixes

    • Improved declaration validation to correctly allow legitimate repeated declarations while still detecting missing or unauthorized entries.
    • Improved video letterbox detection by identifying near-black padding more reliably.
    • Clarified term-length validation for astral and combining Unicode characters.
    • Improved filler-word detection validation across trimming scenarios.
  • Tests

    • Added regression coverage for duplicate declarations, near-black letterboxing, Unicode length limits, and filler-word detection.

G-EDIT-REFRAME-Aの近黒しきい値Y≤24は、letterbox方式の帯色を真っ黒から
RGB(28,28,28)/(32,32,32)/(40,40,40)へ変えるだけの適応的な実装にすり抜けられて
いた(2026-08-08の反証(1)で実測済み)。Y≤55へ引き上げ、この3色を実際にpad色へ
使った対照をtests/reframe-verify-check.pyへ追加し、いずれも不合格になることを
確認した(37 PASS/0 FAIL)。

安全性の根拠: RF-R/RF-N/RF-Mが共有する背景(市松64px角、明側セルr=230固定)を
numpy全画素で実測すると、どの行も近黒(Y≤68)画素の最大比率は50.0%(98%を大きく
下回る)であり、Y≤55は実際の映像を誤検出しない。

criteria/verify本文の変更はmeta.basisChangesへ正当化宣言を追加済み。
GOAL detailの軌道修正チェックリストでC-8を[x]にした(残る反証11件中10件は既に
反映済みだったため、これで全件処理済み)。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MAUag1h71G7iuEjp4hz9Y
@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7937c903-4ddd-4e0c-bb84-0dcd8115a3a7

📥 Commits

Reviewing files that changed from the base of the PR and between 253b8d0 and 67ce50d.

📒 Files selected for processing (6)
  • docs/roadmap.html
  • scripts/verify-criteria-freeze.mjs
  • scripts/verify-criteria-freeze.test.mjs
  • video-shorts/tests/reframe-verify-check.py
  • video-shorts/tests/term-dictionary-check.mjs
  • video-shorts/tests/trim-plan-check.mjs

📝 Walkthrough

Walkthrough

The PR updates frozen-criteria declaration validation to compare complete counts and adds regression coverage. It also tightens black-band detection and adds UTF-16 boundary and filler-detection tests for video-shorts verification.

Changes

Criteria freeze verification

Layer / File(s) Summary
Declaration count validation
scripts/verify-criteria-freeze.mjs, scripts/verify-criteria-freeze.test.mjs
The verifier compares complete matching declaration counts between BASE and HEAD. Tests cover new and non-new duplicate-hash deletion declarations.

Reframe validation

Layer / File(s) Summary
Black-band threshold tests
video-shorts/tests/reframe-verify-check.py
black_bands uses a default threshold of 55. Tests validate detection for padding values 0x1c1c1c, 0x202020, and 0x282828.

Term validation

Layer / File(s) Summary
UTF-16 length boundaries
video-shorts/tests/term-dictionary-check.mjs
Tests validate isSingleTerm with astral characters and decomposed combining-character sequences at and above the 12 UTF-16-unit limit.

Trim-plan validation

Layer / File(s) Summary
Filler detection coverage
video-shorts/tests/trim-plan-check.mjs
The tests remove the direct FILLERS import and validate filler detection, ordinary-word rejection, four material intervals, and an empty independent set.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/checkin-v9yb0x

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

claude added 2 commits August 12, 2026 01:11
G-EDIT-CAPTION-Cのcriteria/verifyは「12文字以内」の数え方(UTF-16 .length /
コードポイント数 / 見た目の文字数)を凍結しておらず、実装(src/term-dictionary.mjs
isSingleTerm)はUTF-16単位で数えているが受入基準として明文化されていなかった。

verify本文へ「String.prototype.length(UTF-16コード単位)で数える。コードポイント
数でも見た目の文字数でもない」と明記し、3つの定義が食い違う入力での境界テストを
tests/term-dictionary-check.mjsへ追加した(19件→22件):
- サロゲートペア文字(BMP外)ちょうど7個(コードポイント数・見た目は7だがUTF-16単位14)
  は不合格、ちょうど6個(UTF-16単位12)は合格
- 結合文字(濁点のNFD分解形)7個(見た目7文字だがUTF-16単位14)は不合格

いずれも現行実装の実際の挙動と一致することを確認済み(22 PASS/0 FAIL)。
判定の緩和は無い(実装の挙動をそのまま文言へ固定しただけ)。

GOAL detailの軌道修正チェックリストでC-6の残りが(3)葉Eの分割1件のみになった旨を記録。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MAUag1h71G7iuEjp4hz9Y
C-6反証(3): G-EDIT-CAPTION-Eが「合言葉なし・他サイト由来・他人のジョブID」という
独立して落ちうる3つの安全装置を1criteriaに束ねていた(isAllowedApiOriginを固定して
も合言葉なし・他人のジョブID経由の判定は緑のまま通る=独立して落ちうる別々の受入事実)。
前例P1-2-A/P1-2-B/P1-4-Bにならい、G-EDIT-CAPTION-E1(合言葉)/E2(Origin)/E3(ジョブの
所有権)の3葉へ分割し、旧葉Eは削除した。実装・テストは既に3種を独立したアサーション
として持っていたため変更不要で、ロードマップ側の粒度をテストの実態に合わせた。
これによりC-6の反証16件が全件処理済みとなり[x]にした。

この作業中、犀新しく追加した削除の基準変更宣言(meta.basisChanges)が、前日の別件の
文面修正で生まれたのと同じcriteriaHashを指したため、verify-criteria-freeze.mjsの
「BASE側に同じid/criteriaHashの宣言が存在するか」という単純な存在チェックが誤って
「既出」と判定する実際のバグを発見した。件数比較(HEAD側の件数がBASE側を上回っている
か)へ変更し、同じハッシュが正当な理由で複数回宣言されるケースを正しく扱えるようにした
(回帰テスト2件を追加、既存47件は全PASSのまま)。

C-7反証(12): tests/trim-plan-check.mjsの対照「言い淀みの一覧が空ならBの検査は落ちる」
は、実装のFILLERS配列を経由してFILLERS.length>0を見るだけの堂々巡りだった(FILLERSを
2語に縮めても18語に増やしても19 PASS/0 FAILのまま)。この素材が実際に使う言い淀み
「えーと」「あのー」をハードコードした独立の期待値で検査する方式へ書き換え、かつ
空集合を独立に作って言い淀み4区間を1件も検出できないことを実測する対照を追加した
(19件→23件)。

C-7反証(13): G-EDIT-TRIM-Eのverifyが「素材TVを処理した出力」としか書いておらず、
音声認識(ASR)とAIによる区間選定(Claude呼び出し)という非決定的な処理を経由するのか
迂回するのか未凍結だった。G-EDIT-TRIM-Aが既に確立した解決(ASRを通さずcalibration.json
を直接使う)にならい、区間選定もplanTrimが決定的に算出したものを使うと明記した。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MAUag1h71G7iuEjp4hz9Y
@rahiseko-alt rahiseko-alt changed the title 軌道修正C-8反証(1)是正: REFRAME黒帯検知を適応的な薄灰色に耐性化 軌道修正C-6/C-8全件・C-7一部是正: 反証16件+11件+2件を解消 Aug 12, 2026
@rahiseko-alt
rahiseko-alt marked this pull request as ready for review August 12, 2026 01:36
@rahiseko-alt
rahiseko-alt merged commit 6a602ce into main Aug 12, 2026
13 of 14 checks passed
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.

2 participants