Skip to content

fix(plugins): keep the release-only runtime-llm ownership and isolated-reasoning tests green - #156565

Merged
steipete merged 1 commit into
mainfrom
fix/runtime-llm-release-shard
Sep 23, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/runtime-llm-release-shard

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Related: #156346, #155393

What Problem This Solves

Fixes: the release-only plugin shard (checks-node-agentic-plugins, Full Release Validation child plugin-prerelease-independent) fails deterministically on main, blocking the 2026.9.6 stable release. A plugin runtime.llm.complete call that the caller aborts after the provider request was dispatched now rejects with a raw AbortError (or the caller's own abort reason) instead of settling through the provider's aborted result, and the isolated-reasoning validation fixture asks for a thinking level that is now legitimately supported.

User Impact

User impact: a plugin that cancels its own in-flight direct completion gets the aborted provider result back again (empty text, no usage), matching the plugin SDK completeWithPreparedSimpleCompletionModel path, instead of an untyped rejection. Operator-role model limits (#156346) keep revoking in-flight work exactly as before. No change for callers that never abort.

Why This Change Was Made

#156346 folded the caller's own params.signal into the operator-currency assertCurrent that also runs after the provider stream has settled, so a caller abort flipped from "resolve with the aborted message" to "reject after the fact". Operator revocation is already enforced by operatorAuthority.assertCurrent() (which checks the operator's own signal) and modelExecution.assertCurrent(), so the caller-signal check is dropped from assertCurrent; the caller signal still reaches the provider through options.signal and still prevents dispatch when already aborted.

#155393 made ultra a harness mode on every runtime, so reasoning: "ultra" is valid for openai/gpt-5.5 by design. The isolated-reasoning validation fixture now requests max, which stays unsupported for the host-resolved model on every runtime, so the test keeps proving that isolated reasoning is validated against the host-resolved profile.

Evidence

  • Reproduced on main 9db35b75146 with node node_modules/vitest/vitest.mjs run --config test/vitest/vitest.plugins.config.ts src/plugins/runtime/runtime-llm-isolated.runtime.test.ts src/plugins/runtime/runtime-llm.prepared-owner.test.ts: abort, callback-drain, anthropic-read-cancel reject with AbortError / foreign cancellation; validates isolated reasoning against the host-resolved model and runtime resolves instead of rejecting.
  • Bisected by history reading: the abort trio regressed in 6b4ebc0 (feat: limit model use by operator role #156346), the isolated test in 7f61c6c (feat: extend Ultra harness mode across supported runtimes #155393). These tests only run in the release-only shard, which is how the regression slipped past PR CI.
  • With the fix, the same command passes 51/51; the full src/plugins/runtime/ directory under test/vitest/vitest.plugins.config.ts passes 23 files / 303 tests; the PR-CI runtime-llm.operator-model-policy.test.ts and runtime-llm-diagnostics.runtime.test.ts pass 35/35 (operator revocation, "cannot use this model", and "requester retired" rejections are unchanged).
  • pnpm check:changed run locally.
  • The commit applies cleanly on the 2026.9.6 release base af7420cc367a (git apply --check against that tree).

…d-reasoning tests green

Operator authority currency no longer folds the caller's own abort signal into
assertCurrent, so a caller-aborted direct completion settles through the
provider result again instead of rejecting after the stream ended (regressed
in #156346). The isolated reasoning validation fixture uses max, which stays
unsupported for the host-resolved model now that Ultra is a harness mode on
every runtime (#155393).
@clawsweeper

clawsweeper Bot commented Sep 23, 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.

@steipete
steipete marked this pull request as ready for review September 23, 2026 14:21
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed September 23, 2026, 10:30 AM ET / 14:30 UTC.

ClawSweeper review

What this changes

Restores aborted results for plugin-requested cancellation of direct model completions and updates the isolated-reasoning rejection fixture.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 1 item remains

The repair remains necessary on current main. No introduced correctness or security defects were found; the patch preserves operator revocation while restoring caller-cancellation behavior.

Priority: P2
Reviewed head: fa2f9888ecb36ac77f64c6fc7c7e62602526112b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Recorded reviewer rating: A narrow, coherent repair supported by existing cancellation and authority coverage, with no actionable findings. Real behavior proof remains required by host policy.
Proof confidence 🌊 off-meta tidepool Recorded reviewer rating; Required by policy: the recorded not-applicable assessment does not satisfy the current PR proof policy. Put relevant after-change evidence in the main PR body, then request a fresh review with @clawsweeper re-review. Recorded reviewer context: Verified repository-admin authorship exempts the ordinary external-contributor gate. Reported before/after validation exercises the production completion owner and real HTTP transport with injected cancellation; policy tests supplement it. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Required by policy Required by policy: the recorded not-applicable assessment does not satisfy the current PR proof policy. Put relevant after-change evidence in the main PR body, then request a fresh review with @clawsweeper re-review. Recorded reviewer context: Verified repository-admin authorship exempts the ordinary external-contributor gate. Reported before/after validation exercises the production completion owner and real HTTP transport with injected cancellation; policy tests supplement it. No stored-data contract changes.
Evidence reviewed 9 items Pinned introduced change: The merge-base-to-head diff removes caller-signal checks from authority assertions and changes the negative reasoning fixture from ultra to max; unrelated base-branch changes are excluded.
Still necessary on main: Fetched main retains signal.throwIfAborted inside the assertion called after provider completion, and retains the obsolete ultra rejection fixture. No merged replacement fixing these behaviors is established by the supplied related context.
Cancellation and authority remain independent: The completion facade checks both current authority and the cancellation signal immediately before provider dispatch. The runtime separately checks operator and selected-model authority after completion; host-issued operator authority itself checks its revocation signal.
Findings None None.
Security None None.

How this fits together

The plugin completion runtime turns plugin prompts into provider requests or isolated agent runs. It carries caller cancellation separately from the operator authority that controls model access.

flowchart TD
  A[Plugin completion request] --> B[Operator authority checks]
  B --> C[Model selection and preparation]
  C --> D[Provider or isolated runtime]
  E[Caller cancellation] --> D
  B --> F[Result authorization check]
  D --> F
  F --> G[Completion result and cleanup]
Loading

Before merge

  • Add real behavior proof - Required by policy: the recorded not-applicable assessment does not satisfy the current PR proof policy. Put relevant after-change evidence in the main PR body, then request a fresh review with @clawsweeper re-review. Recorded reviewer context: Verified repository-admin authorship exempts the ordinary external-contributor gate. Reported before/after validation exercises the production completion owner and real HTTP transport with injected cancellation; policy tests supplement it. No stored-data contract changes.
Agent review details

Security

None.

PR surface

Source 0, Tests 0. Total 0 across 2 files.

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

Review metrics

None.

Technical review

Best possible solution:

Keep provider cancellation settlement separate from operator revocation, using the existing completion and cleanup owners.

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

Yes, from source: aborting a dispatched completion makes current main's post-result assertion throw; the existing transport suite exercises that trigger. Tests were not executed during this read-only review.

Is this the best way to solve the issue?

Yes. Removing caller cancellation from authority currency restores the existing result contract while preserving dispatch cancellation, model-policy checks, and cleanup ownership.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 318fc3c41f71.

Labels

Label changes:

  • add P2: Repairs a bounded plugin cancellation regression and an obsolete validation fixture.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit. This is the recorded reviewer rating; real behavior proof remains required by host policy.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Required by policy: the recorded not-applicable assessment does not satisfy the current PR proof policy. Put relevant after-change evidence in the main PR body, then request a fresh review with @clawsweeper re-review. Recorded reviewer context: Verified repository-admin authorship exempts the ordinary external-contributor gate. Reported before/after validation exercises the production completion owner and real HTTP transport with injected cancellation; policy tests supplement it. No stored-data contract changes.

Label justifications:

  • P2: Repairs a bounded plugin cancellation regression and an obsolete validation fixture.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit. This is the recorded reviewer rating; real behavior proof remains required by host policy.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Required by policy: the recorded not-applicable assessment does not satisfy the current PR proof policy. Put relevant after-change evidence in the main PR body, then request a fresh review with @clawsweeper re-review. Recorded reviewer context: Verified repository-admin authorship exempts the ordinary external-contributor gate. Reported before/after validation exercises the production completion owner and real HTTP transport with injected cancellation; policy tests supplement it. No stored-data contract changes.

Evidence

What I checked:

  • Pinned introduced change: The merge-base-to-head diff removes caller-signal checks from authority assertions and changes the negative reasoning fixture from ultra to max; unrelated base-branch changes are excluded. (src/plugins/runtime/runtime-llm-operator-authority.ts:58, fa2f9888ecb3)
  • Still necessary on main: Fetched main retains signal.throwIfAborted inside the assertion called after provider completion, and retains the obsolete ultra rejection fixture. No merged replacement fixing these behaviors is established by the supplied related context. (src/plugins/runtime/runtime-llm-operator-authority.ts:61, 318fc3c41f71)
  • Cancellation and authority remain independent: The completion facade checks both current authority and the cancellation signal immediately before provider dispatch. The runtime separately checks operator and selected-model authority after completion; host-issued operator authority itself checks its revocation signal. (src/llm/stream.ts:119, fa2f9888ecb3)
  • Meaningful cancellation regression coverage: The prepared-owner suite invokes createRuntimeLlm through real provider transport to a local HTTP server. Its abort, callback-drain, and Anthropic read-cancel cases assert empty completion results and subsequent successful requests. The captured PR body reports these failing before and passing after, with 51 focused cases and 303 runtime cases passing; this reviewer did not execute tests. (src/plugins/runtime/runtime-llm.prepared-owner.test.ts:778, fa2f9888ecb3)
  • Operator controls retained: Existing tests cover denied model aliases before preparation, selective in-flight model revocation, and requester retirement during preparation. Their assertions and the production checks remain unchanged; the body reports the policy and diagnostics suites passing 35 cases. (src/plugins/runtime/runtime-llm.operator-model-policy.test.ts:181, fa2f9888ecb3)
  • Host reasoning validation: OpenClaw adds Ultra at its thinking-profile owner, while the OpenAI profile does not expose max for the fixture model. The changed test retains both the input-rejection assertion and the no-dispatch assertion. It tests host validation with isolated execution mocked, rather than a native Codex protocol contract. (src/plugins/runtime/runtime-llm-isolated.runtime.test.ts:367, fa2f9888ecb3)

Likely related people:

  • Shakker: Raw commit 6b4ebc0 adds src/plugins/runtime/runtime-llm-operator-authority.ts:60 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6b4ebc043bc8; files: src/plugins/runtime/runtime-llm-operator-authority.ts)
  • steipete: 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.

@steipete
steipete merged commit a93058c into main Sep 23, 2026
426 of 428 checks passed
@steipete
steipete deleted the fix/runtime-llm-release-shard branch September 23, 2026 15:08
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 24, 2026
…d-reasoning tests green (openclaw#156565)

Operator authority currency no longer folds the caller's own abort signal into
assertCurrent, so a caller-aborted direct completion settles through the
provider result again instead of rejecting after the stream ended (regressed
in openclaw#156346). The isolated reasoning validation fixture uses max, which stays
unsupported for the host-resolved model now that Ultra is a harness mode on
every runtime (openclaw#155393).

Co-authored-by: Peter Steinberger <[email protected]>
@roboclaw-bot roboclaw-bot mentioned this pull request Sep 24, 2026
2 of 8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant