Skip to content

N-01: A shared "scan completeness" contract across every read-only command #291

Description

@gfargo

Value: high. The single most repeated defect class in this codebase is reporting clean when the scan didn't
actually run
. It was fixed for a11y in #160, and B-01/B-04 show briefing reintroducing it — because the fix lived
in one command instead of in a shared shape.

Introduce a small shared result envelope — { complete: boolean, errors: ScanError[], truncated: string[] } — and make
audit, a11y, briefing, verify and stats all populate it, with one helper that decides the exit code from it.
Then add a single test that asserts every read-only command's --json carries the envelope, so the next scan command
can't ship without it. This is the structural fix that makes B-01, B-04 and B-07 non-recurring rather than three
one-off patches.


Extracted from a repo audit performed 2026-07 (the audit doc it came from was proposed via an unmerged docs PR).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions