Skip to content

fix(models): prevent rejected probe tests from disabling later providers - #157487

Merged
roboclaw-bot merged 1 commit into
mainfrom
fix/models-probe-rejection-cleanup-20260924
Sep 24, 2026
Merged

roboclaw-bot merged 1 commit into
mainfrom
fix/models-probe-rejection-cleanup-20260924

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: a rejected model-probe test can skip teardown and leave bundled providers disabled for later tests in its reused worker.

User Impact

Test-only repair in one fixture file. Failed probes retain their original errors while owned work settles and fixture state is restored. Production provider admission, aliases, broker authority, the 100 ms lock-inspection guard, and the 25 ms cleanup budget are unchanged.

The initial hosted 100 ms overrun remains unexplained. This repairs demonstrated failure-path cleanup, not that original timing trigger.

Why This Change Was Made

The fixture awaited its possibly rejected operation at the start of a finally block. Rejection skipped resource release, registry resets and direct-environment restoration. That can leave bundled-plugin discovery disabled; an explicit bundled-directory override cannot override this flag.

The same fixture now owns initialization through teardown, releases gates and joins pending work before retiring resources, and continues settled cleanup after errors. A single original error is rethrown unchanged; independent cleanup/child errors are retained together. The existing six cases and assertions remain, with three regressions for operation rejection, cleanup rejection and incomplete initialization. No new production seam or generic cleanup framework is introduced.

Contributor credit: requested by and co-authored with @vincentkoc.

Work sessions

Evidence

  • Canonical CI 36029154839 / job 107737176765 first failed lock inspection, followed by five provider/alias failures. Hosted logs lack worker/env tracing, so that precise historical cascade is not claimed proven.
  • Controlled producer-to-observer proof runs the actual fixture and real lock-inspection owner with the unchanged deadline. Before repair, the same GatewayLockError remains visible while the disabled flag/root leak and real alias/admission observers fail. After repair, that same error remains visible, state is restored, and observers work. This one-worker diagnostic is distinct from normal two-worker qualification.
  • All three new regressions fail against the original fixture body for the intended contracts. Final focused file: 11/11 passed, 58.14 s command wall; new cases total 353 ms. Existing native ownership/cleanup compositions and import/setup dominate the file wall time.
  • Unchanged canonical models selection: 32 files / 418 tests passed, 103.97 s command wall, on Node 24.21.0, pnpm 12.4.2, Vitest 5.0.1, with two reused fork workers. The unmodified 415-test selection also passed; that non-reproduction is not fix evidence. Local hardware/cache contents differ from hosted CI.
  • Full changed-file checks passed, including commands types, type-aware lint (zero warnings/errors), formatting, boundaries and all selected guards. Fresh exact-source independent P0–P2 review found no actionable findings.

The full original job envelope is not claimed green: its unmodified local Gateway prefix hit 54 HTTP-502 assertions before models. The configured remote route verified source but supplied Node 24.19.0; the explicit 24.21.0 prerequisite stopped it before tests. No proxy, runtime guard, provider, timeout or assertion was weakened. Both owned remote leases are completed; the third original group was not executed. Exact-head CI 36042583941, attempt 1 completed successfully on e718128; both enforced CI-gate results passed. The durable same-head ClawSweeper review recovered at 19:55 UTC with no actionable findings. The unchanged head landed as fd0b79614de5 at 20:03:39 UTC; main containment, the human co-author trailer and native closeout were verified. The native guard reported relevant mainline input drift and proceeded under its unchanged default policy; this is not a claim of full merged-main CI recovery.


View the OpenClaw team session

Join owned work and continue settled cleanup when a probe or release rejects, preserving original and independent cleanup errors. Exercise the real fixture on rejection and partial acquisition, then inspect real provider alias and admission owners. The original hosted 100 ms inspection overrun remains unexplained; production guards and both existing budgets are unchanged.

Co-authored-by: vincentkoc <[email protected]>
@roboclaw-bot roboclaw-bot self-assigned this Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 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 commands Command implementations size: L labels Sep 24, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 24, 2026 18:37
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

Same-head review-publication recovery only. Head remains e718128; no source push or CI rerun requested. Review generation 36042794829/1 succeeded at 18:45 UTC, but direct publication was deferred with github_rate_limit (retry_at 18:45:48.679Z) and queued. The durable review is still absent after the retry window; only the completed/finalizing progress notice and old lease are visible. Please produce the normal current-head durable review; all normal leases and landing gates remain in force.

@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@roboclaw-bot roboclaw-bot changed the title test(models): restore probe fixtures after rejected work fix(models): prevent rejected probe tests from disabling later providers Sep 24, 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. P2 Normal backlog priority with limited blast radius. labels Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 3:55 PM ET / 19:55 UTC.

ClawSweeper review

What this changes

The branch makes model-probe tests settle pending work and restore fixture state after failures, then adds regressions for rejected probes, cleanup failures, and incomplete initialization.

Merge readiness

✅ Ready for maintainer review

Current main still skips fixture teardown when a probe rejects. This PR is a focused repair with no identified blocking defect. The original hosted lock-inspection overrun remains unexplained, and the PR clearly separates it from the cleanup failure.

Priority: P2
Reviewed head: e718128ca64e845342eadc53f072953f4c17482b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The repair is focused, its failure checks reach downstream provider behavior, and exact-head CI passes; the historical timing trigger remains separately documented.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This bot-authored, test-only fixture repair has no contributor live-proof gate. The PR reports before-and-after observations through the actual probe fixture and lock-inspection owner; the introduced cases assert restored provider observers, and exact-head CI passes. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This bot-authored, test-only fixture repair has no contributor live-proof gate. The PR reports before-and-after observations through the actual probe fixture and lock-inspection owner; the introduced cases assert restored provider observers, and exact-head CI passes. No stored-data contract changes.
Evidence reviewed 10 items Current-main cleanup gap: The existing finally block awaits the possibly rejected operation before releasing the registry and restoring test state; rejection skips those later statements.
Introduced repair: The pinned PR delta joins settled probe work before resource release and continues later cleanup when a release fails.
Downstream regression checks: The new rejection cases assert the original lock error, restored environment and temporary root, and working provider alias and admission observers.
Findings None None.
Security None None.

How this fits together

Model-probe tests create temporary agent and plugin state, run a probe, and release that state. Later provider tests may reuse the worker, so leaked environment settings can change their results.

flowchart LR
A[Probe test] --> B[Temporary agent and plugin state]
B --> C[Model probe and lock inspection]
C --> D{Success or rejection}
D --> E[Settle work and release resources]
E --> F[Restored provider discovery]
F --> G[Later provider checks]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +153. Total +153 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 387 234 +153
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 387 234 +153

Review metrics

Metric Value Why it matters
Regression execution cost 3 new cases: 353 ms reported locally; changed Node shard: 80 s The added failure checks are short; the CI figure is for the whole selected test step.

Technical review

Best possible solution:

Keep fixture teardown responsible for settling probe work, preserving the original failure, and restoring shared provider state; leave production probe and lock policies unchanged.

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

Yes, current-main source gives a focused failure path: rejecting the probe makes the first await in finally skip later teardown. This read-only review did not execute the test.

Is this the best way to solve the issue?

Yes. The fixture owns the temporary environment and registry state, and its teardown is the narrow place to settle work and restore both after failure.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: A rejected fixture can contaminate reused test workers and cause unrelated provider checks to fail, with limited production blast radius.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This bot-authored, test-only fixture repair has no contributor live-proof gate. The PR reports before-and-after observations through the actual probe fixture and lock-inspection owner; the introduced cases assert restored provider observers, and exact-head CI passes. No stored-data contract changes.

Label justifications:

  • P2: A rejected fixture can contaminate reused test workers and cause unrelated provider checks to fail, with limited production blast radius.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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 bot-authored, test-only fixture repair has no contributor live-proof gate. The PR reports before-and-after observations through the actual probe fixture and lock-inspection owner; the introduced cases assert restored provider observers, and exact-head CI passes. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

@roboclaw-bot
roboclaw-bot merged commit fd0b796 into main Sep 24, 2026
189 checks passed
@roboclaw-bot
roboclaw-bot deleted the fix/models-probe-rejection-cleanup-20260924 branch September 24, 2026 20:03
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

@roboclaw-bot roboclaw-bot mentioned this pull request Sep 24, 2026
2 of 8 tasks
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
…7487)

Join owned work and continue settled cleanup when a probe or release rejects, preserving original and independent cleanup errors. Exercise the real fixture on rejection and partial acquisition, then inspect real provider alias and admission owners. The original hosted 100 ms inspection overrun remains unexplained; production guards and both existing budgets are unchanged.

Co-authored-by: vincentkoc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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