Skip to content

refactor(openrouter): prepare Decision routing before execution - #188236

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/decision-11-openrouter-execution
Oct 31, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor/decision-11-openrouter-execution

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

OpenRouter Decision execution receives broad plugin configuration alongside its request lifetime and transport work.

User Impact

No user-visible behavior or configuration change. Part 11 of the Decision refactor stack, based on part 10.

Why This Change Was Made

Keep native eligibility, routing/privacy merges, credential availability and network projection in the plugin adapter. The private executor receives explicit body, capability and lifetime facts plus synchronous transport preparation. It retains the existing transport, dispatch-time admission, response handling and awaited release.

Two production files, +157/-106 lines. The growth defines the private execution boundary; no framework, cache, retry or new public SDK surface is added. Existing provider and registered integration tests remain.

Evidence

  • Independent fresh source review and local committed-range ClawSweeper review completed with no unresolved actionable findings. Corrective changes were reviewed separately; mechanical restacks were checked with git range-diff.
  • Exact-head ordinary CI passed at d5746a74e3a4da136d62dcf64afb925bc2f49d48, including the configured runtime, type, lint and guard lanes.
  • Aggregate production build passed at final production head 5b235dd694af030aeb75e1ec6e831b71ce4b745c. Shared SDK source-audit evidence, the advisory API-report timeout and broader manual-campaign limitations are recorded in part01.
  • Pinned local formatting, limited standalone lint, content hooks and diff checks passed. Local dependencies failed qualification, so no local project runtime pass is claimed.

Landing update

Current head: 5a27e7783a4cd9ef2fb2991672d27196ae5c1a4d; current-head CI passed at 5a27e7783a4cd9ef2fb2991672d27196ae5c1a4d. Native landing targets main after the preceding slice merged. Replayed only this slice onto verified landed part10 70ceaa1e9efbdfc481cbee41fb1e6bb5f576ae7b after an observed squash-ancestry conflict in the OpenRouter adapter. The predecessor's OpenRouter source is byte-identical to its landed form. The own-slice range remains patch-identical by git range-diff, with a valid commit signature. Prior passing CI41162922912 at 12e95a9aa1b8ae3ace8516dccc45877adf150201 remains historical evidence; fresh CI and native admission are required for this head.

Earlier landing evidence

Earlier head: 1a4176a01ea3c68c3911aa5981418054a1a7bb38; that head's CI is pending. After part04 landed, the remaining stack was replayed onto its actual protected-main commit 63dbee6a514580948082dc20cb930c7e748c019e to resolve the named CI/base-context gap in part05. All 20 commit ranges remain patch-identical by git range-diff; the allocation guard passes. Earlier CI/build evidence above remains historical. Each slice lands through the native main-targeted review, preparation, and merge workflow after its predecessor.

@vincentkoc vincentkoc self-assigned this Oct 30, 2026
@clawsweeper

clawsweeper Bot commented Oct 30, 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.

@vincentkoc
vincentkoc marked this pull request as ready for review October 30, 2026 10:06
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. labels Oct 30, 2026
@clawsweeper

clawsweeper Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR separates OpenRouter Decision routing and transport preparation from private HTTP execution.

Example: Evaluate a billing question with openrouter/typesafe/jev-1.13.

  • Before: The provider adapter prepares routing, sends the System One request, and decodes the result.
  • After: The adapter prepares routing and delegates the same request and result handling to a private executor.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused, source-equivalent extraction with green exact-head ordinary CI; execution evidence remains limited to retained harness coverage.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored, behavior-preserving refactor is outside the ordinary contributor proof gate; source and retained integration coverage support equivalence, while historical live proof does not establish execution of this head.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
Reason: The maintainer-authored direction narrows the executor's inputs while preserving plugin-owned policy and removing the superseded inline path.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored refactor preserves the existing Decision transport contract, and inspection found no actionable introduced defect.

Priority: P3
Reviewed head: d5746a74e3a4da136d62dcf64afb925bc2f49d48

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No current-head shipped-entry-point Decision execution is supplied; retained integration coverage exercises the registered provider with synthetic HTTP.
Agent review details

How this fits together

The OpenRouter plugin receives validated Decision batches and host-prepared credentials, applies provider routing policy, and returns typed outcomes through guarded HTTP transport.

flowchart LR
  A[Decision host] --> B[OpenRouter adapter]
  B --> C[Request codec]
  B --> D[Private executor]
  D --> E[Guarded HTTP transport]
  E --> F[System One endpoint]
  D --> G[Typed outcome]
Loading

Technical review

Best possible solution:

Retain this focused private extraction with provider policy in the adapter and one executor owning dispatch, response handling, and cleanup.

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

There is no reported runtime bug to reproduce; source comparison checks preservation of the existing execution contract.

Is this the best way to solve the issue?

The extraction establishes a narrow private boundary without duplicate execution paths, new state, or public SDK expansion.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 9b3d8bc36ea6.

Provenance checked

  • Prepared authentication, routing privacy, guarded dispatch, response handling, and cleanup keeps the original intent (eaaf553: The original adapter deliberately used host-prepared credentials, preserved provider privacy preferences, and rechecked live authority after asynchronous transport preparation.)
  • Native codec and adapter policy boundary keeps the original intent (6c1a53e: The parent refactor separated native input restrictions and wire conversion from routing and HTTP execution.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • RoboClaw: Raw commit eaaf553 adds extensions/openrouter/decision-provider.ts:146 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: eaaf5533213d; files: extensions/openrouter/decision-provider.ts)

PR surface

Source +51. Total +51 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 157 106 +51
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 157 106 +51

Labels

Label changes:

  • add P3: This is an internal refactor with no intended user-visible behavior, configuration, or public API change.
  • 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:

  • P3: This is an internal refactor with no intended user-visible behavior, configuration, or public API change.
  • 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.

Rank-up moves

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

  • A redacted current-head registered-provider Decision request and result would strengthen execution confidence.

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 October 30, 2026, 6:35 AM ET / 10:35 UTC.

@vincentkoc
vincentkoc force-pushed the refactor/decision-10-openrouter-protocol branch from 6c1a53e to defb385 Compare October 30, 2026 13:37
@vincentkoc
vincentkoc force-pushed the refactor/decision-11-openrouter-execution branch from d5746a7 to 14b7d2f Compare October 30, 2026 13:37
@vincentkoc
vincentkoc force-pushed the refactor/decision-10-openrouter-protocol branch from defb385 to 44028d8 Compare October 30, 2026 13:58
@vincentkoc
vincentkoc force-pushed the refactor/decision-11-openrouter-execution branch from 14b7d2f to d6fa822 Compare October 30, 2026 13:58
@vincentkoc
vincentkoc force-pushed the refactor/decision-10-openrouter-protocol branch from 44028d8 to 196c913 Compare October 30, 2026 14:27
@vincentkoc
vincentkoc force-pushed the refactor/decision-11-openrouter-execution branch from d6fa822 to 1a4176a Compare October 30, 2026 14:28
@vincentkoc
vincentkoc force-pushed the refactor/decision-10-openrouter-protocol branch 2 times, most recently from 44028d8 to 196c913 Compare October 31, 2026 02:19
@vincentkoc
vincentkoc changed the base branch from refactor/decision-10-openrouter-protocol to main October 31, 2026 03:03
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation extensions: openai extensions: liquid-ai Plugin: liquid-ai size: XL and removed size: M labels Oct 31, 2026
@vincentkoc
vincentkoc force-pushed the refactor/decision-11-openrouter-execution branch from 1a4176a to 12e95a9 Compare October 31, 2026 03:06
@openclaw-barnacle openclaw-barnacle Bot added size: L and removed docs Improvements or additions to documentation extensions: openai size: XL labels Oct 31, 2026
@vincentkoc
vincentkoc force-pushed the refactor/decision-11-openrouter-execution branch from 12e95a9 to 5a27e77 Compare October 31, 2026 03:25
@openclaw-barnacle openclaw-barnacle Bot added size: M and removed extensions: liquid-ai Plugin: liquid-ai size: L labels Oct 31, 2026
@vincentkoc
vincentkoc merged commit 54c3474 into main Oct 31, 2026
117 checks passed
@vincentkoc
vincentkoc deleted the refactor/decision-11-openrouter-execution branch October 31, 2026 03:38
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

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

Labels

extensions: openrouter P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M 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