Skip to content

fix(agent-guards): Allowed Paths 正規化を統一する - #1802

Merged
squne121 merged 1 commit into
mainfrom
worktree-issue-1653-materializer-allowed-paths-normalization
Jul 26, 2026
Merged

squne121 merged 1 commit into
mainfrom
worktree-issue-1653-materializer-allowed-paths-normalization

Conversation

@squne121

@squne121 squne121 commented Jul 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • materialize_issue_scope_snapshot.py を contract-review の canonical Allowed Paths grammar に接続しました。
  • backtick、注釈付き entry、non-bullet entry が publisher と同じ正規化結果になることを固定しました。
  • 異なる fingerprint の fail-closed 拒否は既存回帰で維持します。
  • この変更は Markdown 表現差による誤拒否だけを解消し、認可境界を緩和しません。

Checks

  • uv run --locked pytest scripts/agent-guards/tests/test_materialize_issue_scope_snapshot.py -q — PASS (21 passed)
  • live contract の backtick 付き Allowed Paths を、publisher fingerprint と同じ値として materialize transaction が受理しました。

受け入れ条件の達成状況

AC 達成根拠
AC1 materializer が canonical contract-review extractor を利用し、backtick entry を同一 hash に正規化します。
AC2 backtick なしと注釈付き entry を含む parameterized regression で同じ grammar を固定します。
AC3 test_materializer_rejects_allowed_paths_fingerprint_mismatch により異なる hash の拒否を維持します。
AC4 既存の unsafe output・空 Allowed Paths・trusted source の fail-closed regression を含む 21 tests が PASS です。

検証コマンド結果

AC コマンド 結果
AC1 uv run --locked pytest scripts/agent-guards/tests/test_materialize_issue_scope_snapshot.py -q PASS (21 passed)
AC2 uv run --locked pytest scripts/agent-guards/tests/test_materialize_issue_scope_snapshot.py -q PASS (21 passed)
AC3 uv run --locked pytest scripts/agent-guards/tests/test_materialize_issue_scope_snapshot.py -q PASS (21 passed)
AC4 uv run --locked pytest scripts/agent-guards/tests/test_materialize_issue_scope_snapshot.py -q PASS (21 passed)

Allowed Paths 遵守

Schema Change Applicability

  • decision: not_schema_change
  • reason: ISSUE_SCOPE_SNAPSHOT_V1 と contract snapshot の field/schema は変更せず、同一 Allowed Paths の Markdown 表現を canonical grammar に揃える実装修正です。
  • この判定は既存利用者の入出力形式と互換性を保つことを意味します。

Schema Consumer Inventory

N/A
reason: producer/consumer contract の schema・field・互換性は不変です。
この PR は schema の追加、削除、型変更を含みません。

Safety Claim Matrix

Claim Implemented? Not controlled Evidence Follow-up
backtick 表現は publisher と同じ fingerprint になる yes none canonical extractor を直接使用する回帰 none
異なる Allowed Paths は拒否される yes none existing mismatch regression none

Notes

@squne121
squne121 marked this pull request as ready for review July 26, 2026 14:51
@github-actions

github-actions Bot commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Preview URL

Preview removed (PR #1802 closed).

@squne121
squne121 merged commit a4ccec3 into main Jul 26, 2026
27 checks passed
@squne121
squne121 deleted the worktree-issue-1653-materializer-allowed-paths-normalization branch July 26, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

実装: materializerのAllowed Paths正規化をcontract snapshotと統一する

1 participant