feat(cases): enforce purpose-bound case governance
Module Package Release / publish-packages (push) Successful in 12s

This commit is contained in:
2026-08-24 20:05:31 +02:00
parent 9435116299
commit 17415d8831
28 changed files with 786 additions and 142 deletions
@@ -67,6 +67,20 @@ class CasesInterfaceDocumentationContractTests(unittest.TestCase):
owner_links.metadata["consequence_classes"],
)
def test_information_governance_claims_are_bounded_and_documented(self) -> None:
manifest = get_manifest()
governance = manifest.information_governance
self.assertEqual("enforced", governance.temporal_browsing.adoption)
self.assertEqual("enforced", governance.purpose_aware_access.adoption)
self.assertEqual("enforced", governance.institutional_context.adoption)
self.assertEqual("contract_only", governance.retention.adoption)
self.assertIn("legal holds", governance.retention.limitation or "")
self.assertTrue(governance.current_authorization_for_historical_reads)
topics = {topic.id: topic for topic in manifest.documentation}
purpose = topics["cases.governance.purpose-bound-access"]
self.assertIn("cases.field.access-purpose", purpose.metadata["help_contexts"])
self.assertIn("cases.field.allowed-purposes", purpose.metadata["help_contexts"])
def test_webui_uses_shared_help_guard_and_confirmation_components(self) -> None:
list_page = (REPO_ROOT / "webui/src/features/cases/CasesPage.tsx").read_text(
encoding="utf-8"