Skip to content

実装: secret_policy.boundary_enforced の意味論を再設計し runtime attestation と static producer contract を schema 上で分離する #536

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "#242"
goal_ref: "secret_policy.boundary_enforced の意味論を runtime と static に分離し、schema description と producer behavior を一致させる"
change_kind: code+docs

Parent Issue

#242

Parent Goal Ref

  • Goal: session recording policy の整備(Kill Switch / secret boundary / producer-consumer contract)
  • Desired Destination: boundary_enforced の意味論曖昧性を解消し、consumer が runtime 証拠と static 宣言を混同しない schema contract を確立する

Background

PR #532(Issue #500 follow-up)で scripts/generate-session-manifest.mjs に secret_policy.boundary_enforced: true を固定値で追加した。しかし docs/schemas/agent-session-manifest.schema.json の boundary_enforced description は "secret_boundary_guard PreToolUse hook was active during this session" と runtime attestation を意図している。

実装コメントは static producer contract と明記しているが、schema description との乖離が security telemetry の greenwashing リスクを生む。Issue #500 の Stop Condition が発動し、PR #532 は as-is merge しない判断となった。

origin PR: #532
origin Issue: #500

source: stop_condition
origin_pr: "https://github.com/squne121/loop-protocol/pull/532"
dedupe_key: "follow-up:squne121/loop-protocol:pr/532:boundary-enforced-semantics"

Current Validated Scope

docs/schemas/agent-session-manifest.schema.json の secret_policy フィールド定義を再設計し、runtime attestation と static producer contract を明示的に分離する。

Remaining Parent Gaps

Outcome

docs/schemas/agent-session-manifest.schema.json の secret_policy フィールドが再設計され、pnpm test が PASS した状態でコミットが存在する。

本 Issue は schema-only(Option A)。producer 実装変更(scripts/generate-session-manifest.mjs)は別 Issue で行う。

runtime_boundary の設計例(if/then で attested: true のとき evidence_ref を必須化):

"runtime_boundary": {
  "type": "object",
  "required": ["attested"],
  "properties": {
    "attested": {
      "type": "boolean",
      "description": "Whether runtime secret boundary enforcement was actually attested for this session."
    },
    "evidence_ref": {
      "type": ["string", "null"],
      "description": "Reference to runtime evidence when attested is true."
    }
  },
  "allOf": [
    {
      "if": {
        "properties": { "attested": { "const": true } },
        "required": ["attested"]
      },
      "then": {
        "required": ["evidence_ref"],
        "properties": {
          "evidence_ref": { "type": "string", "minLength": 1 }
        }
      }
    }
  ]
}

In Scope

  • docs/schemas/agent-session-manifest.schema.json の secret_policy フィールド定義を再設計する(runtime / static 分離)
  • 現行の boundary_enforced フィールドを schema から廃止する
  • producer_contract / runtime_boundary の新フィールドを別 object として schema に追加する(description / type / required を明示)
  • runtime_boundary.attested: true の場合 evidence_ref を非空 string 必須とする制約を if/then で schema に追加する
  • schema contract test を新定義に合わせて更新する(valid / invalid fixtures 追加)
  • docs/dev/secret-policy.md に意味論分離の方針を追記する(任意)

Out of Scope

  • scripts/generate-session-manifest.mjs の producer 実装変更(schema 確定後の別 Issue)
  • secret_boundary_guard hook の runtime attestation 実装(別 Issue)
  • 他 producer / consumer スクリプトへの横展開

注意: PR #532(producer に旧形状の boundary_enforced: true を追加)は本 Issue のスキーマ完了まで merge しない。新スキーマ確定後、PR #532 を rebase または close して新形状対応 PR に差し替える。

Acceptance Criteria

  • AC1: docs/schemas/agent-session-manifest.schema.json から secret_policy.boundary_enforced を廃止する
  • AC2: secret_policy.producer_contract と secret_policy.runtime_boundary が別 object として定義され、それぞれ description / type / required が明示されている
  • AC3: schema contract test が以下を検証している
    • static producer contract は runtime attestation として扱われない
    • runtime_boundary.attested: true の場合は runtime evidence を要求する
    • runtime_boundary.attested: false の場合は evidence が不要または null である
  • AC4: pnpm test が PASS する

Verification Commands

# AC1
rg -n '"producer_contract"|"runtime_boundary"|"attested"|"evidence_ref"' docs/schemas/agent-session-manifest.schema.json

# AC2
# AC3
# AC4
pnpm test

Runtime Verification Applicability

decision: not_applicable
reason: "全 VC コマンド(rg / pnpm test)は CI で実行可能。runtime-only 環境は不要。"

Allowed Paths

  • docs/schemas/agent-session-manifest.schema.json
  • tests/ 配下の schema contract test(既存ファイルの修正・invalid fixture 追加のみ)
  • docs/dev/secret-policy.md(任意)

Stop Conditions

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

Required Skills

  • JSON Schema
  • Node.js / TypeScript(test 修正)

Delivery Rule

1 Issue = 1 PR。Draft PR で開始し、AC が全件 PASS したらレビュー依頼する。

Activity

  1. added
    kind/implementation
    area/security
    area/ai-ops
    follow-up
    on May 31, 2026
  2. squne121 commented on May 31, 2026

    @squne121
    OwnerAuthor

    結論

    #536 は方向性は正しいですが、このまま実装 Issue として走らせると、schema-only の変更で producer contract を壊すか、逆に runtime attestation の偽装余地を残します。
    判定は REQUEST_CHANGES。特に boundary_enforced を「残して description だけ変える」余地を AC1 が許している点は、今回の問題を再発させます。

    #536 の背景整理は妥当です。PR #532 は scripts/generate-session-manifest.mjs に secret_policy: { value_exposed: false, boundary_enforced: true, mode: 'presence_only' } を追加し、コメント上は「static producer contract であり runtime attestation ではない」と明記しています。([GitHub]1) 一方、main の schema は boundary_enforced を “secret_boundary_guard PreToolUse hook was active during this session” と説明しており、これは hook 実行の runtime claim です。([GitHub]2) したがって #536 が言う「static producer contract と runtime attestation の分離」は必要です。([GitHub]3)

    Blockers

    1. AC1 が弱すぎる。boundary_enforced の温存を許している

    #536 の AC1 は「boundary_enforced が存在しない、または description が runtime attestation を意図しないものに修正」となっています。([GitHub]3) これは危険です。今回の事故原因は、同じ boolean 名が static と runtime の両方に読めることです。description を変えても、consumer は過去の実装・名前・既存 fixture から runtime enforcement と誤読できます。

    修正要求:

    AC1: secret_policy.boundary_enforced は schema から削除する。
    例外として残す場合は runtime_boundary.attested の alias として deprecated 扱いにし、
    producer_contract の意味では絶対に使わない。
    

    推奨は削除です。互換性を理由に残すなら、少なくとも deprecated: true 相当の説明、invalid fixture、consumer migration note が必要です。

    2. Scope が自己矛盾している

    #536 の Outcome は、manifest JSON が新しい secret_policy 形状を持つことを成功状態として例示しています。([GitHub]3) しかし Out of Scope では scripts/generate-session-manifest.mjs の producer 実装変更を除外しています。([GitHub]3)

    これは実装者にとって矛盾です。schema を変えるだけなら、PR #532 の producer 出力は新 schema と不整合になります。逆に新 schema に合わせた manifest を実際に生成させるなら producer 変更が必要です。現在 main の producer は secret_policy を出力していません。([GitHub]4) PR #532 は producer に旧形状の boundary_enforced を追加しています。([GitHub]1)

    修正要求:

    Option A: #536 は schema-only に限定する。
    - root required に secret_policy を追加しない。
    - producer 出力変更は follow-up Issue に明示する。
    - PR #532 は #536 完了まで merge block とする。
    
    Option B: #536 で producer まで変更する。
    - Allowed Paths に scripts/generate-session-manifest.mjs と producer test を入れる。
    - 「1 Issue = 1 PR」内で schema + producer + tests を同時に整合させる。
    

    現状の Out of Scope のままなら Option A に倒すべきです。

    3. runtime attestation の証拠条件が schema で表現されていない

    Issue の例は runtime_boundary.attested: false / evidence_ref: null ですが、attested: true のときに evidence_ref が必須・非 null・検証可能であることが AC にありません。([GitHub]3) これは runtime attestation の greenwashing を完全には止めません。

    JSON Schema Draft 2020-12 では required は存在を強制し、properties は「存在した場合の値」を記述するだけです。([learnjsonschema.com]5) また if/then や dependentRequired で条件付き必須を表現できます。([JSON Schema]6)

    修正要求:

    "runtime_boundary": {
      "type": "object",
      "required": ["attested", "evidence_ref"],
      "additionalProperties": false,
      "properties": {
        "attested": { "type": "boolean" },
        "evidence_ref": {
          "oneOf": [
            { "type": "string", "minLength": 1 },
            { "type": "null" }
          ]
        }
      },
      "allOf": [
        {
          "if": {
            "properties": { "attested": { "const": true } },
            "required": ["attested"]
          },
          "then": {
            "properties": {
              "evidence_ref": { "type": "string", "minLength": 1 }
            }
          }
        },
        {
          "if": {
            "properties": { "attested": { "const": false } },
            "required": ["attested"]
          },
          "then": {
            "properties": {
              "evidence_ref": { "type": "null" }
            }
          }
        }
      ]
    }

    evidence_ref は可能なら #/evidence/0 のような JSON Pointer に寄せるべきです。単なる自由文字列だと、証拠への結合が弱いです。

    4. producer_contract.declared: true も自己申告にすぎない

    Issue の例では producer_contract.declared: true と name: presence_only_no_secret_values だけです。([GitHub]3) これは static contract として最低限ですが、consumer が意味を機械判定するには弱いです。

    SLSA は attestation を「artifact に関する authenticated metadata」として扱い、署名は attestation 作成者の真正性を示し、metadata が明示的に意味を持つ設計を説明しています。([SLSA]7) in-toto でも attestation は subject と predicate type を結合し、envelope が authentication/serialization を扱う層として整理されています。([GitHub]8) この Issue ではそこまで重い署名基盤は不要ですが、少なくとも producer_contract は「名前だけ」ではなく、schema 上で解釈可能な contract ID / version / claims を持たせるべきです。

    修正案:

    "producer_contract": {
      "type": "object",
      "required": ["declared", "id", "version", "claims"],
      "additionalProperties": false,
      "properties": {
        "declared": { "const": true },
        "id": { "const": "presence_only_no_secret_values" },
        "version": { "type": "string", "pattern": "^v[0-9]+$" },
        "claims": {
          "type": "object",
          "required": ["secret_values_not_serialized", "presence_only"],
          "additionalProperties": false,
          "properties": {
            "secret_values_not_serialized": { "const": true },
            "presence_only": { "const": true }
          }
        }
      }
    }

    5. secret_policy の root required 方針が未決

    #536 の AC3 は secret_policy 内の required を求めていますが、root の required に secret_policy を入れるかどうかは未定義です。([GitHub]3) 現在 main schema の root required には secret_policy が入っていません。([GitHub]2)

    ここは明示しないと、実装者が互換性破壊を起こします。

    推奨:

    AC追加:
    AC0: agent_session_manifest/v1 の後方互換方針を明示する。
    - schema version を v1 のまま維持する場合、root secret_policy は optional のまま。
    - secret_policy が存在する場合は新形状のみ valid。
    - root secret_policy を required にする場合は schema version bump または producer 同時更新を必須にする。
    

    追加すべき invalid fixtures

    最低限、以下を schema contract test に入れてください。

    {
      "secret_policy": {
        "value_exposed": false,
        "boundary_enforced": true,
        "mode": "presence_only"
      }
    }

    これは 旧 PR #532 形状として invalid にするべきです。少なくとも boundary_enforced を producer contract として読ませないためです。

    {
      "secret_policy": {
        "value_exposed": false,
        "mode": "presence_only",
        "producer_contract": {
          "declared": true,
          "id": "presence_only_no_secret_values",
          "version": "v1",
          "claims": {
            "secret_values_not_serialized": true,
            "presence_only": true
          }
        },
        "runtime_boundary": {
          "attested": true,
          "evidence_ref": null
        }
      }
    }

    これは invalid。attested: true なら証拠参照必須です。

    {
      "secret_policy": {
        "value_exposed": true,
        "mode": "presence_only",
        "producer_contract": {
          "declared": true,
          "id": "presence_only_no_secret_values",
          "version": "v1",
          "claims": {
            "secret_values_not_serialized": true,
            "presence_only": true
          }
        },
        "runtime_boundary": {
          "attested": false,
          "evidence_ref": null
        }
      }
    }

    これは invalid。value_exposed は const: false に固定すべきです。

    改稿すべき Acceptance Criteria

    この Issue は次のように締めた方が安全です。

    AC1: secret_policy.boundary_enforced は schema から削除されている。
    AC2: secret_policy は value_exposed / mode / producer_contract / runtime_boundary を持つ。
    AC3: secret_policy が存在する場合、上記 4 field は required である。
    AC4: value_exposed は const false、mode は const "presence_only" である。
    AC5: producer_contract は declared/id/version/claims を required とし、contract id は enum または const である。
    AC6: runtime_boundary.attested が true の場合、runtime_boundary.evidence_ref は非空 string 必須である。
    AC7: runtime_boundary.attested が false の場合、runtime_boundary.evidence_ref は null である。
    AC8: 旧 shape { boundary_enforced: true } は invalid fixture として拒否される。
    AC9: 後方互換方針が明記されている。root secret_policy を required にしない場合、その理由を schema comment/docs に明記する。
    AC10: pnpm test が PASS する。
    

    実装方針

    #536 は PR #532 を as-is merge しないための blocking follow-upとしては妥当です。PR #532 の本文・diff は固定値 boundary_enforced: true を追加しており、しかも PR コメントでは全 AC PASS / mergeable と報告しています。([GitHub]9) ただし schema 側の description と意味論が食い違っているため、#536 完了前に #532 を merge すると telemetry contract が汚染されます。

    推奨順序:

    1. #536 を schema-only として修正。
    2. boundary_enforced 旧形状を invalid fixture 化。
    3. producer_contract / runtime_boundary の新 schema を入れる。
    4. PR feat(#500): replace boundary_enforced with producer_contract + runtime_boundary in secret_policy #532 は close または rebase して、新 schema shape を出力する follow-up PR に作り直す。

    LOOP_VERDICT

    LOOP_VERDICT:
      verdict: REQUEST_CHANGES
      target: issue_536
      blockers:
        - AC1 permits retaining boundary_enforced with renamed semantics
        - scope conflicts with outcome because producer update is out of scope
        - runtime_boundary.attested lacks conditional evidence requirement
        - producer_contract is under-specified and remains a weak self-claim
        - root required / backward compatibility policy is undefined
      merge_policy:
        pr_532: BLOCK_UNTIL_536_SCHEMA_COMPLETES
  3. squne121 commented on May 31, 2026

    @squne121
    OwnerAuthor

    issue-refinement-loop 終了報告

    LOOP_TERMINATION_RESULT_V1:
      termination_reason: human_escalation
      max_iterations: 3
      blockers_history:
        - iteration: 0
          blockers:
            - AC1 が弱すぎる(boundary_enforced 削除を必須化していない)
            - Scope 自己矛盾(Outcome で新形状を例示しつつ Out of Scope に producer 変更を除外)
            - AC に runtime_boundary.attested=true → evidence_ref 非 null 制約がない
            - producer_contract が name 自己申告のみで id/version/claims なし
            - root required / 後方互換方針が未定義
        - iteration: 1
          blockers:
            - VC に多行 python3 -c スクリプトが含まれ shlex parse 不可
            - AC7 に対応する VC コメント(# AC7)がなく C5 fail
            - AC1 VC の期待値が曖昧(remove vs modify description)
        - iteration: 2
          blockers:
            - AC4 VC にパイプ演算子(|)が含まれ baseline_vc_preflight が拒否
            - AC3/AC5/AC6/AC7/AC9 の VC が "unexpected_pass" と判定(reviewer が baseline-fail の方向を逆に解釈)

    人間判断が必要な残存論点

    1. AC4 VC のパイプ除去(軽微・即時修正可能)

    # 現状(pipe あり → 拒否)
    $ rg -n "const" docs/schemas/agent-session-manifest.schema.json | rg "false|presence_only"
    
    # 修正案(pipe なし)
    $ rg -n '"const".*false\|"presence_only"' docs/schemas/agent-session-manifest.schema.json

    2. VC の baseline-fail 解釈不一致

    reviewer が iteration=2 で多数の VC を "unexpected_pass" と判定したが、これは実装前に既存パターン(null, claims, version 等の一般的なキーワード)が schema の他部分にマッチしたことによる誤検知の可能性がある。

    以下の選択肢があります:

    Option A: VC を全て pnpm test に統合し、schema contract test で AC を検証させる(VC は pnpm test 1 行)

    Option B: AC1 以外の VC を全て削除し、pnpm test のみで全 AC を一括カバーする(最小VC)

    Option C: 現状の VC を維持し、reviewer の誤検知を accept して approve を人間判定する

    推奨

    Option B(最小 VC) を推奨。schema contract test を充実させて pnpm test で全 AC をカバーし、VC は AC1(rg で boundary_enforced 不在確認)と AC10(pnpm test)のみにする。

    # AC1
    $ rg "boundary_enforced" docs/schemas/agent-session-manifest.schema.json
    # 期待: マッチなし(exit 1)
    
    # AC2〜AC9
    $ pnpm test
    
    # AC10
    $ pnpm test

    Issue 本文の VC セクションを上記に差し替えてから /impl-review-loop 536 で実装に進めてください。

    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      schema_version: 1
      materialized_by: issue-refinement-loop
      follow_up_issues: []
      note_only_observations:
        - summary: "producer 実装変更は別 Issue(scripts/generate-session-manifest.mjs)"
          source: "Out of Scope に明記済み"
        - summary: "PR #532 は本 Issue schema 完了まで merge block"
          source: "Out of Scope 注意書き"
        - summary: "secret_boundary_guard hook の runtime attestation 実装は別 Issue"
          source: "Out of Scope に明記済み"
  4. squne121 commented on May 31, 2026

    @squne121
    OwnerAuthor

    結論:もう issue-refinement-loop を再実行せず、人間判断で Issue 本文を 1 回だけ手直ししてから PR に進むのがよいです。ループは max_iterations=3 到達で human escalation しており、残ブロッカーも「仕様そのもの」より VC/AC の書き方が reviewer に誤検知される形になっています。

    直すべき点

    現在の #536 は、schema 側で secret_policy の runtime attestation と static producer contract を分離する Issue になっており、producer 実装変更や runtime hook 実装は Out of Scope です。これは方向性として正しいです。([GitHub]1)

    ただし現在の VC は危険です。

    $ rg -n "producer_contract\|runtime_boundary\|attested" docs/schemas/agent-session-manifest.schema.json

    これは直した方がいいです。理由は 2 つです。

    1. $ が入っていて、そのまま実行できない。
    2. ripgrep の正規表現としては \| が意図した OR にならない可能性がある。OR にしたいなら | を使うべきです。

    おすすめの Issue 修正方針

    VC は最小化してください。AC の意味論は test に寄せる。rg は補助確認だけにする。

    Acceptance Criteria はこう寄せる

    ## Acceptance Criteria
    
    - AC1: `docs/schemas/agent-session-manifest.schema.json` から曖昧な `secret_policy.boundary_enforced` を廃止する
    - AC2: `secret_policy.producer_contract` と `secret_policy.runtime_boundary` が別 object として定義され、それぞれ description / type / required が明示されている
    - AC3: schema contract test が以下を検証している
      - static producer contract は runtime attestation として扱われない
      - `runtime_boundary.attested: true` の場合は runtime evidence を要求する
      - `runtime_boundary.attested: false` の場合は evidence が不要または null である
    - AC4: `pnpm test` が PASS する

    JSON Schema では properties に定義しただけでは必須にならず、必須化には required が必要です。なので AC2/AC3 は required 配列と contract test に落とすのが正攻法です。(JSON Schema)

    Verification Commands はこれだけでよい

    pnpm test

    どうしても grep を残すなら、補助確認としてこの程度にしてください。

    rg -n '"producer_contract"|"runtime_boundary"|"attested"|"evidence_ref"' docs/schemas/agent-session-manifest.schema.json
    pnpm test

    ただしこれは「存在確認」であって「意味論の検証」ではありません。意味論は test に移すべきです。

    schema 側の設計アドバイス

    runtime_boundary.attested: true のときだけ evidence_ref を要求したいなら、JSON Schema の if / then が適しています。if / then / else は Draft 7 以降の条件付き schema 適用で、if が valid の場合に then が適用されます。(JSON Schema)

    例:

    "runtime_boundary": {
      "type": "object",
      "required": ["attested"],
      "properties": {
        "attested": {
          "type": "boolean",
          "description": "Whether runtime secret boundary enforcement was actually attested for this session."
        },
        "evidence_ref": {
          "type": ["string", "null"],
          "description": "Reference to runtime evidence when attested is true."
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "attested": { "const": true }
            },
            "required": ["attested"]
          },
          "then": {
            "required": ["evidence_ref"],
            "properties": {
              "evidence_ref": { "type": "string", "minLength": 1 }
            }
          }
        }
      ]
    }

    重要なのは if 側にも required を入れることです。JSON Schema の公式説明でも、if schema に required がないと、判定対象プロパティが未定義の場合に余計な条件が適用されることがあります。(JSON Schema)

    次の一手

    #536 の本文を上の AC/VC に置換して、PR では schema と contract test だけを変更してください。scripts/generate-session-manifest.mjs は触らない。producer の出力変更が必要になったら、それは #536 ではなく後続 Issue に切るべきです。現在の Issue 本文でも producer 実装変更と runtime hook 実装は Out of Scope になっています。([GitHub]1)

  5. squne121 commented on May 31, 2026

    @squne121
    OwnerAuthor

    impl-review-loop: 人間判断要請 (2026-05-31T04:18:00Z)

    • 発生 step: preparation
    • termination_reason: human_escalation
    • 詳細:
      • consumer ready contract の required routing label phase/implementation が未充足です。現在の #536 には kind/implementation はありますが、phase/implementation がありません。
      • CONTRACT_REVIEW_RESULT_V1 status: go comment は未 materialize です。2026-05-31T04:09:41Z 時点の Issue コメント 3 件には該当コメントがありません。

    Preflight evidence

    • blocker/dependency check: pass
    • product_spec_check: applicability=not_applicable, decision=pass
    • baseline_vc_preflight: status=pass
      • rg -n '"producer_contract"|"runtime_boundary"|"attested"|"evidence_ref"' docs/schemas/agent-session-manifest.schema.json は baseline fail として decision=go
      • pnpm test は regression gate として pass(15 files / 266 tests)

    次アクション

    1. #536 に phase/implementation ラベルを付与する
    2. issue-contract-review を実行して CONTRACT_REVIEW_RESULT_V1 status: go comment を materialize する
    3. その後 /impl-review-loop 536 を再開する
    LOOP_STATE:
      issue_number: 536
      contract_snapshot_url: null
      contract_snapshot_source: materialization_required
      iteration: 0
      max_iterations: 3
      worktree: null
      branch: null
      last_step: preparation
      last_loop_verdict: null
      blockers_history:
        - consumer ready contract missing required routing label: phase/implementation
      external_research_skip_basis: "internal schema/docs follow-up issue; no external spec dependency required for preflight"
      termination_reason: human_escalation
      product_spec_preflight:
        source: contract_snapshot.checks.product_spec_check
        applicability: not_applicable
        decision: pass
        blocked_rule_ids: []
        contract_snapshot_url: null
        body_sha256: null
        routing_action: continue
      scope_rollup_decision:
        schema_version: 2
        recorded_at: "2026-05-31T04:18:00Z"
        rollup_plan_ref:
          body_sha256: null
          generated_at: null
        decision: skipped
        executed_actions: []
        skipped_reason: "ready tuple mismatch: missing phase/implementation label"
        candidates_reviewed: []
  6. squne121 commented on May 31, 2026

    @squne121
    OwnerAuthor

    Contract Snapshot (2026-05-31T04:21:30Z)

    • Outcome: docs/schemas/agent-session-manifest.schema.json の secret_policy フィールドを再設計し、pnpm test が PASS した状態でコミットが存在する
    • Acceptance Criteria:
      1. secret_policy.boundary_enforced を廃止する
      2. producer_contract と runtime_boundary を別 object として定義する
      3. schema contract test で runtime/static 分離と attested/evidence_ref 制約を検証する
      4. pnpm test が PASS する
    • Verification Commands:
      • rg -n '"producer_contract"|"runtime_boundary"|"attested"|"evidence_ref"' docs/schemas/agent-session-manifest.schema.json
      • pnpm test
    • Allowed Paths:
      • docs/schemas/agent-session-manifest.schema.json
      • tests/ 配下の schema contract test
      • docs/dev/secret-policy.md(任意)
    • Worktree: .claude/worktrees/issue-536-secret-policy-boundary-enforced-runtime-
    • Branch: worktree-issue-536-secret-policy-boundary-enforced-runtime-
    • VC preflight: baseline fail = 1, 想定外 pass = 0, 実行不可 = 0, regression gate pass = 1
    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-05-31T04:21:30Z"
      generated_by: issue-contract-review
      issue_url: "https://github.com/squne121/loop-protocol/issues/536"
      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: 1
          vc_passed_unexpectedly: 0
          vc_unrunnable: 0
          vc_expected_pass: 1
          vc_skipped: 0
          classifications:
            - ac: AC1
              command: "rg -n '\"producer_contract\"|\"runtime_boundary\"|\"attested\"|\"evidence_ref\"' docs/schemas/agent-session-manifest.schema.json"
              exit_code: 1
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              evidence:
                stdout_excerpt: ""
                stderr_excerpt: ""
              decision: go
            - ac: AC4
              command: "pnpm test"
              exit_code: 0
              category: regression_gate
              scope_class: regression_gate
              confidence: low
              evidence:
                stdout_excerpt: "15 files / 266 tests passed"
                stderr_excerpt: "$ vitest run --exclude 'tests/e2e/**' --exclude '.claude/worktrees/**'"
              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:fb8e101802c3964d11acb593faeced1aead43cf0efccebccb498f9e8ad4e656c"
  7. squne121 commented on May 31, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-05-31T04:27:30Z)

    • PR: feat(#536): split secret policy runtime and static schema #537
    • Worktree: .claude/worktrees/issue-536-secret-policy-boundary-enforced-runtime-
    • Branch: worktree-issue-536-secret-policy-boundary-enforced-runtime-
    • Verification:
      • rg -n '"producer_contract"|"runtime_boundary"|"attested"|"evidence_ref"' docs/schemas/agent-session-manifest.schema.json: PASS
      • pnpm test: PASS (15 files / 270 tests)
      • pnpm typecheck: PASS
      • pnpm lint: PASS
      • pnpm build: PASS
    • Allowed Paths compliance: true
    • 後続: PR verification → PR review → human merge judgment
  8. squne121 commented on May 31, 2026

    @squne121
    OwnerAuthor

    impl-review-loop: 完了 (2026-05-31T04:30:00Z)

    ISSUE_SCOPE_ROLLUP_DECISION_V2:
      schema_version: 2
      recorded_at: "2026-05-31T04:30:00Z"
      rollup_plan_ref:
        body_sha256: "f4112d47c113661024860683faf9b32e8c025b43634bb66f54d288d9c597c76b"
        generated_at: "2026-05-31T04:21:58.130897Z"
      decision: deferred
      executed_actions: []
      skipped_reason: null
      candidates_reviewed:
        - kind: issue
          number: 500
          confidence: medium
          suggested_action: human_review_required
          final_decision: deferred
          rejection_reason: "schema-only issue body already separates producer migration into #500 / PR #532"
        - kind: issue
          number: 499
          confidence: medium
          suggested_action: human_review_required
          final_decision: deferred
          rejection_reason: "managed settings / org enforcement is distinct from schema-only secret_policy redesign"
    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      schema_version: 1
      materialized_by: impl-review-loop
      follow_up_issues: []
      note_only_observations: []
    LOOP_STATE:
      issue_number: 536
      contract_snapshot_url: "https://github.com/squne121/loop-protocol/issues/536#issuecomment-4585689743"
      contract_snapshot_source: materialized_by_issue_contract_review
      iteration: 0
      max_iterations: 3
      worktree: ".claude/worktrees/issue-536-secret-policy-boundary-enforced-runtime-"
      branch: "worktree-issue-536-secret-policy-boundary-enforced-runtime-"
      last_step: judgment
      last_loop_verdict: APPROVE
      blockers_history: []
      external_research_skip_basis: "internal schema/docs follow-up issue; no external spec dependency required"
      termination_reason: approved
      product_spec_preflight:
        source: contract_snapshot.checks.product_spec_check
        applicability: not_applicable
        decision: pass
        blocked_rule_ids: []
        contract_snapshot_url: "https://github.com/squne121/loop-protocol/issues/536#issuecomment-4585689743"
        body_sha256: "sha256:fb8e101802c3964d11acb593faeced1aead43cf0efccebccb498f9e8ad4e656c"
        routing_action: continue
      scope_rollup_decision:
        schema_version: 2
        recorded_at: "2026-05-31T04:30:00Z"
        rollup_plan_ref:
          body_sha256: "f4112d47c113661024860683faf9b32e8c025b43634bb66f54d288d9c597c76b"
          generated_at: "2026-05-31T04:21:58.130897Z"
        decision: deferred
        executed_actions: []
        skipped_reason: null
        candidates_reviewed:
          - kind: issue
            number: 500
            confidence: medium
            suggested_action: human_review_required
            final_decision: deferred
            rejection_reason: "schema-only issue body already separates producer migration into #500 / PR #532"
          - kind: issue
            number: 499
            confidence: medium
            suggested_action: human_review_required
            final_decision: deferred
            rejection_reason: "managed settings / org enforcement is distinct from schema-only secret_policy redesign"
  9. added 2 commits that reference this issue on May 31, 2026
  10. added 4 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

    area/ai-opsarea/securityfollow-upkind/implementationphase/implementation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions