Add fail-closed ADR wiring verification#521
Merged
proboscis merged 4 commits intoJul 14, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
session.itemsを照合する wiring 自己検査を追加しました。warn、strictは未収集ファイルを列挙して非ゼロ終了します。doeff-adr verify-wiringconsole script は下流リポジトリの CI 一行ゲートとして維持します。tests/test_adr_wiring_gate.pyが strict collect-only を subprocess 起動し、ADR-DOE-ENFORCE-001 R1 の pytest 正典ゲートへ常時組み込みます。ADR-DOE-ADR-001として記録し、proboscis-ema / agent-control-plane の導入手順を README に追加しました。origin/main@a5dc3eb1を取り込み、DOMAIN-001 designed-red を xfail(strict) 相当に変更し、enforcement ledger の増加を明示記帳しました。defsemgrepは Semgrep 不在時に skip せず fail-closed である現行契約を回帰テストで固定しました。根本原因
従来の
pytest_collect_filehook は pytest が既に走査対象にしたファイルしか受け取れず、testpathsや CI 引数の外にあるdefadr_*.hyの存在を観測できませんでした。そのため、ファイルが存在しても検査が無音で不活性化していました。Verification 対応表
packages/doeff-adr/tests/test_wiring.py::test_strict_wiring_fails_when_defadr_is_outside_collection_scopetests/test_adr_wiring_gate.py::test_all_executable_adrs_are_collected_by_default_pytest_gate(ADR-DOE-ENFORCE-001 R1 の pytest 正典ゲート)docs/adr/defadr_doeff_adr_001_wiring_selfcheck.hy::test_ADR_DOE_ADR_001_adr_contract、docs/adr/defadr_doeff_adr_001_wiring_selfcheck.hy::test_no_silent_off_wiring_default_defsemgreppackages/doeff-adr/tests/test_defadr_macros.py::test_defsemgrep_fails_when_semgrep_executable_is_missingtests/test_enforcement_ledger.py::test_enforcement_inventory_matches_ledgerVerification deviations
issue の Done 条件「CI で実行される」は GitHub CI 無効(予算)のため pytest 正典ゲートで充足(ADR-DOE-ENFORCE-001 R1)。CLI は下流リポジトリの CI 用に維持。
実行結果
make sync:--features invariant-checks付き VM 再ビルド成功uv run pytest -q: 1147 passed, 86 skipped, 1 xfailed, failed 0uv run doeff-adr verify-wiring: successorigin/mainと差分なしuv build --package doeff-adr: wheel / sdist success、wheel 内 console script と pytest11 entry point を確認既知の baseline
make lint全体は変更外の既存 Ruff findings で停止します。今回の変更 Python ファイルを対象にした Ruff と format check は green です。Reference:
doeff-adr-wiring-selfcheck