feat(qa): treat ae.config thresholds as hints; policy remains SSOT (#918) #971
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.
Context\n- Aligns with Foundation direction to centralize gates in policy/quality.json and keep ae.config thresholds as developer hints.\n\nChanges\n- QA CLI: always warn when ae.config.qa.coverageThreshold is present; use policy thresholds for enforcement/display (profile via AE_QUALITY_PROFILE or CI→ci).\n- Docs: clarify precedence policy > AE-IR > ae.config; call out hint-only behavior.\n- Tests: small unit test covering resolution/mismatch path (isolated).\n\nNotes\n- CI decision logic is unchanged; this only affects local CLI output/runtime messaging.\n- Vitest full suite has unrelated failures in resilience tests; targeted test passes when run in isolation in typical env.\n\nWhy hints, not gates\n- Single source of truth avoids drift and conflicting thresholds across tools.\n- ae.config serves local developer ergonomics, while policy governs team/CI baselines.\n\nRefs: #918\n\n\nUpdate (Wave 2)\n- Deduped warning: shows once per run; added suppression via AE_SUPPRESS_CONFIG_HINTS=true (for CI noise control).\n- Message clarifies precedence: policy > AE-IR > ae.config and points to policy/quality.json for migration.\n- quality:validate now summarizes AE-Config hint presence (keys) for quick visibility.\n- Added tests: warning dedup and suppression.\n\nLog excerpt\n\n[ae:qa] Using coverage thresholds from policy/quality.json (profile: ci)\n[ae:qa] thresholds → lines=85, functions=85, branches=80, statements=85\n[ae:qa] WARN: ae.config.qa.coverageThreshold is treated as a hint. Policy is the source of truth.\n[ae:qa] Precedence: policy > AE-IR > ae.config (profile: ci)\n[ae:qa] hint → lines=90, functions=90, branches=90, statements=90\n[ae:qa] HINT differs from policy thresholds. Enforcement will follow policy.\n[ae:qa] Migrate thresholds in policy/quality.json (coverage.thresholds.*) to change enforcement.\n\nSuppress\n- export AE_SUPPRESS_CONFIG_HINTS=true\n\nDocs\n- Added docs/quality/precedence.md (precedence and migration example).\n\n### レビュー抄録\n- 機能/挙動のリグレッションは確認されず、目的(ヒント扱い/SSOT準拠/メッセージ整備)を満たしています。\n- 例・ドキュメントの変更は既存構成と整合し、CI/ローダーの意味論への影響はありません。\n- ログ抑制/デデュープの方針は妥当で、運用上のノイズ低減に寄与します。\n\n### 内因/外因の切り分け\n- 内因(本PRによる変更範囲)\n - 警告のデデュープ/抑制(ログのみ)、quality:validate の要約表示、Docs 追加。\n - 影響は CLI ログ/ドキュメントに限定。ゲート/ローダーの意味論やCI判定には不影響。\n - 追加ユニットテスト(デデュープ/抑制)はローカルで緑(vitest)。\n- 外因(既存のCI/テストの赤要因)\n - resilience 系テストの一部不安定/失敗、TypeScript build の一部厳格化によるエラー等。\n - 本PRの変更とは独立。別PRで最小差分の是正を行う予定(verify-lite/testing-ddd の調整など)。