Repository navigation
test(gateway): consolidate deleted-agent session fixtures - #118549
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 2:57 AM ET / 06:57 UTC. ClawSweeper reviewWhat this changesMoves the deleted-agent Merge readinessThis PR remains useful: current Priority: P3 Review scores
Verification
How this fits togetherGateway flowchart LR
Request[Gateway session request] --> Handler[Shared session messaging handler]
Handler --> Lookup[Session lookup helpers]
Lookup --> Guard[Deleted-agent decision]
Guard --> Reject[Invalid-request response]
Handler --> Run[Send or steer session run]
Tests[Consolidated owner test suite] --> Handler
Decision needed
Why: The patch is source-consistent and has strong reported proof, but the protected label requires a human merge decision rather than automated cleanup. Before merge
Agent review detailsSecurityNone. PR surfaceSource -2, Tests -16. Total -18 across 3 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the deleted-agent assertions beside the shared session-messaging handler, preserve the narrow mock contract, and merge after the protected-label reviewer confirms the final exact-head checks. Do we have a high-confidence way to reproduce the issue? Not applicable to a user-facing bug: the claimed improvement is test-harness setup cost, and the PR body provides focused and full-suite post-change timing results. Is this the best way to solve the issue? Yes. Both RPC methods already share the session-messaging handler and its fixture infrastructure, so relocating the unchanged assertions there removes duplicate module setup without moving the production owner boundary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4281e90012fe. 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.
|
…18549) Co-authored-by: Peter Steinberger <[email protected]>
Summary
sessions.send/sessions.steercases into the existingsessions-messagingowner suitesession-utilspartial mocks with the exact lookup exports these handler tests consumeRoot cause
On exact main run 30790046425,
sessions.send-deleted-agent.test.tsran two assertions in 2 ms but finished 53.42 seconds after the preceding gateway output. The file rebuilt the completesessions-messaginggraph in a fresh non-isolated module generation, and its shared helper also calledvi.importActual()on the broadsession-utilsbarrel. Vitest reported 65.29 seconds of gateway setup and the gateway-methods group took 128.28 seconds.The same production handler graph was already owned by
sessions.send-followup-status.test.ts. Consolidating the two cases there keeps the real handler, deleted-agent guard ordering, response assertions, and test count while paying that graph cost once.Proof
git diff --check, and autoreview: cleanExact current-main baseline: https://github.com/openclaw/openclaw/actions/runs/30790046425/job/91612145536
Blacksmith Testbox was unavailable locally. Direct AWS Crabbox lease
cbx_48dc9d8a7605could not install dependencies after the required retry because postinstall could not resolve the TypeScript dev dependency, so the full-suite proof used the documented trusted-source local fallback and the lease was stopped cleanly.