Skip to content

baseline_vc_preflight に GitHub metadata readback 用の安全な assertion 経路を追加する #942

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "baseline_vc_preflight が GitHub milestone metadata readback を deterministic / non-mutating / exit-code based assertion として検証できるようにする"
change_kind: tooling

Parent Issue

none(単独改善)

Parent Goal Ref

Current Validated Scope

  • baseline_vc_preflight.py は現在 _ALLOWED_GH_PREFIXES(gh issue view / gh pr view / gh pr list / gh issue list / gh repo view)のみを許可し、gh api を command_not_allowed として block している(test_gh_api_is_blocked が回帰防止済み)。
  • negated search(! rg ...)は _is_negated_search_command() で静的に expected_fail / expected_baseline_fail / go 分類される実装が存在する。
  • references/vc-preflight.md は pr_review_only / runtime_only を skipped/go として扱う category 表を持つ。
  • 現状 baseline_vc_preflight.py には GitHub milestone metadata readback assertion(gh api --method GET の固定 argv 実行・JSON parse・contains/not_contains の exit code 変換)に相当する first-class command / allowlist validator / authoring guidance が存在しない。

Remaining Parent Gaps

本 Issue で閉じるギャップ:

本 Issue でも閉じないギャップ(Out of Scope):

Outcome

baseline_vc_preflight.py が、gh api の一般 allowlist 解禁ではなく、固定 argv の gh api --method GET repos/<owner>/<repo>/milestones/<number> を内部実行して JSON を Python 側で parse する first-class な GitHub metadata assertion を持ち、contains / not_contains を exit code(present/absent を 0 / non-zero)に変換できる。raw gh api と危険な flags / mutating method は引き続き block され、環境エラー(gh 不在・auth 失敗・404・rate limit・timeout・invalid JSON)は assertion の pass/fail と区別され false pass にならない。authoring guidance が 3 つの docs に同期され、既存の block テストが regression しない。

In Scope

  • .claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py:
    • GitHub milestone metadata readback assertion を first-class command(baseline_vc_preflight 自身の assertion サブコマンド/pseudo-command)として認識・分類する
    • 内部実行は固定 argv ["gh","api","--method","GET",f"repos/{owner}/{repo}/milestones/{number}"] を subprocess.run(..., shell=False) で行い、JSON を Python で parse して contains / not_contains を exit code に変換する
    • allowlist validator(例: _is_allowed_github_metadata_assert)で endpoint / method / flags を exact subset に限定する
  • .claude/skills/issue-contract-review/tests/: present/absent の exit code、各種 deny、環境エラー分類のテスト追加
  • docs 同期: body-authoring.md / issue-contract-review/SKILL.md / references/vc-preflight.md に GitHub metadata assertion の authoring guidance と禁止 raw gh api 例を追記

Out of Scope

Acceptance Criteria

  • AC1: baseline_vc_preflight.py が GitHub milestone metadata readback assertion を first-class command として認識・分類する(raw gh api の一般 allowlist 解禁ではない)
  • AC2: 許可される readback は method GET かつ endpoint 形 repos/<owner>/<repo>/milestones/<number> のみで、絶対 URL endpoint・query string(?)・path traversal(../)・placeholder endpoint は reject される
  • AC3: not_contains <literal> assertion は、対象 field に literal が含まれる場合 exit non-zero、含まれない場合 exit 0 を返す
  • AC4: contains <literal> assertion は、対象 field に literal が含まれる場合 exit 0、含まれない場合 exit non-zero を返す
  • AC5: raw gh api、および -f / -F / --field / --raw-field / --input / --header(-H)/ --include(-i)/ --paginate / --slurp / --cache / --template / --preview / graphql を含む invocation は block される
  • AC6: mutating method(--method POST/PATCH/PUT/DELETE、-X ...、--method=...、大文字小文字混在 variant)は block される
  • AC7: gh 不在 / auth 失敗 / 404 / rate limit / timeout / invalid JSON は assertion の pass/fail と区別される分類になり、false pass(exit 0)にならない
  • AC8: 既存の unsafe command / compound command / test_gh_api_is_blocked 系テストが regression しない
  • AC9: body-authoring.md / issue-contract-review/SKILL.md / references/vc-preflight.md に GitHub metadata assertion の authoring guidance(許可される形と禁止 raw gh api 例)が同期記載される
  • AC10: pnpm typecheck / pnpm lint / pnpm test / pnpm build が pass する

