Skip to content

test(agents): fixture CLI attempt backends - #118199

Merged
steipete merged 1 commit into
mainfrom
codex/test-perf-cli-backends
Aug 2, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-perf-cli-backends

Conversation

@steipete

@steipete steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • use deterministic contract-level Claude and Gemini CLI backend fixtures in the CLI attempt execution suite
  • avoid cold-loading complete bundled setup plugins for orchestration tests that do not assert plugin discovery
  • close agent database handles before restoring the test environment, preserving fixture ownership order

All 112 orchestration assertions remain unchanged. No production code, test configuration, worker count, or sharding changes.

Performance

  • baseline full file: 45.07s Vitest / 32.13s test bodies
  • rebased result: 29.99s Vitest / 16.91s test bodies
  • improvement: 33.5% Vitest duration and 47.4% test-body time
  • targeted cold case group: 61.37s to 12.09s in the original comparison

Proof

  • src/agents/command/attempt-execution.cli.test.ts — 112/112 passed after rebasing onto current main
  • targeted oxfmt, oxlint, and git diff --check passed
  • autoreview clean with no accepted/actionable findings

Test-only change; no changelog entry.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS maintainer Maintainer-authored PR labels Aug 2, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 2, 2026
@clawsweeper

clawsweeper Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 2, 2026, 5:46 PM ET / 21:46 UTC.

ClawSweeper review

What this changes

The PR replaces bundled plugin CLI-backend discovery in the agent command test suite with deterministic Claude and Gemini backend fixtures, then resets injected dependencies before restoring the test environment.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

This is a coherent, test-only performance improvement that uses the existing CLI-backend test injection seam and preserves the tested Claude/Gemini execution paths. It remains necessary because current main does not contain the change; the protected maintainer label keeps it for normal human review rather than automated cleanup.

Priority: P3
Reviewed head: 5bebc59e3ed49010e5d55e8c2e043457f2748d16

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused and policy-aligned test-only patch with no correctness findings; refreshing its focused proof after rebasing would complete the current-main review path.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-labeled, test-only PR is appropriately assessed through focused test and benchmark evidence rather than external user-facing behavior proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-labeled, test-only PR is appropriately assessed through focused test and benchmark evidence rather than external user-facing behavior proof.
Evidence reviewed 5 items Changed test uses the supported fixture seam: The branch installs deterministic Claude and Gemini runtime descriptors before each test, matching the backend fields consumed by CLI backend resolution, and resets the injected dependencies during teardown.
Fixture contract matches the production owner boundary: CLI attempt execution resolves a registered backend through resolveCliBackendConfig; its test-only dependency controls intentionally replace runtime/setup registry lookups and reset to defaults.
Scoped agent-test guidance supports this approach: The applicable src/agents policy directs import-bound tests to use dependency injection or narrow helpers instead of cold-loading bundled plugin runtime, while retaining behavior coverage.
Findings None None.
Security None None.

How this fits together

Agent command execution resolves a configured CLI backend before invoking the CLI runner and persisting session effects. This test suite exercises that orchestration while the new fixtures avoid booting unrelated bundled plugin runtime during setup.

flowchart LR
  A[CLI attempt tests] --> B[Injected backend descriptors]
  B --> C[CLI backend resolution]
  C --> D[Agent attempt orchestration]
  D --> E[Mocked CLI runner and session assertions]
  E --> F[Test cleanup restores runtime state]
Loading

Before merge

  • Add real behavior proof - Not applicable: This maintainer-labeled, test-only PR is appropriately assessed through focused test and benchmark evidence rather than external user-facing behavior proof.
  • Resolve merge risk (P1) - Current main advanced after the branch base; the three-way merge is clean, but rebasing and rerunning the focused suite would keep the performance evidence current.
  • Complete next step (P2) - The protected maintainer label requires human landing review; there is no discrete repair for ClawSweeper to queue.
Agent review details

Security

None.

PR surface

Tests +20. Total +20 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 21 1 +20
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 21 1 +20

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Rebase onto current main, retain the deterministic registry fixtures and teardown order, rerun the focused CLI-attempt suite, then land the isolated test-performance improvement.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Rebase onto current main, retain the deterministic registry fixtures and teardown order, rerun the focused CLI-attempt suite, then land the isolated test-performance improvement.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is a test-only performance change, and current source directly establishes the injected registry path and teardown ordering under review.

Is this the best way to solve the issue?

Yes: using the existing test-only dependency controls is the narrowest maintainable way to avoid loading bundled plugin runtime while retaining the CLI-attempt assertions.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against a6ad60a24709.

Labels

Label justifications:

  • P3: This is a small test-suite performance and isolation improvement with no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-labeled, test-only PR is appropriately assessed through focused test and benchmark evidence rather than external user-facing behavior proof.

Evidence

What I checked:

  • Changed test uses the supported fixture seam: The branch installs deterministic Claude and Gemini runtime descriptors before each test, matching the backend fields consumed by CLI backend resolution, and resets the injected dependencies during teardown. (src/agents/command/attempt-execution.cli.test.ts:612, 5bebc59e3ed4)
  • Fixture contract matches the production owner boundary: CLI attempt execution resolves a registered backend through resolveCliBackendConfig; its test-only dependency controls intentionally replace runtime/setup registry lookups and reset to defaults. (src/agents/cli-backends.ts:365, 82540adc476c)
  • Scoped agent-test guidance supports this approach: The applicable src/agents policy directs import-bound tests to use dependency injection or narrow helpers instead of cold-loading bundled plugin runtime, while retaining behavior coverage. (src/agents/AGENTS.md:13, a6ad60a24709)
  • The branch applies cleanly to current main: Current main is ahead of the PR base, but Git's three-way merge reports a merged result with no conflict markers for the only changed test file. (src/agents/command/attempt-execution.cli.test.ts:612, a6ad60a24709)
  • Feature-history provenance: The test controls and the surrounding CLI-attempt coverage appear to date to the recent requester-completion repair, which introduced the CLI-backend dependency controls used by this PR. (src/agents/cli-backends.ts:451, 82540adc476c)

Likely related people:

  • steipete: History attributes the current CLI-backend test controls and the surrounding agent command coverage to Peter Steinberger, who also authored this branch. (role: recent area contributor and test-seam introducer; confidence: high; commits: 82540adc476c, 5bebc59e3ed4; files: src/agents/cli-backends.ts, src/agents/cli-backends.test-support.ts, src/agents/command/attempt-execution.cli.test.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Rebase onto current main and rerun src/agents/command/attempt-execution.cli.test.ts so the reported timing and pass count apply to the merge head.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-02T20:58:42.308Z sha 5bebc59 :: needs real behavior proof before merge. :: none

@steipete

steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The prior review lease expired while the placeholder remained. Exact-head CI and the focused proof in the PR body are current.

@clawsweeper

clawsweeper Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete merged commit 30cb41f into main Aug 2, 2026
104 of 110 checks passed
@steipete
steipete deleted the codex/test-perf-cli-backends branch August 2, 2026 21:46
@steipete

steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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