Skip to content

feat: 使い切りキーから視聴権移行までを完成する - #42

Open
rytich wants to merge 11 commits into
developfrom
1a-m4/issue-35-viewing-flow
Open

rytich wants to merge 11 commits into
developfrom
1a-m4/issue-35-viewing-flow

Conversation

@rytich

@rytich rytich commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Issue / Task

Review range

  • baseRefOid: 772497a406035f8ea166c1f6791b76d881785f4d
  • headRefOid: 66c3a039fb49a940e6bbff1b232b5d2483340be4

変更

  • 使い切り閲覧キーの原子的消費、匿名30分視聴、登録・ログイン時の視聴権移行
  • ログイン後ライブラリと視聴権による再生
  • Filma APIキーの暗号化保存と検証済みorganization/API type保持
  • 短時間・動画限定playback grantの検証
  • Filma player URLのiframe埋め込み。独自HTML5 video要素は使用しない
  • frame-src https://filma.bizへ限定したCSP
  • Playwright Chromiumによる必須CIブラウザ受入

対象外: 動画アップロード、解析、DRM、サムネイル、メール確認・再設定、実D1 migration、Cloudflareデプロイ。

リスクと失敗時動作

  • 実Filma契約確認前は実再生を既定無効にする
  • Filma障害、設定不備、allowlist不一致、無効・5分超のgrantでは503で閉じ、キーと視聴権を変更しない
  • grant取得中にFilma file IDが変更された場合も最終transactionで拒否する
  • 非公開、公開前、期限終了、未知IDは動画情報・再生情報を返さない

検証結果

  • pnpm verify: Node 128/128、Worker/D1 67/67、lint、typecheck、reviewer validator、build、format成功
  • pnpm test:browser:viewing: exact-head 66c3a03...で成功
  • Filma iframe / native video不使用 / fullscreen / CSPをunit・Worker・browserで確認
  • git diff --check origin/develop...HEAD: 成功
  • 秘密情報scan: 検出なし

NO-GO / 未確認

  • 承認済みNO-GO: 一般公開、実Filma契約未確認での実再生・キー消費、production動画保存時のFilma存在確認、remote D1、Cloudflareデプロイ
  • 未確認: 実Filma storage 200/401/403/404 schema、動画限定、5分以下の期限、origin、期限後grant/refresh
  • 合成テストは実Worker・remote D1・実Filmaの証拠ではない

セキュリティ確認

  • Filma APIキーをresponse、URL、browser storage、ログへ出さない
  • iframe srcはserver-sideで固定origin・動画binding・期限を検証したgrantだけ
  • CSPのframe許可先はhttps://filma.bizのみ
  • 再生grantをD1、browser storage、ログへ保存しない
  • 秘密情報をコミットしていない

独立レビュー

  • Review round: re-review
  • Finding ledger source: review ID 5161128405 / author knryt / commit fdbbf94e4a2938800c15029feb553b97da55e33e / submittedAt 2026-09-09T23:59:27Z
  • Finding ledger: legacy-F-001 resolved(organization/API typeを原子的保存)、legacy-F-002 resolved(exact-head browser受入を必須CIへ統合)
  • Late-discovery reason / reviewer-process follow-up: なし
  • Operational stop: なし
  • Assessment: 別5.6担当のローカル独立レビュー Ready(Critical/Important/Minor 0)
  • GitHub action: 修正push済み。CIとformal knryt review待ち

実装前の境界確認

  • DB関係整合・exactly-one-ownerを確認
  • 競合時no-writeを確認
  • 外部APIの固定host、timeout、応答量、redirect、schemaを確認
  • 秘密を保存・送信・URL・ログ・応答へ出さない境界を確認
  • browser受入をexact-headで確認

Refs #35

@knryt

knryt commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

独立レビューを実行中です。GitHubのPR状態、対象SHA、CI(verify成功)、ブランチルールセットを確認済みです。レビュー結果を受領後、条件に従って承認・マージまたは変更要求を行い、Discord #krbotにも同じ要約を通知します。

@knryt

knryt commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

前回レビューはPRヘッド変更により無効です。現在のヘッドSHAに対する独立レビューを再実行中です。結果を確認後、承認・変更要求・停止を判断します。

@knryt knryt left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: Not ready

Important

  • src/server/app.ts:598-624; src/adapters/database/viewing-repository.ts:74-134 — The final redemption transaction does not re-check videos.filma_file_id against the approved Filma file ID or bind it to the granted file. The route checks the allowlist before grant issuance, but the conditional insert re-checks other video state without the Filma binding. A concurrent file-ID update can consume a code and create an entitlement for a video that no longer matches the allowlist, while the grant refers to the prior file. Pass the expected Filma file ID into the repository and require it in the final conditional insert; add a concurrency regression test.

  • package.json:23; .github/workflows/ci.yml:24pnpm verify/CI does not run pnpm test:browser:viewing, so the direct/reload/back/forward and registration/library acceptance criteria are not part of the verified merge gate. Add the browser suite to a required CI check, or publish an exact-head browser result and make it a documented merge prerequisite.

Verified checks

  • verify succeeded for head 55e5e0fb768c9aa896eda36aafc764c013374f4e (run 34356819980).
  • Live ruleset requires one approval, strict verify, stale-review dismissal, and merge commits; no bypass.
  • Review scope was the exact base/head pair 3def2493a33f2c1616641b8d7548b8aba688d6a255e5e0fb768c9aa896eda36aafc764c013374f4e.

Please address both Important findings and request a fresh review on the updated head.

@knryt

knryt commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

独立レビュー結果を待機中です。ローカル検証は完了しています。

@knryt

knryt commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Assessment

Not ready. Two Important findings remain:

  • Redemption does not re-check the Filma file-ID binding in the final transaction, allowing a concurrent video update to consume a code against an unauthorized or changed file.
  • Browser acceptance tests are not included in the required CI merge gate.

Execution

@knryt

knryt commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

verify は成功しました(PR #42、head SHA 55e5e0f)。

ただし、PRはまだマージ不可です。

  • CHANGES_REQUESTED が残存
  • 独立レビューの Important 指摘が2件未解消
    • FilmaファイルIDの最終トランザクション内再検証不足
    • ブラウザ受入テストがCI必須ゲート外
  • PRはオープンのまま、マージは実行していません。

@knryt knryt left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: Not ready

Important

  • src/server/app.ts:738-745, 764-771; src/adapters/database/admin-repository.ts:176-239 — Admin video create and update persist any syntactically accepted filmaFileId without verifying the file through the fixed-host Filma storage contract. The approved P0 registration boundary requires confirming that the existing Filma video is present and playable before saving it. As written, nonexistent, inaccessible, or invalid Filma IDs can be stored, and codes can later be issued for records that cannot play. Validate before insert and update; classify 404 as input/not-found and 401, 403, timeout, redirect, invalid schema, and other failures as 503. On failed updates, preserve the existing row, and add tests for every classification plus the no-write invariant.

Minor

  • src/server/app.ts:497-512GET /api/admin/filma reports configured: true from ciphertext/nonce/verifiedAt presence without checking that the current PLAY_ENCRYPTION_KEY can decrypt the stored value. A corrupted setting or rotated key is therefore shown as connected even though playback will return 503. Either decrypt-check before reporting configured or distinguish stored metadata from a usable configuration.

Verified

  • Exact reviewed range: 3def2493a33f2c1616641b8d7548b8aba688d6a2 -> 55e5e0fb768c9aa896eda36aafc764c013374f4e.
  • pnpm verify passed: 113 unit tests, 65 Worker tests, lint, typecheck, build, and formatting; targeted tests and git diff --check also passed. GitHub verify passed for this head. Browser acceptance build succeeded but could not run because Playwright module/browser paths were not configured.

The existing Important findings in the prior review remain blocking. Please address all blocking findings and request a fresh review on the updated head.

@knryt

knryt commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

PR #42 を exact head 55e5e0fb768c9aa896eda36aafc764c013374f4e に対してレビューし、CHANGES_REQUESTED を投稿しました。

主なブロッカー:

  • 動画作成・更新時に filmaFileId の存在・再生可否をFilma storage APIで検証していない
  • 検証失敗時の分類と更新時の no-write 保証が未実装
  • 既存レビューのImportant指摘2件も未解決

確認結果:

@knryt

knryt commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

💾 Self-improvement review: Skill 'github-pr-review-merge-safety' patched

@knryt

knryt commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

レビュー処理を停止しました。リポジトリの必須条件であるWebhook X-GitHub-Delivery 値がイベント payload に含まれておらず、リプレイ防止キーを検証できないためです。

確認済み:

  • PR: rytich/play-cms#42
  • Base: develop / 3def2493a33f2c1616641b8d7548b8aba688d6a2
  • Head: 79e253090ec77a4c29467b983ca07e5806aec25d
  • PR: open・非Draft・mergeable
  • GitHub CI verify: success
  • ruleset: active、verify 必須、merge commit のみ
  • GitHubへのレビュー、Approve、Merge、Discord通知: 未実行

正確な X-GitHub-Delivery 値を提供してください。確認後、同じhead SHAを再取得してレビューを再開します。

@knryt

knryt commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

必要な X-GitHub-Delivery 値がまだ提供されていないため、レビュー・Approve・Merge・Discord通知は実行できません。

Webhookヘッダーの次の値を送ってください。

X-GitHub-Delivery: <delivery-id>

@rytich

rytich commented Sep 9, 2026

Copy link
Copy Markdown
Owner Author

Webhook再レビュー用の受信境界情報です。GitHub delivery履歴と現在のPR headを照合済みです。\n\n- X-GitHub-Delivery: a1c68b90-ac54-11f1-8202-1e691c91cbaa\n- event/action: pull_request / synchronize\n- repository: rytich/play-cms\n- PR: #42\n- head: 79e253090ec77a4c29467b983ca07e5806aec25d\n- delivery status: 202\n\nWebhook secret、signature、payload本文は記載していません。このdelivery IDでリプレイ防止キーを検証し、同じheadを再取得してレビューを再開してください。

@knryt knryt left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: Not ready

Important

  • src/server/app.ts:752-793 / src/adapters/database/admin-repository.ts:176-239: admin video create/update accepts syntactically valid filmaFileId without validating the fixed-host Filma storage contract. Nonexistent, unauthorized, or unusable IDs can be persisted and later receive access codes. Validate before insert/update, classify 404 separately from 401/403/timeout/schema failures, and preserve the existing row on failed updates.
  • package.json / .github/workflows/ci.yml:24: pnpm verify and CI do not run pnpm test:browser:viewing. The repository policy requires exact-head browser evidence for navigation/authentication changes, but the active required checks do not enforce it. Add it to a required CI check or provide reproducible exact-head evidence and enforce it as a merge prerequisite.

Minor

  • src/server/app.ts:501-511: /api/admin/filma reports configured from ciphertext metadata without checking decryptability, so a rotated/corrupt key can appear connected while playback returns 503. Distinguish stored metadata from usable configuration or perform a decrypt check.

Verification

  • Exact base/head: 3def2493a33f2c1616641b8d7548b8aba688d6a2 -> 79e253090ec77a4c29467b983ca07e5806aec25d
  • GitHub verify: success
  • Independent review: Not ready
  • Exact-head pnpm verify: passed
  • Exact-head browser test build passed, but execution was blocked by missing Playwright module/browser configuration; no reproducible browser result is available.
  • No approval or merge performed.

@rytich

rytich commented Sep 9, 2026

Copy link
Copy Markdown
Owner Author

最新reviewへの対応(head fdbbf94e4a2938800c15029feb553b97da55e33e

修正済み: Filma接続状態

GET /api/admin/filmaは、保存メタデータの存在だけでなく、現在のPLAY_ENCRYPTION_KEYでAES-GCM復号できる場合だけconfigured:trueを返すよう修正しました。暗号文破損・鍵変更・設定不足は、詳細を出さず{configured:false, verifiedAt:null}へ閉じ、Filmaへ接続しません。

production動画保存前検証: このPRでは接続しない

指摘箇所の動画create/update routeはbase 3def249に既に存在し(baseのsrc/server/app.ts:435,461)、このPRの同routeには差分hunkがありません。現在行番号が760,786へ移ったのは前方への追加によるものです。

承認済み計画Task 1 Step 4は、実Filmaでstorage 200/404/401/403と200 schemaを確認するまでproduction create/updateへ接続しないことを明記しています。現在そのlive contractは未確認でIssue #16がNO-GOのため、未確認endpoint/status/schemaを推測して接続する変更は行いません。これは未実装の隠蔽ではなく、PR本文の未確認事項とplanの未完了checkboxに記録したfail-closed境界です。

exact-headブラウザ証拠

CONTRIBUTING.mdで許可されているexact-head記録方式を使用しました。実行環境とコマンドは次のとおりです。

PLAYWRIGHT_MODULE_PATH=/Applications/ChatGPT.app/Contents/Resources/cua_node/lib/node_modules/playwright \
PLAYWRIGHT_CHROME_PATH='/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' \
pnpm test:browser:viewing
  • tested head: fdbbf94e4a2938800c15029feb553b97da55e33e
  • result: viewing flow browser acceptance: pass
  • scope: 合成APIを使うdirect/reload/back/forward、匿名redeem、登録、再login/library、別browser再利用拒否、/admin/filma履歴復元
  • limitation: 実Worker、remote D1、実Filmaの証拠ではありません

その他のexact-head証拠

  • pnpm verify: Unit 114/114、Worker/D1 67/67、lint/typecheck/build/format成功
  • full-base git diff --check: 成功
  • tracked diff秘密情報パターン: 検出なし
  • 別5.6 Sol scoped review: Approved(Critical/Important/Minor 0)
  • X-GitHub-Delivery: 1cf0a720-aca9-11f1-9e2a-1e897b1a2b90
  • event/action: pull_request / synchronize、delivery status: 202

上記headと承認済み段階計画を再取得して再レビューしてください。

@knryt

knryt commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

独立レビュー担当の exact-head 確認が完了していないため、GitHubへのレビュー投稿・承認・マージはまだ実行していません。現在確認済みの停止候補は、Filma動画IDの保存前検証不足と、exact-headのブラウザ受入結果が merge gate で検証されていない点です。

@knryt

knryt commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

💾 Self-improvement review: Skill 'github-pr-review-merge-safety' patched

@knryt knryt left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: Not ready

Important

  • migrations/0004_redemptions_filma_settings.sql:3-5; src/server/app.ts:547-558; src/adapters/filma/live-contract.ts:192-203verifyFilmaTokenContract validates and returns organization_id and api_type, but the migration stores only ciphertext, nonce, and filma_verified_at, and the PUT handler discards the returned contract summary before saving. The approved design requires preserving this verified Filma organization/API type in the app_settings model. Without it, key rotation or redeployment cannot distinguish the verified account/type, weakening the intended connection-boundary evidence and leaving the canonical design incomplete. Add migration columns, persist the summary atomically with the encrypted key, expose it only through the appropriate status/repository contract, and add migration/API tests proving the values are stored without exposing the key.

  • .github/workflows/ci.yml:15-31; package.json:18-25; tests/browser/viewing-flow.mjs:8-14 — The required CI job runs pnpm verify, but pnpm verify excludes test:browser:viewing. The browser suite requires externally supplied Playwright module and Chrome paths, and it could not run in the exact-head review because those variables were unavailable. The required CI success therefore does not verify the plan's browser acceptance scenarios for direct navigation, reload, history navigation, anonymous-to-account transfer, re-login, and used-key UI behavior. Add a reproducible browser workflow with pinned Playwright/Chromium dependencies, run it against this head, publish the result as an exact-SHA check, and make that check required for this feature or record a verifiable exact-head artifact before merge.

Verified checks

  • Exact review scope: base 3def2493a33f2c1616641b8d7548b8aba688d6a2 to head fdbbf94e4a2938800c15029feb553b97da55e33e.
  • pnpm verify passed: 114 unit tests, 67 Worker/D1 tests, lint, typecheck, build, and format checks.
  • GitHub verify passed for this head.
  • Browser acceptance could not be executed because the required Playwright module/browser paths were unavailable.

Please address both Important findings and request a fresh review on the updated head.

@knryt

knryt commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

PR #42 reviewed at exact head fdbbf94e4a2938800c15029feb553b97da55e33e.

  • Submitted GitHub review Changes requested: review ID 5161128405
  • Findings: 2 Important
    • Verified Filma organization/API type is discarded instead of persisted.
    • Browser acceptance tests are not part of the required CI gate and could not run due to unavailable Playwright/Chrome paths.
  • pnpm verify and GitHub verify passed.
  • PR remains open and blocked; no approval or merge performed.

@knryt

knryt commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

X-GitHub-Delivery が今回の synchronize イベント payload に含まれていないため、リプレイ防止検証を完了できません。レビュー・Approve・Merge・Discord通知は実行していません。

次の値を提示してください。

X-GitHub-Delivery: <delivery-id>

@rytich

rytich commented Sep 10, 2026

Copy link
Copy Markdown
Owner Author

最新review対応完了(head b836549eed5126d31c5be833d87cfe67de5e59ea

review ID 5161128405 の2件のImportantへ対応しました。

  1. Filma token検証で取得したorganization_idapi_typeをmigration 0005で追加し、APIキー暗号文・nonce・検証時刻と同じ1回のUPDATEで保存します。GET/PUT /api/admin/filmaのresponseは引き続きconfiguredverifiedAtだけで、identity、APIキー、暗号化情報を返しません。
  2. Playwrightを1.63.0へ固定し、既存の必須verify jobでChromiumだけを導入してpnpm test:browser:viewingを実行します。外部runtime path overrideも維持しています。

exact-head確認:

  • pnpm verify: Unit 115/115、Worker/D1 67/67、lint/typecheck/build/format成功
  • pnpm test:browser:viewing: viewing flow browser acceptance: pass
  • full-base git diff --check: 成功
  • tracked秘密情報パターン: 検出なし
  • 別5.6 Sol独立レビュー: Approved(Critical 0 / Important 0 / Minor 0)
  • 実Filma storage契約とproduction動画保存前検証: 承認済み計画どおりNO-GOを維持

Webhook:

  • X-GitHub-Delivery: a916cf00-acad-11f1-882e-8689c6b55850
  • event/action: pull_request / synchronize
  • delivery status: 202

上記headとdeliveryを再取得し、GitHub CIの同head成功後に再レビューしてください。

@rytich
rytich requested a review from knryt September 10, 2026 00:28
@rytich

rytich commented Sep 10, 2026

Copy link
Copy Markdown
Owner Author

GitHubの必須 verify は exact head b836549eed5126d31c5be833d87cfe67de5e59ea で成功しました(通常検証+Playwright Chromium受入)。Run: https://github.com/rytich/play-cms/actions/runs/34420993916 。GitHubの Re-request review も実行済みで、knryt は Awaiting requested review、review_requested delivery 9545c2a0-acae-11f1-8619-5c4d3209a5fd はHTTP 200です。

@rytich

rytich commented Sep 10, 2026

Copy link
Copy Markdown
Owner Author

訂正します。先のコメントで review_requested delivery 9545c2a0-acae-11f1-8619-5c4d3209a5fd のHTTP 200をもってWebhookレビュー起動済みと判断しましたが、これは誤りです。HTTP 200はGitHub側のdelivery成功を示すだけで、Hermesのroute一致・agent起動・レビュー完了を証明しません。Hermesログには当該deliveryの受信記録がなく、現行ルートの許可actionにも review_requested は含まれていません。現在の確実な再レビュー経路は、修正commitのpushで synchronize を発生させるか、既存の pull_request deliveryを手動再送することです。恒久対応は Issue #43 で、通常の修正push=synchronize、同一HEAD再試行=review_requested とし、後者を requested_reviewer.login == knryt の場合だけHermesで受け付ける方針に修正します。完了判定はdelivery IDからHermes受信・agent run・同一HEADのレビュー結果まで確認します。

@knryt

knryt commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Review is blocked from GitHub write actions because the webhook X-GitHub-Delivery GUID was not provided. The exact-head read-only assessment found the prior Important issue remains unresolved: admin video create/update stores filmaFileId without validating it against the Filma storage contract (src/server/app.ts:766-807, src/adapters/database/admin-repository.ts:176-239).

No review, comment, approval, merge, or Discord notification was posted.

@knryt knryt left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: Ready with minor follow-up

Critical

None.

Important

None.

Minor

  • src/server/app.ts:775-780, 801-806: admin video insert/update still accepts a Filma file ID without validating storage existence first. This is a documented deferred boundary pending confirmation of the real Filma storage contract; the code is unchanged by this PR, so it is not an actionable blocker for this review.

Verification

  • Exact review scope: base 772497a406035f8ea166c1f6791b76d881785f4d to head 66c3a039fb49a940e6bbff1b232b5d2483340be4.
  • Independent read-only review found no Critical or Important findings.
  • GitHub verify passed for this exact head.
  • Active develop ruleset requires one approval, strict verify, stale-review dismissal, and merge commits.

@knryt

knryt commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

PR #42 レビュー結果

  • 対象: rytich/play-cms#42
  • Exact base: 772497a406035f8ea166c1f6791b76d881785f4d
  • Exact head: 66c3a039fb49a940e6bbff1b232b5d2483340be4
  • 独立レビュー: Critical / Important なし
  • Minor: FilmaファイルIDのstorage存在確認は未実装。ただしPRで変更されておらず、既知の延期事項。
  • CI: verify 成功
  • PR状態: Open、非Draft、mergeable
  • 実行: COMMENT レビューを投稿・読み戻し確認済み
    feat: 使い切りキーから視聴権移行までを完成する #42 (review)
  • マージ: 未実施。develop の必須承認条件を満たしておらず、PRはblocked。

@knryt
knryt self-requested a review September 10, 2026 05:07
@knryt

knryt commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

レビューを停止しました。

  • 対象: rytich/play-cms#42
  • 確認済み: base 772497a...f4d、head 66c3a03...40be、author rytich、非Draft、required check verify は成功
  • 停止理由:
    • GitHub Delivery GUID(X-GitHub-Delivery)が通知 payload にない
    • pull_request.requested_reviewer.login が payload に存在せず、knryt であることを検証できない
  • 実施していないこと: GitHubレビュー投稿、承認、マージ、ブランチ削除、Discord通知
  • delivery recordも、識別子がないため更新していません

GUIDと requested_reviewer.login: knryt を含む正規payloadで再送してください。

@rytich
rytich requested review from knryt and removed request for knryt September 10, 2026 05:12
@knryt

knryt commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

独立レビューを継続中です。指定されたbase/head SHA、developとの差分、同一headのverify成功、ruleset条件を確認済みです。

@knryt

knryt commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

PR #42 review — rytich/play-cms

  • Reviewed range: 772497a406035f8ea166c1f6791b76d881785f4d66c3a039fb49a940e6bbff1b232b5d2483340be4
  • Status: Open, non-draft, mergeable; merge state blocked
  • CI: verify passed
  • Assessment: Not ready

Important

  • src/server/app.ts:775 — Filma file existence/playability is not verified before persisting a video.
    • verifyFilmaFile() exists but is not invoked by the create or update routes.
    • Any syntactically valid numeric filmaFileId can therefore be saved without confirming that the Filma file exists.
    • Call verifyFilmaFile() before insertVideo()/updateVideo() and reject invalid or unavailable files without modifying the database.

GitHub action

No formal review was submitted. The webhook delivery did not provide an X-GitHub-Delivery GUID, which is required before any GitHub write under the review policy. No approval, change request, or merge was performed.

@rytich

rytich commented Sep 10, 2026

Copy link
Copy Markdown
Owner Author

Webhook再レビュー確認結果:

  • GitHubでknrytの既存review requestを解除後、Re-request reviewを実行
  • event/action: pull_request / review_requested
  • delivery GUID: 609ff2f0-acd6-11f1-81ea-9e30bbee4702
  • deliveredAt: 2026-09-10T05:13:39Z
  • GitHub delivery: HTTP 202
  • exact range: 772497a406035f8ea166c1f6791b76d881785f4d66c3a039fb49a940e6bbff1b232b5d2483340be4
  • knryt実行: 進行コメント 5613567433、結果コメント 5613576449を確認

結論: Webhook経由のagent runは起動しました。ただしHermesからagentへ渡された入力にX-GitHub-Delivery GUIDがなく、formal review・Approve・Mergeはfail closedで停止しました。GitHub側にはGUIDが存在するため、残る修正箇所はHermes route/agent promptへのheader転送です。再修正前の追加Re-requestは重複を避けるため行いません。

結果コメントのFilma file保存前検証は、実Filma storage契約確認までの承認済みNO-GOであり、本PRが導入・悪化させた差分ではありません。同一HEADのformal review 5162912173でも既知のMinor/non-blockingとして確認済みのため、このPRでは製品コードを追加変更しません。

@knryt knryt left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formal review for exact HEAD 66c3a03.

Important

  • src/server/app.ts:443-459 — configuredFilmaApiKey() validates only the encrypted key, nonce, verification timestamp, and encryption secret. It does not require filma_organization_id and filma_api_type, although migration 0005 adds both and GET /api/admin/filma requires them. A legacy app_settings row can therefore still supply its old key to playbackGrant() when PLAY_CMS_P0_INVITE_PLAYBACK is enabled, bypassing the verified-identity fail-closed boundary. Require both identity fields to be non-null and add a Worker test proving legacy/null-identity settings cannot issue grants.

Minor

  • src/server/app.ts:775-782; src/adapters/database/admin-repository.ts:176-201 — video create/update accepts syntactically valid filmaFileId without invoking verifyFilmaFile(). Complete the live Filma storage validation before enabling production or invite playback.

Verdict: Not ready. Do not merge until the Important finding is fixed and re-reviewed at the new exact HEAD.

@knryt

knryt commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

ℹ Codex gpt-5.6-luna caps context at 262K, so auto-compaction was raised to 85% (from 50%) to use more of the window before summarizing.
Opt back out: hermes config set compression.codex_gpt55_autoraise false

@knryt

knryt commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

レビューを停止しました(GitHubへの書き込みなし)。

  • 対象: rytich/play-cms#42
  • action: synchronize
  • exact base: 772497a406035f8ea166c1f6791b76d881785f4d
  • exact head: 02f3d18cf396b76b1c41419ec49cb6d28faca48f
  • PR状態: Open / 非Draft / Mergeable
  • 必須CI: verify 実行中
  • 停止理由: X-GitHub-Delivery GUIDが今回のpayloadにないため、deliveryの重複排除・lease検証ができない

実施していない操作: レビュー投稿、Approve、Merge、ブランチ削除、Discord通知、delivery record更新。

正規のWebhookヘッダーを提示してください。

X-GitHub-Delivery: <delivery-id>

@rytich
rytich requested a review from knryt September 10, 2026 07:29
@knryt

knryt commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

運用停止:GitHub delivery GUID(X-GitHub-Delivery)が提示・取得できないため、重複排除の admission gate を通過できません。

PR #42 のレビュー、GitHubへの書き込み、Discord通知はいずれも実行していません。

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