Files
hermes-agent/contributors/emails/wangs.coder@gmail.com
Austin Pickett 29d0cc2602 fix(dashboard): treat Ctrl+C serve shutdown as a clean exit (supersedes #52970) (#85711)
* fix(dashboard): suppress Ctrl+C shutdown traceback

* fix(dashboard): extend clean Ctrl+C exit to the Windows serve branch

The Windows loop-factory branch (and its pre-0.36 asyncio.run fallback)
runs under the same uvicorn capture_signals() re-raise as the POSIX
path, so console Ctrl+C leaked the identical KeyboardInterrupt
traceback there. Guard both serve calls with the same clean-exit
contract, keeping the import-resolution try/except comment accurate
(genuine serve-time errors still propagate).

Also ports the reworded POSIX-test docstring (the serve path is no
longer 'byte-for-byte unchanged'), wraps the POSIX KI test in
pytest.fail so a regression reports red instead of aborting the pytest
session, and adds the windows_only sibling test.

Extends #52970 to the whole bug class.

* chore: map contributor email for @wangs1203

* test(dashboard): actually exercise the pre-0.36 Windows fallback KI contract

Copilot review caught that patching uvicorn._compat.asyncio_run with
raising=False makes the import succeed, so _runner is non-None and the
extra asyncio.run patch never covered the fallback. Split it out: a
dedicated windows_only test halts the _compat import (None in
sys.modules) so the fallback branch is genuinely selected, then asserts
the same clean-KI contract on bare asyncio.run.

---------

Co-authored-by: Emiya·Leon <wangs.coder@gmail.com>
2026-08-14 12:02:05 -04:00

2 lines
10 B
Plaintext