server: retire hard-timeout ledger - #936
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c12810b83
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
4c12810 to
e3cca9b
Compare
e3cca9b to
13dea5f
Compare
bc36a53
into
agent/ws25-voice-server-listener-scope
Problem
After every server cleanup caller established explicit ownership,
server/transports.pystill contained the grandfathered_await_with_hard_timeouthelper and_BACKGROUND_TIMEOUT_TASKSmodule-global ledger. The helper could create hidden work and kept survivors outside their lifecycle owners.Changes
wait_for_owned_future, a shared hard-bound primitive that never creates or retains work_await_with_hard_timeout,_track_background_timeout, and_BACKGROUND_TIMEOUT_TASKSWhy / impact
Server teardown survivors now stay exclusively with their
RuntimeTaskScope,SurvivorRegistry, or explicit handler owner. There is no cross-runtime module-global anchor and no timeout helper that can silently turn a coroutine into a task. Repository-wide raw production starts fall from 23 to 22 in this slice (29 to 22 across the post-#930 server sequence), andmodule_task_setfalls from 1 to 0.Checks
env UV_FROZEN=1 just checkoutside the sandbox because uv's cache lock is not sandbox-writable.venv/bin/python -m pytest tests/runtime/test_task_scope.py tests/server/test_capacity_gate_drain.py tests/server/test_websocket_runtime_drain.py tests/server/test_voice_server_lifecycle.py tests/server/test_webrtc_routes.py -q(116 passed, 28 skipped).venv/bin/python -m pytest tests/ratchets/test_teardown_budget_inventory.py tests/ratchets/test_source_inventory.py -q(16 passed)