Skip to content

Doctrine gap: observation degrades that fold faults into benign values must be visible (class + audit) #747

Description

@pbean

Problem

"Observation may degrade, repair writes must raise" is silent on visibility. In practice a degraded observation is routinely folded into the same value a healthy reading produces — [], {}, None, a green status — so the degrade is invisible at the call site and at every surface above it. This is the single most repeated defect shape in the open backlog; the instances below are all open today, and several past incidents (e.g. a faulted scan reading as "nothing to prune") share it.

Known open instances (each remains tracked in its own issue; listed here as the class)

Proposed work

  1. Doctrine amendment (AGENTS.md engineering doctrine + wherever observe/degrade is documented): a degrade must be countable — either the return shape carries a reason (tri-state, reason field) or the seam journals/warns at the point of folding. Silent coercion to a healthy-empty value at an observation seam is a defect, not tolerance.
  2. Mechanical audit for unfiled instances: sweep the observation seams (adapters/, runs.py, tui/data.py, documents.py, machine.py read paths) for except/nonzero-exit arms returning [] / {} / None / "", and file what falls out as individual issues. (Prove absence in Python, not grep.)
  3. Per-seam fixes stay with their member issues. Observation return shapes are compatibility contracts; where a shape must grow a reason channel, that member issue picks up needs-design.

The member issues above stay open and are tracked individually; this issue owns the doctrine text and the audit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Robustness, enhancement, tests, or docs worth schedulingarea:adaptersCoding-CLI adapters and profilesarea:engineOrchestrator engine and run lifecycledocumentationImprovements or additions to documentationenhancementNew feature or requestneeds-designAwaiting a maintainer design decision before code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions