Skip to content

実装: verify-vitest-discovery-policy.mjs を CI 常設 gate として追加する #1569

Open

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: none
goal_ref: "scripts/verify-vitest-discovery-policy.mjs の runtime sentinel probe を、既存 jobs.test 内で pnpm test とは別の CI step として常設し、discovery exclusion の regression を継続検証する"
change_kind: workflow

Runtime Verification Applicability

decision: deferred
reason: "この Issue の変更はCI workflowのみであり、probeの実行結果・artifact・run metadataは実装PRのcurrent CI runで初めて確定する。ローカル実行は実装PRのCI証跡を代替しない。"
deferred_destination:
  destination_type: phase
  destination_ref: "implementation PR の current CI run"
deferred_verification_condition: "実装PRのcurrent headに対する jobs.test 実行が完了し、probeのexit status、upload artifact、run_id/run_attempt、checkout SHAを同一runの証跡として取得できること。"

Parent Issue

なし(単独改善)

Parent Goal Ref

  • Goal: N/A(単独改善 Issue のため)
  • Desired Destination: N/A(単独改善 Issue のため)

Current Validated Scope

  • 既存 jobs.test の Manifest check (timed) の直後かつ Test (timed) の直前に、node scripts/verify-vitest-discovery-policy.mjs を実行する独立stepを追加する。
  • probe failure後の非cancelled実行でも、main artifactまたはwrite-failed fallback artifactを存在確認してGitHub Actions artifactとしてuploadする。

Remaining Parent Gaps

なし(単独改善 Issue のため)

Outcome

既存 jobs.test に限定してruntime sentinel probeを常設し、probe失敗時も診断artifactを失わず、implementation PRのcurrent CI runからprobe結果・artifact・性能影響を判定できる状態にする。

In Scope

  • .github/workflows/ci.yml の既存 jobs.test.steps に、Manifest check (timed) の後、Test (timed) の前で実行される独立のprobe stepを追加する。
  • probe stepは node scripts/verify-vitest-discovery-policy.mjs のみを実行し、continue-on-error を設定せず、非zero exitでjobをfailさせる。
  • probe stepの後に、if: ${{ !cancelled() }} で実行するartifact upload stepを追加する。artifacts/verify-vitest-discovery-policy.json と artifacts/verify-vitest-discovery-policy.write-failed.json のいずれかが存在することをupload actionに検証させ、両方ない場合はfailさせる。
  • upload stepは actions/upload-artifact@v7、${{ github.run_id }} と ${{ github.run_attempt }} を含む一意name、if-no-files-found: error、retention-days: 30 を使う。
  • implementation PRでactionlintとYAML semantic verificationを実行し、step順序、既存stepのsiblings、新job不追加、continue-on-error 不在、upload条件/action/version/path/missing-file policyを確認する。
  • probe内部の pnpm test と既存 Test (timed) の二重実行コストを、CI performance evidenceのruntime deltaとして記録する。

Out of Scope

  • scripts/verify-vitest-discovery-policy.mjs、package.json、pnpm_gate_registry.py、テスト実装の変更。
  • jobs.test 以外のjob追加・削除・並列化・workflow全体の再設計。
  • artifactの head_sha をcheckout SHA以外へ変更すること。

Acceptance Criteria

  • AC1: .github/workflows/ci.yml の既存 jobs.test.steps に、Manifest check (timed) の直後かつ Test (timed) の直前で node scripts/verify-vitest-discovery-policy.mjs を実行する独立stepがある。新jobを追加せず、既存のManifest checkとTest stepはsiblingsとして残る。
  • AC2: AC1のprobe stepには continue-on-error がなく、node scripts/verify-vitest-discovery-policy.mjs の非zero exitにより jobs.test がfailする。
  • AC3: AC1の直後にあるartifact upload stepは、if: ${{ !cancelled() }}、actions/upload-artifact@v7、${{ github.run_id }} と ${{ github.run_attempt }} を含む一意name、retention-days: 30、if-no-files-found: error を持ち、main artifactとwrite-failed fallback artifactの両pathをupload対象にする。非cancelledなprobe failure後に両pathが無ければupload stepがfailする。
  • AC4: implementation PRでactionlintとYAML semantic verificationを実行し、AC1からAC3のstep順序、siblings、新job不追加、continue-on-error 不在、upload条件/action/version/path/missing-file policyをmachine-checkableに確認する。
  • AC5: implementation PRのcurrent CI runで、probeのstatus、artifact upload、run_id/run_attempt、checkout SHA、CI_TEST_PERFORMANCE_DECISION_V1、TEST_VERDICT_MACHINE、CI_CHECK_RUN_SCOPED、ci_runtime_baseline_v1 deltaをPR evidenceとして提示する。probe内部の pnpm test と既存 Test (timed) の二重実行コストをdeltaに明記する。

Verification Commands

# AC1
# preflight-scope: pr_review_only
$ actionlint .github/workflows/ci.yml

# AC2
# preflight-scope: pr_review_only
$ actionlint .github/workflows/ci.yml

# AC3
# preflight-scope: pr_review_only
$ actionlint .github/workflows/ci.yml

# AC4
# preflight-scope: pr_review_only
$ actionlint .github/workflows/ci.yml

# AC5
# preflight-scope: runtime_only
$ python3 .claude/skills/ci-test-performance/scripts/ci_verdict_summary.py --help

YAML semantic verificationは、implementation PRで jobs.test.steps を構造として読み、AC1からAC3の要件(step順序、siblings、新job不追加、continue-on-error 不在、if、action/version、path、if-no-files-found)を個別assertionとして実行する。actionlintだけの通過をsemantic verificationの代替にしてはならない。

Allowed Paths

  • .github/workflows/ci.yml

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
  • jobs.test 以外への配置、新job追加、既存stepの削除・移動、workflow全体の構成変更が必要と判明した場合。
  • probeのmain artifactとwrite-failed fallback artifactの両方が非cancelled実行でupload不能となる設計上の制約が判明した場合。
  • actionlintまたはYAML semantic verificationを、Allowed Paths内のworkflow変更だけでは満たせない場合。
  • current CI runのevidenceでartifact head_sha がcheckout SHAであり、PR head SHAとの一致を要求する必要が判明した場合。probe実装の変更は本Issue外のため、既存のcanonical open Issueを確認し、なければ専用follow-up Issueを起票して停止する。
  • CI runtime deltaで、probe内部の pnpm test による二重実行コストが受容基準を超えると判定された場合。

Required Skills

  • ci-test-performance

Required Design References

  • docs/dev/workflow.md
  • docs/dev/ci-performance.md
  • .claude/skills/ci-test-performance/SKILL.md

Notes for Reviewer

  • probeは pnpm test を内部実行するため、既存 Test (timed) と二重実行になる。最適化済みとの主張はせず、ci_runtime_baseline_v1 のbefore/after deltaとcurrent CI runのjob evidenceを提示する。
  • uploadはprobe step失敗後にも到達する必要があるため、if: ${{ !cancelled() }} を必須とする。pathにはmain artifactとwrite-failed fallback artifactを列挙し、if-no-files-found: error で無証跡の成功を禁止する。
  • head_sha は現行probeがcheckout上で得る値である。PR head SHAとの意味的同一性を本Issueで推測しない。必要ならStop Conditionsに従い専用follow-upへ分離する。
  • PR evidenceには CI_TEST_PERFORMANCE_DECISION_V1、TEST_VERDICT_MACHINE、CI_CHECK_RUN_SCOPED、ci_runtime_baseline_v1 deltaを含める。

Activity

  1. squne121 commented on Jul 18, 2026

    @squne121
    OwnerAuthor

    判定

    REQUEST_CHANGES — Blocker 3件、Major 5件。現状のIssue契約では、そのまま実装着手すべきではありません。

    CI常設化という方向は正しいです。#1545 / PR #1559 で実装されたprobeも、初期レビューで発見されたcleanup・false-pass・process failureの問題を修正済みであり、常設gateの素材としては十分に強くなっています。一方、#1569の契約は「CI上に文字列が存在すること」しか検証しておらず、実際に必要な非zero伝播、失敗時artifact、CI判定系への組み込み、artifact provenance、追加コストを固定できていません。#1569自体には現時点でコメントがないため、以下は実装差分ではなくIssue契約へのレビューです。

    妥当な点

    #1545からCI常設化を別Issueへ分離した判断は妥当です。probeは内部で本物のpnpm testを実行するため、通常のVitest suiteへ直接組み込むと再帰構造になります。PR #1559の最終実装は、常時throwするsentinel、一意な子ディレクトリ、vitest list --filesOnly --jsonによる構造化判定、spawnのstatus/signal/error検査、cleanup失敗のfail-closeを備えています。

    Vitest側の技術選択も適切です。Vitestの既定excludeは限定的で、追加--excludeはroot相対で扱われます。またvitest list、--filesOnly、JSON出力は、テストを実行せずdiscoveryを機械判定する正式なCLIです。([Vitest]1)


    Blocker

    1. Runtime Verification Applicabilityが誤っている

    Issueは次の理由でdecision: not_applicableとしています。

    CI変更は静的YAML変更であり、実行結果はActionsログとartifactで確認できる。

    これはnot applicableの理由ではなく、deferredの定義そのものです。今回証明したいのは次の実行時挙動です。

    • probeが実際に起動する
    • probeの非zeroがjob failureになる
    • probe失敗後もupload stepが実行される
    • artifactが実際にActions上で取得できる
    • JSONが期待するschema・status・SHAを持つ

    これらはrgやYAML静的検査だけでは証明できません。リポジトリ内の類似Issue #898も、CI artifact生成・uploadについてdecision: deferredとし、implementation PRのCI runを検証先に指定しています。

    必須修正

    Runtime Verification Applicability:
      decision: deferred
      reason: >
        probe の exit code 伝播、失敗後の artifact upload、
        GitHub Actions artifact の実在は実際の workflow run が必要。
      deferred_destination:
        destination_type: implementation_pr_ci
        destination_ref: "#1569 implementation PR CI run"
      required_evidence:
        - test job が current PR run で実行されたこと
        - probe 成功runでartifactが存在すること
        - artifact JSONがschema v2としてparse可能であること
        - probe非zero時にjobがfailureになる構造的またはcanary evidence
        - probe失敗後もupload stepが実行されること

    2. 「別job」案は現在のCI判定系に接続されない

    Issueは「既存test jobとは別、または既存job内の別step」を許容しています。しかし現在のci-verdict-summaryは、typecheck、lint、test、build、e2e、python-test、node-backed-hook-tests、actionlintを固定的にneedsとNEEDS_JSONへ列挙しています。新しいjobを追加しても、canonical CI verdict artifactには入りません。

    さらに、consumer側のCLASSIFICATION_MAPとREQUIRED_CHECKSも固定集合です。新しいjobを正規gateとして扱うには、少なくとも判定スクリプト、fixture test、設計文書の更新が必要であり、.github/workflows/ci.ymlだけというAllowed Pathsでは完結しません。

    新job自体がGitHub上で失敗することと、リポジトリのcanonical merge-ready判定に取り込まれることは別問題です。

    必須修正

    Issueの選択肢を次に限定してください。

    既存のtest job内に、既存Test (timed)とは別のstepとして追加する。新規jobは本Issueでは禁止する。

    新規jobを本当に採用するなら、Allowed Pathsを少なくとも以下まで拡大する必要があります。

    .github/workflows/ci.yml
    .claude/skills/pr-review-judge/scripts/ci_verdict_summary_v2.py
    .claude/skills/pr-review-judge/scripts/tests/
    docs/dev/ci-operations.md
    

    その場合は現在のStop Conditionに到達します。

    3. 「成功・失敗どちらでも毎回artifact upload」は現行probeでは達成不能

    GitHub Actionsのstepは、明示的なstatus functionがなければ実質的にsuccess()条件で動きます。したがってprobeが失敗した後にuploadするには、upload stepへif: ${{ !cancelled() }}等を明示する必要があります。GitHubも、成功・失敗を問わず後処理を実行しつつcancel時は止めたい場合、!cancelled()を推奨しています。([GitHub Docs]2)

    それだけでは足りません。現行probeにはartifactが生成されない失敗経路があります。

    • node_modules/.bin/vitestがなければ、ensureEnvironment()がartifact objectの初期化前にprocess.exit(3)する。
    • main artifactのwriteに失敗した場合、別名のverify-vitest-discovery-policy.write-failed.jsonへbest-effort保存する。Issueが指定するmain pathだけをuploadすると、この診断artifactを取得できない。
    • probeより前のinstallやmanifest checkが失敗した場合、probe自体が実行されずartifactは存在しない。
    • workflowがcancelされた場合、artifact uploadの完遂は保証できない。

    したがって「毎回」は成立しません。

    契約を次のいずれかに変更する必要があります。

    狭い修正:

    probeが起動し、artifact書き込み処理へ到達した非cancelled runでは、probe成功・失敗を問わずmainまたはwrite-failed artifactをuploadする。

    強い修正:

    environment-blocked時にもartifactを生成するようprobeを変更する。

    後者はscripts/verify-vitest-discovery-policy.mjsがAllowed Paths外なので、scope deltaが必要です。


    Major

    4. ACとVerification Commandsが挙動を検証していない

    現在のVCは次の2件だけです。

    rg -n -F -- "node scripts/verify-vitest-discovery-policy.mjs" .github/workflows/ci.yml
    rg -n -F -- "verify-vitest-discovery-policy.json" .github/workflows/ci.yml

    これは以下の壊れた実装でもPASSします。

    • コメント内に文字列だけ存在する
    • 別jobや到達不能なstepに置かれている
    • probe stepにcontinue-on-error: trueがある
    • upload stepにifがなく、probe失敗時にskipされる
    • if-no-files-found: warnでartifact欠落を黙認する
    • probeと通常testが同じshell stepに入っている
    • artifact pathが別stepの無関係な設定に現れる
    • uploadがprobeより前に置かれている

    また、AC2の「probe実行stepにupload-artifact相当の記述」という表現も不正確です。run:によるprobe実行とuses: actions/upload-artifactは、明確に別の兄弟stepとして定義すべきです。現行workflowでもartifact uploadは独立stepです。

    最低限、YAMLをparseして構造を検証してください。リポジトリには既にyamlパッケージがあります。

    例:

    actionlint .github/workflows/ci.yml
    
    node --input-type=module <<'NODE'
    import fs from 'node:fs'
    import assert from 'node:assert/strict'
    import YAML from 'yaml'
    
    const workflow = YAML.parse(
      fs.readFileSync('.github/workflows/ci.yml', 'utf8'),
    )
    const steps = workflow.jobs.test.steps
    
    const probeIndex = steps.findIndex(
      (step) =>
        typeof step.run === 'string' &&
        step.run.includes(
          'node scripts/verify-vitest-discovery-policy.mjs',
        ),
    )
    const normalTestIndex = steps.findIndex(
      (step) =>
        step.id === 'timed-test' &&
        typeof step.run === 'string' &&
        step.run.includes('pnpm test'),
    )
    const uploadIndex = steps.findIndex(
      (step) =>
        step.uses === 'actions/upload-artifact@v7' &&
        String(step.with?.path ?? '').includes(
          'verify-vitest-discovery-policy',
        ),
    )
    
    assert(probeIndex >= 0)
    assert(normalTestIndex >= 0)
    assert(uploadIndex > probeIndex)
    assert(uploadIndex < normalTestIndex)
    assert.notEqual(steps[probeIndex]['continue-on-error'], true)
    
    const upload = steps[uploadIndex]
    assert.equal(upload.if, '${{ !cancelled() }}')
    assert.equal(upload.with['if-no-files-found'], 'error')
    assert.match(upload.with.name, /github\.run_id/)
    assert.match(upload.with.name, /github\.run_attempt/)
    NODE

    5. CIでpnpm testを二重実行するが、性能契約がない

    現在のtest jobは既にpnpm testを実行しています。

    一方、probeもcheck (c)として内部で完全なpnpm testを最大600秒のtimeoutで実行します。

    したがって本Issueをそのまま実装すると、unit test suiteがCIで原則2回実行されます。これは単なる数秒の静的gate追加ではありません。現行のCI performance skillでは、.github/workflows/**変更は全レーン適用であり、runtime baseline、P50/P95、artifact consistency、CI_TEST_PERFORMANCE_DECISION_V1が要求されています。

    選択肢は2つです。

    1. 本Issueでは二重実行を受け入れる。
      probe stepをtimed measurementへ含め、CI runtime deltaと根拠をPR evidenceに残す。

    2. 二重実行を除去する。
      probeをprepare / existing-test / finalizeへ分割する、または--skip-pnpm-test等のCI modeを追加する。

    2はprobe実装変更を伴うため、現行Allowed Pathsでは不可能です。最小スコープでは1を選び、コストを明示的に受け入れるべきです。

    6. Artifact配布契約が不足している

    Issueは「actions/upload-artifact相当」としか定めていませんが、required evidence artifactであれば次を固定すべきです。

    • actions/upload-artifact@v7
    • runごとに一意なartifact名
    • if: ${{ !cancelled() }}
    • upload前のtest -s
    • if-no-files-found: error
    • retention-days: 30
    • main artifactに加えてwrite-failed artifactも診断対象にするかどうか

    upload-artifactはartifact名の一意性が重要で、同一run内で同名artifactへ複数回uploadする設計は避ける必要があります。またif-no-files-foundの既定はwarningであり、required evidenceにはerrorを明示すべきです。([GitHub]3)

    これは外部の一般論だけではありません。リポジトリのCI performance skillも、reviewer gate用artifactについてupload前のtest -sとif-no-files-found: errorを要求しています。既存のci-verdict-summary-v2もrun ID・attemptを含む一意名、missing error、30日retentionを採用しています。

    推奨名:

    name: verify-vitest-discovery-policy-${{ github.run_id }}-${{ github.run_attempt }}

    7. artifact内のhead_shaがPR head SHAにならない

    probeはgit rev-parse HEADをhead_shaとして記録します。

    しかし通常のpull_request workflowでactions/checkoutを既定設定のまま使うと、checkout対象はPR headそのものではなく、PRのmerge ref / synthetic merge commitです。PR #1559の実ログでもrefs/remotes/pull/1559/mergeをfetchしてcheckoutしています。 GitHub公式仕様でも、pull request eventのGITHUB_SHAはpull request merge branchの最終merge commitであり、PR headを取得する場合はgithub.event.pull_request.head.shaを明示的に使う必要があります。([GitHub Docs]4)

    したがってCI常設後のartifactでは、head_shaという名前が実質的にcheckout_shaまたはmerge_shaになります。PR-head evidenceとして読むconsumerが現れれば、誤認の原因になります。

    既存のruntime baseline artifactは既に次の2つを分離しています。

    • head_sha: ${{ github.event.pull_request.head.sha || github.sha }}
    • merge_sha: ${{ github.sha }}

    推奨修正はprobe schemaを次のようにすることです。

    {
      "pr_head_sha": "...",
      "checkout_sha": "...",
      "merge_sha": "..."
    }

    ただしprobe変更は現IssueのOut of Scopeです。したがって少なくとも以下のどちらかが必要です。

    • scope deltaでprobeをAllowed Pathsへ追加する
    • Known residualとして「head_shaはPR runではmerge checkout SHA」と明記し、修正Issueを起票する

    テストの意味をmerge-resultからPR-headへ弱めるため、既存test jobのcheckoutをPR head専用へ変更することは推奨しません。

    8. Required Skills: なしがIssue自身のNotesと矛盾している

    IssueのNotesでは、.github/workflows/変更時にCI_TEST_PERFORMANCE_ADVISORY_V1が発火し、skillを読んでCI_TEST_PERFORMANCE_DECISION_V1をPR evidenceとして残す必要があると明記しています。一方、Required Skillsは「なし」です。

    対象skillは明示的に.github/workflows/**を適用pathとしており、workflow変更のlane分類・baseline・artifact consistency・reviewer evidenceを要求しています。

    修正案

    Required Skills:
      - .claude/skills/ci-test-performance/SKILL.md
    
    Required PR Evidence:
      - CI_TEST_PERFORMANCE_DECISION_V1
      - TEST_VERDICT_MACHINE
      - CI_CHECK_RUN_SCOPED
      - ci_runtime_baseline_v1 delta

    推奨する最小実装形

    Allowed Pathsを.github/workflows/ci.ymlだけに維持するなら、既存test job内で、Manifest checkの後、通常のTest stepの前に置くのが最も整合的です。

    この順番にする理由は次のとおりです。

    • dependency installとmanifest integrityを通してからprobeを実行できる
    • probe失敗直後にartifactをuploadできる
    • probe失敗時は後続の通常Testをskipしつつ、job failureを維持できる
    • 新job追加によるverdict aggregatorの変更が不要
    • 通常testが後から失敗しても、probe artifactは既にupload済み
    # Existing test job:
    # Install dependencies
    # Manifest check
    # ↓ ここに追加
    
    - name: Verify Vitest discovery policy (timed)
      id: timed-verify-vitest-discovery-policy
      run: |
        run_timed() {
          local step_id="$1"; shift
          local start_ms end_ms elapsed_ms status
          start_ms=$(date +%s%3N)
          set +e
          "$@"
          status=$?
          set -e
          end_ms=$(date +%s%3N)
          elapsed_ms=$((end_ms - start_ms))
          printf \
            '{"step_id":"%s","phase_id":"%s","status":%d,"elapsed_ms":%d}\n' \
            "$step_id" "$step_id" "$status" "$elapsed_ms" \
            >> measurements.jsonl
          return "$status"
        }
    
        run_timed verify_vitest_discovery_policy \
          node scripts/verify-vitest-discovery-policy.mjs
    
    - name: Require Vitest discovery policy artifact
      if: ${{ !cancelled() }}
      run: |
        test -s artifacts/verify-vitest-discovery-policy.json \
          || test -s artifacts/verify-vitest-discovery-policy.write-failed.json
    
    - name: Upload Vitest discovery policy artifact
      id: upload-verify-vitest-discovery-policy
      if: ${{ !cancelled() }}
      uses: actions/upload-artifact@v7
      with:
        name: verify-vitest-discovery-policy-${{ github.run_id }}-${{ github.run_attempt }}
        path: |
          artifacts/verify-vitest-discovery-policy.json
          artifacts/verify-vitest-discovery-policy.write-failed.json
        if-no-files-found: error
        retention-days: 30
    
    # Existing Test (timed) step remains here

    continue-on-errorは設定しません。probeが非zeroなら、そのstepとjobはfailureのままです。後続2stepはそれぞれ独自の!cancelled()条件を持つため、probe failure後にも実行されます。GitHub Actionsのstatus check semantics上、この明示条件が必要です。([GitHub Docs]2)


    推奨するAcceptance Criteria

    現行2件ではなく、少なくとも次の6件に再構成すべきです。

    AC1 — 既存test jobへの配置

    .github/workflows/ci.ymlのjobs.test.stepsにprobe実行stepが存在し、既存timed-testとは別stepである。新規jobには配置しない。

    AC2 — fail-close

    probe stepにcontinue-on-error: trueがなく、probeの非zeroがtest jobのfailureとして保持される。

    AC3 — 順序

    step順が次を満たす。

    Install dependencies
    → Manifest check
    → Verify Vitest discovery policy
    → artifact existence check
    → artifact upload
    → existing Test
    

    AC4 — artifact contract

    upload stepは以下をすべて満たす。

    if: ${{ !cancelled() }}
    uses: actions/upload-artifact@v7
    if-no-files-found: error
    retention-days: 30
    name includes:
      - github.run_id
      - github.run_attempt

    main artifactまたはwrite-failed artifactの少なくとも一方を対象にする。

    AC5 — workflow validation

    • actionlintがPASSする
    • YAML semantic checkが、job、step分離、順序、条件、action version、path、missing policyを検証する
    • 単純なrgのみをAC達成根拠にしない

    AC6 — deferred runtime evidence

    implementation PRのCI runで次を確認する。

    test job: success
    artifact: exists
    artifact JSON: parseable
    schema: verify-vitest-discovery-policy/v2
    status: pass
    artifact name: current run_id/run_attempt bound
    actionlint: success
    

    「probe failure後にもuploadされる」を厳密なhard requirementにするなら、成功runだけでは未証明です。controlled workflow_dispatch canaryを追加するか、別のdeterministic failure-path fixtureを用意する必要があります。そこまで本Issueで行わない場合は、ACを「GitHubの!cancelled() semanticsとsemantic YAML testによる構造保証」に限定し、実failure canaryをfollow-upへ送るべきです。


    最終評価

    #1569が解こうとしている問題は実在し、#1545 / PR #1559からのscope分離も正しいです。しかし現契約は、過去の敵対的レビューで排除した「存在確認だけで達成扱いするVC」をCI wiring側で再導入しています。

    実装前に最低限、次の4点を直す必要があります。

    1. Runtime Verificationをnot_applicableからdeferredへ変更する
    2. 実装先を既存test job内の別stepへ限定する
    3. artifactのstatus condition・missing policy・一意名・retentionを固定する
    4. rgだけでなくactionlint・YAML semantic check・実CI artifact evidenceをACへ入れる

    加えて、二重pnpm testのコストと、artifact内head_shaがPR merge SHAになる点を明示しない限り、高品質な常設gateとは判定できません。

  2. squne121 commented on Jul 18, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-07-18T05:15:53Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1569
      body_sha256: "sha256:0117215cce20a1b85962470e96be145b0d1a560280836de6f6260a99c9964630"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        product_spec_check: {"schema":"product_spec_check/v1","applicability":"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,"machine_readable_contract_present":true},"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":[],"body_sha256":"sha256:0117215cce20a1b85962470e96be145b0d1a560280836de6f6260a99c9964630","source_provenance":{"source_type":"github_api","body_file":null}}
        vc_preflight:
          decision: pass
          classifications: [{"ac":"AC1","line":3,"raw_command":"actionlint .github/workflows/ci.yml","command_hash":"sha256:8be93eaf4ed57a2d604a0808eb15e526f9f935c91d937e0b529a2f5dfa0be1b2","execution_key_hash":null,"runner":"skipped","exit_code":null,"classification":"skipped","category":"preflight_scope_pr_review_only","decision":"go","scope_class":"pr_review_only","confidence":"low","stdout_head":[],"stdout_truncated":false,"stdout_original_line_count":1,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":0,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null,"verification_owner":"pr-review-judge","deferred_reason":"VC marked pr_review_only; verification deferred to PR review","runtime_verification_required":false},{"ac":"AC2","line":7,"raw_command":"actionlint .github/workflows/ci.yml","command_hash":"sha256:8be93eaf4ed57a2d604a0808eb15e526f9f935c91d937e0b529a2f5dfa0be1b2","execution_key_hash":null,"runner":"skipped","exit_code":null,"classification":"skipped","category":"preflight_scope_pr_review_only","decision":"go","scope_class":"pr_review_only","confidence":"low","stdout_head":[],"stdout_truncated":false,"stdout_original_line_count":1,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":0,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null,"verification_owner":"pr-review-judge","deferred_reason":"VC marked pr_review_only; verification deferred to PR review","runtime_verification_required":false},{"ac":"AC3","line":11,"raw_command":"actionlint .github/workflows/ci.yml","command_hash":"sha256:8be93eaf4ed57a2d604a0808eb15e526f9f935c91d937e0b529a2f5dfa0be1b2","execution_key_hash":null,"runner":"skipped","exit_code":null,"classification":"skipped","category":"preflight_scope_pr_review_only","decision":"go","scope_class":"pr_review_only","confidence":"low","stdout_head":[],"stdout_truncated":false,"stdout_original_line_count":1,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":0,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null,"verification_owner":"pr-review-judge","deferred_reason":"VC marked pr_review_only; verification deferred to PR review","runtime_verification_required":false},{"ac":"AC4","line":15,"raw_command":"actionlint .github/workflows/ci.yml","command_hash":"sha256:8be93eaf4ed57a2d604a0808eb15e526f9f935c91d937e0b529a2f5dfa0be1b2","execution_key_hash":null,"runner":"skipped","exit_code":null,"classification":"skipped","category":"preflight_scope_pr_review_only","decision":"go","scope_class":"pr_review_only","confidence":"low","stdout_head":[],"stdout_truncated":false,"stdout_original_line_count":1,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":0,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null,"verification_owner":"pr-review-judge","deferred_reason":"VC marked pr_review_only; verification deferred to PR review","runtime_verification_required":false},{"ac":"AC5","line":19,"raw_command":"python3 .claude/skills/ci-test-performance/scripts/ci_verdict_summary.py --help","command_hash":"sha256:a7ef4f3c9c4f4193735e1f51e27b35bed6fc5d3d4a90f32a63523f004884bb1b","execution_key_hash":null,"runner":"skipped","exit_code":null,"classification":"skipped","category":"preflight_scope_runtime_only","decision":"go","scope_class":"runtime_only","confidence":"low","stdout_head":[],"stdout_truncated":false,"stdout_original_line_count":1,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":0,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null,"verification_owner":"impl-review-loop","deferred_reason":"VC marked runtime_only; verification deferred to post-implementation runtime","runtime_verification_required":true}]
      source: ensure_contract_snapshot_auto
      expected_contract_fingerprint: {"issue_number":1569,"contract_source_kind":"issue_comment","contract_source_id":"5010035413","contract_body_sha256":"sha256:0117215cce20a1b85962470e96be145b0d1a560280836de6f6260a99c9964630","allowed_paths_normalized_sha256":"6d7e868206a31f32c794f0fe3304de31a8b51d5de53719084a5c22894c53f260","base_ref":"main","base_sha_at_snapshot":"6cc00c58fa9c2690ac88f80012b74c0d33e62d30"}
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