Skip to content

Verification Discipline: Four Ways a Check Reports Success Without Establishing Anything #1296

Closed as duplicate

Description

@ptr727

Filed from ptr727/HomeAutomation-Config after an orchestrated session in which each of these produced a confident but wrong answer. All four are fleet-wide measurement traps rather than anything specific to that repository, which is why they are filed here rather than carried locally. Tracked downstream as ptr727/HomeAutomation-Config#154.

Related but distinct from #1241, which corrects defects in the existing text of this unit. This adds hazards the unit does not currently cover.

1. A wait that cannot fail reads as "still running" forever

until ! pgrep -f docker_lint.py; do sleep 5; done

pgrep -f matches full command lines, and the until command's own command line contains the pattern, so the condition can never become true. The loop spins silently until the session ends. It never errors, so nothing distinguishes it from work still in progress.

This is the failure mode AGENTS.md already warns about for a backgrounded wait, that the three outcomes render identically, appearing in a new form: here the wait is not merely silent, it is structurally incapable of succeeding. Match on a marker the watcher itself does not contain, or poll the output for a completion line.

2. An agent's working directory does not reliably persist between tool calls

A cd into one repository for a single command left a later git show origin/develop:<path> reading a different repository entirely. It failed loudly only because that path did not exist there. For any path the two repositories share, it would have returned the wrong content silently.

The rule that follows is mechanical: pass git -C <path> on every invocation rather than relying on an earlier cd. This matters more than it sounds, because the boundaries section already requires that a mutating command take an absolute path or a cd in the same invocation. The same reasoning applies to reads, and reads are where a wrong answer is least likely to be noticed.

3. Linting the primary checkout does not measure the branch

Where work lands through worktrees, the primary checkout lags whatever is on the branch. A linter run there reported findings that the branch had already fixed, and the report was acted on before the discrepancy was caught.

Extract from the branch and lint that:

tmp=$(mktemp -d)
mkdir -p "$tmp/$(dirname <path>)"
git show "origin/<branch>:<path>" > "$tmp/<path>"
# run the linter against $tmp

This generalises past linting to every "measure the code" step, and it pairs with the existing rule that a clean local copy of a gate script is not evidence CI passes.

4. A test suite that has never been run against the unfixed code proves nothing

The most useful discipline the session produced is not currently stated anywhere. Every assertion suite reported two numbers: how many assertions pass on the branch, and how many fail when run against the pre-change file. The second is what separates a test that measures a change from one that merely passes alongside it.

It caught a real defect in its own right: one harness's pre-change run failed while assembling its fixture rather than on the defect, so it would have shown a green-to-red transition that had nothing to do with the change.

Worth stating as a requirement wherever a change claims test coverage: report the pre-change failure count, and treat a suite with zero pre-change failures as unproven rather than as passing.

Activity

  1. added
    prose
    on Sep 5, 2026
  2. ptr727 commented on Sep 5, 2026

    @ptr727
    OwnerAuthor

    Rolled up per #1315 into the unit tracker(s) #1366: every finding this issue enumerates appears there as a numbered line naming this issue. Closing as a duplicate of those trackers so no finding is lost and this bundle stops being a unit of work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    prose

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions