Skip to content

実装: agent_session_manifest schema の phase_instance_id を CI-native 形式(ci:<workflow>:<run_id>:<run_attempt>)に対応させる #547

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "agent_session_manifest/v1 の phase_instance_id が衝突リスクのない CI-native ID を受け付けられるようにする"
change_kind: mixed

Parent Issue

none(単独改善。関連 closed: #242 session recording policy, #432 manifest validation gate)

Parent Goal Ref

  • Goal: agent_session_manifest/v1 の phase_instance_id フィールドが CI ラン固有の一意な値を表現できるようにする
  • Desired Destination: schema と validator が ci:<producer_slug>:<run_id>:<run_attempt> 形式を受け付け、workflow が CI-native ID を生成・設定できる状態

Current Validated Scope

  • docs/schemas/agent-session-manifest.schema.json の phase_instance_id pattern を拡張(現行 ^issue-[0-9]+:[a-z_]+:[0-9]{3}$ に加えて ci:<producer_slug>:<run_id>:<run_attempt> 形式を受け付ける。非捕捉グループ形式: ^(?:issue-[0-9]+:[a-z_]+:[0-9]{3}|ci:[a-z0-9_.-]+:[1-9][0-9]*:[1-9][0-9]*)$)
  • scripts/generate-session-manifest.mjs の --phase-instance-id バリデーションロジックを更新(新 pattern を許容、help 文言・invalid-format error の更新を含む)
  • .github/workflows/session-manifest.yml の PHASE_SEQ 生成ロジックを ci:session-manifest:${{ github.run_id }}:${{ github.run_attempt }} 形式に変更
  • 関連する validator スクリプト・unit test を更新

Remaining Parent Gaps

なし(スタンドアロン改善)

Outcome

docs/schemas/agent-session-manifest.schema.json の phase_instance_id pattern が ci:<producer_slug>:<run_id>:<run_attempt> 形式を受け付けるよう拡張され、.github/workflows/session-manifest.yml が CI-native な一意 ID を生成して pnpm manifest:check が PASS する状態で PR がマージされている。

In Scope

  • docs/schemas/agent-session-manifest.schema.json: phase_instance_id の pattern を非捕捉グループ形式 ^(?:issue-[0-9]+:[a-z_]+:[0-9]{3}|ci:[a-z0-9_.-]+:[1-9][0-9]*:[1-9][0-9]*)$ に更新。schema の phase_instance_id.description には「GitHub Actions の workflow name ではなく、schema-safe な固定 slug」と明記する
  • .github/workflows/session-manifest.yml: PHASE_SEQ ベースの暫定 ID 生成を ci:session-manifest:${{ github.run_id }}:${{ github.run_attempt }} に変更
  • scripts/generate-session-manifest.mjs: 新しい format の --phase-instance-id 値を受け付けるバリデーション更新。help 文言・invalid-format error の更新を含む
  • 変更に対応する unit test の追加・更新(schema validation テスト、generator スクリプトテスト)

Contract Clarification

ci:<producer_slug>:<run_id>:<run_attempt> の producer_slug は GitHub Actions の workflow name(github.workflow)ではなく、schema-safe な固定 producer slug とする。本 Issue の生成対象は session-manifest に限定し、.github/workflows/session-manifest.yml は固定値 ci:session-manifest:${{ github.run_id }}:${{ github.run_attempt }} を使用する。schema の phase_instance_id.description には「GitHub Actions の workflow name ではなく、schema-safe な固定 slug」と明記する。

Out of Scope

  • issue-<N>:<phase>:<seq> 形式の廃止または後方非互換変更
  • CI 以外のコンテキスト(local 実行等)での ID 生成ロジック変更
  • session-manifest 以外の schema への変更
  • phase_instance_id を参照する他システムの変更

Acceptance Criteria

  • AC1: docs/schemas/agent-session-manifest.schema.json の phase_instance_id pattern が ci:session-manifest:12345678:1 を valid と判定する
  • AC2: 既存の issue-432:impl:001 形式が引き続き valid と判定される(後方互換)
  • AC3: schema が以下の malformed CI ID を reject する:空白入り slug ci:session manifest:12345678:1、run_id=0 の ci:session-manifest:0:1、run_attempt=0 の ci:session-manifest:12345678:0、run_attempt 欠落の ci:session-manifest:12345678
  • AC4: scripts/generate-session-manifest.mjs --phase-instance-id ci:session-manifest:12345678:1(他の必須引数を補完した上で)--validate が成功する
  • AC5: scripts/generate-session-manifest.mjs --help の出力が issue-<N>:<phase>:<seq> と ci:<producer_slug>:<run_id>:<run_attempt> の両形式を列挙し、invalid-format error も両形式を示す
  • AC6: .github/workflows/session-manifest.yml が --phase-instance-id ci:session-manifest:$GITHUB_RUN_ID:$GITHUB_RUN_ATTEMPT(または ${{ github.run_id }} / ${{ github.run_attempt }})を渡し、PHASE_SEQ ベースのロジックが削除されている
  • AC7: pnpm manifest:check artifacts/agent-session-manifest-ci.json が PR の CI run で PASS する(deferred: CI 上で確認)
  • AC8: pnpm test が PASS し、phase_instance_id の positive ケース(ci:session-manifest:12345678:1・issue-432:impl:001)と negative ケース(空白スラッグ・run_id=0・run_attempt=0・フィールド欠落)を含む TypeScript テストが追加されている

Verification Commands

# AC1
$ rg -n "ci:\[a-z0-9_\.\-\]" docs/schemas/agent-session-manifest.schema.json
# AC2
$ rg -n "issue-\[0-9\].*ci:" docs/schemas/agent-session-manifest.schema.json
# AC3
$ rg -n "\[1-9\]\[0-9\]" docs/schemas/agent-session-manifest.schema.json
# AC4
$ rg -n "ci:session-manifest" scripts/generate-session-manifest.mjs
# AC5
$ rg -n "producer_slug" scripts/generate-session-manifest.mjs
# AC6
$ rg -n "ci:session-manifest" .github/workflows/session-manifest.yml
# AC7
# preflight-scope: runtime_only
$ rg -n "ci:session-manifest" artifacts/agent-session-manifest-ci.json
# AC8
$ rg -rn "ci:session-manifest" tests/

Runtime Verification Applicability

  • decision: deferred
  • reason: AC7 は CI 上で session-manifest workflow が実際に実行されて artifact を生成しないと検証できない。local 実行では artifact が存在しないため pnpm manifest:check が実行不能。AC1-AC6 と AC8 は local で検証可能(immediate)。
  • deferred_destination:
    • destination_type: phase
    • destination_ref: PR CI run(session-manifest workflow の validate-generated-artifact step)
  • deferred_verification_condition: PR に対する CI run で agent-session-manifest / validate-generated-artifact check が PASS し、生成 artifact の phase_instance_id が ci:session-manifest:<run_id>:<run_attempt> 形式であることを artifact ログで確認できる状態

Allowed Paths

  • docs/schemas/agent-session-manifest.schema.json
  • .github/workflows/session-manifest.yml
  • scripts/generate-session-manifest.mjs
  • tests/ — phase_instance_id schema validation に対応するテストファイル

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合

Required Skills

  • JSON Schema (pattern / anyOf)
  • GitHub Actions workflow 変数展開(${{ github.run_id }} 等)

Scope Delta(任意)

N/A

Background

PR #540(feat: enforce manifest validation required check (#432))の実装で、phase_instance_id を CI ラン固有の値にしようとしたが、agent_session_manifest/v1 の現行 schema(^issue-[0-9]+:[a-z_]+:[0-9]{3}$)が issue-<N>:<phase>:<seq> 形式しか受け付けないため、暫定として (run_id + run_attempt) % 1000 の 3 桁 seq を使って issue-432:impl:<seq> を生成している(.github/workflows/session-manifest.yml L47, L54)。

この 3 桁 seq は uniqueness が 1000 通りに限定され、長期運用では衝突する。PR #540 の non-blocking コメントで指摘済み。

source: post_merge_cleanup
anchor_pr: "https://github.com/squne121/loop-protocol/pull/540"
dedupe_key: "follow-up:squne121/loop-protocol:pr/540:phase_instance_id_schema"
created_by: post-merge-cleanup
created_at: "2026-05-31T15:30:00Z"

Delivery Rule

  • 1 Issue = 1 PR
  • Draft PR から開始する
  • worktree: .claude/worktrees/issue-<N>-phase-instance-id-ci-native/

Activity

  1. added
    triage-required
    on May 31, 2026
  2. squne121 commented on May 31, 2026

    @squne121
    OwnerAuthor

    敵対的レビュー結論

    判定: そのまま実装に入るべきではない。Issue #547 は方向性は正しいが、契約の精度が低く、実装者がACを満たしたつもりで破綻したPRを出す余地がある。

    #547 の目的は、agent_session_manifest/v1 の phase_instance_id が現行の issue-:: 形式だけでなく、CIラン固有の ci::<run_id>:<run_attempt> を受け付けるようにすること。背景として #540 で 3桁seqによる暫定IDを使っており、長期運用で衝突リスクがある、という整理は妥当です。GitHub公式でも github.run_id はリポジトリ内のworkflow runごとに一意で、rerunしても変わらず、github.run_attempt はrerunごとに増えるため、この2つを組み合わせる設計は筋がよいです。

    ただし、Issue本文のAC・検証・パス指定に複数の不整合があります。

    重大指摘

    1. artifact path が現行workflowと食い違っている

    #547 のAC4は pnpm manifest:check artifacts/agent-session-manifest-ci.json を検証対象にしていますが、現行 main の .github/workflows/session-manifest.yml は artifacts/private-agent-session-manifest-ci.json に出力しています。Issue本文でもOutcome/AC側は artifacts/agent-session-manifest-ci.json を前提にしており、実ファイル名とズレています。

    これは単なる表記揺れではありません。PR実装者がIssueどおりに agent-session-manifest-ci.json を検証すると、workflowの生成物とは別ファイルを見に行くか、存在しないファイルを検証することになります。AC4は現行workflowに合わせて artifacts/private-agent-session-manifest-ci.json に修正するべきです。

    1. テストコマンドがプロジェクト実態と合っていない

    #547 はAC5で uv run pytest tests/ -k "phase_instance_id" -v を要求していますが、リポジトリの tests/ 配下は .test.ts 群で、#540の検証実績も pnpm test です。

    これはかなり危険です。実装者がPythonテストを新設して uv run pytest だけ通しても、既存のVitest/TypeScript系テスト・Node producer・Ajv schema validationとの結合が壊れている可能性を見逃します。AC5は pnpm test -- ... または既存テストランナーに合わせたコマンドへ修正すべきです。

    推奨:

    pnpm test -- tests/agent-session-manifest.test.ts tests/agent-session-manifest-producer.test.ts tests/agent-session-manifest-check.test.ts
    pnpm manifest:check artifacts/private-agent-session-manifest-ci.json

    1. ci: の意味が曖昧

    Issueは ci::<run_id>:<run_attempt> と書いていますが、実装例では ci:session-manifest:${{ github.run_id }}:${{ github.run_attempt }} を固定値で使っています。GitHub公式の github.workflow / GITHUB_WORKFLOW は「workflowのname」であり、スペースや大文字を含み得ます。一方、Issueのpattern案は [a-z0-9_.-]+ のため、実際のworkflow nameをそのまま入れる仕様とは互換しません。

    ここは仕様名を変えるべきです。workflow ではなく workflow_slug または producer_id と定義するべきです。例:

    ci:<producer_slug>:<run_id>:<run_attempt>
    ci:session-manifest:12345678:1

    また、schema descriptionにも「GitHub Actionsのworkflow nameではなく、schema-safeな固定slug」と明記するべきです。

    1. schema pattern の書き方が将来の誤実装を誘発する

    IssueのIn Scopeは次のpatternを例示しています。

    ^issue-[0-9]+:[a-z_]+:[0-9]{3}$|^ci:[a-z0-9_.-]+:[0-9]+:[0-9]+$

    これは各分岐に ^ / $ があるため現時点では大きな誤マッチにはなりにくいですが、保守性が悪いです。JSON Schema の pattern は正規表現で制約するもので、JSON Schema docsでも ^ と $ による境界指定の意味が説明されています。分岐を増やす契約では、全体を非捕捉グループで囲む方が安全です。

    推奨:

    ^(?:issue-[0-9]+:[a-z_]+:[0-9]{3}|ci:[a-z0-9_.-]+:[1-9][0-9]:[1-9][0-9])$

    さらに run_id / run_attempt はGitHub仕様上「number」なので、[0-9]+ より 0 を拒否する [1-9][0-9]* が妥当です。GitHub公式では run_attempt は1から始まり、rerunごとに増加するとされています。

    中程度の指摘

    1. Verification Commands が rg 偏重で、schema実効性を保証しない

    #547 のAC1/AC2/AC3検証は rg が中心です。これは「文字列がある」ことしか確認できず、以下を検出できません。

    ci:session-manifest:12345678:1 が本当にschema validか

    ci:session manifest:123:1 のような空白入りslugがrejectされるか

    ci:session-manifest:0:0 をrejectするか

    既存 issue-432:impl:001 が後方互換でvalidか

    scripts/generate-session-manifest.mjs のCLIバリデーションとschemaが同じ正規表現を使っているか

    最低限、以下をACに入れるべきです。

    node scripts/generate-session-manifest.mjs
    --repository squne121/loop-protocol
    --phase-main-loop impl
    --phase-ledger-phase post_commit_verification
    --phase-instance-id ci:session-manifest:12345678:1
    --actor-type github_action
    --actor-name session-manifest-workflow
    --evidence-source-kind ci_check
    --evidence-source-ref https://github.com/squne121/loop-protocol/actions/runs/12345678
    --evidence-visibility private_artifact
    --format json
    --validate > /tmp/agent-session-manifest-ci.json

    pnpm manifest:check /tmp/agent-session-manifest-ci.json

    1. generatorのhelp文言更新がACに入っていない

    現行 generate-session-manifest.mjs はhelpで --phase-instance-id を issue-:: 形式と説明し、validatePhaseInstanceId も ^issue-[0-9]+:[a-z_]+:[0-9]{3}$ を直書きしています。

    Issueはバリデーションロジック更新を含めていますが、help文言・エラーメッセージ・例示の更新を明示していません。これは小さく見えて、運用時に「schemaは通るがCLI説明が古い」状態を作ります。ACに含めるべきです。

    1. workflow 固定値を session-manifest にするなら、workflow rename耐性を捨てる判断を明文化すべき

    Issueでは .github/workflows/session-manifest.yml の生成値を ci:session-manifest:${{ github.run_id }}:${{ github.run_attempt }} にするとしています。これは実用上よいですが、GitHubの github.workflow とは別物です。

    したがって、以下のどちらかに決めるべきです。

    固定slug方式: ci:session-manifest:<run_id>:<run_attempt>

    GitHub context方式: ci::<run_id>:<run_attempt>

    敵対的には、固定slug方式を推します。github.workflow は表示名であり、renameや空白混入の影響を受けるため、schema IDには不向きです。

    修正後のIssue文案

    Contract Clarification

    ci:<producer_slug>:<run_id>:<run_attempt> の producer_slug は GitHub Actions の workflow name ではなく、schema-safe な固定 producer slug とする。
    本Issueでは session-manifest のみを生成対象とする。

    Required Pattern

    phase_instance_id MUST accept both:

    • issue-<issue_number>:<phase_slug>:<seq3>
    • ci:<producer_slug>:<github_run_id>:<github_run_attempt>

    Recommended schema pattern:

    ^(?:issue-[0-9]+:[a-z_]+:[0-9]{3}|ci:[a-z0-9_.-]+:[1-9][0-9]*:[1-9][0-9]*)$
    
    Correct Artifact Path
    
    The session-manifest workflow currently writes:
    
    artifacts/private-agent-session-manifest-ci.json
    
    All verification commands and ACs must use this path unless the workflow output path is intentionally renamed in the same PR.
    
    ## 修正すべきAC
    
    ```markdown
    - AC1: schema validates `ci:session-manifest:12345678:1`.
    - AC2: schema still validates `issue-432:impl:001`.
    - AC3: schema rejects malformed CI IDs:
      - `ci:session manifest:12345678:1`
      - `ci:session-manifest:0:1`
      - `ci:session-manifest:12345678:0`
      - `ci:session-manifest:12345678`
    - AC4: `scripts/generate-session-manifest.mjs --phase-instance-id ci:session-manifest:12345678:1 --validate` succeeds.
    - AC5: generator help text and invalid-format error mention both accepted formats.
    - AC6: `.github/workflows/session-manifest.yml` passes `ci:session-manifest:$GITHUB_RUN_ID:$GITHUB_RUN_ATTEMPT` or equivalent `${{ github.run_id }}` / `${{ github.run_attempt }}`.
    - AC7: `pnpm manifest:check artifacts/private-agent-session-manifest-ci.json` passes in CI.
    - AC8: existing TypeScript test suite passes via `pnpm test`, with targeted tests for `phase_instance_id`.
    
    実装方針
    
    最小実装は以下です。
    
    1. docs/schemas/agent-session-manifest.schema.json の phase_instance_id.pattern を非捕捉グループ形式に更新。
    
    
    2. scripts/generate-session-manifest.mjs の validatePhaseInstanceId を同じpatternへ更新。
    
    
    3. generatorのhelp文言・エラーメッセージを更新。
    
    
    4. .github/workflows/session-manifest.yml の --phase-instance-id を ci:session-manifest:${{ github.run_id }}:${{ github.run_attempt }} に変更。
    
    
    5. artifacts/private-agent-session-manifest-ci.json を検証する。
    
    
    6. 既存 .test.ts 系にpositive/negative casesを追加。
    
    
    
    最終コメント案
    
    敵対的レビューです。このIssueは目的は妥当ですが、現状のまま実装に入ると検証が壊れます。
    
    Blocker:
    - AC4 の artifact path が現行 workflow と不一致です。現行は `artifacts/private-agent-session-manifest-ci.json` に出力しているため、`artifacts/agent-session-manifest-ci.json` 前提の検証は誤りです。
    - AC5 の `uv run pytest` はプロジェクト実態と合っていません。既存テストは `.test.ts` で、#540 でも `pnpm test` を検証しています。`pnpm test` ベースに修正してください。
    - `ci:<workflow>` の `workflow` が曖昧です。GitHubのworkflow nameは空白・大文字を含み得るため、pattern `[a-z0-9_.-]+` と矛盾します。`workflow` ではなく `producer_slug` と定義し、今回は固定値 `session-manifest` を使う契約にしてください。
    
    Required changes:
    - patternは `^(?:issue-[0-9]+:[a-z_]+:[0-9]{3}|ci:[a-z0-9_.-]+:[1-9][0-9]*:[1-9][0-9]*)$` を推奨します。
    - `scripts/generate-session-manifest.mjs` のvalidatorだけでなく、help文言とinvalid-format errorも更新してください。
    - `rg` だけでなく、generator CLI + `pnpm manifest:check` + positive/negative testsで検証してください。
    - `ci:session-manifest:12345678:1` valid、`ci:session manifest:12345678:1` invalid、`ci:session-manifest:0:1` invalid、既存 `issue-432:impl:001` valid を最低限テストしてください。
    
    この修正を入れない場合、schema変更Issueなのに「文字列はあるが実際にschema/producer/CI artifactが整合していない」PRを通す危険があります。
  3. squne121 commented on May 31, 2026

    @squne121
    OwnerAuthor

    Contract Review: BLOCKED (2026-05-31T09:42:00Z)

    不足項目

    VC preflight: human_judgment

    • AC7 の preflight-scope: runtime_only marker が # AC7 の 前 に配置されており、「コマンド行の直前行」ルール違反です
    • スクリプトが marker を検出できず、rg ... artifacts/agent-session-manifest-ci.json(存在しないファイル)を実行 → exit_code 2 → category: unknown / decision: human_judgment

    現状(誤):

    # preflight-scope: runtime_only
    # AC7
    $ rg -n "ci:session-manifest" artifacts/agent-session-manifest-ci.json

    正しい順序:

    # AC7
    # preflight-scope: runtime_only
    $ rg -n "ci:session-manifest" artifacts/agent-session-manifest-ci.json

    推奨アクション

    上記 1 箇所の順序を入れ替えるだけで VC preflight が status: pass になります。gh issue edit で直接修正するか、issue-refinement-loop を起動してください。


    CONTRACT_REVIEW_RESULT_V1:
      status: blocked
      generated_at: "2026-05-31T09:42:00Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/547
      checks:
        template_compliance: pass
        state_label: ok
        allowed_paths_present: pass
        vc_present: pass
        stop_conditions_complete: pass
        vc_preflight:
          passed: false
          vc_failed_as_expected: 7
          vc_passed_unexpectedly: 0
          vc_unrunnable: 0
          vc_expected_pass: 0
          vc_skipped: 0
          status: human_judgment
          classifications:
            - ac: AC1
              command: "rg -n \"ci:[a-z0-9_\\.\\-\\]\" docs/schemas/agent-session-manifest.schema.json"
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC2
              command: "rg -n \"issue-[0-9].*ci:\" docs/schemas/agent-session-manifest.schema.json"
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC3
              command: "rg -n \"[1-9][0-9]\" docs/schemas/agent-session-manifest.schema.json"
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC4
              command: "rg -n \"ci:session-manifest\" scripts/generate-session-manifest.mjs"
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC5
              command: "rg -n \"producer_slug\" scripts/generate-session-manifest.mjs"
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC6
              command: "rg -n \"ci:session-manifest\" .github/workflows/session-manifest.yml"
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC7
              command: "rg -n \"ci:session-manifest\" artifacts/agent-session-manifest-ci.json"
              exit_code: 2
              classification: human_judgment
              category: unknown
              scope_class: baseline_fail_expected
              confidence: low
              decision: human_judgment
              fix_hint: "preflight-scope: runtime_only marker を # AC7 の直後($ コマンド行の直前行)に移動してください"
            - ac: AC8
              command: "rg -rn \"ci:session-manifest\" tests/"
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
        ac_verifiability: pass
        product_spec_check:
          applicability: not_applicable
          decision: pass
          triggers:
            docs_product_allowed_paths: false
            tasks_md_mentioned: false
            specify_artifact_mentioned: false
            generated_task_mentioned: false
            product_spec_context_present: false
        worktree_branch_collision: clear
      next_action: human_judgment
      blocked_reasons:
        - check: vc_preflight
          detail: "AC7 preflight-scope marker が誤位置(# AC7 の前)にあり、runtime_only として認識されない。exit_code 2 → human_judgment"
      warnings:
        - "Issue label が triage-required のみ。impl-review-loop の ready tuple は phase/implementation を要求する。contract review BLOCKED 解消後に label を更新してください"
  4. added
    phase/implementation
    and removed
    triage-required
    on May 31, 2026
  5. squne121 commented on May 31, 2026

    @squne121
    OwnerAuthor

    (誤投稿)削除してください

  6. squne121 commented on May 31, 2026

    @squne121
    OwnerAuthor

    Contract Snapshot (2026-05-31T09:46:00Z)

    • Outcome: docs/schemas/agent-session-manifest.schema.json の phase_instance_id pattern が ci:<producer_slug>:<run_id>:<run_attempt> 形式を受け付けるよう拡張され、.github/workflows/session-manifest.yml が CI-native な一意 ID を生成して pnpm manifest:check が PASS する状態で PR がマージされている
    • Acceptance Criteria: AC1–AC8(AC7 は CI deferred)
    • Allowed Paths:
      • docs/schemas/agent-session-manifest.schema.json
      • .github/workflows/session-manifest.yml
      • scripts/generate-session-manifest.mjs
      • tests/
    • Worktree: .claude/worktrees/issue-547-agent-session-manifest-schema-phase-inst
    • Branch: worktree-issue-547-agent-session-manifest-schema-phase-inst
    • VC preflight: baseline fail = 7, skipped = 1 (AC7/runtime_only), 想定外 pass = 0, 実行不可 = 0
    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-05-31T09:46:00Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/547
      checks:
        template_compliance: pass
        state_label: ok
        allowed_paths_present: pass
        vc_present: pass
        stop_conditions_complete: pass
        vc_preflight:
          passed: true
          vc_failed_as_expected: 7
          vc_passed_unexpectedly: 0
          vc_unrunnable: 0
          vc_expected_pass: 0
          vc_skipped: 1
          status: pass
          body_sha256: "sha256:21c8b2ce9bb6c690cda302d30bd844bb11ae39438c655cf73e3f4ff98866f1a6"
          classifications:
            - ac: AC1
              command: 'rg -n "ci:[a-z0-9_\.-]" docs/schemas/agent-session-manifest.schema.json'
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC2
              command: 'rg -n "issue-[0-9].*ci:" docs/schemas/agent-session-manifest.schema.json'
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC3
              command: 'rg -n "[1-9][0-9]" docs/schemas/agent-session-manifest.schema.json'
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC4
              command: "rg -n 'ci:session-manifest' scripts/generate-session-manifest.mjs"
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC5
              command: "rg -n 'producer_slug' scripts/generate-session-manifest.mjs"
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC6
              command: "rg -n 'ci:session-manifest' .github/workflows/session-manifest.yml"
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC7
              command: "rg -n 'ci:session-manifest' artifacts/agent-session-manifest-ci.json"
              exit_code: null
              classification: skipped
              category: preflight_scope_runtime_only
              scope_class: runtime_only
              confidence: low
              decision: go
              verification_owner: impl-review-loop
              deferred_reason: "VC marked runtime_only; verification deferred to post-implementation runtime"
              runtime_verification_required: true
            - ac: AC8
              command: "rg -rn 'ci:session-manifest' tests/"
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
        ac_verifiability: pass
        product_spec_check:
          applicability: not_applicable
          decision: pass
          triggers:
            docs_product_allowed_paths: false
            tasks_md_mentioned: false
            specify_artifact_mentioned: false
            generated_task_mentioned: false
            product_spec_context_present: false
          blocked_reasons: []
        worktree_branch_collision: clear
      next_action: implement_issue
      blocked_reasons: []
      warnings: []
  7. squne121 commented on Jun 1, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-06-01T12:00:19Z)

    • PR: feat(#547): extend phase_instance_id to accept CI-native ci:<slug>:<run_id>:<run_attempt> #551
    • Worktree: .claude/worktrees/issue-547-agent-session-manifest-schema-phase-inst
    • Branch: worktree-issue-547-agent-session-manifest-schema-phase-inst
    • Verification: typecheck PASS / lint PASS / test 288 passed (16 files) / build PASS
    • AC7: deferred (runtime_only — CI run の validate-generated-artifact step で確認)
    • 後続: PR レビュー(pr-review-judge)→ マージ → post-merge-cleanup
  8. squne121 commented on Jun 1, 2026

    @squne121
    OwnerAuthor

    impl-review-loop: 完了 (2026-06-01T12:30:00Z)

    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      schema_version: 1
      materialized_by: impl-review-loop
      follow_up_issues: []
      note_only_observations: []
    
    ISSUE_SCOPE_ROLLUP_DECISION_V2:
      schema_version: 2
      recorded_at: "2026-06-01T09:47:12.973884Z"
      rollup_plan_ref:
        body_sha256: "98f5c9c12e300f3602bd9d5235195722cd5f067014ae3edf5f4533a8b0a4cb0c"
        generated_at: "2026-06-01T09:47:12.973884Z"
      decision: skipped
      executed_actions: []
      skipped_reason: "scope rollup の security escalation は false positive(#549 は secret_policy フィールド名一致のみ、実セキュリティリスクなし)。#549 は #547 マージ後に着手する順序で調整済み。改善 Issue #550 を起票。"
      candidates_reviewed:
        - kind: issue
          number: 549
          confidence: medium
          suggested_action: human_review_required
          final_decision: rejected
          rejection_reason: "false_positive: schema property name only, no security boundary change"
  9. added 2 commits that reference this issue on Jun 1, 2026
  10. squne121 commented on Jun 1, 2026

    @squne121
    OwnerAuthor

    post-merge-cleanup: 完了 (2026-06-01T12:40:00Z)

    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      schema_version: 1
      materialized_by: post-merge-cleanup
      follow_up_issues: []
      note_only_observations: []

    unresolved_cleanup_items

    worktree .claude/worktrees/issue-547-agent-session-manifest-schema-phase-inst に untracked ファイルが残っています:

    tests/fixtures/agent-session-manifest/temp-unsupported.txt
    

    このファイルは PR マージ前から存在していたもので、PR #551 とは独立しています。
    削除可能であれば以下を実行することで worktree を完全に削除できます:

    rm /home/squne/projects/LOOP_PROTOCOL/.claude/worktrees/issue-547-agent-session-manifest-schema-phase-inst/tests/fixtures/agent-session-manifest/temp-unsupported.txt
    git worktree remove .claude/worktrees/issue-547-agent-session-manifest-schema-phase-inst
    git branch -d worktree-issue-547-agent-session-manifest-schema-phase-inst
  11. added a commit that references this issue on Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    phase/implementation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions