Skip to content

v1.7.1 — a string in evidence: drifts instead of crashing render

Choose a tag to compare

@CesarRivasP CesarRivasP released this 06 Sep 04:00
· 142 commits to main since this release

A registry node written as:

basis: measured
evidence: "44 policies over 25 tables..."

— evidence: a bare string instead of the { how, cmd, date, value } mapping — crashed audit's render with AttributeError: 'str' object has no attribute 'get'.

node.get("evidence") or {} only falls back to {} on a falsy value. A non-empty string is truthy, so it passed straight through to two independent call sites that then call .get() on it:

  • collect_claims feeds it into the claim; status_gate does ev.get(k) and raises.
  • render_value hands it to evidence_block, whose if not ev guard does not catch a non-empty string; the next line raises.

A malformed evidence is exactly the drift the render gate exists to report. A non-dict evidence is now coerced to {} at the claim source and at the evidence_block choke point, so the gate emits

`<path>` is `measured` but evidence lacks: how, cmd, date, value.

instead of raising.

Closes #12

https://claude.ai/code/session_01E1LX3TpcwUptu6Rj3PC42C