Skip to content

refactor(openai): project prepared Decision execution explicitly - #188231

Merged
vincentkoc merged 5 commits into
mainfrom
refactor/decision-07-openai-provider
Oct 31, 2026
Merged

vincentkoc merged 5 commits into
mainfrom
refactor/decision-07-openai-provider

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The OpenAI Decision plugin passes a broad host context to its shared executor, obscuring which prepared facts execution consumes.

User Impact

No user-visible behavior or configuration changes. Part 07 of the maintainer-directed Decision refactor stack, based on part 06.

Why This Change Was Made

Project prepared model, auth, transport, lifetime and reasoning facts explicitly. Keep endpoint eligibility and lazy registration with the OpenAI plugin.

1 production file, +11/-2 lines. Existing provider and registered integration tests are retained; no duplicate extraction-only tests were added.

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 74d7ee2d56cda5940618e5abc42abcdb12575964, 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: 48089ac3081836900f679c8df6b10cb65027da7c; current-head CI passed at 48089ac3081836900f679c8df6b10cb65027da7c. Landing waits for the preceding slices. 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 09:58
@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 passes prepared Decision execution fields explicitly from the OpenAI plugin to the shared executor.

Example: Evaluate a Boolean question using openai/gpt-6-luna.

  • Before: The shared helper extracts model, authentication, transport, cancellation, deadline, admission, and reasoning from the provider context.
  • After: The plugin passes those same values directly, preserving the request and result.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is narrow and source-equivalent with successful current-head CI; execution evidence remains limited to automated checks rather than the shipped entry point.
Proof confidence 🦐 gold shrimp (3/6) The maintainer-authored OpenAI adapter refactor is outside the ordinary proof gate; supplied validation consists of source comparison and CI rather than a current-head CLI or Gateway evaluation.
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 makes consumed execution facts explicit without changing behavior or adding another execution owner.

Merge readiness

✅ Ready for maintainer review

Keep this maintainer-authored PR open: the explicit projection preserves the existing executor inputs, and no actionable defect was found.

Priority: P3
Reviewed head: 74d7ee2d56cda5940618e5abc42abcdb12575964

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No current-head shipped-entry-point Decision evaluation is supplied; this maintainer-authored refactor is outside the ordinary contributor proof gate.
Agent review details

How this fits together

The OpenAI Decision adapter receives a prepared question batch and provider context, checks endpoint eligibility, and invokes the shared guarded HTTP executor to return typed results.

flowchart LR
  A[Prepared Decision batch] --> B[Lazy OpenAI adapter]
  C[Prepared provider context] --> B
  B --> D[Explicit execution inputs]
  D --> E[Shared guarded executor]
  E --> F[Decisions endpoint]
  F --> G[Typed Decision outcome]
Loading

Technical review

Best possible solution:

Retain the explicit plugin projection while keeping guarded execution and supported SDK compatibility with their existing owners.

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

This PR reports an internal dependency-boundary concern rather than a user-visible bug; source comparison confirms the broader context is replaced by equivalent explicit inputs.

Is this the best way to solve the issue?

The smallest complete change is this direct projection into the existing executor, preserving endpoint eligibility, lazy registration, and shared execution ownership without new machinery.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 5310270e46cf.

Provenance checked

  • OpenAI adapter and shared guarded execution keeps the original intent (1217586: Share the OpenAI-compatible Decisions implementation while retaining provider-owned endpoint eligibility and host-prepared authentication, transport, and lifetime authority.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit 621f574 adds extensions/openai/decision-provider.runtime.ts:4 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 621f574e6639; files: extensions/openai/decision-provider.runtime.ts)
  • Jason (Json): Raw commit 1217586 adds extensions/openai/decision-provider.runtime.ts:14 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 121758697b04; files: extensions/openai/decision-provider.runtime.ts)
  • Jacqueline Henriksen: Raw commit dd1776f adds extensions/openai/decision-provider.runtime.ts:205 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: dd1776f13319; files: extensions/openai/decision-provider.runtime.ts)

PR surface

Source +9. Total +9 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 11 2 +9
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 1 11 2 +9

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is a focused internal refactor with no intended user-visible behavior, configuration, or persisted-state 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.

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:12 AM ET / 10:12 UTC.

@vincentkoc
vincentkoc force-pushed the refactor/decision-06-openai-protocol branch from cb577ec to 56e8dd6 Compare October 30, 2026 13:37
@vincentkoc
vincentkoc force-pushed the refactor/decision-07-openai-provider branch 2 times, most recently from f9f2a4d to 779d567 Compare October 30, 2026 13:58
@vincentkoc
vincentkoc force-pushed the refactor/decision-06-openai-protocol branch from 56e8dd6 to 1404ebf Compare October 30, 2026 13:58
@vincentkoc
vincentkoc force-pushed the refactor/decision-06-openai-protocol branch from 1404ebf to 85390ca Compare October 30, 2026 14:22
@vincentkoc
vincentkoc force-pushed the refactor/decision-07-openai-provider branch from 779d567 to 48089ac Compare October 30, 2026 14:22
Base automatically changed from refactor/decision-06-openai-protocol to main October 31, 2026 02:41
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: L and removed size: XS labels Oct 31, 2026
@vincentkoc
vincentkoc merged commit 6fdd9aa into main Oct 31, 2026
141 of 204 checks passed
@vincentkoc
vincentkoc deleted the refactor/decision-07-openai-provider branch October 31, 2026 02:46
@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
…nclaw#188231)

* refactor(decisions): centralize scoped consumer execution

* refactor(decisions): keep consumer evaluation receipts opaque

* refactor(decisions): avoid shadowing consumer runtime names

* refactor(decisions): separate OpenAI protocol from guarded execution

* refactor(openai): project prepared Decision execution explicitly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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