docs: add files workflow assurance topics
This commit is contained in:
@@ -4,10 +4,12 @@ import unittest
|
||||
|
||||
|
||||
TOPIC_IDS = {
|
||||
"files.workflow.upload-organize-and-share",
|
||||
"files.workflow.import-managed-snapshot",
|
||||
"files.governed-connectors-and-provenance",
|
||||
"files.reference.integrity-recovery-and-fail-closed-transports",
|
||||
"files.reference.snapshot-provenance-and-capabilities",
|
||||
"files.assurance.process-and-release-readiness",
|
||||
}
|
||||
HANDBOOK_HREF = "govoplan-files/docs/FILES_HANDBOOK.md"
|
||||
|
||||
@@ -52,6 +54,28 @@ class FilesManifestDocumentationTests(unittest.TestCase):
|
||||
self.assertIn("never mutate the remote source", topic.body)
|
||||
self.assertIn("/api/v1/files/connectors/profiles/{profile_id}/import", {link.href for link in topic.links})
|
||||
|
||||
def test_managed_file_workflow_covers_upload_organization_and_current_share_boundary(self) -> None:
|
||||
topic = self.topic("files.workflow.upload-organize-and-share")
|
||||
|
||||
self.assertEqual(("user",), topic.documentation_types)
|
||||
self.assertEqual("workflow", topic.metadata["kind"])
|
||||
self.assertEqual(
|
||||
{
|
||||
"files:file:read",
|
||||
"files:file:upload",
|
||||
"files:file:organize",
|
||||
"files:file:share",
|
||||
},
|
||||
set(topic.conditions[0].required_scopes),
|
||||
)
|
||||
for key in ("prerequisites", "steps", "outcome", "verification"):
|
||||
self.assertTrue(topic.metadata[key])
|
||||
self.assertIn("does not yet provide a general share editor", topic.body)
|
||||
self.assertIn("no share-revocation route", topic.body)
|
||||
self.assertIn("/api/v1/files/upload", {link.href for link in topic.links})
|
||||
self.assertIn("/api/v1/files/transfer", {link.href for link in topic.links})
|
||||
self.assertIn("/api/v1/files/{file_id}/shares", {link.href for link in topic.links})
|
||||
|
||||
def test_admin_topic_covers_policy_redaction_and_atomic_credential_deletion(self) -> None:
|
||||
topic = self.topic("files.governed-connectors-and-provenance")
|
||||
|
||||
@@ -93,6 +117,23 @@ class FilesManifestDocumentationTests(unittest.TestCase):
|
||||
self.assertIn("exact asset, version, blob, checksum", topic.body)
|
||||
self.assertIn("collaboration", topic.body)
|
||||
|
||||
def test_process_and_release_assurance_exposes_gates_evidence_and_limits(self) -> None:
|
||||
topic = self.topic("files.assurance.process-and-release-readiness")
|
||||
|
||||
self.assertEqual(("admin", "user"), topic.documentation_types)
|
||||
self.assertEqual("workflow", topic.metadata["kind"])
|
||||
self.assertIn("process_owner", topic.audience)
|
||||
self.assertIn("release_manager", topic.audience)
|
||||
self.assertIn("versions align", topic.body)
|
||||
self.assertIn("no general share-management UI or share revocation", topic.body)
|
||||
self.assertIn("no enforced retention or legal hold", topic.body)
|
||||
for key in ("prerequisites", "steps", "outcome", "verification"):
|
||||
self.assertTrue(topic.metadata[key])
|
||||
self.assertTrue(any("meta-repository security" in step for step in topic.metadata["steps"]))
|
||||
self.assertTrue(any("fails closed" in step for step in topic.metadata["steps"]))
|
||||
self.assertTrue(any("SHA-256" in step for step in topic.metadata["steps"]))
|
||||
self.assertIn(HANDBOOK_HREF, {link.href for link in topic.links if link.kind == "repository"})
|
||||
|
||||
def test_internal_related_topic_ids_resolve(self) -> None:
|
||||
for topic in self.topics.values():
|
||||
for related_id in topic.metadata.get("related_topic_ids", []):
|
||||
|
||||
Reference in New Issue
Block a user