---
title: "Three Reviews Flagged Line 43 of close_gaps_daily.ps1"
canonical: https://dxdev.com/blog/exit-code-one-overloaded-verdict-hid-failures/
datePublished: 2026-10-17
---
A cron wrapper change would have logged real failures as success. Three reviews flagged the same line, line 43 of `close_gaps_daily.ps1`.

The wrapper recorded any exit 1 without a Python traceback as the expected "gaps found" verdict.

## The verdict that looked like a failure

PreReleaseScan and CloseGaps both use rc=1 as a verdict, and the cron health view was recording that verdict as a failed run. The commit normalised it: a verdict rc=1 is no longer recorded as a failed run, and a Traceback keeps its rc. The commit's test run reported 89 passing.

The heuristic assumed that an exit 1 with no traceback was the verdict. The wrapper looked for the literal Python traceback header, and if it was absent, the run was recorded as a success.

## Three reviews, one finding

The first review was Manus (standard, 171cr, 231.39s) at 1:02 am, flagged high. It said the new rc=1 normalization "treats every non-traceback exit as an expected 'gaps found' verdict."

Codex (high, 243.67s) came in at 1:06 am, also high: "The traceback heuristic converts genuine failures into success." It cited `_client()`.

A second Codex pass (high, 195.93s) at 1:20 am, medium this time, said it again: "Every exit-1 result lacking the literal Python traceback header is recorded as success."

What the commit actually quieted was every exit 1 that didn't print a traceback.

## Giving failures their own exit code

The review-fix commit made missing tracker credentials and a missing sprint exit rc 2, so the rc=1 normalisation can no longer hide a failed scan. rc=1 stays the verdict.

Two related changes went in with it:

- `daemon_health` now treats a failed task enumeration as unknown, and a same-name enabled task as not parked.
- A tautology assertion in the tests was fixed.

The tests run for the fix covered daemon_health, the [cron exit codes](/blog/2026-09-26_agent-health-hourly-not-manual/), close_gaps and prerelease, and 104 pass.

A failed scan now exits rc 2, so it never lands on the rc=1 path the wrapper treats as "gaps found."
