Skip to content

実装: docs/schemas/agent-session-manifest.schema.json に boundary_enforced フィールドを追加する(test_manifest_schema_has_secret_policy_property 修正) #699

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: none
goal_ref: "test_manifest_schema_has_secret_policy_property が PASS する状態にする(test_secret_boundary_contract.py の期待値を #536/#537 後の新 schema shape に更新)"
change_kind: test

Parent Issue

none(単独改善)

Parent Goal Ref

  • Goal: pre-existing failure test_manifest_schema_has_secret_policy_property を解消し、test_secret_boundary_contract.py の全テストが CI で登録・実行できる状態にする
  • Desired Destination: .claude/hooks/tests/test_secret_boundary_contract.py の期待値が現行 schema shape と整合し、テストが PASS している

Current Validated Scope

Remaining Parent Gaps

Outcome

.claude/hooks/tests/test_secret_boundary_contract.py::test_manifest_schema_has_secret_policy_property が PASS する状態になる。

docs/schemas/agent-session-manifest.schema.json は変更しない(#536/#537 の設計を維持)。

本 Issue 完了後、test_secret_boundary_contract.py の CI 登録は #682 の scope delta または dedicated follow-up Issue で扱う。本 PR は #682 を close しない。

Background

PR #694 のレビューで pre-existing failure として確認された test_manifest_schema_has_secret_policy_property は、secret_policy.properties に value_exposed / boundary_enforced / mode が存在することを期待している。

しかし #536/#537(breaking change) で boundary_enforced は廃止され、producer_contract(static 宣言)と runtime_boundary(runtime attestation)に分離済みである。

  • docs/schemas/agent-session-manifest.md: 「boundary_enforced は廃止、旧 shape は invalid」と明記
  • 廃止理由: boundary_enforced: true が runtime enforcement 済みと誤読される security semantics 問題

したがって failure の原因は「schema が足りない」ではなく、テストの期待値が #537 後の新 schema shape に追従できていないことである。

修正対象は test_secret_boundary_contract.py のみ。docs/schemas/agent-session-manifest.schema.json は変更しない。

In Scope

  • .claude/hooks/tests/test_secret_boundary_contract.py::test_manifest_schema_has_secret_policy_property の期待フィールドを更新する
    • 旧期待(stale): value_exposed / boundary_enforced / mode
    • 新期待(正しい): value_exposed / mode / producer_contract / runtime_boundary
  • boundary_enforced が secret_policy.properties に存在しないことの regression guard を同テストに追加する
    • assert "boundary_enforced" not in secret_policy_props
  • Scope Delta(PR fix(#699): update test_manifest_schema_has_secret_policy_property to match current schema shape #716 レビュー指摘受け): 同ファイル内の legacy boundary_enforced fixture を新 shape に更新する
    • test_sentinel_producer_injection_does_not_leak の secret_policy fixture
    • test_manifest_fixture_with_secret_policy_validates_sentinel_absence の secret_policy fixture
  • Scope Delta: test_manifest_schema_has_secret_policy_property に deeper contract check を追加する
    • required フィールドセット(value_exposed/mode/producer_contract/runtime_boundary)
    • additionalProperties: false の確認
    • producer_contract の型・required フィールド確認
    • runtime_boundary の型・required フィールド・allOf 条件制約確認

Out of Scope

Acceptance Criteria

  • AC1: uv run pytest .claude/hooks/tests/test_secret_boundary_contract.py::test_manifest_schema_has_secret_policy_property -v が PASS する
  • AC2: test_manifest_schema_has_secret_policy_property が期待するフィールドに value_exposed / mode / producer_contract / runtime_boundary が含まれる
  • AC3: test_manifest_schema_has_secret_policy_property が boundary_enforced を期待しない(regression guard が存在する)
  • AC4: docs/schemas/agent-session-manifest.schema.json に boundary_enforced が追加されていない(スキーマ変更なし)

Verification Commands

# AC1
# preflight-scope: pr_review_only
$ uv run pytest .claude/hooks/tests/test_secret_boundary_contract.py::test_manifest_schema_has_secret_policy_property -v

# AC2
$ rg -n "producer_contract" .claude/hooks/tests/test_secret_boundary_contract.py

# AC3
$ rg -n "boundary_enforced.*not in" .claude/hooks/tests/test_secret_boundary_contract.py

# AC4
# preflight-scope: pr_review_only
$ rg -n "boundary_enforced" docs/schemas/agent-session-manifest.schema.json

Allowed Paths

  • .claude/hooks/tests/test_secret_boundary_contract.py

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • docs/schemas/agent-session-manifest.schema.json の変更が必要と判明した場合(スキーマ変更は本 Issue のスコープ外)
  • 新規 Issue の起票が必要と判断した場合
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合

Required Skills

  • Python / pytest

Scope Delta(任意)

N/A(前回の Scope Delta(tests/agent-session-manifest.test.ts 追加)は取り消し。本 Issue では schema 変更を行わないため不要)

Delivery Rule

  • 1 Issue = 1 PR
  • Draft PR で開始、レビュー後にマージ

Runtime Verification Applicability

rva_schema_version: v1
applicability: not_applicable
decision: not_applicable
reason: "テストファイルの更新のみ。runtime 動作検証不要。pytest PASS を VC で確認する。"

Activity

  1. added
    triage-required
    phase/implementation
    enhancement
    agent/implementer
    on Jun 6, 2026
  2. squne121 commented on Jun 6, 2026

    @squne121
    OwnerAuthor

    判定

    Issue #699 は方向性として妥当。ただし、このまま実装に渡すと「テストは通るが、secret boundary の意味論を壊す」リスクがあるため、Issue 契約は修正した方がよいです。

    対象 failure は実在します。test_secret_boundary_contract.py::test_manifest_schema_has_secret_policy_property は secret_policy.properties に value_exposed / boundary_enforced / mode があることを直接 assert していますが、現行 schema は value_exposed / mode / producer_contract / runtime_boundary を持ち、boundary_enforced を持っていません。([GitHub]1)
    また、PR #694 のレビューでもこの failure は pre-existing failure として follow-up 化され、#699 に言及されています。([GitHub]2)

    敵対的レビュー

    1. Blocker: docs/dev/secret-policy.md を根拠にしている記述が不正確

    Issue #699 は「docs/dev/secret-policy.md は boundary_enforced: true を secret_policy の一部として扱っている」と書いていますが、現行の docs/dev/secret-policy.md には boundary_enforced が見つかりません。出てくるのは secret_policy/v1 の inventory metadata であり、boundary_enforced ではありません。([GitHub]3)

    実際に boundary_enforced に近い文脈を持っているのは docs/dev/session-recording-policy.md 側の #412 追加セクションです。ただし、そこでも manifest schema の説明は secret_policy.value_exposed: false が中心で、boundary_enforced は明示されていません。([GitHub]4)

    修正案:
    Issue 本文の Background / In Scope から「docs/dev/secret-policy.md 準拠」という根拠を外し、次のように変えるべきです。

    test_secret_boundary_contract.py の legacy structural assertion が boundary_enforced を要求しているため、schema 側に backward-compatible な alias property として追加する。ただし runtime attestation の正本は既存の secret_policy.runtime_boundary.attested とする。

    2. Blocker: boundary_enforced と runtime_boundary.attested の意味が衝突しうる

    現行 schema の secret_policy description は、static producer contract と runtime attestation を分離している、と明示しています。さらに runtime_boundary.attested / evidence_ref が runtime enforcement の実証情報を持つ構造になっています。([GitHub]5)

    ここに単純に boundary_enforced: true を入れると、runtime_boundary.attested: false の manifest と意味が矛盾します。セキュリティ境界の文脈では、GitHub Actions 公式も「secret がログに出ないことを確認せよ」「sensitive data は plaintext workflow に置くな」としており、自己申告 boolean を実証済み enforcement と誤読させる設計は危険です。([GitHub Docs]6)

    実装方針:
    boundary_enforced は required にしない。const: true も付けない。説明文で 互換用・legacy structural marker と明示し、runtime 判定には使わせない。

    推奨追加:

    "boundary_enforced": {
      "type": "boolean",
      "description": "Backward-compatible structural marker for legacy secret boundary tests. This field is not runtime attestation; consumers MUST use secret_policy.runtime_boundary.attested and runtime_boundary.evidence_ref for runtime enforcement evidence."
    }

    配置は value_exposed と mode の間がよいです。テストが要求するキー集合と、人間の読み順が一致します。

    3. Major: secret_policy 自体が root required ではない

    Issue #699 の対象テストは「schema に property があるか」しか見ません。現行 schema の root required には secret_policy が含まれていないため、secret_policy を丸ごと省いた manifest が schema validation を通る可能性があります。([GitHub]5)

    #412 の AC9 は manifest schema または producer output contract に secret_policy.value_exposed: false 相当の明示フィールドを要求しており、AC13 で test_secret_boundary_contract.py の実行を求めています。([GitHub]7)
    したがって #699 は failure 修正としては十分でも、secret boundary enforcement としては不十分です。

    ただし #699 に含めるべきではありません。
    root required 化は既存 manifest 互換性を壊す可能性があるため、別 Issue に分けるべきです。

    後続 Issue 案:

    agent_session_manifest/v1 の secret_policy required 化可否を consumer inventory 付きで検討する

    • 現行 producer が常に secret_policy を出すか確認
    • 既存 artifact / fixture / validator consumer を棚卸し
    • required 化するか、validator warning / transitional mode にするか決める

    4. Major: fixture が「schema valid」と言いながら現行 schema では valid ではない

    test_manifest_fixture_with_secret_policy_validates_sentinel_absence の fixture は value_exposed / boundary_enforced / mode だけを持ちますが、現行 schema の secret_policy.required は producer_contract と runtime_boundary も要求しています。つまり、テスト名・コメント上の「schema valid manifest」という主張が schema 実態と一致していません。([GitHub]1)

    #699 の scope は schema 1 ファイルだけなので、このテスト修正は含めない方がよいです。ただし、#699 完了後に test_secret_boundary_contract.py の fixture を現行 schema 準拠に直す follow-up が必要です。

    5. Major: #682 との接続を明確化する必要がある

    #682 は test_secret_boundary_contract.py を pre-existing failure のため CI 登録対象外にしています。([GitHub]8)
    #699 はその failure を消す Issue ですが、#699 完了後に CI 登録まで進めないと回帰防止になりません。Issue #699 は「#682 または後続 Issue で対応」としていますが、これは曖昧です。([GitHub]9)

    修正案:
    #699 の Outcome に次を追加。

    本 Issue 完了後、test_secret_boundary_contract.py の CI 登録は #682 の scope delta または dedicated follow-up Issue で扱う。本 PR は #682 を close しない。

    実装 PR に出すべきレビュー指摘

    PR が来たら、最低限この観点で見るべきです。

    1. 変更ファイルは docs/schemas/agent-session-manifest.schema.json のみ。Issue 実装: docs/schemas/agent-session-manifest.schema.json に boundary_enforced フィールドを追加する(test_manifest_schema_has_secret_policy_property 修正) #699 の Allowed Paths と一致していること。([GitHub]9)
    2. secret_policy.properties.boundary_enforced.type は boolean。
    3. secret_policy.required には追加しない。既存互換性を壊さない。
    4. boundary_enforced の説明は runtime enforcement と誤読されない文言にする。
    5. runtime_boundary.attested / evidence_ref を正本として残す。
    6. 単体の target test だけでなく、最低でも JSON parse と schema grep を通す。JSON Schema では additionalProperties: false が未定義 property を拒否するため、今回の追加は schema contract 上も意味があります。([json-schema.org]10)

    推奨 Verification Commands

    Issue #699 の VC は概ねよいですが、次を追加したいです。

    uv run python3 - <<'PY'
    import json
    from pathlib import Path
    
    schema = json.loads(Path("docs/schemas/agent-session-manifest.schema.json").read_text())
    sp = schema["properties"]["secret_policy"]
    props = sp["properties"]
    
    assert "boundary_enforced" in props
    assert props["boundary_enforced"]["type"] == "boolean"
    assert "boundary_enforced" not in sp.get("required", []), "boundary_enforced must stay optional compatibility marker"
    assert "runtime_boundary" in props, "runtime attestation canonical field must remain"
    assert "producer_contract" in props, "static producer contract must remain"
    print("secret_policy boundary_enforced additive compatibility check: PASS")
    PY
    
    uv run pytest .claude/hooks/tests/test_secret_boundary_contract.py::test_manifest_schema_has_secret_policy_property -v

    Issue #699 本文の修正文案

    ## Background 修正案
    
    PR #694 review で、main に継続する pre-existing failure として
    `.claude/hooks/tests/test_secret_boundary_contract.py::test_manifest_schema_has_secret_policy_property`
    が確認された。
    
    当該 test は legacy structural contract として
    `secret_policy.properties` に `value_exposed` / `boundary_enforced` / `mode`
    が存在することを要求している。一方、現行 schema は
    `value_exposed` / `mode` / `producer_contract` / `runtime_boundary`
    を定義しているが、`boundary_enforced` を持たない。
    
    本 Issue では `boundary_enforced` を backward-compatible structural marker
    として schema に追加する。ただし runtime enforcement の正本は
    `secret_policy.runtime_boundary.attested` と `runtime_boundary.evidence_ref`
    であり、`boundary_enforced` は runtime attestation として扱わない。
    
    ## In Scope 追加案
    
    - `secret_policy.properties.boundary_enforced` を追加する
      - type: boolean
      - required には追加しない
      - const は付けない
      - description で legacy / compatibility marker であり、runtime attestation ではないことを明記する
    
    ## Out of Scope 追加案
    
    - `secret_policy` の root required 化
    - `test_secret_boundary_contract.py` fixture の schema-valid 化
    - `test_secret_boundary_contract.py` の CI 登録

    最終判断

    実装は小さいが、セキュリティ契約の意味論が危ない Issue です。
    boundary_enforced を「実行時に境界が実証された」という意味で足すのは不可。runtime_boundary.attested の互換 marker として optional boolean を追加するなら妥当です。

    PR レビュー時の判定基準はこれでよいです。

    verdict: REQUEST_CHANGES_UNTIL_SEMANTICS_CLARIFIED
    required_change:
      - boundary_enforced を runtime attestation として説明しない
      - required / const true にしない
      - runtime_boundary を正本として残す
      - #682 / CI 登録をこの PR で close しない
    merge_ready_after:
      - schema JSON valid
      - target pytest pass
      - additive-only diff confirmed
  3. squne121 commented on Jun 6, 2026

    @squne121
    OwnerAuthor

    Refinement Loop: Approved

    The issue has been approved and is ready for implementation.

  4. squne121 commented on Jun 6, 2026

    @squne121
    OwnerAuthor

    Contract Review: BLOCKED (2026-06-06T12:18:00Z)

    不足項目

    VC preflight が status: blocked を返しました。以下の AC/コマンドに問題があります。

    AC2 — uv run python3 -c (command_not_allowed / blocked)

    uv run python3 -c "import json; s=json.load(...); print(sp['boundary_enforced']['type'])"
    

    uv run python3 -c は VC preflight の allowlist 外です(uv run pytest と uv run python3 -m pytest のみ許可)。

    → 推奨修正: # preflight-scope: pr_review_only マーカーを追加するか、pytest テストに書き直す。

    AC3 — uv run pytest ... ::test_manifest_schema_has_secret_policy_property (human_judgment)

    テストは実行され exit code 1 で失敗(baseline では期待通り失敗)しますが、preflight classifier が category: unknown / decision: human_judgment と判定しました。pytest 失敗の自動分類ができていません。

    → 推奨修正: # preflight-scope: pr_review_only マーカーを追加し、実装後の Step 2 (Verification) で確認する。

    AC4 additive checks — unexpected_pass (blocked)

    rg -n '"runtime_boundary"' docs/schemas/agent-session-manifest.schema.json
    rg -n '"producer_contract"' docs/schemas/agent-session-manifest.schema.json
    

    これらのフィールドは 既にスキーマに存在する ため baseline で exit 0(unexpected_pass/blocked)となります。これらは後方互換性の regression gate チェックですが、baseline_fail_expected として扱われています。

    → 推奨修正: # preflight-scope: pr_review_only マーカーを追加する(既存フィールド確認は baseline-fail の証拠にならないため)。

    AC4 — uv run python3 -c (command_not_allowed / blocked)

    uv run python3 -c "import json; sp=json.load(...); assert 'boundary_enforced' not in req ..."
    

    AC2 と同様。

    → 推奨修正: # preflight-scope: pr_review_only マーカーを追加する。

    分類根拠

    AC コマンド種別 category decision 推奨対処
    AC2 uv run python3 -c command_not_allowed blocked preflight-scope: pr_review_only
    AC3 uv run pytest unknown human_judgment preflight-scope: pr_review_only
    AC4 rg '"runtime_boundary"' unexpected_pass blocked preflight-scope: pr_review_only
    AC4 rg '"producer_contract"' unexpected_pass blocked preflight-scope: pr_review_only
    AC4 uv run python3 -c command_not_allowed blocked preflight-scope: pr_review_only

    推奨アクション

    issue-refinement-loop を起動して VC に # preflight-scope: pr_review_only マーカーを追加してください。
    変更は AC の意味論を変えないため simple_contract_hygiene_fix に分類されます。


    CONTRACT_REVIEW_RESULT_V1:
      status: blocked
      generated_at: "2026-06-06T12:18:00Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/699
      body_sha256: "sha256:4ab5f1d2068ccfabfa6910d8ddec4e2213e2a7a509520026764243647c316e9c"
      checks:
        template_compliance: pass
        state_label: ok
        allowed_paths_present: pass
        vc_present: pass
        stop_conditions_complete: pass
        vc_preflight:
          passed: false
          vc_failed_as_expected: 2
          vc_passed_unexpectedly: 2
          vc_unrunnable: 3
          vc_expected_pass: 0
          vc_skipped: 0
          status: blocked
          classifications:
            - ac: AC1
              command: "rg -n \"boundary_enforced\" docs/schemas/agent-session-manifest.schema.json"
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC2
              command: "uv run python3 -c \"import json; ...\""
              exit_code: null
              classification: blocked
              category: command_not_allowed
              scope_class: baseline_fail_expected
              confidence: high
              decision: blocked
              fix_hint: "'uv run python3' is not in the VC preflight allowlist"
            - ac: AC3
              command: "uv run pytest .claude/hooks/tests/test_secret_boundary_contract.py::test_manifest_schema_has_secret_policy_property -v"
              exit_code: 1
              classification: human_judgment
              category: unknown
              scope_class: baseline_fail_expected
              confidence: low
              decision: human_judgment
              fix_hint: "Unable to automatically classify exit code"
            - ac: AC4
              command: "rg -n '\"boundary_enforced\"' docs/schemas/agent-session-manifest.schema.json"
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC4
              command: "rg -n '\"runtime_boundary\"' docs/schemas/agent-session-manifest.schema.json"
              exit_code: 0
              classification: unexpected_pass
              category: unexpected_pass
              scope_class: baseline_fail_expected
              confidence: medium
              decision: blocked
              fix_hint: "Command unexpectedly passed (field already exists)"
            - ac: AC4
              command: "rg -n '\"producer_contract\"' docs/schemas/agent-session-manifest.schema.json"
              exit_code: 0
              classification: unexpected_pass
              category: unexpected_pass
              scope_class: baseline_fail_expected
              confidence: medium
              decision: blocked
              fix_hint: "Command unexpectedly passed (field already exists)"
            - ac: AC4
              command: "uv run python3 -c \"import json; sp=json.load(...); assert ...\""
              exit_code: null
              classification: blocked
              category: command_not_allowed
              scope_class: baseline_fail_expected
              confidence: high
              decision: blocked
              fix_hint: "'uv run python3' is not in the VC preflight allowlist"
        ac_verifiability: pass
        product_spec_check:
          applicability: not_applicable
          decision: pass
          triggers:
            docs_product_allowed_paths: false
            tasks_md_mentioned: false
            specify_artifact_mentioned: false
            generated_task_mentioned: false
            product_spec_context_present: false
        worktree_branch_collision: clear
      next_action: propose_refinement_loop
      blocked_reasons:
        - "VC preflight blocked: AC2 command_not_allowed (uv run python3 -c)"
        - "VC preflight human_judgment: AC3 unknown classification for pytest failure"
        - "VC preflight blocked: AC4 rg '\"runtime_boundary\"' unexpected_pass"
        - "VC preflight blocked: AC4 rg '\"producer_contract\"' unexpected_pass"
        - "VC preflight blocked: AC4 command_not_allowed (uv run python3 -c)"
      warnings: []
  5. squne121 commented on Jun 6, 2026

    @squne121
    OwnerAuthor

    Contract Snapshot (2026-06-06T12:21:04Z)

    • Outcome: docs/schemas/agent-session-manifest.schema.json に boundary_enforced フィールドが追加され、test_manifest_schema_has_secret_policy_property が PASS する状態にする
    • Acceptance Criteria:
      • AC1: secret_policy.properties に boundary_enforced キーが存在する
      • AC2: boundary_enforced の型が boolean である
      • AC3: test_manifest_schema_has_secret_policy_property が PASS する
      • AC4: docs/schemas/agent-session-manifest.schema.json が有効な JSON である
    • Allowed Paths: docs/schemas/agent-session-manifest.schema.json
    • Worktree: .claude/worktrees/issue-699-docs-schemas-agent-session-manifest-sche
    • Branch: worktree-issue-699-docs-schemas-agent-session-manifest-sche
    • VC preflight: baseline fail = 2, skipped (pr_review_only) = 6, unexpected_pass = 0, unrunnable = 0

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-06-06T12:21:04Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/699
      body_sha256: "sha256:d4c0fe201f857f90a23363d1556489579a8a07fd5014fb67a6c9693f4b66b2e2"
      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: 2
          vc_passed_unexpectedly: 0
          vc_unrunnable: 0
          vc_expected_pass: 0
          vc_skipped: 6
          status: pass
          classifications:
            - ac: AC1
              command: "rg -n \"boundary_enforced\" docs/schemas/agent-session-manifest.schema.json"
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC2
              command: "uv run python3 -c \"...\""
              exit_code: null
              classification: skipped
              category: preflight_scope_pr_review_only
              scope_class: pr_review_only
              confidence: low
              decision: go
              verification_owner: pr-review-judge
              deferred_reason: "VC marked pr_review_only; verification deferred to PR review"
              runtime_verification_required: false
            - ac: AC3
              command: "uv run pytest .claude/hooks/tests/test_secret_boundary_contract.py::test_manifest_schema_has_secret_policy_property -v"
              exit_code: null
              classification: skipped
              category: preflight_scope_pr_review_only
              scope_class: pr_review_only
              confidence: low
              decision: go
              verification_owner: pr-review-judge
              deferred_reason: "VC marked pr_review_only; verification deferred to PR review"
              runtime_verification_required: false
            - ac: AC4
              command: "uv run python3 -c \"import json; json.load(...); print('valid JSON')\""
              exit_code: null
              classification: skipped
              category: preflight_scope_pr_review_only
              scope_class: pr_review_only
              confidence: low
              decision: go
              verification_owner: pr-review-judge
              deferred_reason: "VC marked pr_review_only; verification deferred to PR review"
              runtime_verification_required: false
            - ac: AC4
              command: "rg -n '\"boundary_enforced\"' docs/schemas/agent-session-manifest.schema.json"
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              confidence: high
              decision: go
            - ac: AC4
              command: "rg -n '\"runtime_boundary\"' docs/schemas/agent-session-manifest.schema.json"
              exit_code: null
              classification: skipped
              category: preflight_scope_pr_review_only
              scope_class: pr_review_only
              confidence: low
              decision: go
              verification_owner: pr-review-judge
              deferred_reason: "VC marked pr_review_only; verification deferred to PR review"
              runtime_verification_required: false
            - ac: AC4
              command: "rg -n '\"producer_contract\"' docs/schemas/agent-session-manifest.schema.json"
              exit_code: null
              classification: skipped
              category: preflight_scope_pr_review_only
              scope_class: pr_review_only
              confidence: low
              decision: go
              verification_owner: pr-review-judge
              deferred_reason: "VC marked pr_review_only; verification deferred to PR review"
              runtime_verification_required: false
            - ac: AC4
              command: "uv run python3 -c \"import json; sp=...; assert 'boundary_enforced' not in req ...\""
              exit_code: null
              classification: skipped
              category: preflight_scope_pr_review_only
              scope_class: pr_review_only
              confidence: low
              decision: go
              verification_owner: pr-review-judge
              deferred_reason: "VC marked pr_review_only; verification deferred to PR review"
              runtime_verification_required: false
        ac_verifiability: pass
        product_spec_check:
          applicability: not_applicable
          decision: pass
          triggers:
            docs_product_allowed_paths: false
            tasks_md_mentioned: false
            specify_artifact_mentioned: false
            generated_task_mentioned: false
            product_spec_context_present: false
        worktree_branch_collision: clear
      next_action: implement_issue
      blocked_reasons: []
      warnings: []
  6. squne121 commented on Jun 6, 2026

    @squne121
    OwnerAuthor

    Contract Snapshot — Scope Delta 反映版 (2026-06-06T12:27:33Z)

    Scope Delta: tests/agent-session-manifest.test.ts を Allowed Paths に追加。

    • Outcome: boundary_enforced フィールドを schema に追加し、pytest PASS かつ Vitest 整合を確保する
    • Allowed Paths:
      • docs/schemas/agent-session-manifest.schema.json
      • tests/agent-session-manifest.test.ts(Scope Delta 追加)
    • Worktree: .claude/worktrees/issue-699-docs-schemas-agent-session-manifest-sche
    • Branch: worktree-issue-699-docs-schemas-agent-session-manifest-sche
    • VC preflight: baseline fail = 2, skipped (pr_review_only) = 6, unexpected_pass = 0, unrunnable = 0

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-06-06T12:27:33Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/699
      body_sha256: "sha256:088dd98ed3e6fe5e9f5a83fd292444e63beb6c941486d0c1b060ac6678e58a69"
      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: 2
          vc_passed_unexpectedly: 0
          vc_unrunnable: 0
          vc_expected_pass: 0
          vc_skipped: 6
          status: pass
        ac_verifiability: pass
        product_spec_check:
          applicability: not_applicable
          decision: pass
        worktree_branch_collision: clear
      next_action: implement_issue
      blocked_reasons: []
      warnings:
        - "Scope Delta: tests/agent-session-manifest.test.ts を Allowed Paths に追加(3件の Vitest テスト整合修正のため)"
  7. squne121 commented on Jun 6, 2026

    @squne121
    OwnerAuthor

    実装完了: PR #711 を作成しました。

    #711

    Quality Gates 結果

    • pnpm typecheck: PASS
    • pnpm lint: PASS
    • pnpm test (406 tests): PASS
    • pnpm build: PASS
    • uv run pytest test_manifest_schema_has_secret_policy_property -v: PASS
    • uv run pytest test_model_routing.py (21 tests): PASS
  8. squne121 commented on Jun 6, 2026

    @squne121
    OwnerAuthor

    Contract Snapshot — スコープ変更版 (2026-06-06T13:05:44Z)

    スコープを「schema 変更」から「stale test 修正(#536/#537 整合)」に変更。

    • Outcome: test_manifest_schema_has_secret_policy_property の期待フィールドを新 schema shape に更新し、regression guard を追加する
    • Allowed Paths: .claude/hooks/tests/test_secret_boundary_contract.py
    • Worktree: .claude/worktrees/issue-699-docs-schemas-agent-session-manifest-sche
    • Branch: worktree-issue-699-docs-schemas-agent-session-manifest-sche
    • VC preflight: baseline fail = 2 (AC2/AC3), skipped (pr_review_only) = 2 (AC1/AC4)

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-06-06T13:05:44Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/699
      body_sha256: "sha256:14451b08b799d04bb23301d338d7692cf1d076a81735e9f696200fc35b59ae6b"
      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: 2
          vc_passed_unexpectedly: 0
          vc_unrunnable: 0
          vc_expected_pass: 0
          vc_skipped: 2
          status: pass
          classifications:
            - ac: AC1
              classification: skipped
              category: preflight_scope_pr_review_only
              scope_class: pr_review_only
              decision: go
              verification_owner: pr-review-judge
            - ac: AC2
              command: "rg -n \"producer_contract\" .claude/hooks/tests/test_secret_boundary_contract.py"
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              decision: go
            - ac: AC3
              command: "rg -n \"boundary_enforced.*not in\" .claude/hooks/tests/test_secret_boundary_contract.py"
              exit_code: 1
              classification: expected_fail
              category: expected_baseline_fail
              scope_class: baseline_fail_expected
              decision: go
            - ac: AC4
              classification: skipped
              category: preflight_scope_pr_review_only
              scope_class: pr_review_only
              decision: go
              verification_owner: pr-review-judge
        ac_verifiability: pass
        product_spec_check:
          applicability: not_applicable
          decision: pass
        worktree_branch_collision: clear
      next_action: implement_issue
      blocked_reasons: []
      warnings:
        - "前回の PR #711 はクローズ(boundary_enforced 廃止設計 #536/#537 と逆行するため)"
        - "本 go は新スコープ(stale test 修正)に対する contract review"
  9. added a commit that references this issue on Jun 6, 2026
  10. squne121 commented on Jun 6, 2026

    @squne121
    OwnerAuthor

    PR を作成しました: #715

    実装内容

    .claude/hooks/tests/test_secret_boundary_contract.py の test_manifest_schema_has_secret_policy_property を修正:

    1. 期待フィールドを {"value_exposed", "mode", "producer_contract", "runtime_boundary"} に更新
    2. boundary_enforced の regression guard を追加: assert "boundary_enforced" not in sp_props
    3. docs/schemas/agent-session-manifest.schema.json は変更なし

    AC 確認結果

    • AC1: uv run pytest ... PASSED ✓
    • AC2: producer_contract と runtime_boundary が期待フィールドに含まれる ✓
    • AC3: boundary_enforced.*not in の regression guard が存在する ✓
    • AC4: docs/schemas/agent-session-manifest.schema.json に boundary_enforced なし ✓
  11. added 2 commits that reference this issue on Jun 6, 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/implementationtriage-required

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions