Skip to content

fix(test): agent artifact fixture uses the retired worker creation API - #197985

Merged
roboclaw-bot merged 2 commits into
mainfrom
openclaw/quiet-prawn
Nov 13, 2026
Merged

roboclaw-bot merged 2 commits into
mainfrom
openclaw/quiet-prawn

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

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 createWithRequest contract 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

  • Main run 43319824287, job 131538054306, and later 43328833910, job 131568769621, fail with worker environment creation failed at the first environments.create RPC.
  • On isolated AWS, exact prepared base 02f29597c1075c0db5193fe2e3f2d5409593cfba reproduces that error (RED); the single-file fix passes the existing full composed case, 1/1 (GREEN). Remote proof run.
  • The unchanged composed case exercises repeated Gateway restarts, worker replay, agent CRUD, artifact persistence/reload, GET/HEAD/range downloads, and negative artifact checks, using the repository-pinned Bun and isolated Gateway test configuration.
  • Touched-file typecheck, lint, format, and diff checks pass. Independent P0–P2 review is scoped-clean. Remote source bytes match the reviewed local file; the sole proof lease is released with cleanup complete.
  • Exact published-head PR CI and later main qualification remain pending; this does not claim all-green main.

Contributor credit: @obviyus and @steipete.

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

roboclaw-bot and others added 2 commits November 13, 2026 00:05
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
@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS labels Nov 13, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 13, 2026
@clawsweeper

clawsweeper Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Updates 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.

  • Before: The Gateway calls createWithRequest, which the injected service does not implement.
  • After: The fixture returns worker-qa-1 and reuses it for the repeated request.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-verified test repair with passing exact-head CI and harness-level validation.
Proof confidence 🦐 gold shrimp (3/6) Only integration-fixture code changes; shipped-entry-point proof is not required, and exact-head CI supports the reported isolated red/green integration run.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Maintainers lose the composed agent, worker-environment, and artifact regression check because setup fails at worker creation.
Reason: The maintainer-authored repair restores an existing integration contract and changes no production defaults, APIs, or persisted data.

Regression provenance

Possible 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
Reviewed head: 7f4b2eea52b73b8b6d017987a5a125a92c7e855c

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Injected worker creation fixture keeps the original intent (e4b6bde: The original suite added composed real-Gateway coverage with deterministic worker environments; the later migration changed the handler contract without updating this fixture.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit e4b6bde adds test/e2e/qa-lab/runtime/gateway-agent-artifact-apis.e2e.test.ts:57 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e4b6bde45a07; files: test/e2e/qa-lab/runtime/gateway-agent-artifact-apis.e2e.test.ts)

PR surface

Tests +8. Total +8 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 10 2 +8
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 10 2 +8

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: Restores broken main-branch integration coverage without changing production behavior.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Restores broken main-branch integration coverage without changing production behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 12, 2026, 7:22 PM ET / November 13, 2026, 00:22 UTC.

@roboclaw-bot
roboclaw-bot merged commit 0a44239 into main Nov 13, 2026
121 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/quiet-prawn branch November 13, 2026 00:36
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 13, 2026
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant