diff --git a/testing/quality_contract.json b/testing/quality_contract.json index 2195a6a6..06741e18 100644 --- a/testing/quality_contract.json +++ b/testing/quality_contract.json @@ -5,10 +5,6 @@ "path": "README.md", "description": "Top-level repository handbook." }, - { - "path": "AGENTS.md", - "description": "Shared repository operating instructions." - }, { "path": "Jenkinsfile", "description": "Top-level Jenkins mirror for multibranch discovery." diff --git a/testing/tests/test_quality_contract.py b/testing/tests/test_quality_contract.py index 8cd9e630..e5f97d00 100644 --- a/testing/tests/test_quality_contract.py +++ b/testing/tests/test_quality_contract.py @@ -16,6 +16,18 @@ def test_bundled_contract_exposes_local_and_jenkins_profiles(): assert contract["pytest_suites"]["unit"]["paths"] +def test_bundled_contract_keeps_monorepo_manifest_trees_out_of_hygiene_scope(): + contract = load_contract() + required_doc_paths = {item["path"] for item in contract.get("required_docs", [])} + assert "AGENTS.md" not in required_doc_paths + + globs = contract.get("hygiene", {}).get("line_limit_globs", []) + assert globs + for entry in globs: + assert entry.startswith(("testing/", "ci/", "scripts/tests/", "services/")) + assert "/scripts/" in entry or not entry.startswith("services/") + + def test_docs_check_reports_missing_docstring_and_missing_path(tmp_path: Path): module_path = tmp_path / "managed.py" module_path.write_text("value = 1\n", encoding="utf-8")