Skip to content

test(agents): fixture harness provider discovery - #118228

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

steipete merged 1 commit into
mainfrom
codex/test-perf-harness-registry

Conversation

@steipete

@steipete steipete commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • keep the harness registry suite on deterministic provider ownership and route-artifact seams
  • preserve the registry-to-selection handoff and assert the exact provider/config ownership call
  • leave real ownership classification and route discovery in their dedicated provider owner suites

No production code, test configuration, worker count, or sharding changes.

Performance

  • registry baseline: 31.67s Vitest / 27.68s test bodies / 1.87GB RSS
  • patched registry: 3.93s Vitest / 10ms test bodies / 945MB RSS
  • improvement: 87.6% Vitest duration, effectively all test-body overhead, and 49.5% RSS

The slow registry assertion used a synthetic provider config but accidentally cold-loaded every plugin metadata artifact through ownership and route discovery.

Proof

  • inspectable reviewed-head terminal proof: registry/selection 114/114 and provider owners/routes 82/82 passed with duration and RSS
  • exact-head CI is green
  • 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: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. 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 maintainer review before merge. Reviewed August 2, 2026, 6:43 PM ET / 22:43 UTC.

ClawSweeper review

What this changes

The branch mocks provider ownership and model-route discovery in the agent-harness registry test, then verifies that explicit provider runtime selection still forwards the original configuration to the ownership resolver.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

This focused test-only PR remains useful: it isolates the agent-harness registry suite from real provider discovery while retaining an explicit assertion that selection forwards the original provider configuration to ownership resolution. The patch is correct, its reviewed-head terminal proof is sufficient, and no security or compatibility concern was found; the protected maintainer label leaves final merge approval to a human.

Priority: P3
Reviewed head: 78ab5586c077e96c78007f4a6c10fb32dfa62563
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, correct test-isolation patch with strong reviewed-head terminal evidence; only protected human merge handling remains.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): An inspectable reviewed-head terminal transcript shows the affected registry/selection suites and the separate provider owner/route suites passing after the change, with timing and RSS measurements.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): An inspectable reviewed-head terminal transcript shows the affected registry/selection suites and the separate provider owner/route suites passing after the change, with timing and RSS measurements.
Evidence reviewed 6 items Focused fixture boundary: At the reviewed PR head, the registry test mocks only provider ownership and model-route resolver seams, then asserts the exact provider/config handoff used by explicit plugin-runtime selection.
Current production owner boundary: Current main performs provider ownership resolution only when validating a forced plugin harness, passing the same provider and configuration into the resolver before calling harness support.
Dedicated route coverage remains separate: The production route resolver is independently exercised by the provider-model-routes suite, including configuration and environment forwarding, so the registry fixture does not become the sole proof of route behavior.
Findings None None.
Security None None.

How this fits together

Agent-harness selection receives a provider, model, and configuration, resolves provider ownership and model routes, then chooses the embedded runtime that can support the request. This PR changes only the registry suite’s fixture boundary: real provider-artifact behavior remains covered by dedicated provider suites.

flowchart LR
  A[Registry test fixture] --> B[Agent harness selection]
  B --> C[Provider ownership resolver]
  B --> D[Model route resolver]
  C --> E[Harness support decision]
  D --> E
  E --> F[Selected agent runtime]
Loading

Decision needed

Question Recommendation
Does a maintainer approve merging this narrow test-fixture isolation now that the reviewed head has terminal proof and a clean current-main merge result? Approve the test-only merge: Land the narrow fixture boundary because it preserves the configuration handoff assertion and the dedicated provider suites retain real-discovery coverage.

Why: The patch has no mechanical defect, but the existing protected maintainer label requires explicit human merge handling.

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +18. Total +18 across 1 file.

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

Review metrics

None.

Technical review

Best possible solution:

Merge the focused fixture isolation after human approval, keeping real provider ownership and route-artifact behavior canonical in their dedicated provider suites.

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

Not applicable as a product-bug reproduction. The contributor supplied reviewed-head terminal proof that both the narrowed registry/selection suites and the dedicated provider suites pass after the fixture change.

Is this the best way to solve the issue?

Yes. Mocking the explicit discovery seams while asserting the ownership handoff is narrower and more maintainable than cold-loading bundled provider metadata in a synthetic registry test.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. An inspectable reviewed-head terminal transcript shows the affected registry/selection suites and the separate provider owner/route suites passing after the change, with timing and RSS measurements.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): An inspectable reviewed-head terminal transcript shows the affected registry/selection suites and the separate provider owner/route suites passing after the change, with timing and RSS measurements.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P3: This is a scoped test-performance and fixture-isolation improvement with no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): An inspectable reviewed-head terminal transcript shows the affected registry/selection suites and the separate provider owner/route suites passing after the change, with timing and RSS measurements.
  • proof: sufficient: Contributor real behavior proof is sufficient. An inspectable reviewed-head terminal transcript shows the affected registry/selection suites and the separate provider owner/route suites passing after the change, with timing and RSS measurements.

Evidence

What I checked:

  • Focused fixture boundary: At the reviewed PR head, the registry test mocks only provider ownership and model-route resolver seams, then asserts the exact provider/config handoff used by explicit plugin-runtime selection. (src/agents/harness/registry.test.ts:17, 78ab5586c077)
  • Current production owner boundary: Current main performs provider ownership resolution only when validating a forced plugin harness, passing the same provider and configuration into the resolver before calling harness support. (src/agents/harness/selection.ts:342, 1e10c444748a)
  • Dedicated route coverage remains separate: The production route resolver is independently exercised by the provider-model-routes suite, including configuration and environment forwarding, so the registry fixture does not become the sole proof of route behavior. (src/plugins/provider-model-routes.test.ts:36, 8df95ccd087e)
  • Reviewed-head behavior proof: The PR discussion contains an inspectable terminal run on reviewed head 78ab558: registry/selection 114/114 and provider owner/route 82/82 passed, with measured duration and RSS; supplied exact-head checks are green. (78ab5586c077)
  • Current-main merge result: A read-only three-way merge of the current main SHA and reviewed PR head reports a merged result for the sole touched test file, with no conflict. (src/agents/harness/registry.test.ts:17, 78ab5586c077)
  • Feature provenance: The current registry test and the relevant selection/support handoff lines trace to the same recent main commit authored by Peter Steinberger, establishing a single current owner trail for the test surface and production behavior. (src/agents/harness/registry.test.ts:203, 1e10c444748a)

Likely related people:

  • steipete: Current main blame attributes the registry selection case and the provider-ownership handoff to Peter Steinberger; the reviewed PR is also authored by this contributor. (role: introduced the current selection and registry-test surface; confidence: high; commits: 1e10c444748a, 78ab5586c077; files: src/agents/harness/registry.test.ts, src/agents/harness/selection.ts, src/agents/harness/support.ts)

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 (2 earlier review cycles)
  • reviewed 2026-08-02T22:04:11.840Z sha 78ab558 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-02T22:39:53.916Z sha 78ab558 :: needs maintainer review before merge. :: none

@steipete

steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Focused after-fix terminal proof on reviewed head 78ab5586c077e96c78007f4a6c10fb32dfa62563:

$ /usr/bin/time -l node scripts/run-vitest.mjs \
  src/agents/harness/registry.test.ts \
  src/agents/harness/selection.test.ts \
  src/plugins/providers.test.ts \
  src/plugins/provider-model-routes.test.ts

Test Files  2 passed (2)
     Tests  114 passed (114)
  Duration  6.51s (transform 5.21s, setup 574ms, import 8.49s, tests 2.42s, environment 0ms)

Test Files  2 passed (2)
     Tests  82 passed (82)
  Duration  1.97s (transform 595ms, setup 212ms, import 14ms, tests 1.66s, environment 0ms)

[test] passed 2 Vitest shards in 11.79s
      11.95 real
 1621737472 maximum resident set size

Exact-head CI is green.

@steipete

steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Inspectable reviewed-head terminal proof is now attached and linked from the PR body.

@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 commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The prior refreshed review lease expired without updating its placeholder. Inspectable reviewed-head terminal proof and exact-head green CI are linked from the PR body.

@steipete
steipete merged commit adedc32 into main Aug 2, 2026
111 of 118 checks passed
@steipete
steipete deleted the codex/test-perf-harness-registry branch August 2, 2026 22:44
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 2, 2026
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. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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