Skip to content

G-DELIVERY: クラウドセッション起動時にffmpeg/文字起こしライブラリを自動導入 - #22

Merged
rahiseko-alt merged 2 commits into
mainfrom
claude/checkin-rnnzj5
Jul 29, 2026
Merged

rahiseko-alt merged 2 commits into
mainfrom
claude/checkin-rnnzj5

Conversation

@rahiseko-alt

@rahiseko-alt rahiseko-alt commented Jul 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

2026-07-28マスター指示(配布パターン「Claude Codeあり×PCなし(クラウド上のClaude Codeセッションのみで完結)」をまず完成させる)を受け、docs/roadmap.html の G-DELIVERY 配下に原子ツリー4葉(G-DELIVERY-HOOK-FFMPEG / HOOK-PYTHON / HOOK-LOCALSAFE / DOC)を新設。

  • .claude/hooks/session-start.sh を新設し .claude/settings.json の SessionStart に配線。$CLAUDE_CODE_REMOTE が真の場合のみ ffmpeg・文字起こしライブラリ(faster-whisper/groq)の有無を確認し、無ければ自動導入する。真でない場合(手元PCでの通常セッション)は即終了し apt/pip に一切触れない。
  • video-shorts/start-here.md の冒頭に、クラウド版Claude Codeセッションのみ(PC無し)で使う場合はffmpeg等の個別案内が不要である旨を追記。
  • .github/workflows/ci.yml に hook-session-start ジョブを追加。CI上でffmpeg/pythonライブラリを一旦除去してから本フックで再導入できることを継続的に機械検証する(外部install依存でflakyになりうるため、必須ゲートci-greenには含めていない)。

実地検証で発見・修正したバグ

sudo apt-get remove -y ffmpeg / pip uninstall で強制的に欠落させた状態から session-start.sh を実行して自動導入を検証したところ、sudo apt-get update -y が本リポジトリの用途とは無関係な野良PPA(deadsnakes・ondrej/php。実行環境イメージに元から設定されていたapt source)への403 Forbiddenで非ゼロ終了し、スクリプト冒頭の set -euo pipefail により apt-get install -y ffmpeg にすら到達できず、無言でffmpeg未導入のまま終了する不具合を発見した(標準リポジトリ由来のffmpeg自体は取得可能だった)。apt-get update 行のみ || true を付け、無関係sourceの失敗ではinstallまでの到達を止めないよう修正した。詳細は docs/failures.md の2026-07-28追記を参照。

Test plan

  • pnpm -r --if-present typecheck
  • pnpm -r --if-present lint
  • pnpm -r test(全53 PASS / dict-corrector 全PASS / restart-reconnect 4 PASS、既存分含む)
  • pnpm -r --if-present build
  • pnpm audit --audit-level moderate(既知の脆弱性なし)
  • node scripts/verify-roadmap-evidence.mjs(roadmap evidence リンタ OK)
  • 実地検証: env -u CLAUDE_CODE_REMOTE session-start.sh が無音・即終了すること(ローカルPC想定でのno-op)
  • 実地検証: sudo apt-get remove -y ffmpeg と pip uninstall faster-whisper groq で強制欠落させた状態から CLAUDE_CODE_REMOTE=true session-start.sh を実行し、両方とも自動導入され ffmpeg -version / python3 -c "import faster_whisper, groq" が成功することを確認
  • CI(hook-session-start ジョブ)が緑になり次第、docs/roadmap.html のG-DELIVERY-HOOK-*のevidenceにCI run URLを、G-DELIVERY-DOCのevidenceにstart-here.md追記のcommit SHAを記入する追いコミットを行う

Generated by Claude Code

Summary by CodeRabbit

  • New Features

    • Cloud-based coding sessions now automatically prepare required video-processing and transcription tools.
    • Local sessions remain unaffected by the automatic setup.
  • Documentation

    • Added guidance for starting video-shorts workflows without a local PC.
    • Documented dependency verification steps and session setup behavior.
  • Tests

    • Added automated validation for dependency installation and local-session safety.

session-start-hookスキルに従い.claude/hooks/session-start.shを新設し
.claude/settings.jsonのSessionStartに配線。$CLAUDE_CODE_REMOTEが真の場合のみ
ffmpeg・faster-whisper/groqの有無を確認し無ければ自動導入、それ以外(手元PC)は
即終了しapt/pipに触れない。実地検証(強制欠落→再導入)で、apt-get updateが
本筋と無関係な野良PPAの403でset -eにより全体停止しffmpeg導入まで到達できない
不具合を発見し修正(該当行のみ|| true)。CIにhook-session-startジョブを追加し
継続的に機械検証する。start-here.mdにクラウド専用ユーザー向けの案内を追記。

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

coderabbitai Bot commented Jul 29, 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: 021f5261-07d1-4e79-ab52-140616218f70

📥 Commits

Reviewing files that changed from the base of the PR and between 077437c and 67c2eb2.

📒 Files selected for processing (6)
  • .claude/hooks/session-start.sh
  • .claude/settings.json
  • .github/workflows/ci.yml
  • docs/failures.md
  • docs/roadmap.html
  • video-shorts/start-here.md

📝 Walkthrough

Walkthrough

A remote-only Claude Code session hook now installs missing ffmpeg and Python transcription dependencies. The hook is wired into session startup, validated by CI after dependency removal, and documented in failure records, roadmap data, and usage instructions.

Changes

Remote dependency bootstrap

Layer / File(s) Summary
Session hook wiring and provisioning
.claude/hooks/session-start.sh, .claude/settings.json
The SessionStart hook invokes a remote-gated script that conditionally installs ffmpeg and the required Python packages.
End-to-end hook validation
.github/workflows/ci.yml
CI verifies local no-op behavior, resets dependencies, runs the remote hook, and checks command availability and Python imports.
Delivery records and usage guidance
docs/failures.md, docs/roadmap.html, video-shorts/start-here.md
Documentation records the apt update handling, delivery state, CI evidence, and cloud-session setup instructions.

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

Sequence Diagram(s)

sequenceDiagram
  participant ClaudeCode
  participant SessionStartHook
  participant PackageManagers
  participant CI
  ClaudeCode->>SessionStartHook: Start remote session
  SessionStartHook->>PackageManagers: Install missing ffmpeg and Python packages
  PackageManagers-->>SessionStartHook: Report installation results
  CI->>SessionStartHook: Run hook with remote mode enabled
  CI->>PackageManagers: Verify ffmpeg and Python imports
Loading
✨ 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-rnnzj5

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

hook-session-startジョブの成功run URLをG-DELIVERY-HOOK-FFMPEG/PYTHON/
LOCALSAFEのevidenceに、start-here.md追記commitのSHAをG-DELIVERY-DOCの
evidenceに記入。meta.active/nextをP1-8へ戻す。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Krg9N4phVxqNqW2KAruNcj
@rahiseko-alt
rahiseko-alt marked this pull request as ready for review July 29, 2026 00:08
@rahiseko-alt
rahiseko-alt merged commit f78de30 into main Jul 29, 2026
13 of 14 checks passed
@rahiseko-alt
rahiseko-alt deleted the claude/checkin-rnnzj5 branch August 19, 2026 06:20
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