Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ All notable changes to this project are documented here. Format follows

### Fixed

- The product-gap baseline now records private-runtime findings only as
aggregate synthetic-fixture contracts and identifies the existing
post-scoped lineage DAG without retaining post or organization identifiers.
- The public ontology now states its OWL 2 Full/RDF-Based semantics for the
ADR 0036 RDF-reified project evidence, and the PROV-O support profile uses
its canonical lowercase deployed IRI.
Expand Down
24 changes: 24 additions & 0 deletions tests/test_documentation_hygiene.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,19 @@

_ROOT = Path(__file__).resolve().parents[1]
_ADR_DIRECTORY = _ROOT / "docs" / "adr"
_PRODUCT_GAP_BASELINE = _ROOT / "docs" / "product-technical-gap-baseline.md"
_ROLE_CATALOG_COLUMNS = (
"cataloged_team_id",
"cataloged_corporate_entity_id",
"cataloged_person_id",
)
_ADR_NAME = re.compile(r"^(?P<number>[0-9]{4})-.+\.md$")
_PRIVATE_POST_IDENTIFIER = re.compile(
r"(?i)"
r"\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b"
r"|\bpost(?:_id)?\s*(?:=|:)\s*[`'\"]?[a-z0-9][a-z0-9-]{5,}"
r"|\bpost\s+[`'\"]?(?:[0-9][a-z0-9-]{5,}|[a-f][a-f0-9-]{7,})\b"
)
Comment thread
seonghobae marked this conversation as resolved.
_FORBIDDEN_MARKERS = (
"PLACEHOLDER_DO_NOT_WRITE",
"TODO_WRITE_ADR",
Expand Down Expand Up @@ -46,6 +53,23 @@ def test_adr_numbers_are_unique_and_documents_are_not_placeholders() -> None:
assert duplicates == [], f"duplicate ADR numbers: {duplicates}"


def test_product_gap_baseline_contains_no_private_post_identifiers() -> None:
"""Buyer-gap evidence stays aggregate and cannot identify private runtime posts."""
baseline = _PRODUCT_GAP_BASELINE.read_text(encoding="utf-8")

for private_reference in (
"post=synthetic-12345",
"post: synthetic-12345",
"post 12345678",
"00000000-0000-4000-8000-000000000000",
):
assert _PRIVATE_POST_IDENTIFIER.search(private_reference)
assert _PRIVATE_POST_IDENTIFIER.search("authorized post evidence remains aggregate") is None

match = _PRIVATE_POST_IDENTIFIER.search(baseline)
assert match is None, f"private post identifier in product-gap baseline: {match.group(0)!r}"
Comment thread
seonghobae marked this conversation as resolved.


def test_fetch_persisted_summary_reads_stored_catalog_ids() -> None:
"""ADR 0019 / 0027: fetch must not rejoin the catalog by a non-unique name."""

Expand Down