[BUG] Supervisor timeouts lose their exception type #22

Closed
opened 2026-10-16 18:18:17 +02:00 by erikinkinen · 1 comment
Owner

Summary

A supervised tool can report its no-output timeout before the parent observes the same deadline. That response loses the timeout category, so the caller receives EvidenceError instead of TimeoutError. This makes the existing owned-invocation test depend on which process notices the stall first.

Reproduction

On Linux with Python 3.14, run the existing case from Exsh:

python3 -Werror -m unittest discover -s tests -p descriptor_cleanup_owned_invocation_test.py -k actual_no_output_stall -v

The supervisor-first ordering occurred in CI 570 on fba2402. The same case can pass when the parent notices the stall first.

Expected and actual behavior

Both orderings should expose TimeoutError and preserve the first failure through cleanup. The failed run instead raises:

EvidenceError: original isolated tool retained a failure-only terminal outcome: TimeoutError: original supervisor tool exceeded its no-output deadline

Environment and identity

Exsh fba240218d70f0738beccc7c9dfbb7cac6330d4b, feature/posix-compat push run 570, Rust job attempt 1. Linux x86_64 host and Python 3.14, using the real owned supervisor and the test's original tool, capture and cleanup limits.

Evidence and prior checks

The complete terminal log is retained. Rust tests and native builds finish; the Python suite runs 1,093 tests in 284.856 seconds and reports this one failure. The later frame checks are not reached. Source inspection shows that a remote negative response carries diagnostic text without a timeout category; the parent wraps it in EvidenceError.

Tracking

  • Preserve an explicit timeout category and the retained first failure across the supervisor channel.
  • Cover both deadline orderings, malformed category data and cleanup deterministically.
  • Pass the owned-invocation controls and full Python suite without changing their limits.

The separate frame-analysis deadline issue remains open.

## Summary A supervised tool can report its no-output timeout before the parent observes the same deadline. That response loses the timeout category, so the caller receives `EvidenceError` instead of `TimeoutError`. This makes the existing owned-invocation test depend on which process notices the stall first. ## Reproduction On Linux with Python 3.14, run the existing case from Exsh: ```sh python3 -Werror -m unittest discover -s tests -p descriptor_cleanup_owned_invocation_test.py -k actual_no_output_stall -v ``` The supervisor-first ordering occurred in [CI 570](https://git.erikinkinen.fi/erix/exsh/actions/runs/570) on [fba2402](https://git.erikinkinen.fi/erix/exsh/commit/fba240218d70f0738beccc7c9dfbb7cac6330d4b). The same case can pass when the parent notices the stall first. ## Expected and actual behavior Both orderings should expose `TimeoutError` and preserve the first failure through cleanup. The failed run instead raises: ```text EvidenceError: original isolated tool retained a failure-only terminal outcome: TimeoutError: original supervisor tool exceeded its no-output deadline ``` ## Environment and identity Exsh `fba240218d70f0738beccc7c9dfbb7cac6330d4b`, feature/posix-compat push run 570, Rust job attempt 1. Linux x86_64 host and Python 3.14, using the real owned supervisor and the test's original tool, capture and cleanup limits. ## Evidence and prior checks The complete terminal log is retained. Rust tests and native builds finish; the Python suite runs 1,093 tests in 284.856 seconds and reports this one failure. The later frame checks are not reached. Source inspection shows that a remote negative response carries diagnostic text without a timeout category; the parent wraps it in `EvidenceError`. ## Tracking - [x] Preserve an explicit timeout category and the retained first failure across the supervisor channel. - [x] Cover both deadline orderings, malformed category data and cleanup deterministically. - [x] Pass the owned-invocation controls and full Python suite without changing their limits. The separate [frame-analysis deadline issue](https://git.erikinkinen.fi/erix/exsh/issues/4) remains open.
Author
Owner

Fixed in f3e0db3. The supervisor sends an explicit timeout category, so either process can notice the stall first without changing the reported exception type. An earlier local error keeps its identity through cleanup.

Added deterministic coverage for both observation orders and malformed reports. All 37 focused checks and the full 1,098-test Python suite pass under the existing limits.

Fixed in [f3e0db3](https://git.erikinkinen.fi/erix/exsh/commit/f3e0db357a3bc432e35d5408be4b4d3dd3910e63). The supervisor sends an explicit timeout category, so either process can notice the stall first without changing the reported exception type. An earlier local error keeps its identity through cleanup. Added deterministic coverage for both observation orders and malformed reports. All 37 focused checks and the full 1,098-test Python suite pass under the existing limits.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:33:49 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/exsh#22
No description provided.