Problem
PR #1109 (fix: surface prompt stream errors instead of hanging query()) only handles errors inside stream_input's own try/except. The "hanging query()" symptom has at least 3 other plausible root causes not addressed.
Impact
- The fix may not address the actual hang root cause in many cases
- A real hang could still occur in the unhandled scenarios
- The test relies on
anyio.fail_after(5) to convert a hang into a pass - brittle and not really a failing-first test
What was audited
MCE audit Tcas1109 (2026-07-19) caught 3 HIGH attacks via F-C:
- The test does not actually exercise the original bug on a failing-first basis - before the fix, stream_input() swallowed the exception and returned; the CLI would then wait for input
- P1's confidence of 0.85 is overstated - the fix only handles errors inside stream_input's own try/except
- P4 confidence (0.6) is too high and the test is brittle - it relies on anyio.fail_after(5) to convert a hang into a pass
Recommended fix
- The author should:
a. Identify and address all 3+ root causes of the hanging query() symptom
b. Write failing-first tests that exercise each root cause
c. Avoid relying on anyio.fail_after to convert hangs into passes
Cross-references
Problem
PR #1109 (fix: surface prompt stream errors instead of hanging query()) only handles errors inside
stream_input's own try/except. The "hanging query()" symptom has at least 3 other plausible root causes not addressed.Impact
anyio.fail_after(5)to convert a hang into a pass - brittle and not really a failing-first testWhat was audited
MCE audit Tcas1109 (2026-07-19) caught 3 HIGH attacks via F-C:
Recommended fix
a. Identify and address all 3+ root causes of the hanging query() symptom
b. Write failing-first tests that exercise each root cause
c. Avoid relying on anyio.fail_after to convert hangs into passes
Cross-references