Skip to content

Report a crashed FIND_CONSUMER probe as unknown, not as absent - #599

Merged
fdaviddpt merged 1 commit into
mainfrom
fix/578
Aug 27, 2026
Merged

Report a crashed FIND_CONSUMER probe as unknown, not as absent#599
fdaviddpt merged 1 commit into
mainfrom
fix/578

Conversation

@fdaviddpt

Copy link
Copy Markdown
Contributor

Closes #578

What

bin/oss-workspace's FIND_CONSUMER heredoc -- the block that locates the supertool plugin's channel consumer -- ended in || true with no captured exit status, and its json.load was guarded only by except (OSError, ValueError). A RecursionError out of json.load on a deeply nested (but validly-formed) registry escaped that guard, the interpreter exited nonzero, and || true swallowed the status -- so channel_script came back empty with no signal anything had crashed, and the launcher reported the SAME confident "the supertool plugin's channel consumer was not found" sentence it gives for a genuine absence.

This is the third instance of the class #546 and #573/#588 already fixed once each at the sibling ASK_CONSUMER call site. Fix: capture the status on the heredoc's own assignment (&& find_consumer_status=0 || find_consumer_status=$?), the same idiom #588 established, and give a crashed probe its own third-state stderr sentence -- "could not determine whether the supertool plugin's channel consumer is installed ... UNKNOWN rather than absent" -- checked before the existing not-found and registered-but-unverifiable branches, since a crash also leaves channel_script empty.

Sweep

Grepped the whole file for || true and except (. The only other || true (claude mcp remove ... || true) is a different shape -- a deliberate best-effort suppression on a value nobody captures, with its own existing comment explaining why removal is allowed to fail -- and was left alone. The other two except (OSError, ValueError) sites (READ_NAME, DERIVE_NAME) already carry their own status-capture idiom from prior fixes. FIND_CONSUMER was the only remaining unguarded instance.

Tests

tests/test_find_consumer_578.py extracts the acquisition block and the decision chain from the shell file at the shell level (not through a python-only extraction, which would strip the very wrapper this issue is about) and runs them under real sh -eu. Red confirmed against the pre-fix code (unbound-variable / missing-guard-marker failures under set -eu); green against the fix. Paired controls: a deeply-nested registry must produce the could-not-look message and not kill the script under errexit; a well-formed absence and a well-formed hit must both still produce their ordinary answers, unaffected by the new branch.

shellcheck -x bin/oss-workspace exits 0. 175 tests across the related launcher/consumer test files pass, plus this lane's guard (tests/test_unwired_scripts_253.py).

below-bar

None found in this diff -- see the agent report's adjacent survey (checked, no items) for the full account.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01Wr8bkvu4ac3hpnHcG99fec

bin/oss-workspace's FIND_CONSUMER heredoc discarded a crashed probe's exit
status via a trailing `|| true`, so a RecursionError out of json.load on a
deeply nested registry landed in the same branch a genuine absence lands
in -- reporting the confident, plausible "channel consumer was not found"
sentence for a crash nobody had reason to doubt. Capture the status on the
heredoc's own assignment, the #588 idiom, and give a crashed probe its own
third-state sentence distinct from both the not-found and
found-but-unverifiable arms already in that block.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wr8bkvu4ac3hpnHcG99fec
@fdaviddpt
fdaviddpt merged commit afc1f11 into main Aug 27, 2026
14 checks passed
@fdaviddpt
fdaviddpt deleted the fix/578 branch August 27, 2026 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bin/oss-workspace's FIND_CONSUMER heredoc still discards a crashed probe's exit status, so a crash renders as a genuine absence

1 participant