Commit 8238dd8
fix(resolution): merge.py レビュー指摘対応 — RED-to-GREEN テスト化+inline 化(microsoft#3169)
@MohammadHaroonAbuomar のレビュー対応:
- 【必須】test_conditions_overlap_..._unsat_bias は同一 condition 2つで
_condition_key 一致の早期 return を踏むだけで、main でも pass=新ロジックを
検証できていなかった。レビュアー提案の具体例で書き直し:
親 deny = {and:[{x in []}, {tool eq shell}]}(_condition_unsatisfiable が
unsatisfiable と分類するが tool==shell で子と重なる)vs 非同一の子 allow。
→ main では子 allow が生き残る(fail-open)= RED、本ブランチでは drop = GREEN
を実機で確認済み。これにより本指摘が defense-in-depth ではなく実在の
fail-open であることも実証。
- _condition_key 早期 return の sanity guard を別テストに分離。
- minor: _flag エイリアスを廃し ignore_left_unsatisfiable を直接渡す(grep性)。
検証: test_merge_deny.py + test_manifest_resolution.py 58 passed。
新テストは main で RED / 本ブランチで GREEN を確認。
Refs microsoft#3137
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VT2CfGX3tmPsQaofuuWwED1 parent a32197b commit 8238dd8
2 files changed
Lines changed: 42 additions & 11 deletions
File tree
- agent-governance-python/agt-policies
- src/agt/manifest_resolution
- tests
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
261 | 260 | | |
262 | 261 | | |
263 | 262 | | |
264 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
265 | 266 | | |
266 | 267 | | |
267 | 268 | | |
268 | 269 | | |
269 | 270 | | |
270 | | - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
271 | 274 | | |
272 | 275 | | |
273 | 276 | | |
274 | 277 | | |
275 | 278 | | |
276 | 279 | | |
277 | | - | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
278 | 283 | | |
279 | 284 | | |
280 | 285 | | |
281 | 286 | | |
282 | 287 | | |
283 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
284 | 291 | | |
285 | 292 | | |
286 | 293 | | |
| |||
Lines changed: 30 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
0 commit comments