Skip to content

fix(decisions): allow OpenAI batches up to 400 questions - #180210

Merged
fuller-stack-dev merged 3 commits into
mainfrom
openclaw/native-decisions-400-publish
Oct 22, 2026
Merged

fuller-stack-dev merged 3 commits into
mainfrom
openclaw/native-decisions-400-publish

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Related: openclaw/clawrouter#277 (service-side Decisions support)

What Problem This Solves

Fixes: OpenAI Decisions batches containing 201–400 questions are rejected locally even though the current API accepts up to 400.

User Impact

User impact: OpenAI and ClawRouter native Decisions V2 callers can evaluate up to 400 questions without truncation. Legacy V1 remains capped at 256; use contractVersion: 2 for larger batches. No credential, deployment, or migration changes.

Why This Change Was Made

Align the shared OpenAI executor and both capability manifests with the official Decisions reference, and raise the shared V2 host ceiling. The 255-choice bound, provider-specific admission, and other resource budgets are unchanged. OpenAI, ClawRouter, and shared-limit docs are updated, including the previously missed ClawRouter 200-question statement.

The single-inline-image/4 MiB and JSON budgets remain integration limits, not full vendor wire-option parity. ClawRouter needs service-side support and an eligible key; this PR does not deploy it.

Evidence

Published head: 41f478dc6e0dc0a7fa6945d5ceab8e541cbc91ef; tree: 7f91509a01ffa129ffbc8afd1b6c323702957eaf; main base: c234ee3561a2ca46b6b847efbb129ffb1e8d46a9. The publisher's metadata commit has the identical full tree as tested local head be2c046bd939f990d7f00e8a6b84c97c39d89081.

  • Clean transplant of the independently reviewed candidate, no conflict or touched-file drift. Both diffs have stable patch ID 261195c475024aa8ab381c345f7ffd5b54a4ebca.
  • RED: production-only reversion on the identical patch produced 7 expected failures / 74 passes. Current local GREEN: 115 tests passed across eight files (81 focused Decisions + 34 host/legacy/tool/prompt-prefix regressions). Tests cover complete 201/400 requests and answers, 401 rejection before transport/catalog, and manifest projection. Private handoff state verified; no paid live calls.
  • Core, both provider packages, core-test other shard, and touched extension-test typechecks passed. Type-aware lint passed seven touched TypeScript files, zero errors/warnings. Format, docs format, whitespace, and both extension import-boundary checks passed. Initial missing generated SDK declarations were prepared by their tooling owner; package checks then passed without source/guard workarounds.
  • Canonical affected-subpath API comparison (decisions, decisions-openai-runtime) against the actual base: no API changes, digest ff7b090f. Prior export-sync/surface-budget checks passed. Full-repository API comparison previously exceeded its 15-minute budget and was not repeated.
  • All twelve touched files and four touched tests audited in full. API-only independent review of the identical patch found no actionable P0–P2 findings.
  • Local suite wall time: 250.40s; host/validation/registry 67.64s, prefix 53.68s, tool 27.18s, OpenAI 44.40s, ClawRouter 37.91s. Real registry/prepared auth/catalog/HTTP/cancellation boundaries justify the integration coverage. Prior cold registry deadline failure remains recorded; passing isolated/current runs are not claimed as a timing repair.

Exact-head CI and failure attribution

Initial CI run 39712989203 completed with 36 successful jobs, 28 skipped and two failures (extension-bundle plus aggregate gate). Security/dependency reviews, all six selected Security High checks, and all three selected Critical Quality checks passed.

Levanto: pre-existing deadline-sensitive fixture behavior, not a 400-question routing regression. The failed extension job had native-usage and prepared-prefix failures at 572/628ms against a 500ms fixture deadline. The initial repository helper classified them unknown; the following investigation supplies baseline evidence:

  • Ran the unmodified extensions/levanto/registration.test.ts 10 times serially at head and 10 at the exact merge-base, alternating refs. Used the workflow's scripts/ci-run-node-test-shard.mts, bun-all policy, pinned Bun 1.4.4-canary.1+ef37c31de, same extension config and worker limits; only the include list was narrowed. Local host was macOS arm64, versus Linux x64 in CI.
  • Each ref had seven passing runs and three failing runs: 273 passing tests / seven failures. All 14 failures exceeded 500ms and moved among unchanged fixture cases. The exact native-usage assertion failed on base at 530/1142ms and on head at 508ms; successful instances took 235–433ms. Original 13-file shard order also ran: head 246 passes; base 242 passes / two failures, including native usage at 601ms and a prepared-header case at 602ms.
  • The prepared-prefix case passed all 20 natural repetitions (141–258ms at head; 122–450ms at base). A separate temporary, clock-controlled diagnostic passed 2/2 cases on each ref: with 0ms consumed, the real provider sends the exact prefix URL and effective header; consuming 501ms from the original 500ms context returns unavailable/transport, makes no HTTP call, and leaves the recorded URL undefined. This explains the original symptom without pretending that exact CI scheduling stall was instrumented or naturally reproduced locally.
  • Source trace: Levanto does consume shared V2 validation, but the only changed validator operation is comparing question count against 256 versus 400. Both failing fixtures have one question and take the same validation path. Levanto does not import the OpenAI executor; its URL/header/deadline/transport owners and provider fixture are byte-identical at base and head.

No production changes, timeout increases, assertion weakening, or retry-based test fixes were made. The temporary diagnostic was removed from both checkouts. These results establish inherited timing sensitivity; they do not repair it or identify the underlying scheduling stall.

Provider scaffold: validation job passed its generated build/test, then failed OpenClaw npm metadata lookup with HTTP 503 during npm's Degraded Package Install and Publishing incident.

The authorized failed-job retry is pending npm registry recovery. CI is not yet green; this PR remains unmerged.

@clawsweeper

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

@fuller-stack-dev
fuller-stack-dev marked this pull request as ready for review October 22, 2026 02:43
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation agents Agent runtime and tooling extensions: openai extensions: clawrouter Extension: clawrouter size: S labels Oct 22, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR raises native OpenAI and ClawRouter Decisions V2 capacity to 400 questions while preserving V1’s 256-question ceiling.

Example: Evaluate 400 Boolean questions using contractVersion 2 and openai/gpt-6-luna.

  • Before: The shared host rejects the batch before provider execution.
  • After: The complete batch can reach the Decisions endpoint and return all 400 answers.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-supported repair with meaningful boundary regressions; strongest supplied behavioral evidence remains synthetic.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; inspected evidence covers provider boundary tests and a linked synthetic service composition, with no authority-boundary or persisted-data-model change.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Callers cannot submit larger batches that the current OpenAI Decisions contract supports.
Reason: The vendor limit is independently confirmed, the repair is narrow, and maintainer authorship supplies direction approval.

Merge readiness

✅ Ready for maintainer review

Keep open: current main still rejects supported larger Decisions batches, and this maintainer-authored PR provides a focused repair with no concrete introduced defect found.

Priority: P2
Reviewed head: 41f478dc6e0dc0a7fa6945d5ceab8e541cbc91ef

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied boundary tests and linked synthetic composition do not establish live vendor acceptance through a shipped CLI or Gateway.
Agent review details

How this fits together

The decision tool and plugin API submit evidence and typed questions through shared validation, prepared provider execution, and the OpenAI-compatible transport, returning validated answers and usage.

flowchart LR
  A[Decision tool or plugin] --> B[Versioned host validation]
  B --> C[Prepared provider execution]
  C --> D[OpenAI or ClawRouter adapter]
  D --> E[Shared Decisions transport]
  E --> F[Typed answers and usage]
Loading

Technical review

Best possible solution:

Use the existing shared validator and executor with aligned provider declarations, preserving legacy limits and all other admission budgets.

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

Current-main source deterministically rejects 201–256 questions in the shared executor and 257–400 at V2 host admission; no target code was executed during this read-only review.

Is this the best way to solve the issue?

The patch is the smallest complete repair: it updates the existing owners, both consumers’ declarations, diagnostic guidance, and distinct boundary regressions without adding machinery.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 2f17d4d533a8.

Provenance checked

  • OpenAI preflight capacity changes intended behavior with a stated reason (7e224e3: Reject batches exceeding the vendor’s then-recorded 200-question limit before credentials or transport.)
  • Shared native executor and ClawRouter capability declarations changes intended behavior with a stated reason (1217586: Share the supported OpenAI Decisions codec while retaining credential-scoped ClawRouter eligibility and transport ownership.)
  • V2 host resource ceiling changes intended behavior with a stated reason (ed916bc: Provide bounded V2 validation and lossless versioned codecs; this PR raises only the question ceiling to admit the updated vendor contract.)
  • Tool guidance and shared documentation keeps the original intent (f9e969c: Expose accurate provider constraints and bounded actionable guidance through the shared decision tool.)
  • Existing provider regression suites keeps the original intent (43cef15: Consolidate fixtures while retaining distinct behavioral contracts; the changed cases extend existing capacity coverage.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit d23cd5d adds src/decisions/validation-v2.ts:174 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d23cd5d48f80; files: src/decisions/validation-v2.ts)
  • Peter Steinberger: Raw commit b1ee9a7 adds src/decisions/validation-v2.ts:142 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: b1ee9a7c0e22; files: src/decisions/validation-v2.ts)

PR surface

Source 0, Tests +51, Docs +3. Total +54 across 12 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 5 5 5 0
Tests 4 58 7 +51
Docs 3 9 6 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 12 72 18 +54

Labels

Label changes:

  • add P2: A focused provider integration bug rejects larger supported batches; smaller batches remain available.
  • add merge-risk: 🚨 compatibility: The public V2 validator and provider capability declarations expand accepted batch sizes; the maintainer-authored direction preserves V1 behavior and introduces no incompatible signature or persisted-format 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:

  • P2: A focused provider integration bug rejects larger supported batches; smaller batches remain available.
  • merge-risk: 🚨 compatibility: The public V2 validator and provider capability declarations expand accepted batch sizes; the maintainer-authored direction preserves V1 behavior and introduces no incompatible signature or persisted-format 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 21, 2026, 11:16 PM ET / October 22, 2026, 03:16 UTC.

@fuller-stack-dev
fuller-stack-dev merged commit bf28212 into main Oct 22, 2026
315 of 318 checks passed
@fuller-stack-dev
fuller-stack-dev deleted the openclaw/native-decisions-400-publish branch October 22, 2026 15:46
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 23, 2026
…0210)

Decisions: allow OpenAI batches up to 400 questions.
- Shared V2 (contractVersion 2) validation ceiling raised from 256 to 400 questions; legacy input stays at 256. 401 is refused with a clear host-bound error before anything is sent.
- OpenAI decision executor maxQuestions raised from 200 to 400; OpenAI and ClawRouter plugin manifests and docs updated.
- Tool failure guidance states the 256 legacy / 400 V2 host bounds.

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

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation extensions: clawrouter Extension: clawrouter extensions: openai merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S 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