Skip to content

実装: manifest validation gate を required-check に昇格する #432

Closed
1 of 1 issue completed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "#242"
goal_ref: "manifest producer が生成した artifact が agent_session_manifest/v1 schema に適合することを CI の required check として検証し、schema 違反の PR が main にマージされないようにする"
change_kind: workflow

Parent Issue

#242

Parent Goal Ref

  • Goal: agent session manifest の生成・検証・保存を CI パイプラインで自動化し、session 記録が常に schema に準拠した状態を保証する
  • Desired Destination: PR CI が manifest を自動生成・validate し、schema 違反の PR が main にマージできない状態

Current Validated Scope

  • .github/workflows/session-manifest.yml の job 名変更(agent-session-manifest / validate-generated-artifact)と validation step 追加
  • artifact 生成後・upload 前の public-safe hard-fail check 追加
  • docs/dev/session-recording-policy.md または docs/dev/ci-required-checks.md への required check 手順記載

Remaining Parent Gaps

Required Skills

  • GitHub Actions workflow YAML
  • GitHub branch protection / rulesets
  • pnpm / Node.js

Background

PR #426(Issue #402)で agent_session_manifest/v1 の hook/CI wiring が完了した。Issue #402 の "Remaining Parent Gaps" に「manifest validation gate を required check に昇格する enforcement は別 follow-up」と明記されており、本 Issue はその follow-up である。

Issue #378 の Out of Scope にも「GitHub branch protection で required check に昇格させる作業」と明記されている。

現状: .github/workflows/session-manifest.yml が artifact を生成するが、manifest が schema validation に通るかどうかを CI の required check として強制していない。

Goal

manifest producer が生成した artifact が agent_session_manifest/v1 schema に適合することを CI の required check として検証し、schema 違反の PR が main にマージされないようにする。

Outcome

.github/workflows/session-manifest.yml に manifest schema validation ステップが追加され、生成 artifact を pnpm manifest:check で検証する required check が CI 上に存在する。schema / semantic 違反の PR は main にマージできない。

Desired Destination

manifest artifact を PR CI の required check で schema validate し、fail した PR が merge できない状態。

In Scope

  • .github/workflows/session-manifest.yml または新規 workflow に manifest schema validation ステップを追加
  • validation が fail した場合 workflow を fail させる
  • required check への昇格(repository settings / branch protection rule への追加手順を docs に記載)
  • job name を agent-session-manifest / validate-generated-artifact に変更
  • artifact 生成後・upload 前に public-safe hard-fail check を追加(absolute path / token-like string / transcript marker)
  • --phase-instance-id を CI run-specific な値(ci:${{ github.workflow }}:${{ github.run_id }}:${{ github.run_attempt }})に変更
  • merge queue 使用有無の docs 明示、または merge_group trigger 追加

Out of Scope

Acceptance Criteria

  • AC1: .github/workflows/session-manifest.yml に、生成済み manifest artifact を pnpm manifest:check artifacts/<file>.json で検証する step が存在する
  • AC2: validation step は artifact upload より前に実行され、schema / semantic violation 時に job を fail させる
  • AC3: required check に登録する exact check context を docs に明記する(check context: agent-session-manifest / validate-generated-artifact)
  • AC4: required check 名は全 workflow で一意であり、workflow 名・job_id・job name の違いが docs に明記されている
  • AC5: public repo artifact 前提の public-safe hard-fail check が存在する(absolute path / token-like string / transcript/local_file marker)
  • AC6: branch protection または ruleset のどちらを SSOT とするかを docs に明記する
  • AC7: required check 設定後の確認コマンド、または admin 権限がない場合の stop condition が docs にある
  • AC8: merge queue を使う場合は merge_group trigger がある。使わない場合は docs に明示する

Verification Commands

# AC1
$ rg -n 'pnpm manifest:check artifacts/.+\.json' .github/workflows/session-manifest.yml

# AC2
$ rg -n 'pnpm manifest:check' .github/workflows/session-manifest.yml

# AC3
$ rg -rn 'agent-session-manifest / validate-generated-artifact' docs/

# AC4
$ rg -n 'validate-generated-artifact' .github/workflows/session-manifest.yml

# AC5
$ rg -n 'FAIL.*token-like\|token-like.*detected' .github/workflows/session-manifest.yml

# AC6
$ rg -rn 'branch protection\|ruleset' docs/

# AC7
$ rg -rn 'required_status_checks\|admin.*stop condition\|stop condition.*admin' docs/

# AC8
$ rg -rn 'merge_group\|merge queue' .github/workflows/session-manifest.yml docs/

Allowed Paths

  • .github/workflows/session-manifest.yml(job 名変更・validation step 追加・public-safe check 追加・merge_group 対応)
  • docs/dev/session-recording-policy.md または docs/dev/ci-required-checks.md(required check 手順・exact check context 記載)
  • tests/fixtures/agent-session-manifest/(workflow contract test / invalid fixture、任意)

Stop Conditions

Runtime Verification Applicability

decision: not_applicable
rationale: 全 AC が決定論的 script verification (rg / yaml 構造検査) で成立し、外部 CLI / auth / network / fallback semantics を伴わない。

Related

Source

source: post_merge_cleanup
anchor_pr: "https://github.com/squne121/loop-protocol/pull/426"
anchor_issue: "https://github.com/squne121/loop-protocol/issues/402"
dedupe_key: "402-followup:manifest-validation-gate-required-check"
created_by: post-merge-cleanup
created_at: "2026-05-28T00:00:00Z"

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. added
    enhancement
    on May 27, 2026
  2. squne121 commented on May 31, 2026

    @squne121
    OwnerAuthor

    判定: REQUEST_CHANGES

    #432 は方向性は正しいですが、現状の Issue 契約のまま実装すると「required check に見えるが、実際には生成 artifact を検証していない」「required check 名を誤って設定して merge block が効かない」「public repo artifact の安全性を過信する」リスクがあります。

    #432 の目的は、agent_session_manifest/v1 の schema 違反 PR を main に merge できないようにすることです。Issue 本文も、PR #426 / Issue #402 で hook/CI wiring は済みだが、required check enforcement は follow-up だと位置付けています。([GitHub]1) 既存 #402 は GitHub Actions artifact workflow を作り、pull_request_target 不使用、read-only permission、artifact upload を導入済みです。([GitHub]2) #378 は pnpm manifest:check を追加し、.github/workflows/ci.yml の test job に入れる設計です。([GitHub]3)

    Blockers

    B1: required check に設定すべき「check 名」が Issue に定義されていない

    GitHub の required status check は、workflow 名ではなく job 名が基準です。GitHub Docs は、workflow check の name format は <job name> であり、required checks は workflow / matrix / event trigger type を考慮しないと明記しています。([GitHub Docs]4) また、branch protection で required status checks を使う場合、複数 workflow で同じ job name を使うと ambiguous になり PR merge がブロックされ得るため、job name を一意にすべきです。([GitHub Docs]5)

    現行 .github/workflows/session-manifest.yml の job name は Generate agent session manifest です。([GitHub]6) #432 の AC3 は「required check 昇格手順を docs に記載」だけですが、どの check context を required にするのかが未指定です。これは運用者が session-manifest、generate、Generate agent session manifest、ci / test のどれを選ぶべきか誤る余地を残します。

    修正案:

    jobs:
      validate-agent-session-manifest:
        name: agent-session-manifest / validate-generated-artifact

    docs には required check 名として agent-session-manifest / validate-generated-artifact をそのまま記載する。job_id と name を分けるなら、branch protection / ruleset に登録するのは name 側であることを明記する。


    B2: 現行 pnpm manifest:check は、生成 artifact を既定では検証していない

    #432 の Goal は「manifest producer が生成した artifact が schema に適合すること」を required check で検証することです。([GitHub]1) しかし現在の manifest:check の default target は docs/schemas/examples/**/*.json と tests/fixtures/agent-session-manifest/valid-* だけです。([GitHub]7) つまり、.github/workflows/session-manifest.yml が生成する artifacts/private-agent-session-manifest-ci.json は、明示指定しない限り pnpm manifest:check の対象外です。

    現行 workflow は producer を --validate 付きで実行し、stdout を artifact JSON に redirect しています。([GitHub]6) これは一定の validation ですが、#432 が要求している required check としての manifest validation gate には弱いです。#378 が entrypoint として作った pnpm manifest:check を、生成 artifact に対して直接走らせるべきです。

    修正案:

    - name: Generate session manifest artifact
      run: |
        mkdir -p artifacts
        node scripts/generate-session-manifest.mjs \
          --repository "${{ github.repository }}" \
          --phase-main-loop impl \
          --phase-ledger-phase post_commit_verification \
          --phase-instance-id "ci:${{ github.workflow }}:${{ github.run_id }}:${{ github.run_attempt }}" \
          --actor-type github_action \
          --actor-name session-manifest-workflow \
          --evidence-source-kind ci_check \
          --evidence-source-ref "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
          --evidence-visibility private_artifact \
          --format json \
          --validate \
          > artifacts/agent-session-manifest-ci.json
        test -s artifacts/agent-session-manifest-ci.json
    
    - name: Validate generated session manifest schema
      run: pnpm manifest:check artifacts/agent-session-manifest-ci.json

    AC1 / AC2 も rg だけではなく、pnpm manifest:check artifacts/agent-session-manifest-ci.json が workflow にあることを要求するべきです。


    B3: AC2 の検証方法が regex 依存で、実際の fail-close を証明しない

    #432 の AC2 は「schema 違反の manifest artifact で workflow が fail する」ですが、Verification Commands は exit 1|if-no-files-found: error|fail を rg するだけです。([GitHub]1) これは「fail と書いてある」ことしか見ません。invalid manifest を実際に validator に食わせて fail する証跡にはなりません。

    #378 の PR #431 では invalid schema、marker roundtrip、redaction violation、empty target などの test case が実装・検証されています。([GitHub]8) #432 はその成果を利用し、少なくとも workflow 上では生成 artifact を pnpm manifest:check <artifact> に通す必要があります。

    より強い AC:

    # AC2a: generated artifact is explicitly validated
    rg -n 'pnpm manifest:check artifacts/.+\.json' .github/workflows/session-manifest.yml
    
    # AC2b: explicit empty-target green is forbidden by the checker
    node scripts/check-agent-session-manifests.mjs does-not-exist.json; test $? -ne 0

    可能なら allowed paths に tests/ を追加し、workflow contract test を置くべきです。現行 #432 の Allowed Paths は workflow と docs だけなので、fail-close の回帰テストを入れにくい設計です。([GitHub]1)


    B4: branch protection / rulesets の実設定と docs 記載が混同されている

    #432 は「required check への昇格」を In Scope に入れつつ、repository settings / branch protection rule への追加手順を docs に記載するとしています。([GitHub]1) しかし GitHub の protected branches は repository settings 側の状態であり、PR のファイル差分だけでは merge block を保証できません。Protected branches は required status checks などの requirements を branch に課す仕組みです。([GitHub Docs]5)

    Issue の Desired Destination は「fail した PR が merge できない状態」ですが、AC3 は docs 記載だけなので、実際の repo 設定が変わったかを証明できません。([GitHub]1)

    修正案: #432 を二段に分ける。

    1. コード PR: workflow に validation step を追加し、docs に exact check name を書く。
    2. admin operation: branch protection / ruleset に required check を追加し、証跡を comment に残す。

    docs には最低限これを入れるべきです。

    # branch protection 側の確認例
    gh api repos/squne121/loop-protocol/branches/main/protection/required_status_checks \
      --jq '.checks[]?.context // .contexts[]?'

    GitHub required status checks は、選択対象になるには過去 7 日以内にその repo で成功している必要があるため、初回導入時は workflow を一度成功させてから required check に登録する手順も必要です。([GitHub Docs]9)


    B5: merge queue を使う場合、merge_group trigger がないと required check が未報告になる

    GitHub Docs は、required checks を使う repo で merge queue を使う場合、workflow に merge_group event を追加しないと status check が発火せず、merge が失敗すると説明しています。([GitHub Docs]9) 現行 session-manifest.yml は push と pull_request のみです。([GitHub]6)

    #432 では merge queue の利用有無が未定義です。将来 merge queue を有効化する余地があるなら、今のうちに以下を入れるべきです。

    on:
      push:
        branches: [main]
      pull_request:
        branches: [main]
      merge_group:

    merge queue を使わない方針なら、docs に「merge queue 未使用。使用開始時は merge_group trigger を追加する」と明記する。


    B6: artifact を「private」と呼ぶ設計は危険。public repo artifact は public-safe 前提で扱うべき

    現行 docs は、public repo では GitHub Actions artifact が REST API 経由でアクセス可能であり、「private artifact」は secret-safe を意味しないと明記しています。([GitHub]10) GitHub Docs も、Actions artifacts は REST API で download / delete / retrieve でき、public resources なら認証なしで使える場合があると説明しています。([GitHub Docs]11)

    にもかかわらず、現行 session-manifest.yml の public-safe check は絶対パス検出だけが hard fail で、token-like strings は warning-only です。([GitHub]6) #432 で required check に昇格するなら、warning-only は不十分です。required check は merge gate なので、public artifact に載せてはいけないものは hard fail にする必要があります。

    修正案:

    FILE=artifacts/agent-session-manifest-ci.json
    
    # absolute path
    if grep -qE '"/(home|Users|tmp|var|private)/|[A-Za-z]:\\\\|file://' "$FILE"; then
      echo "FAIL: absolute/local path detected"
      exit 1
    fi
    
    # token-like
    if grep -qE '(gh[pousr]_[A-Za-z0-9_]{20,}|github_pat_[A-Za-z0-9_]{20,}|sk-[A-Za-z0-9]{20,}|[A-Fa-f0-9]{40,})' "$FILE"; then
      echo "FAIL: token-like string detected"
      exit 1
    fi
    
    # transcript-ish fields should be structurally rejected by schema/semantic validator,
    # but keep a cheap guard for accidental raw transcript keys.
    if grep -qiE '"transcript"|raw_transcript|local_file' "$FILE"; then
      echo "FAIL: transcript/local_file marker detected"
      exit 1
    fi

    理想は shell grep ではなく、#378 の semantic validator に public artifact safety rule を寄せることです。


    B7: 生成 manifest の provenance が issue-402:impl:001 に固定されている

    現行 workflow は --phase-instance-id "issue-402:impl:001" を固定値として渡しています。([GitHub]6) #432 で required check 化するなら、今後の CI artifact がいつまでも Issue #402 の実装 phase を名乗るのは provenance として不正確です。

    修正案:

    --phase-instance-id "ci:${{ github.workflow }}:${{ github.run_id }}:${{ github.run_attempt }}"

    または PR / issue 番号を持たない CI artifact 用に schema 上の phase instance naming policy を docs に明記する。


    望ましい Issue #432 の改訂版 AC

    ## Acceptance Criteria
    
    - AC1: `.github/workflows/session-manifest.yml` に、生成済み manifest artifact を `pnpm manifest:check artifacts/<file>.json` で検証する step が存在する。
    - AC2: validation step は artifact upload より前に実行され、schema / semantic violation 時に job を fail させる。
    - AC3: required check に登録する exact check context を docs に明記する。
      - check context: `agent-session-manifest / validate-generated-artifact`
    - AC4: required check 名は全 workflow で一意であり、workflow 名・job_id・job name の違いが docs に明記されている。
    - AC5: public repo artifact 前提の public-safe hard-fail check が存在する。
      - absolute path
      - token-like string
      - transcript/local_file marker
    - AC6: branch protection または ruleset のどちらを SSOT とするかを docs に明記する。
    - AC7: required check 設定後の確認コマンド、または admin 権限がない場合の stop condition が docs にある。
    - AC8: merge queue を使う場合は `merge_group` trigger がある。使わない場合は docs に明示する。

    実装方針の最小パッチ

    #432 の Allowed Paths を維持するなら、最小変更は以下です。

    1. .github/workflows/session-manifest.yml

      • job name を安定した required-check 用名称に変更。
      • artifact 生成後に pnpm manifest:check artifacts/agent-session-manifest-ci.json を追加。
      • upload 前に public-safe hard-fail check を追加。
      • phase-instance-id を run-specific に変更。
      • merge queue を使うなら merge_group を追加。
    2. docs/dev/ci-required-checks.md または docs/dev/session-recording-policy.md

      • required check 名を exact string で記載。
      • branch protection / ruleset のどちらを使うか明記。
      • gh api による確認コマンドを記載。
      • 「過去 7 日以内に check が成功していないと required check として選べない」導入順序を記載。
      • public repo artifact は secret-safe ではなく public-safe metadata のみ、という前提を再掲。

    最終コメント案

    ## Verdict: REQUEST_CHANGES
    
    #432 の目的自体は妥当ですが、現行 Issue 契約は required check 化に必要な運用上の一意性と fail-close 証跡が不足しています。
    
    Blockers:
    1. Required check に登録する exact check context が未定義です。GitHub required status check は workflow 名ではなく job name を使うため、job `name:` を `agent-session-manifest / validate-generated-artifact` のように固定し、docs にその exact string を記載してください。
    2. 現行 `pnpm manifest:check` は default target では生成 artifact を検証しません。`session-manifest.yml` で artifact 生成後、upload 前に `pnpm manifest:check artifacts/<generated>.json` を実行してください。
    3. AC2 の verification が `rg 'fail|exit 1'` 依存で、schema violation artifact が実際に fail することを証明していません。少なくとも workflow に explicit artifact validation step を要求し、可能なら invalid fixture / negative test を追加してください。
    4. branch protection / ruleset の実設定確認が docs-only になっています。required check 登録後の `gh api` 確認コマンド、または admin 権限がない場合の stop condition を追加してください。
    5. public repo artifact は secret-safe ではありません。現行 workflow の token-like check は warning-only なので、required check 化するなら absolute path / token-like / transcript marker を hard fail にしてください。
    6. 現行 workflow の `--phase-instance-id "issue-402:impl:001"` は provenance として stale です。CI run-specific な値に変更してください。
    
    このまま実装すると「required check はあるが、生成 artifact の validation gate としては抜け穴がある」状態になります。
  3. squne121 commented on May 31, 2026

    @squne121
    OwnerAuthor

    refinement-loop applied anchor comment feedback (B1-B7) from #432 (comment)

    Changes applied:

    • B1: Added ## Outcome section with concrete post-implementation verification statement
    • B2: Updated ## In Scope with job name change, public-safe hard-fail check, --phase-instance-id CI run-specific value, and merge queue docs/trigger requirement
    • B3: Replaced ## Acceptance Criteria with AC1-AC8 (exact check context, uniqueness, public-safe check, SSOT docs, admin stop condition, merge queue)
    • B4: Replaced ## Verification Commands with LP016-format bare # AC<N> lines covering all 8 ACs
    • B5: Updated ## Allowed Paths to add tests/fixtures/agent-session-manifest/ for regression tests
    • B6: Added 2 new Stop Conditions (job name conflict, merge queue prerequisite)
    • B7: All unchanged sections (Machine-Readable Contract, Parent Issue, Background, Goal, Desired Destination, Out of Scope, Runtime Verification Applicability, Related, Source) preserved intact
  4. changed the title [-]feat: manifest validation gate を required-check に昇格する[/-] [+]実装: manifest validation gate を required-check に昇格する[/+] on May 31, 2026
  5. added
    agent/implementer
    on May 31, 2026
  6. squne121 commented on May 31, 2026

    @squne121
    OwnerAuthor

    Contract Snapshot (2026-05-31T05:11:32Z)

    • Outcome: .github/workflows/session-manifest.yml に manifest schema validation step と public-safe hard-fail check が追加され、required check 運用を docs で再現できる状態
    • Acceptance Criteria: AC1-AC8
    • Verification Commands: 8 commands, baseline fail expected = 8
    • Allowed Paths: .github/workflows/session-manifest.yml, docs/dev/session-recording-policy.md or docs/dev/ci-required-checks.md, tests/fixtures/agent-session-manifest/
    • Worktree: .claude/worktrees/issue-432-manifest-validation-gate-required-check
    • Branch: worktree-issue-432-manifest-validation-gate-required-check
    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-05-31T05:11:32Z"
      generated_by: issue-contract-review
      issue_url: "https://github.com/squne121/loop-protocol/issues/432"
      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: 8
          vc_passed_unexpectedly: 0
          vc_unrunnable: 0
          vc_expected_pass: 0
          vc_skipped: 0
          vc_human_judgment: 0
          classifications:
            - ac: AC1
              command: "rg -n 'pnpm manifest:check artifacts/.+\\.json' .github/workflows/session-manifest.yml"
              exit_code: 1
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              evidence:
                stdout_excerpt: ""
                stderr_excerpt: ""
              decision: go
            - ac: AC2
              command: "rg -n 'pnpm manifest:check' .github/workflows/session-manifest.yml"
              exit_code: 1
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              evidence:
                stdout_excerpt: ""
                stderr_excerpt: ""
              decision: go
            - ac: AC3
              command: "rg -rn 'agent-session-manifest / validate-generated-artifact' docs/"
              exit_code: 1
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              evidence:
                stdout_excerpt: ""
                stderr_excerpt: ""
              decision: go
            - ac: AC4
              command: "rg -n 'validate-generated-artifact' .github/workflows/session-manifest.yml"
              exit_code: 1
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              evidence:
                stdout_excerpt: ""
                stderr_excerpt: ""
              decision: go
            - ac: AC5
              command: "rg -n 'FAIL.*token-like\\|token-like.*detected' .github/workflows/session-manifest.yml"
              exit_code: 1
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              evidence:
                stdout_excerpt: ""
                stderr_excerpt: ""
              decision: go
            - ac: AC6
              command: "rg -rn 'branch protection\\|ruleset' docs/"
              exit_code: 1
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              evidence:
                stdout_excerpt: ""
                stderr_excerpt: ""
              decision: go
            - ac: AC7
              command: "rg -rn 'required_status_checks\\|admin.*stop condition\\|stop condition.*admin' docs/"
              exit_code: 1
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              evidence:
                stdout_excerpt: ""
                stderr_excerpt: ""
              decision: go
            - ac: AC8
              command: "rg -rn 'merge_group\\|merge queue' .github/workflows/session-manifest.yml docs/"
              exit_code: 1
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              evidence:
                stdout_excerpt: ""
                stderr_excerpt: ""
              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
          conditions:
            docs_product_requires_spec_evidence:
              status: pass
              evidence: []
            tasks_md_not_direct_source:
              status: pass
              evidence: []
            specify_not_canonical:
              status: pass
              evidence: []
            diff_first_rationale_present:
              status: pass
              evidence: []
            generated_task_trace_present:
              status: pass
              evidence: []
            task_dependencies_materialized:
              status: pass
              evidence: []
          blocked_reasons: []
        worktree_branch_collision: clear
      next_action: implement_issue
      blocked_reasons: []
      warnings: []
    body_sha256: "sha256:ff8a82116a8d8ee07a56ffa6974f0745c28c3d6d1d02e3ac6f6166b01a6d9274"
  7. squne121 commented on May 31, 2026

    @squne121
    OwnerAuthor

    はい。少なくとも添付ログの #432 については、create-issue / edit-issue 側で Issue の ready tuple 正規化が漏れている疑いが強いです。

    根拠は次です。

    • 現在の title は feat: manifest validation gate を required-check に昇格する
    • labels は enhancement のみ
    • impl-review-loop は 実装: / implement: prefix と phase/implementation label を要求
    • その不一致で preparation 停止
    • 本文側の contract readiness / blocker / VC preflight / product-spec gate は通っている

    つまり、本文 contract は整っているのに、Issue の外側メタデータだけ canonical ready tuple に同期されていない状態です。

    修正対象としてはこう切るのが妥当です。

    create-issue:
      implementation issue を作る時点で
      - title prefix を 実装: / implement: に正規化
      - phase/implementation label を付与
      - enhancement 等の既存種別 label は維持
    
    edit-issue:
      issue_kind / phase / contract body / readiness に影響する編集後に
      - title prefix を再同期
      - phase/* label を再同期
      - 既存の不要な phase label を必要なら除去
      - 最後に gh issue view --json title,labels で postcondition 検証
    

    さらに、edit-issue には次の postcondition を入れるべきです。

    if issue_kind == implementation:
      assert title startswith ("実装:", "implement:")
      assert labels contains "phase/implementation"
    

    今回の #432 でいえば、最低限の修正はこれです。

    gh issue edit 432 \
      --title "実装: manifest validation gate を required-check に昇格する" \
      --add-label "phase/implementation"

    ただし、これだけでは完全ではなく、ログ上は CONTRACT_REVIEW_RESULT_V1 status: go コメントも未 materialize なので、issue-contract-review の正式実行も別途必要です。件名・ラベル漏れは create/edit の責務、contract snapshot 未作成は review flow の責務、と分けて直すのがよいです。

  8. squne121 commented on May 31, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-05-31T05:27:00Z)

    • PR: feat: enforce manifest validation required check (#432) #540
    • Worktree: .claude/worktrees/issue-432-manifest-validation-gate-required-check
    • Branch: worktree-issue-432-manifest-validation-gate-required-check
    • Contract Snapshot: 実装: manifest validation gate を required-check に昇格する #432 (comment)
    • Verification:
      • rg -n 'pnpm manifest:check artifacts/.+\.json' .github/workflows/session-manifest.yml : PASS
      • rg -n 'pnpm manifest:check' .github/workflows/session-manifest.yml : PASS
      • rg -n 'agent-session-manifest / validate-generated-artifact' docs/ : PASS
      • rg -n 'validate-generated-artifact' .github/workflows/session-manifest.yml : PASS
      • rg -n 'FAIL.*token-like\|token-like.*detected' .github/workflows/session-manifest.yml : PASS
      • rg -n 'branch protection\|ruleset' docs/ : PASS
      • rg -n 'required_status_checks\|admin.*stop condition\|stop condition.*admin' docs/ : PASS
      • rg -n 'merge_group\|merge queue' .github/workflows/session-manifest.yml docs/ : PASS
      • pnpm typecheck : PASS
      • pnpm lint : PASS
      • pnpm test : PASS (15 files / 266 tests)
      • pnpm build : PASS
    • 後続: PR checks 完了後に pr-review-judge 相当の verdict を記録
  9. added 3 commits that reference this issue on May 31, 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

    agent/implementerenhancementphase/implementation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions