Repository navigation
test: close owned emitter clients before bounded server drain - #447
Conversation
faaeccf to
35716ea
Compare
Observe helper-boundary identity on Python 3.10 and later. Pin repeated child cancellation and late exception retrieval while preserving the original shutdown bounds and GET closure oracle.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d13981096c
ℹ️ 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".
| task.cancel() | ||
| stage = "cancellation_grace" | ||
| _, pending = await asyncio.wait({task}, timeout=CANCEL_GRACE) | ||
| raise RuntimeError( |
There was a problem hiding this comment.
Retrieve disconnect failures after the timeout
When disconnect_all() exceeds CLIENT_STOP_TIMEOUT and either raises during the cancellation grace period or survives cancellation and raises later, this branch raises its own RuntimeError without consuming the child task's exception or installing retrieve_outcome. That produces an un-retrieved task exception—potentially after the test has moved on—whereas the caller-cancellation path explicitly handles the same late-failure case. Register the callback before raising, and consume the result immediately if the task already completed.
Useful? React with 👍 / 👎.
The remote-emitter fixtures disconnect owned clients before bounded peer shutdown and retain an independent oracle for closure of the original GET response before client cleanup. Caller cancellation stays supervised, including second cancellation, eventual child outcome retrieval and safe notes on Python 3.10 and later. This is fixture ownership hygiene; the natural hosted failure and shutdown with a request in flight remain open in #445.
The original 7+5-second client and 10+5-second server guards, held-response, wrong-order, body-error, reconnect and hang controls remain. Cancellation during the original grace can add one bounded 5-second supervision period; a resistant child may outlive the helper. No universal lifetime clearance or 12-second ceiling is claimed. D2 changes three test files and CHANGELOG only; product code, workflows and the lock are unchanged.
Validation at
d13981096c3d9a7640bbbfe0fb633e87411f2585over25a45b999d9eb9cea39417ab67d231ab97b98530: statics pass, including explicit base/head whitespace checks; mypy covers 62 product files only. Python 3.12 focused runs pass 28 cases three times and 46 with four workers. One real CPython 3.10.22 run passes the same 28 cases using a borrowed environment. Its anyio 4.14.2 matches the lock's Python <3.14 marker; among eight recorded packages only certifi differs (2025.11.12 versus 2026.10.19). This is compatibility evidence, not a full transitive or lock-equivalent environment audit. Eight distinct scratch-only mutations each fail their intended assertion. The two original driver stops and continuations of only unrun stages remain preserved; no tests were repeated for reviewer quality or policy changes.The single current ai full run passes 13206 cases (57 skipped, 1 xfailed, 330.98s), with all four workers finished and zero observed queue exceptions or unexpected markers. Hosted Test 39595890235 passes 13203 cases (60 skipped, 1 xfailed, 739.96s), with all 14 checks, four PR workflows and the locked audit successful. Artifact 12344234062 has matching API/ZIP SHA-256
592175270570c1dc2b13e074a8e81510be0d7789839a7be4543bfb33d5ee883a. Both timing and JUnit joins cover all 13264 selected cases; only three known tag-dependent ai-pass/hosted-skip differences remain, and all 16 lifetime controls pass on both hosts. Live merge-turn CI and main checks remain required.Review policy for #447: the owner explicitly said "skip gemini", waiving the Google fourth seat for this PR only after the until-fixed review extension. The accepted route is three usable distinct vendors plus separate independent Gmail Claude Opus 5.5 presidents: Astra/OpenAI FULL, Claude/Anthropic FULL, Grok/xAI REDUCED. Grok's current-source review is usable; its mandatory history gaps, lack of an independent history reading and limited raw-evidence verification remain explicit. Every other seat's read and process limits remain preserved. Presidents are not vendor seats. The literal four-vendor gate is not met, and native/runtime certification remains false.
The R3 president accepted the whole D2 source and all sustained R1/R2 findings as addressed by repair. Two R3 nits are nonblocking: the original whitespace receipt was vacuous but explicit-ref checks pass; a possible diagnostic displacement affects only an already-failing cleanup path. The new limited independent Gmail president applies the owner's three-vendor exception and records conditional landing eligibility at this exact binding, subject to truthful metadata and same-turn merge checks. Both presidents use the owner-selected Gmail Claude Opus 5.5 route, effort max, fast mode false.
Google R1/R2/R3 reports remain unusable, preserved and counted with zero weight. The single prescribed recovery ended with a harness WS1011/backend502 error and produced no report. No more Google review for this PR. One additional R3 president strike (A28) is withdrawn: 13203 passed on both and 58 skipped on both are correct intersections, not marginal totals. The incorrect anyio lock-delta statement is also corrected here; frozen originals are preserved. The adopted R3 president pair has a disclosed duplicate-session writer/adoption incident and verified custody backup. The limited president independently records this provenance and the accepted corrections. Rejected reports, errors, process deviations, read gaps and prior rulings remain in the durable evidence; no source or CI waiver is inferred.
Limits retained: 27 configured-service skips leave #361 unexercised; ai coverage 77.06% is observer-affected and not comparable to hosted 92.18%; borrowed environments are not lock proof; one clean run is not universal lifetime proof. The earlier unintended R2 uv environment creation, never used for tests, and uninstrumented cache/network limits remain recorded. #445 stays open for the natural cause and in-flight-request gap. #431 proceeds only after an actual D2 merge receipt and then needs a fresh binding, its original review route, CI, hosted transfer evidence and a new exact-head human acknowledgement. No settings, tags, release, registry or operational rollout activation.
Owner-policy authority SHA-256:
df50af778e4cfdf201289dc19fb9a2d3b41d85a28568b6cfea7710d86a39e0bc. Evidence:D-repairs-20261020/447-r3-compatibility-20261021/; all original 498 manifest entries remain intact (496 distinct files after path aliases).Report identities below are TXT / JSON SHA-256. R1 and R2 are historical bindings, not current approvals. Current acceptance is the three R3 usable seats and the adopted R3 plus new limited president rulings under the explicit owner policy.
0f12deb680b43bec28f0b3824eae874274c67eb7c1208d056e896c28d94540e6276916a39c2e362ae825cd0c09cf3cbe66b95dcd5ee44b3d0e337bd985aa22c097bd99fcbb4e86bcc2f226ffe4f2e916f748bde4f20d940215a494548c010cac9695d75a1e3c92c1618058ec0d1f4cd16a8adb6d950210c057d64e21a82dbf051f88f495fa2b589093565538273ff3bd945cbf3560c7a8e5986840fc125c785f6f37f677d98d8ad0289c8a476e1173abd1947aa5ab22ef70467d5b464ed596cc79f719f1f79189f0bb17853529d18f77f1a7cda961a89722c23ce046a2c623632cf8ea44f1519c8e0facc96fce812971fcfc9d881f9baf792c68c5357e6a52610e70a9dad909e99d915a4a27d0882fd1e46257480e0fa159178d2bbeefe215316e30d79c2e8b5c0d679828438b3736a8d66082e6743cef855ba2fdbe5eddb4f33fd2505f6108073fa82fc94b87bbb386ec3462a78f40f81ac3aa546d2e02b6690cb99696eeb92610caf100f8d8c48645ff55b909e1a43a53d3a5c8eb9c38cb8115a010a04f1ef96853decdd9ffbdf68a99d1def4d39348d7dfde48d084c0156b43ec4b2f6fa0721f7bd76da2d635a323e62a1008512612765de17ed0c968e7fc9dd533a09e53a9a42c88169c4370aba267904996ae9be06b65958f75df93ddff89602857367ad941f1d4e9ce8395023871793a6fe8868b3bc3665527f10a3cb4124c90ff6c419ef61539d074c20f852968b83e2aa1a784b28d2f24441a00307e23aed39c4571bd1069e37d4738bfe4dfe24f2d323fb940a16cc1212746a29f2f9e63b8307db3c9f35352502259a3ef03d9b30bfd2b2f2ea287a46ed3243e72921da626f987f7711f6b73aa057895d317fd54fbe9e4ed67e6aff8a6c95a3a6cb188069fac054e320dd72b311a745c4af7d0abd1be2ac7df0495ee94eea726164a8cac3dfb1d211ad45a2ff5430220f965f05c459408cb5428df7b9696efb7b75ba3cf6986948a35ef8475751e61d1263c476d00b50c3bc2ce2c29c34697e6662536b27a887ecef2de31f114ade2d23fea0551fa676f91474d08ab3bb21698e3a24a65f8e1dcde5b4d6b6976f8597089b74d67cc448f24188fa6302d333f518bf4d9f5dff28c9da95497937fb32fb9f849ad3c52a6b7f18cb3a2d3b4e14bcca9bdc49880e99f05f8fecfa6bd96d524e2b498586bec8925c1c9b2ce427d26edade134592bb62a6663f42d8f4519be29319149e24e13614047af184156fea61d2f95c771cd7dfa2e65d7066ef6518dc9f7f6c17fa6c4fcdd147759a8046d6b6316c210e03d79f7c17395dad0ba256a93c8dabfc0df493770fba7d715a44b1700bd313b3f2c17d0ca6f4802cfbe03a74372f3d7d3cf5a7521bb21d96f9754057ad08147a5cb67ba9c77d587b9d49490a0855fa40c8d878a39eb42729ff3ad0320f625