Repository navigation
fix(test): agent artifact fixture uses the retired worker creation API - #197985
Conversation
Update the injected worker service to the request-shaped creation contract introduced in #197875. Preserve idempotency and invoke the supplied authority check before fixture allocation. Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]>
Worked on by: - @obviyus - @steipete Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 0f327e11-666e-8123-8350-6617f8a9e77a
|
🦞👀 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. What this changesUpdates the injected worker service to the request-shaped creation API used by the Gateway. Example: The integration test requests environments.create with profileId qa-provider and idempotencyKey qa-environment-request.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep open: this PR repairs a verified fixture mismatch still present on main, preserves existing coverage, and has passing exact-head CI; no actionable findings remain. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe integration suite sends RPCs to a real isolated Gateway, substitutes deterministic worker allocation, and verifies agent operations and artifact downloads. flowchart LR
A[Integration test] --> B[Gateway RPC client]
B --> C[Environment handler]
C --> D[Injected worker service]
D --> E[Fixture worker records]
B --> F[Agent and artifact APIs]
Technical reviewBest possible solution: Merge the focused fixture update while retaining the existing composed integration assertions. Do we have a high-confidence way to reproduce the issue? Source establishes the failure directly: environments.create invokes createWithRequest, but the main-branch injected service supplies only create; no target code was executed during this read-only review. Is this the best way to solve the issue? This is the smallest complete repair: align the existing fixture with its production caller, preserve idempotency, and honor the supplied pre-allocation callback without adding machinery or weakening assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2035b0730f82. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +8. Total +8 across 1 file. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 12, 2026, 7:22 PM ET / November 13, 2026, 00:22 UTC. |
|
Merged via squash.
|
openclaw#197985) * fix(test): align agent artifact worker creation fixture Update the injected worker service to the request-shaped creation contract introduced in openclaw#197875. Preserve idempotency and invoke the supplied authority check before fixture allocation. Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> * fix(test): agent artifact fixture uses the retired worker creation API Worked on by: - @obviyus - @steipete Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 0f327e11-666e-8123-8350-6617f8a9e77a --------- Co-authored-by: obviyus <[email protected]> Co-authored-by: steipete <[email protected]>
What Problem This Solves
Fixes: the real-Gateway agent/environment/artifact integration test fails at its first worker-environment creation request after the worker creation API migration.
User Impact
User impact: no production behavior changes; restores the existing end-to-end coverage of agent, worker-environment, and managed-artifact operations. No migration or user action is required.
Why This Change Was Made
#197875 migrated the production environment handler to the request-shaped
createWithRequestcontract but left this injected test service on the retired positional API. Update that fixture using the canonical request type, retaining idempotent reuse and invoking the supplied pre-provision authority hook before allocation. All existing assertions and timeouts remain unchanged.Evidence
worker environment creation failedat the firstenvironments.createRPC.02f29597c1075c0db5193fe2e3f2d5409593cfbareproduces that error (RED); the single-file fix passes the existing full composed case, 1/1 (GREEN). Remote proof run.Contributor credit: @obviyus and @steipete.
Work sessions
Linked for team reference; these sessions aren’t public.
Worked on by