Skip to content

BUG: coordination-ledger contract suite writes fixture claims into the production ledger #642

Description

@aarontrowbridge

Important

Problem — The coordination-ledger contract suite constructs the sqlite service with its default path, which resolves to the production claims ledger when no isolation env is set. Every contract run appends synthetic fixture rows (fake agents, users, orgs) into the production ledger — the server's ledger held 176 such rows and zero real claims before being archived by ops today. The Prova isolation bridge (the simulated-ledger partition env, documented in the amico-run ledger docs) exists for exactly this and is not used by the suite.
Approach — Isolate the contract suite: point every service construction in the suite at a per-test tmp partition via the existing claims-file env (or an explicit path parameter if the service constructor accepts one), and assert the production path is never touched. Contract semantics must remain identical and the suite stays green.
Scope — in: the contract suite + the minimal source seam needed for path injection · out: production ledger behavior, schema changes, the ledger verb surface.

Acceptance Criteria

  • Contract suite passes with the claims path isolated per test run, asserting no write reaches the production ledger
  • A fresh contract-suite run leaves a pristine claims ledger untouched (true in CI and locally)
  • Close-out notes the ops archive of the polluted production ledger (archived 2026-08-30, no in-repo action needed)

Testing Decisions

Extend the existing coordination-ledger contract suite (reuse-first); no new suite.

Prior Art

The Prova persona-QA gym's isolation bridge (the amico-run ledger docs own its description) is the intended pattern; the coordination service module owns the default-path resolution seam.

Notes

Evidence gathered 2026-08-30, skill-health campaign (session-20260830-skill-health §7): 176 fixture rows written Aug 16–27 by repeated contract runs; root cause is default-path resolution in the coordination service when the isolation env is unset. Part of the skill-health campaign, Phase 0.4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    afkImplementable without human interaction

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions