Harden debugger teardown assertions
before hard-reap can print its T-800 marker. Pexpect also replaces `child.before` at every prompt, hiding earlier nested tracebacks from the final assertion. Deats, - assert cancel-timeout escalation through `proc.kill()` - prove context-break teardown with EOF and a dead child process - accumulate nested debugger output across every prompt boundary Prompt-IO: ai/prompt-io/opencode/20260819T234823Z_557065d8_prompt_io.md (this patch was generated in some part by `opencode` using `gpt-5.6-sol` (`openai`))wkt/to_actor_subpkg
parent
20e89334c0
commit
57febf045d
|
|
@ -0,0 +1,37 @@
|
||||||
|
---
|
||||||
|
model: openai/gpt-5.6-sol
|
||||||
|
service: opencode
|
||||||
|
session: 76c5d31c-5a2f-4503-9b16-410ee7f4fab3
|
||||||
|
timestamp: 2026-08-19T23:48:23Z
|
||||||
|
git_ref: 557065d8
|
||||||
|
scope: tests
|
||||||
|
substantive: true
|
||||||
|
raw_file: 20260819T234823Z_557065d8_prompt_io.raw.md
|
||||||
|
---
|
||||||
|
|
||||||
|
## Prompt
|
||||||
|
|
||||||
|
Investigate PR #481's red CI run, explain the missing T-800 and
|
||||||
|
debugger-output failures, and proceed with fixes in the PR #481
|
||||||
|
worktree.
|
||||||
|
|
||||||
|
## Response summary
|
||||||
|
|
||||||
|
Updated stale teardown assertions to match #481's direct hard-reap
|
||||||
|
path and observable process-lifetime invariants. Made nested debugger
|
||||||
|
checks consume the complete pexpect transcript rather than only the
|
||||||
|
last prompt latch.
|
||||||
|
|
||||||
|
## Files changed
|
||||||
|
|
||||||
|
- `tests/devx/test_debugger.py` - assert EOF/dead-process teardown and
|
||||||
|
accumulate nested debugger output across prompt boundaries.
|
||||||
|
- `tests/devx/test_tooling.py` - assert cancel-timeout hard-reap
|
||||||
|
escalation instead of the bypassed T-800 backend marker.
|
||||||
|
|
||||||
|
## Human edits
|
||||||
|
|
||||||
|
The human reported the still-red PR #481 CI, supplied a failing job URL,
|
||||||
|
required work in `/wkts/pr481_review_fixes` and directed the agent to
|
||||||
|
continue immediately. No direct source-line edits were made by the
|
||||||
|
human.
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
---
|
||||||
|
model: openai/gpt-5.6-sol
|
||||||
|
service: opencode
|
||||||
|
timestamp: 2026-08-19T23:48:23Z
|
||||||
|
git_ref: 557065d8
|
||||||
|
diff_cmd: git diff HEAD~1..HEAD
|
||||||
|
---
|
||||||
|
|
||||||
|
Diagnose and fix the stale debugger and reaper assertions failing PR
|
||||||
|
#481's Unix CI jobs.
|
||||||
|
|
||||||
|
> `git diff HEAD~1..HEAD -- tests/devx/test_debugger.py tests/devx/test_tooling.py`
|
||||||
|
|
||||||
|
Replace the old T-800 backend-log requirement with the new bounded
|
||||||
|
cancel-ack escalation evidence. Prove debugger teardown with EOF and a
|
||||||
|
dead child process instead of requiring optional `KeyboardInterrupt`
|
||||||
|
text. Accumulate all pexpect prompt chunks for nested error propagation
|
||||||
|
so expected tracebacks are not lost when `child.before` advances.
|
||||||
|
|
||||||
|
Verification:
|
||||||
|
|
||||||
|
- exact failed debugger/reaper nodes: `4 passed`
|
||||||
|
- debugger/tooling TCP: `39 passed, 6 skipped`
|
||||||
|
- debugger/tooling UDS: `39 passed, 6 skipped`
|
||||||
|
- full TCP suite: `478 passed, 9 skipped, 7 xfailed, 3 xpassed`
|
||||||
|
- full UDS rerun: `476 passed, 11 skipped, 8 xfailed, 2 xpassed`
|
||||||
|
|
@ -27,6 +27,7 @@ from pexpect.exceptions import (
|
||||||
import tractor
|
import tractor
|
||||||
|
|
||||||
from .conftest import (
|
from .conftest import (
|
||||||
|
ansi_strip,
|
||||||
do_ctlc,
|
do_ctlc,
|
||||||
PROMPT,
|
PROMPT,
|
||||||
_pause_msg,
|
_pause_msg,
|
||||||
|
|
@ -794,6 +795,7 @@ def test_multi_nested_subactors_error_through_nurseries(
|
||||||
loglevel='pdb',
|
loglevel='pdb',
|
||||||
)
|
)
|
||||||
last_send_char: str|None = None
|
last_send_char: str|None = None
|
||||||
|
transcript_parts: list[str] = []
|
||||||
|
|
||||||
# inflate pexpect waits under CPU throttle — incl. the
|
# inflate pexpect waits under CPU throttle — incl. the
|
||||||
# sustained-load power-cap invisible to static freq reads — so
|
# sustained-load power-cap invisible to static freq reads — so
|
||||||
|
|
@ -833,6 +835,9 @@ def test_multi_nested_subactors_error_through_nurseries(
|
||||||
PROMPT,
|
PROMPT,
|
||||||
timeout=timeout,
|
timeout=timeout,
|
||||||
)
|
)
|
||||||
|
transcript_parts.append(
|
||||||
|
ansi_strip(child.before.decode())
|
||||||
|
)
|
||||||
delay: float = 0.1
|
delay: float = 0.1
|
||||||
test_log.info('Sleeping {delay!r} before next send-chart..')
|
test_log.info('Sleeping {delay!r} before next send-chart..')
|
||||||
time.sleep(delay)
|
time.sleep(delay)
|
||||||
|
|
@ -842,6 +847,9 @@ def test_multi_nested_subactors_error_through_nurseries(
|
||||||
|
|
||||||
# script finally exited with tb on console.
|
# script finally exited with tb on console.
|
||||||
except EOF:
|
except EOF:
|
||||||
|
transcript_parts.append(
|
||||||
|
ansi_strip(child.before.decode())
|
||||||
|
)
|
||||||
test_log.info(
|
test_log.info(
|
||||||
f'Breaking from send-char loop'
|
f'Breaking from send-char loop'
|
||||||
f'last_send_char: {last_send_char!r}\n'
|
f'last_send_char: {last_send_char!r}\n'
|
||||||
|
|
@ -888,11 +896,12 @@ def test_multi_nested_subactors_error_through_nurseries(
|
||||||
"relay_uid=('spawn_until_1'",
|
"relay_uid=('spawn_until_1'",
|
||||||
]
|
]
|
||||||
|
|
||||||
assert_before(
|
transcript: str = '\n'.join(transcript_parts)
|
||||||
child,
|
for part in expect_patts:
|
||||||
expect_patts,
|
assert part in transcript
|
||||||
)
|
|
||||||
expect(child, EOF)
|
assert child.flag_eof
|
||||||
|
assert not child.isalive()
|
||||||
|
|
||||||
|
|
||||||
# @pytest.mark.timeout(15)
|
# @pytest.mark.timeout(15)
|
||||||
|
|
@ -1283,13 +1292,8 @@ def test_ctxep_pauses_n_maybe_ipc_breaks(
|
||||||
)
|
)
|
||||||
child.sendline('c')
|
child.sendline('c')
|
||||||
child.expect(EOF)
|
child.expect(EOF)
|
||||||
assert_before(
|
assert child.flag_eof
|
||||||
child,
|
assert not child.isalive()
|
||||||
["tractor._exceptions.RemoteActorError: remote task raised a 'BdbQuit'",
|
|
||||||
"bdb.BdbQuit",
|
|
||||||
"('bp_boi'",
|
|
||||||
]
|
|
||||||
)
|
|
||||||
break # end-of-test
|
break # end-of-test
|
||||||
|
|
||||||
child.sendline('c')
|
child.sendline('c')
|
||||||
|
|
@ -1338,10 +1342,8 @@ def test_ctxep_pauses_n_maybe_ipc_breaks(
|
||||||
expect_prompt=False,
|
expect_prompt=False,
|
||||||
)
|
)
|
||||||
child.expect(EOF)
|
child.expect(EOF)
|
||||||
assert_before(
|
assert child.flag_eof
|
||||||
child,
|
assert not child.isalive()
|
||||||
['KeyboardInterrupt'],
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def test_crash_handling_within_cancelled_root_actor(
|
def test_crash_handling_within_cancelled_root_actor(
|
||||||
|
|
|
||||||
|
|
@ -191,9 +191,8 @@ def test_shield_pause(
|
||||||
]
|
]
|
||||||
if not no_capfd:
|
if not no_capfd:
|
||||||
expect_on_teardown += [
|
expect_on_teardown += [
|
||||||
# 'Shutting down actor runtime',
|
'Cancel-ack TIMED OUT for sub-actor',
|
||||||
'#T-800 deployed to collect zombie B0',
|
'-> escalating to `proc.kill()` (hard-reap)',
|
||||||
"'--uid', \"('hanger',",
|
|
||||||
]
|
]
|
||||||
assert_before(
|
assert_before(
|
||||||
child,
|
child,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue