Skip to content

Guarantee catalog: add per-ID contract tests to catch semantic drift #66

Description

@Eilodon

Recovered architecture-audit finding 11.2 (docs/plans/2026-08-07-audit-findings-recovery-and-open-work-execution-plan.md §7).

docs/guarantee-levels.toml is the source of truth for CALM's behavioral guarantees, and scripts/gen-status.sh --check already fails CI on format/presence drift (a stale entry vs the rendered docs/status.generated.md). But there is no contract test per guarantee ID — nothing asserts that the behavior a given ID describes still holds in code.

Example: guarantee::txn.begin_before_write (level enforced) claims a write is refused if the durable transaction journal can't start. Today only a human reading the TOML links that sentence to txn.rs; a refactor that silently weakened it would pass CI.

Scope

A small framework mapping each enforced guarantee ID to a test that exercises the specific behavior it promises, so a semantic regression fails the build the same way a format drift does. Start with the enforced-level entries (the ones users are told to rely on).

Meta-tooling / new test framework — related to the machine-readable-limitations idea (11.1b) and the durable-record theme in this plan's §3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions