diff --git a/CHANGELOG.md b/CHANGELOG.md index 48918f40..019f8466 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ ### Changed -- Contributor guidance now requires explicit `Contract Routing` for contract-affecting PRs and `Contract Change` when a PR intentionally changes an existing product, runtime, or review contract. Contract tests must move with the corresponding docs instead of silently redefining behavior by themselves. +- Contributor guidance now requires explicit `Contract Routing` for contract-affecting PRs and `Contract Change` when a PR intentionally changes an existing product, runtime, or review contract. Contract tests must move with the corresponding docs instead of silently redefining behavior by themselves, with the current static coverage documented as advisory rather than a GitHub policy gate. ## [v0.51.137] — 2026-05-25 — Release DI (stage-batch19 — 6-PR medium-risk batch) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 262b33c4..14c548bf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,6 +26,9 @@ A contract-affecting PR is any change that updates a public contract document, an RFC, a contributor guide, a product-semantics test, or behavior that those documents already describe. These PRs need an explicit `Contract Routing` section in the PR body that names the touched contract family and the evidence used. +See [`docs/CONTRACTS.md#contract-routing`](docs/CONTRACTS.md#contract-routing) +for the short routing shape and [`docs/CONTRACTS.md#contract-changes`](docs/CONTRACTS.md#contract-changes) +for intentional contract changes. If the PR intentionally changes an existing contract, add a `Contract Change` section that states the old rule, the new rule, and why the change is justified. diff --git a/docs/CONTRACTS.md b/docs/CONTRACTS.md index 95a141c3..13f5d659 100644 --- a/docs/CONTRACTS.md +++ b/docs/CONTRACTS.md @@ -118,6 +118,13 @@ product semantics must not silently redefine the contract by asserting the opposite behavior without updating the public docs and naming the change in the PR body. +The static tests for this guidance are advisory coverage. They pin contributor +wording so the rule stays visible. This advisory coverage is not an automated +policy gate; static coverage is not an automated policy gate and does not enforce +PR-body content on GitHub. A future release-time or CI check could +surface contract-affecting diffs whose PR body lacks `Contract Routing`, but this +document only defines the review expectation. + Release batches should list included contract-affecting PRs explicitly so reviewers can distinguish ordinary green-CI fixes from changes that update the project's product or runtime guardrails. diff --git a/tests/test_contract_review_gate.py b/tests/test_contract_review_gate.py index 87b95ad8..93c17452 100644 --- a/tests/test_contract_review_gate.py +++ b/tests/test_contract_review_gate.py @@ -32,3 +32,18 @@ def test_contracts_requires_docs_tests_and_pr_body_to_move_together(): missing = [term for term in required_terms if term not in text] assert missing == [] + + +def test_contract_guidance_names_static_coverage_as_advisory_not_enforcement(): + text = CONTRACTS.read_text(encoding="utf-8") + + required_terms = [ + "advisory", + "not an automated policy gate", + "does not enforce", + "PR-body content", + "release-time", + ] + + missing = [term for term in required_terms if term not in text] + assert missing == []