Mk `test_crash_handler_cms` suite go green

Turns out there were some subtle internal bugs discovered by the just
added `tests/devx/test_tooling::test_crash_handler_cms` suite.

So this fixes,

- a mis-ordering around `rt_repl_fixture :=` in the logic of
  `DebugStatus.maybe_enter_repl_fixture()`.

- `.devx.debug._post_mortem._post_mortem()` ensuring we now **always**
  call `DebugStatus.release()`, and thus unwind the exist-stack managing
  the `repl_fixture` exit/teardown, **even in the case** where
  `yield False` is delivered from the user-fixture-fn (meaning
  `dnter_repl=False`) thus triggering an early `return` (as is done in
  the new test suite).
main^2
Tyler Goodlet 2025-07-14 18:07:50 -04:00
parent 9ff448faa3
commit f5056cdd02
2 changed files with 50 additions and 48 deletions

View File

@ -148,7 +148,9 @@ def _post_mortem(
repl_fixture=repl_fixture,
boxed_maybe_exc=boxed_maybe_exc,
)
try:
if not enter_repl:
# XXX, trigger `.release()` below immediately!
return
try:
actor: Actor = current_actor()
@ -194,7 +196,7 @@ def _post_mortem(
# frame=None,
traceback=tb,
)
finally:
# XXX NOTE XXX: this is abs required to avoid hangs!
#
# Since we presume the post-mortem was enaged to

View File

@ -846,9 +846,9 @@ class DebugStatus:
'''
if not (
repl_fixture
or
(rt_repl_fixture := _state._runtime_vars.get('repl_fixture'))
or
repl_fixture
):
return True # YES always enter