Functions | |
| str | digest_of (list paths) |
| Deterministic digest over an ordered list of files. | |
| list | surface_paths (dict surface) |
| The files a surface fingerprints. | |
| str | enforcement_of (dict surface) |
| Whether a suspicion on this surface blocks. | |
| list | validate_manifest (list surfaces, set published) |
| Structural checks on the manifest itself. | |
| dict | evaluate (list surfaces, set published) |
| Classify every surface as current, suspect, or an integrity failure. | |
| list | blocking_entries (dict report) |
| The suspicions that must fail the build. | |
| list | attest (list surfaces, list wanted) |
| Record the current digests as reviewed. | |
| int | main () |
| Report freshness, or re-attest reviewed surfaces. | |
Variables | |
| REPO_ROOT = Path(__file__).resolve().parents[2] | |
| str | MANIFEST = REPO_ROOT / "tests" / "tooling" / "freshness_manifest.json" |
| str | PAGE_TYPES = REPO_ROOT / "tests" / "tooling" / "page_types.json" |
| tuple | VALID_TIERS = ("hard", "soft") |
| tuple | VALID_ENFORCEMENT = ("blocking", "report") |
| dict | SURFACE_KEYS |
| str | UNATTESTED = "unattested" |
Tiered documentation freshness: hard suspicion, soft suspicion, integrity failure. A fingerprint answers one question: has the thing a page describes changed since a human or agent last compared the page against it? It never claims the page is wrong, and matching digests never claim the page is right. It routes review.
| str audit_freshness.digest_of | ( | list | paths | ) |
Deterministic digest over an ordered list of files.
The path is hashed alongside the bytes so that moving content between watched files is itself a change.
| [in] | paths | Repository-relative paths. |
Definition at line 31 of file audit_freshness.py.
| list audit_freshness.surface_paths | ( | dict | surface | ) |
The files a surface fingerprints.
| [in] | surface | One manifest entry. |
Definition at line 49 of file audit_freshness.py.
| str audit_freshness.enforcement_of | ( | dict | surface | ) |
Whether a suspicion on this surface blocks.
| [in] | surface | One manifest entry. |
Definition at line 60 of file audit_freshness.py.
Structural checks on the manifest itself.
A malformed manifest is an integrity failure, not ordinary staleness: it means coverage is broken and the absence of suspicion proves nothing.
| [in] | surfaces | Manifest entries. |
| [in] | published | Ids of published pages. |
Definition at line 69 of file audit_freshness.py.
| dict audit_freshness.evaluate | ( | list | surfaces, |
| set | published | ||
| ) |
Classify every surface as current, suspect, or an integrity failure.
| [in] | surfaces | Manifest entries. |
| [in] | published | Ids of published pages. |
Definition at line 132 of file audit_freshness.py.
| list audit_freshness.blocking_entries | ( | dict | report | ) |
The suspicions that must fail the build.
| [in] | report | Output of evaluate(). |
Definition at line 167 of file audit_freshness.py.
Record the current digests as reviewed.
| [in] | surfaces | Manifest entries, mutated in place. |
| [in] | wanted | Surface ids, or ["all"]. |
Definition at line 177 of file audit_freshness.py.
| int audit_freshness.main | ( | ) |
Report freshness, or re-attest reviewed surfaces.
Definition at line 195 of file audit_freshness.py.
| audit_freshness.REPO_ROOT = Path(__file__).resolve().parents[2] |
Definition at line 18 of file audit_freshness.py.
| str audit_freshness.MANIFEST = REPO_ROOT / "tests" / "tooling" / "freshness_manifest.json" |
Definition at line 19 of file audit_freshness.py.
| str audit_freshness.PAGE_TYPES = REPO_ROOT / "tests" / "tooling" / "page_types.json" |
Definition at line 20 of file audit_freshness.py.
| tuple audit_freshness.VALID_TIERS = ("hard", "soft") |
Definition at line 22 of file audit_freshness.py.
| tuple audit_freshness.VALID_ENFORCEMENT = ("blocking", "report") |
Definition at line 23 of file audit_freshness.py.
| dict audit_freshness.SURFACE_KEYS |
Definition at line 24 of file audit_freshness.py.
| str audit_freshness.UNATTESTED = "unattested" |
Definition at line 28 of file audit_freshness.py.