Skip to content

P1: Enforcement residue: granted_at stamping, kinds-filter probe, representations witness, red-script check mapping #51

Description

@macanderson

GOVERNANCE's freeze criterion 4 requires the conformance suite to fully enforce the documented requirements. #10's named items (F4 timestamps, B4 flood-frames) landed, but the surface shipped since (#37/#38/#41) has enforcement holes:

  • Representation invariants are unenforced. representation_invariants() / representations_consistent() are unit-tested only — check_frames (contextgraph-conformance/src/lib.rs:467-529) never calls them, the fixture advertises representations: vec![], resolve: false (example-docs.rs:233-234), and no --misbehave mode trips a representation lie. PR Defer the frame-representations witness to unblock #33 #42 deferred this witness noting it was untracked; this issue tracks it. — caller landed in Pre-freeze: normative completeness + enforcement + host conformance (top-10 build) #60: check_frames now invokes the invariants. Residual (survivor): there is still no live witness — no fixture advertises representations and no --misbehave mode trips a representation lie, so the invariants are exercised against nothing.
  • as_of is never probed. sample_query() sends as_of: None (lib.rs:459); the fixture has no disjoint validity windows, so a provider that ignores time-pinned retrieval passes. (Stella uses as_of for bi-temporal retrieval today — this is exercised surface, not speculation.) — landed in Pre-freeze: normative completeness + enforcement + host conformance (top-10 build) #60: the fixture now has disjoint validity windows and a probe that asserts the pin is honoured.
  • Host-side max_frames audit is missing. contextgraph-host/src/host.rs:361 audits only respects_budget(max_tokens); there is no FrameCountLie-style audit, so only the conformance suite ever catches flooding. — landed in Pre-freeze: normative completeness + enforcement + host conformance (top-10 build) #60 via the host-conformance harness (B4), with a named drop reason.
  • ConsentRecord.granted_at is never stamped (contextgraph-host/src/consent.rs:36,51). — still open (the last survivor of Close enforcement gaps: audit max_frames, validate temporal fields as RFC 3339, probe as_of #10).
  • E1 (embedding-fingerprint exact-match gate) has no witness; kinds-filter honoring is unprobed (the sample query sends empty kinds). — E1 landed in Pre-freeze: normative completeness + enforcement + host conformance (top-10 build) #60: fingerprint helpers plus an embedding-fingerprint check with a raw-wire probe and the AcceptBadEmbedding misbehave mode. Residual (survivor): the kinds filter is still unprobed — sample_query() continues to send empty kinds, so a provider that ignores the filter passes.
  • CI looseness: the red script accepts a misbehave mode caught by any check rather than the matching one; tests/docs_site_witness_test.py never runs in CI. — still open.

Related: #10 (predecessor — its named items are done and it can be trimmed to point here), #14 (the host-side harness these host-binding checks belong in), #7 (an anchored-query probe would ride the same fixture work).


Status (2026-07-26): four of the original items are done, four survive.

PR #60 merged four hours after this issue was filed and closed everything the old title advertised — representation witnesses (caller), the as_of probe, the host-side max_frames audit, and the E1 fingerprint. The title was left describing only finished work; it has been rewritten to name the survivors instead.

Survivors:

  1. granted_at stampingConsentRecord.granted_at is still never set.
  2. The kinds-filter probesample_query() sends empty kinds, so filter honoring is unverified.
  3. A live representations witness — the invariants have a caller but nothing to catch: no representation-advertising fixture, no representation-lying --misbehave mode.
  4. The red script's expected-check mapping — a misbehave mode caught by the wrong check still passes the red gate. (tests/docs_site_witness_test.py is still unwired in CI, in the same bullet.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    conformanceThe conformance suite and its checksroadmapPart of the steering roadmap

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions