Repository navigation
test(gateway): observe native drain without a lint exception - #139576
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 8:57 PM ET / September 6, 2026, 00:57 UTC. ClawSweeper reviewWhat this changesUpdates Gateway shutdown test support to observe native drain completion through a call-through spy without a lint exception. Merge readiness✅ Ready for maintainer review Keep open: current main still contains the rejected lint suppression, and this focused repair preserves meaningful lifecycle coverage. No actionable correctness or security defects found. Priority: P3 Review scores
Verification
How this fits togetherGateway shutdown must finish admitted work before releasing its dependencies. This test helper observes the selected work owner and connection cleanup so lifetime tests can verify that shutdown waits for held work. flowchart TD
A[Lifetime test holds work] --> B[Gateway shutdown]
B --> C[Native work drain]
D[Selected owner signal] --> E[Test observer]
C --> E
F[Connection releases] --> E
E --> G[Assert drain remains pending]
G --> H[Release work and verify shutdown]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -2. Total -2 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep native drain execution and exact-owner lifecycle assertions while removing the unnecessary suppression without changing the ratchet. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main adds a suppression in a file scanned by an inventory that does not allow it. Tests were not executed during this read-only review. Is this the best way to solve the issue? Yes. A call-through spy uses Vitest's existing receiver and promise-settlement tracking while preserving the native drain and final lifecycle assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3d14bba71949. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Upstream #139576 now observes the native drain without an unbound-method suppression. Remove the obsolete inventory entry so the combined CI tree matches current main.
* origin/main: (302 commits) test(gateway): preserve held-work close failures (#139593) refactor(exec): share package argument scanning (#139560) fix(audit): preserve sequence range validation before numeric decoding (#139587) fix(transcripts): retain capture ownership through failed cleanup (#139572) refactor(models): share selector reference traversal (#139571) perf(agents): classify allowlists without intermediate sets (#138392) chore(release): update appcast for 2026.9.2 (#139575) fix(ci): synchronize cloud retries and board widget input (#139506) fix(plugins): explain SDK incompatibilities after core updates (#139458) fix(voice-call): retain installed WebSocket behavior under Bun (#139567) test(text): consolidate literal sanitizer cases (#139579) test(gateway): observe native drain without a lint exception (#139576) test(memory): consolidate visibility fixtures without policy defaults (#139569) fix(ui): show shimmer skeletons while loading Control UI (#139525) test(qa): make cleanup child logging deterministic (#139566) test(cli): keep Unix socket fixtures within path limits (#139565) fix: avoid slow incognito key checks in large session stores (#139528) feat(macos): open Gateway windows from the Gateways menu (#139522) test(workshop): isolate marker casing fixture identities (#139554) fix(process): require cleanup evidence before releasing owned work (#139517) ... # Conflicts: # scripts/release-check.ts
* commit '047587a542ce205ee78354fbd88ba8ec05c07844': (45 commits) chore(ui): refresh control ui locales (#139481) fix(slack): keep prototype-named emoji shortcodes intact (#136374) fix(gateway): deliver upgrade rejection responses under Bun (#139516) refactor(test): simplify catalog guards and fix native report fixture (#139496) fix(macos): prevent dashboard fixture loopback timeouts (#139556) fix(matrix): preserve selected reply targets inside threads (#139479) test(gateway): preserve held-work close failures (#139593) refactor(exec): share package argument scanning (#139560) fix(audit): preserve sequence range validation before numeric decoding (#139587) fix(transcripts): retain capture ownership through failed cleanup (#139572) refactor(models): share selector reference traversal (#139571) perf(agents): classify allowlists without intermediate sets (#138392) chore(release): update appcast for 2026.9.2 (#139575) fix(ci): synchronize cloud retries and board widget input (#139506) fix(plugins): explain SDK incompatibilities after core updates (#139458) fix(voice-call): retain installed WebSocket behavior under Bun (#139567) test(text): consolidate literal sanitizer cases (#139579) test(gateway): observe native drain without a lint exception (#139576) test(memory): consolidate visibility fixtures without policy defaults (#139569) fix(ui): show shimmer skeletons while loading Control UI (#139525) ...
* fix(cron): keep dashboard current-session delivery in its conversation * fix(cron): retain unresolved explicit delivery failures * test: complete cron delivery fixtures and CI inventory Carry the normalized delivery plan through CLI suppression and Gateway background-completion fixtures. Preserve their assertions and the existing runtime requirement. Record the existing native drain capture suppression introduced by #139483 in the intentional inventory, without changing its receiver semantics. * test: drop superseded drain suppression entry Upstream #139576 now observes the native drain without an unbound-method suppression. Remove the obsolete inventory entry so the combined CI tree matches current main. * test: keep native process probes in report fixture Default the shared spawnSync mock to Node so Linux cleanup probes remain observable. Preserve the explicit report-unit overrides and strict process-tree checks.
* fix(cron): keep dashboard current-session delivery in its conversation * fix(cron): retain unresolved explicit delivery failures * test: complete cron delivery fixtures and CI inventory Carry the normalized delivery plan through CLI suppression and Gateway background-completion fixtures. Preserve their assertions and the existing runtime requirement. Record the existing native drain capture suppression introduced by openclaw#139483 in the intentional inventory, without changing its receiver semantics. * test: drop superseded drain suppression entry Upstream openclaw#139576 now observes the native drain without an unbound-method suppression. Remove the obsolete inventory entry so the combined CI tree matches current main. * test: keep native process probes in report fixture Default the shared spawnSync mock to Node so Linux cleanup probes remain observable. Preserve the explicit report-unit overrides and strict process-tree checks.
Related: #139428
What Problem This Solves
The test helper introduced in #139483 uses an unbound-method lint suppression that the broader suppression-inventory check rejects. Local lifetime and changed-file checks had passed, so that validation gap was discovered in subsequent CI.
Why This Change Was Made
Observe the native drain through a call-through spy instead of capturing and replacing its implementation. Select the exact owner by signal, wait for its drain and transport releases, and check the native promise remains pending while work is held. Stop waiting when close settles on either outcome. The bounded wait has no mandatory delay.
User Impact
No production behavior changes. Lifetime coverage remains while the suppression disappears. The inventory/ratchet is unchanged; net two test-support lines removed.
Evidence
All 15 lifetime tests and four unchanged suppression-inventory tests pass. A negative control omitting only the selected owner's join makes exactly five intended pending-drain checks fail, while the other ten cases pass. Final native code was restored and revalidated.
The full changed gate, including core test typing, dead-export scans and helper lint, passes. Deslop, diff check and independent P2 review pass. No new full-suite runtime claim.