Runtime Verification Applicability

applicability: not_applicable
decision: not_applicable
reason: tooling script change(baseline_vc_preflight.py の assertion 追加とテスト・docs 同期)— runtime behavior / 起動するサーバーが無く、検証は pytest と静的 grep で完結する

Verification Commands

# AC1
$ uv run pytest .claude/skills/issue-contract-review/tests/test_github_metadata_assert.py -k github_metadata_assert_recognized
# AC2
$ uv run pytest .claude/skills/issue-contract-review/tests/test_github_metadata_assert.py -k github_metadata_assert_endpoint_subset
# AC3
$ uv run pytest .claude/skills/issue-contract-review/tests/test_github_metadata_assert.py -k github_metadata_assert_not_contains
# AC4
$ uv run pytest .claude/skills/issue-contract-review/tests/test_github_metadata_assert.py -k github_metadata_assert_contains
# AC5
$ uv run pytest .claude/skills/issue-contract-review/tests/test_github_metadata_assert.py -k github_metadata_assert_dangerous_flags_blocked
# AC6
$ uv run pytest .claude/skills/issue-contract-review/tests/test_github_metadata_assert.py -k github_metadata_assert_mutating_method_blocked
# AC7
$ uv run pytest .claude/skills/issue-contract-review/tests/test_github_metadata_assert.py -k github_metadata_assert_environment_error
# AC8
# baseline-expect: pass
$ uv run pytest .claude/skills/issue-contract-review/tests/ -k gh_api_is_blocked
# AC9
$ rg -c "github_metadata_assert" .claude/skills/create-issue/references/body-authoring.md
# AC9
$ rg -c "github_metadata_assert" .claude/skills/issue-contract-review/SKILL.md
# AC9
$ rg -c "github_metadata_assert" .claude/skills/issue-contract-review/references/vc-preflight.md
# AC10
$ pnpm typecheck
# AC10
$ pnpm lint
# AC10
$ pnpm test
# AC10
# preflight-scope: runtime_only
$ pnpm build

Allowed Paths

  • .claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py
  • .claude/skills/issue-contract-review/tests/**
  • .claude/skills/create-issue/references/body-authoring.md
  • .claude/skills/issue-contract-review/SKILL.md
  • .claude/skills/issue-contract-review/references/vc-preflight.md

Stop Conditions

  • raw gh api を VC command として一般許可する必要が出た場合(→ 本 Issue の安全方針に反するため停止)
  • mutating gh api(書き込み)の許可が必要になった場合
  • assertion ロジックを baseline_vc_preflight.py 単一ファイルに収められず、新規 helper module の追加が必要になった場合(→ Scope Delta + contract 再レビューが必要)
  • checker 以外の src/ 変更が必要になった場合
  • Allowed Paths 外の変更が必要と判明した場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • main への直接 push、force push が必要と判明した場合
  • secret 取得・表示が必要と判明した場合
  • GitHub 権限不足で操作が失敗した場合

Required Skills

  • Python subprocess(shell=False 固定 argv 実行)と JSON parse
  • GitHub CLI gh api の flag surface と read/write 境界(GET milestone vs PATCH/DELETE)の理解
  • baseline_vc_preflight の command classification / scope_class / skipped semantics
  • pytest による deny-list / exit-code 回帰テスト設計

Scope Delta(任意)

原 Issue(AC 6 個・Allowed Paths 3 件)からの差分。差分の出所は #942 の anchor comment(issuecomment-4712275602、Request Changes / BLOCK レビュー)であり、unilateral なスコープ拡張ではなく authoritative review decision の反映である。

  • AC を 6 → 10 に拡張(exit-code deterministic 化、deny surface の網羅、環境エラー分類の追加)。新 AC はいずれも従来より検証可能性が高い。
  • 設計を「raw gh api --method GET subset の許可」から「baseline_vc_preflight 内 first-class assertion(固定 argv + Python JSON parse + exit code 変換)」へ変更。
  • Allowed Paths に issue-contract-review/SKILL.md と references/vc-preflight.md を追加(category / classification の docs drift 防止)。同一 skill 内に閉じており、新規アーキテクチャ層の追加ではない。

Delivery Rule

  • 1 Issue = 1 PR
  • worktree: impl/942-github-metadata-assert
  • Draft PR で開始し、検証 green 後に ready for review へ変更
  • PR body に「raw gh api を解禁していないこと」「許可された endpoint/method/flags の exact subset」「deny テスト一覧」「環境エラー分類」を記録する

Notes for Reviewer

Activity

  1. squne121 commented on Jun 15, 2026

    @squne121
    OwnerAuthor

    判定: Request Changes / BLOCK 推奨

    #942 の問題意識は正しいです。#931 で Milestone #3 description の禁止語句 absence check が必要になったが、baseline_vc_preflight.py が gh api を block し、Issue 本文側で # preflight-scope: pr_review_only workaround に逃げた、という起点は確認できます。#942 本文も、gh api ... --jq '.description' が「出力するだけ」で absence/presence assertion の exit code にならない点を明示しています。

    ただし、この Issue は現状のままだと 「安全な GitHub metadata assertion 経路」ではなく、「gh api の危険な一部解禁」になりやすいです。gh api は GitHub CLI 公式仕様上、endpoint と flags 次第で GET / POST / PATCH / GraphQL / request body / header / pagination / cache / template 出力まで触れる汎用 API クライアントです。-f / -F を付けると request parameters が追加され、通常 POST に切り替わる仕様もあります。([GitHub CLI]1)

    #942 自体にはコメントがありませんでした。 そのため、関連判断材料は #931 の refinement コメント、#913 の milestone metadata 実行 Issue、PR #854 / #739 の M3 persistence 文脈、そして現行 baseline_vc_preflight.py 実装です。

    主要な敵対的指摘

    BLOCKER 1: 「gh api --method GET subset 許可」は表現が広すぎる

    #942 AC1 は gh api --method GET repos/<owner>/<repo>/milestones/<number> を safe として扱う、としています。しかし GitHub CLI の gh api は --method, --field, --raw-field, --input, --header, --paginate, --slurp, --cache, --template, graphql などを持つ汎用 surface です。特に -F は @file / @- でファイルや stdin を読み、--input も request body をファイル/stdin から読むため、VC preflight の「read-only metadata check」とは別種の I/O surface を開きます。([GitHub CLI]1)

    現行実装はこの危険を理解しており、_ALLOWED_GH_PREFIXES は gh issue view, gh pr view, gh pr list, gh issue list, gh repo view だけを許可し、コメントで gh api は mutation potential のため block と明記しています。 実際の classifier も gh api を allowlist 外として command_not_allowed に落とします。 さらにテストにも test_gh_api_is_blocked() があり、gh api repos/owner/repo/issues は blocked / command_not_allowed / exit_code None を期待しています。

    修正方針: raw gh api を VC command として一般許可しないでください。どうしても許可するなら、_is_allowed_gh_api_readback(argv) のような専用 validator を作り、次のような exact subset に絞るべきです。

    allowed:
      gh api --method GET repos/squne121/loop-protocol/milestones/<integer>
    
    blocked:
      -X POST / PATCH / PUT / DELETE
      --method=POST / --method PATCH / lowercase mixed variants
      -f / --raw-field / -F / --field
      --input
      --header / -H
      --include / -i
      --paginate / --slurp
      --cache
      --template
      --preview
      graphql
      absolute URL endpoint
      endpoint containing ? query, ../ traversal, braces placeholders, or non-target repo
    

    BLOCKER 2: --jq を assertion exit code として扱う設計は脆い

    #942 の背景認識どおり、gh api ... --jq '.description' は readback 表示であって assertion ではありません。GitHub CLI manual は --jq を「response から値を選択する query」と説明していますが、boolean false を assertion failure にする契約は gh api --jq には明示されていません。(GitHub CLI) 一方、jq 本体では --exit-status / -e を使った場合だけ、最後の出力が false / null なら exit 1、結果なしなら exit 4 になると明記されています。([JQ Language]2)

    つまり、次のような VC は危険です。

    $ gh api --method GET repos/squne121/loop-protocol/milestones/3 --jq '.description | contains("reload 後に復元する") | not'

    これは false を出しても exit 0 になり得るため、baseline_vc_preflight の「exit code で判定する」契約に適合しません。現行 skill も AC は決定論的な exit code / 数値比較で検証可能であることを求めています。

    修正方針: jq expression をそのまま VC surface に出さず、Python 側で JSON を parse して boolean を exit code に変換する専用 helper に寄せてください。subprocess.run([...], shell=False) で固定 argv を組めば、Python 公式 docs の security consideration 上も shell metacharacter を shell が解釈しない構造にできます。([Python documentation]3)

    BLOCKER 3: ! rg 型の absence check と metadata assertion を混同している

    #931 レビューでは、禁止語句 absence は ! rg -n ... + positive grep にすべきだという指摘がありました。これは repo file の静的 grep なら妥当です。 しかし GitHub metadata readback では同じ設計を使えません。

    現行 baseline_vc_preflight.py は negated search command を _is_negated_search_command() で検出し、実行前に expected_fail / expected_baseline_fail / go と静的分類します。 これは「実装前 baseline で禁止語句がまだ存在するので ! rg は fail する」という preflight 用の扱いであって、実装後に GitHub metadata が本当に修正されたことを読む assertion helper ではありません。

    修正方針: #942 の AC3/AC4 は「forbidden phrase present/absent を exit code で表現する経路がある」では弱いです。次のように、baseline classification と実行後 assertion を分けてください。

    - baseline preflight: assertion command は現在の metadata 状態に応じて expected_fail / unexpected_pass を正しく分類する
    - post-implementation verification: same command が live readback を実行し、absent なら exit 0、present なら exit 1
    - skipped/environment: gh missing, auth missing, repo not found, rate limit, API 5xx は assertion failure と区別する
    

    BLOCKER 4: GitHub REST milestone API の read/write 境界が AC に埋め込まれていない

    GitHub REST API では milestone の GET は GET /repos/{owner}/{repo}/milestones/{milestone_number} で、read permission か public resource なら利用可能です。一方、Update milestone は PATCH /repos/{owner}/{repo}/milestones/{milestone_number} で write permission を要求し、title, state, description, due_on を変更できます。Delete は DELETE です。([GitHub Docs]4)

    #942 の Out of Scope は mutating method を block と書いていますが、AC/VC には「GET milestone のみを allow し、PATCH/DELETE/create/list/graphql は deny」という検証が不足しています。gh api --method GET という文字列だけを見て通すと、endpoint や flags によって readback 以外の挙動が混入します。

    修正方針: allowlist は HTTP method だけでなく、endpoint schema と resource kind まで固定してください。最低限、初回実装は milestone description の readback だけに絞るべきです。

    resource_kind: milestone
    allowed endpoint: repos/squne121/loop-protocol/milestones/<number>
    allowed fields: title | description | state | number | open_issues | closed_issues | due_on
    assertions: equals | contains | not_contains | regex_match | regex_not_match
    

    BLOCKER 5: Allowed Paths と docs scope が不足している

    #942 の In Scope は baseline_vc_preflight.py、テスト、body-authoring.md を含みます。これは最低限としては良いです。 しかし実際に baseline_vc_preflight の command category / scope_class / skipped semantics を変えるなら、issue-contract-review/SKILL.md と references/vc-preflight.md も同期対象に入れるべきです。現行 vc-preflight.md は pr_review_only / runtime_only は skipped/go であり、通常の baseline_fail_expected と別扱いだと説明しています。

    このままだと、実装は新しい github_metadata_readback category を持つが、skill docs は古い category table のままという drift が起きます。

    修正方針: Allowed Paths に最低限以下を追加してください。

    .claude/skills/issue-contract-review/references/vc-preflight.md
    .claude/skills/issue-contract-review/SKILL.md
    

    また、ディレクトリ指定は gate 互換のため、曖昧な trailing slash より .../tests/** のような recursive pattern に寄せる方が安全です。PR #802 のレビューでも、Allowed Paths の trailing-slash directory entry が review gate と噛み合わず fail_closed になった事例があります。

    実装提案: raw gh api 解禁ではなく pseudo-command / helper 化

    推奨は、VC command として raw gh api を許可するのではなく、baseline_vc_preflight.py 内で扱う pseudo-command を追加することです。

    # AC3
    $ github-metadata-assert milestone-description-absent --repo squne121/loop-protocol --milestone 3 --literal "reload 後に復元する"

    内部処理は次のようにします。

    argv = [
        "gh",
        "api",
        "--method",
        "GET",
        f"repos/{owner}/{repo}/milestones/{milestone_number}",
    ]
    result = subprocess.run(
        argv,
        capture_output=True,
        text=True,
        timeout=10,
        shell=False,
    )
    payload = json.loads(result.stdout)
    description = payload.get("description") or ""
    return 1 if forbidden in description else 0

    この方式なら、VC author は gh api の多すぎる flags を触れません。--jq の exit code 問題も避けられます。stdout には full milestone JSON を出さず、次のような最小 artifact だけを返すべきです。

    {
      "resource_kind": "milestone",
      "repo": "squne121/loop-protocol",
      "number": 3,
      "field": "description",
      "assertion": "not_contains",
      "literal_sha256": "<hash>",
      "matched": false,
      "result": "pass"
    }

    秘密情報を扱う surface ではありませんが、GitHub metadata は workflow evidence としてログに残るため、full response をそのまま stdout に流す必要はありません。

    改訂 AC 案

    ## Acceptance Criteria
    
    - [ ] AC1: `baseline_vc_preflight.py` が GitHub milestone metadata readback assertion を first-class command として扱える。raw `gh api` の一般 allowlist 解禁ではない。
    - [ ] AC2: 許可される readback は `GET repos/squne121/loop-protocol/milestones/<number>` のみで、field は `title / description / state / number / open_issues / closed_issues / due_on` に限定される。
    - [ ] AC3: `description not_contains <literal>` assertion は、literal が含まれる場合 exit non-zero、含まれない場合 exit 0 を返す。
    - [ ] AC4: `description contains <literal>` assertion は、literal が含まれる場合 exit 0、含まれない場合 exit non-zero を返す。
    - [ ] AC5: `gh api` raw command、`-f/-F/--field/--raw-field/--input/--header/--include/--paginate/--slurp/--cache/--template/--preview/graphql`、および mutating method は block される。
    - [ ] AC6: `gh api --method PATCH/POST/PUT/DELETE`, `-X PATCH`, `--method=PATCH`, lowercase/mixed-case method variants は block される。
    - [ ] AC7: `gh missing`, auth failure, 404, rate limit, timeout, invalid JSON は assertion failure と区別した `env_missing_dep` / `github_metadata_readback_error` / `human_judgment` 等の分類になる。
    - [ ] AC8: `body-authoring.md`, `issue-contract-review/SKILL.md`, `references/vc-preflight.md` に GitHub metadata assertion の authoring guidance と禁止 raw `gh api` 例が同期されている。
    - [ ] AC9: 既存の unsafe / compound / command_not_allowed / regression_gate テストが regress しない。
    - [ ] AC10: `pnpm typecheck`, `pnpm lint`, `pnpm test`, `pnpm build` が pass する。

    追加すべきテスト

    def test_github_metadata_assert_milestone_description_absent_passes_when_absent():
        ...
    
    def test_github_metadata_assert_milestone_description_absent_fails_when_present():
        ...
    
    def test_raw_gh_api_remains_blocked():
        ...
    
    def test_gh_api_patch_is_blocked_even_with_method_get_elsewhere():
        ...
    
    def test_gh_api_field_flags_are_blocked():
        ...
    
    def test_gh_api_input_header_paginate_cache_template_are_blocked():
        ...
    
    def test_gh_api_graphql_is_blocked():
        ...
    
    def test_github_metadata_assert_auth_failure_is_environment_error_not_false_pass():
        ...
    
    def test_github_metadata_assert_invalid_json_is_blocked_or_human_judgment():
        ...

    #931 / #913 / #854 との関連評価

    #942 は #931 の単なる便利機能ではありません。#931 レビューでは、Milestone #3 description の禁止語句 readback が preflight-scope: pr_review_only workaround になっており、さらに #931 自体も docs-only cleanup としては範囲不足、E2E 証跡の主張過剰、rg -c absence check の exit code 問題、pnpm build だけでは docs lint 不足と指摘されています。

    #913 では milestone metadata の PATCH / readback / close 運用がすでに問題化しており、GitHub UI 目視や stale cache を PASS にしない、gh api / gh issue list の CLI readback のみを PASS とする、という運用方針が書かれています。 #942 はこの運用を preflight に取り込む Issueなので、--cache を許す設計や stdout 目視に戻る設計は逆行です。

    PR #854 は M3 persistence の実装側で、reward claim 後に persistProgressionSnapshot('reward-claim') を呼ぶ wiring と progression-only snapshot test を追加していますが、レビュー上は save failure 時の hasLoadableSnapshot = false、reward-claim save wiring 未証明、HTTP origin evidence の弱さが問題化しています。 つまり #942 の価値は「GitHub metadata readback だけを通す」ことではなく、M3 close gate の証跡全体を exit-code deterministic にすることです。

    GitHub に貼るレビューコメント案

    Request Changes / BLOCK.
    
    #942 の問題意識は正しいです。#931 で Milestone #3 description の forbidden phrase absence check が必要になったが、baseline_vc_preflight.py が raw `gh api` を block し、`preflight-scope: pr_review_only` workaround に逃げた点は実際の root cause です。
    
    ただし、現在の #942 contract は危険です。`gh api --method GET` subset 許可という表現が広すぎます。GitHub CLI の `gh api` は `-f/-F/--input/--header/--paginate/--slurp/--cache/--template/graphql` まで持つ汎用 API client であり、field flags は method switching や file/stdin read surface を含みます。raw `gh api` を VC command として一般解禁すべきではありません。
    
    Blockers:
    
    1. `gh api --jq` を assertion exit code として扱う設計は不可。`--jq` は output filter であり、false/null を failure にする jq の契約は `jq -e` 側のものです。Python helper 側で JSON を parse し、contains/not_contains を exit code に変換してください。
    2. raw `gh api` allowlist ではなく、`github-metadata-assert` のような first-class pseudo-command / helper にしてください。内部で fixed argv の `gh api --method GET repos/squne121/loop-protocol/milestones/<n>` だけを実行する設計が安全です。
    3. `-f/-F/--field/--raw-field/--input/--header/--include/--paginate/--slurp/--cache/--template/--preview/graphql`、mutating method、absolute URL endpoint、query string、path traversal、repo placeholder は deny test 必須です。
    4. `! rg` 型 absence check と GitHub metadata assertion を混同しないでください。現行 baseline_vc_preflight は negated search を静的 expected_fail として分類するため、live metadata readback assertion とは別物です。
    5. `body-authoring.md` だけでなく `issue-contract-review/SKILL.md` と `references/vc-preflight.md` も同期対象に入れてください。新 category / scope_class / error classification を docs に残さないと workflow drift が起きます。
    6. gh missing/auth failure/404/rate limit/timeout/invalid JSON を assertion failure と区別する classification を定義してください。
    
    この Issue は「gh api を少し許可する」Issueではなく、「GitHub metadata readback を deterministic, non-mutating, exit-code based assertion として preflight に導入する」Issueとして書き直すべきです。

    結論として、#942 は 方向性 GO、現契約は BLOCK です。安全な着地点は raw gh api の allowlist 拡張ではなく、GitHub metadata assertion を baseline_vc_preflight の専用機能として閉じ込める実装です。

  2. squne121 commented on Jun 15, 2026

    @squne121
    OwnerAuthor

    Refinement Loop: Approved

    The issue has been approved and is ready for implementation.

  3. squne121 commented on Jun 15, 2026

    @squne121
    OwnerAuthor

    VC 修正記録(impl-review-loop preflight 由来)

    issue-contract-review の deterministic preflight 実行時、AC1–AC7 の Verification Command が baseline_vc_preflight.py で blocked 判定となったため、実装スコープを変えずに VC 形式のみを修正した。

    修正内容

    AC1–AC7 の対象を …/tests/ -k <name> から …/tests/test_github_metadata_assert.py -k <name> へ変更(specific file 参照化)。

    理由

    • pytest …/tests/ -k <未作成テスト名> は baseline で 0 件収集 → exit 5 となり、baseline_vc_preflight.py は exit 5 を「typo / wrong path と未作成を区別できない」として常に vc_no_tests_collected / blocked に分類する(baseline-expect: fail annotation でも override されない)。
    • 未作成の specific file を参照すると baseline で pytest が exit 4 + ERROR: file or directory not found: を返し、preflight は expected_baseline_fail / go と決定論的に分類できる。
    • 実装は AC1–AC7 のテストを tests/test_github_metadata_assert.py に作成すれば post-impl で collect & pass する。tests/** は既に Allowed Paths 内のためスコープ拡張ではない。

    不変点

    • AC8(tests/ -k gh_api_is_blocked、# baseline-expect: pass)は既存ファイル参照で baseline pass のため変更なし。
    • Outcome / In Scope / Out of Scope / Allowed Paths / AC の意味内容は不変。VC の baseline 検証可能性のみを改善。
  4. squne121 commented on Jun 15, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-06-15T21:27:51Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/942
      body_sha256: "sha256:2c317d6a4a5bd7dd04810328267c9fe24a2e30a32a7347636fd947185928029e"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        vc_preflight: pass
      source: ensure_contract_snapshot_auto
  5. added 3 commits that reference this issue on Jun 17, 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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions