4 Commits

Author SHA1 Message Date
Xinmin Zeng
df544f126a
test(backend): prune 32 zero-unique redundant suites and rewrite 9 source-inspection tests (#8362)
* test(backend): prune 32 zero-unique redundant suites and rewrite 9 source-inspection tests

- Remove 32 superseded test files proven lossless across statement/branch coverage (per-test dynamic contexts), hotspot mutation testing (mutmut), and 20 historical bug replays.
- Replace all inspect.getsource and brittle source-string assertions across 9 test files with behavioral runtime assertions.

* test(backend): consolidate hidden-answer and compaction-hash guards and assert protocol defaults

- Fold hidden human-input turn-boundary regressions into tests/test_channels.py while keeping test_channel_hidden_human_input.py removed.
- Fold multimodal source content hashing and unobserved-skip regressions into tests/test_compaction_event_identity.py.
- Assert contract-specific default return values/types (False for bool registrations, empty sequence for middleware contributions, explicit return None for void hooks) in test_extension_api_contracts.py and add stub rejection tests.
2026-11-18 21:13:19 +08:00
Nan Gao
a684ae2fe3
fix(sandbox): leave SIGTERM/SIGINT teardown to the Gateway lifespan (#7560)
* fix(sandbox): leave SIGTERM/SIGINT teardown to the Gateway lifespan

AIO and E2B providers built on the event-loop thread installed SIGTERM/SIGINT
handlers that force-destroyed every sandbox synchronously, before uvicorn
started the run drain. The Gateway lifespan now holds sandbox shutdown
ownership from its first step, so providers skip those handlers and the
existing hook closes the provider after run drain and MCP teardown. SIGHUP
keeps the provider fallback. AIO acquire now refuses once shutdown began.

* docs(sandbox): document Gateway-owned sandbox shutdown and AIO admission fence

* test(gateway): inspect the lifespan body now that lifespan wraps it

* docs(changelog): reference #7560 for the sandbox SIGTERM drain-order fix

* ci: retrigger sandbox image smoke after a registry pull timeout
2026-10-26 20:38:32 +08:00
FanouZeng-TT
02ce9ab283
fix(subagents): preserve batch stop cleanup across cancellation (#6552)
* fix(subagents): preserve batch stop cleanup across cancellation

* fix(subagents): reset stop cleanup when restarting batches

---------

Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
2026-10-09 15:33:58 +08:00
NanPan
fa3bb438c9
fix(gateway): bound subagent batch shutdown (#6434)
* fix(gateway): bound subagent batch shutdown

* test(gateway): cover bounded subagent batch shutdown

* fix(subagents): cancel batch work before stop drain

* test(subagents): pin cancellation before stop drain

* test(gateway): account for subagent shutdown budget

* docs(helm): refresh gateway shutdown budget

* docs(compose): refresh gateway shutdown budget

* docs(compose): correct gateway shutdown total

---------

Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
2026-10-08 09:55:54 +08:00