Repository navigation
refactor(gateway): isolate Serve hello lifecycle tests - #140044
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 6, 2026, 6:44 AM ET / 10:44 UTC. ClawSweeper reviewWhat this changesThe PR gives Gateway connection lifecycle tests a small method-list fixture so unrelated RPC additions no longer require editing those tests. Merge readiness✅ Ready for maintainer review Keep open: this is a useful, narrowly scoped cleanup with no actionable correctness findings. Current main still duplicates the method inventory in these lifecycle tests, and the dedicated inventory coverage remains intact. Priority: P3 Review scores
Verification
How this fits togetherThe Gateway sends connected clients a hello message containing supported methods and dashboard identity. These tests exercise how Tailscale Serve route withdrawal closes an existing connection and updates the identity advertised after reconnection. flowchart TD
A[Small method fixture] --> B[Gateway hello]
C[Active Serve route] --> B
B --> D[Connected WebSocket client]
E[Route exit cleanup or replacement] --> F[Close old connection]
F --> G[Reconnect and verify hello]
A --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -12. Total -12 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep exact catalog assertions in the dedicated inventory suite and retain focused connection-lifecycle assertions at the WebSocket boundary. Do we have a high-confidence way to reproduce the issue? Not applicable to a runtime defect: source inspection confirms duplicated inventory assertions, and no failing behavior is claimed. Is this the best way to solve the issue? Yes. The small fixture preserves method transport checks while the existing dedicated suite retains the full inventory contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b72a36a77d1b. 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.
|
* origin/main: (47 commits) ci: record CPU time for Node test jobs (openclaw#140054) test(crabbox): consolidate wrapper boundary coverage (openclaw#140058) fix(test): keep native filesystem access checks portable (openclaw#140047) fix: preserve models when OAuth preparation fails (openclaw#139951) feat(update): recover failed updates with bounded repair (openclaw#139495) refactor(plugins): share managed npm package traversal (openclaw#140040) chore(ui): refresh control ui locales (openclaw#140059) refactor(auth): share profile failure state reset (openclaw#140049) fix(cron): surface skipped on-exit payloads when jobs are busy (openclaw#139987) fix(codex): preserve exec-server WebSocket backpressure under Bun (openclaw#140048) fix(agents): ground exec approvals in tool results (openclaw#140043) refactor(policy): reuse authored policy value helpers (openclaw#140019) docs: keep ClawSweeper status inspection read-only (openclaw#139958) fix: reduce task maintenance stalls with large histories (openclaw#140038) fix(code-mode): identify unawaited promise output (openclaw#140028) fix(test): release memory search fixtures after failed phases (openclaw#140013) test(gateway): isolate Serve hello lifecycle fixtures (openclaw#140044) fix(microsoft-foundry): bound Entra token retention across accounts (openclaw#127216) fix(process): preserve the cause of cleanup observation failures (openclaw#140015) fix: clear Side chat when its parent conversation is deleted (openclaw#139974) ...
Supply a small method list to the handler and assert it in both original and renewed hellos. Keep full advertised method inventory coverage in the existing dedicated test, avoiding unrelated RPC additions in these three Serve withdrawal cases. Related to openclaw#130860 and openclaw#139875.
Related: #130860, #139875.
What Problem This Solves
Adding Gateway RPCs currently requires unrelated edits to the Serve connection lifecycle tests because they duplicate the full advertised method inventory. Those edits create avoidable merge conflicts.
Why This Change Was Made
The three route exit, cleanup, and replacement cases now supply
healthandconfig.getto the handler and verify that both the original and renewed hello preserve that exact list. The dedicatedserver-methods-list.test.tscontinues to check the complete legacy prefix and appended inventory.User Impact
No runtime behavior changes. Existing Serve withdrawal, identity, close-code, and renewed-socket assertions remain intact.
Evidence
All 62 focused hello and method-inventory tests passed before and after the cleanup. The canonical changed-file gate passed, including the owning Gateway test typecheck, lint, and repository guards. Independent P0–P2 review found no actionable issues.