Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: blocked before merge. What this changesAdds bounded llm-task batches with ordered per-item results, partial success, cancellation, and a shared deadline. Example: Classify request-a, request-b, and request-c with concurrency 2 and a schema requiring a billing or technical category.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep this PR open: it contains coherent, distinct feature work and remains paired with the author's unresolved feature issue; no actionable code defect was found. Priority: P3 Decision needed
Before merge
FindingsNone. Agent review detailsHow this fits togetherThe optional llm-task plugin receives a shared prompt, schema, and independent inputs, invokes host-authorized isolated completions, and returns validated JSON or bounded per-item failure categories. flowchart LR
A[Workflow caller] --> B[Optional llm-task tool]
B --> C[Batch admission and deadline]
C --> D[Existing concurrency runner]
D --> E[Host isolated completion]
E --> F[JSON and schema validation]
F --> G[Ordered per-item outcomes]
Technical reviewBest possible solution: If accepted, add batching through the existing optional llm-task owner while preserving single-input behavior and host-owned completion policy. Do we have a high-confidence way to reproduce the issue? This is an additive feature request; current main confirms the single-input boundary, and supplied Gateway output demonstrates the proposed batch behavior. Is this the best way to solve the issue? The implementation is a focused way to provide the requested invariant: each admitted input gets an ordered outcome while successful siblings survive failure or interruption, using existing completion and concurrency owners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 20b368b86326. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +158, Tests +237, Docs +68. Total +463 across 5 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReviewed October 27, 2026, 3:19 AM ET / 07:19 UTC (Revision 3). |
|
@clawsweeper re-review Updated the same PR with commit The follow-up checks deadline expiry when work settles, not only when its timer callback runs. Two synthetic regressions failed on the prior head and all 26 owner tests now pass. Production/test typechecks, focused lint/format/ratchets, and fresh independent P0–P2 review passed. The earlier live runtime failure cause remains unproven; the unit regressions establish the batch-owner deadline defect independently. No deadline extension or weakened assertion was used. Only allowlisted status/category output is published; no personal data, credentials, raw logs, local paths, addresses, or non-public endpoints are included. CI is running on the new head; previous-head green checks are labeled separately in the body. No provider-side billing cutoff is claimed. The maintainer decision about accepting this optional-plugin batch API remains explicitly pending; please review the new proof separately from that human product decision. |
|
🦞👀 Re-review progress:
|
|
Updated this original PR at The PR body now records the integration proof: all 36 plugin tests, targeted production/test types, typed lint, formatting, ratchets and docs links pass; fresh canonical independent P0–P2 review is scoped-clean. The unchanged schema-forwarding contract fails on the old PR production owner because outputSchema is absent and passes on the restored integrated owner. Main's native schema forwarding and same-route fallback are preserved, while the batch scheduler adds no retries. Only public code and fictional fixtures were used for this integration. Earlier real-model evidence is explicitly tied to its older head; no new real authorization, private data or credentials were used, and maintainer edits/secrets access remain disabled. New-head CI is running separately; maintainer acceptance of the optional batch API remains pending. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
This pull request has been automatically marked as stale after 7 days without qualifying human activity. |
|
Fresh compatibility check for the current PR head All 41 tests in the three llm-task test files passed on the snapshot, including a new local test for manual retry after mixed outcomes. I also ran that flow through the tool with a synthetic completion fixture. Three fictional inputs returned ordered outcomes The GitHub CI run for this head still shows action required and needs maintainer approval. This run used only fictional inputs and a local completion fixture. The optional batching API still needs maintainer acceptance. |
Closes #177325
What Problem This Solves
Workflows extracting or classifying several independent inputs need bounded fan-out and per-item outcomes without rebuilding that orchestration around every
llm-taskcall.User Impact
Callers can submit 1–20 inputs, inspect ordered results, keep successful siblings, and explicitly resubmit selected unsuccessful inputs. Existing single-input behavior is unchanged. The optional plugin remains opt-in; this adds no core tool or persistent job service.
New feature proposal: maintainer acceptance of this optional-plugin API is requested, not assumed.
maxTokensis per item, not a batch spending limit. Cancellation may occur after usage is incurred, and outer agent cancellation may suppress the response. This is not durable recovery or a provider's offline Batch API.Why This Change Was Made
batch.itemsshares the existing prompt, schema, routing, and host-authorized isolated-completion path. The existing public concurrency runner limits fan-out to 1–4 (default 2). A single deadline includes queue time, and invalid batch admission fails before inference. Each started input invokes the existing completion API once; the batch scheduler adds no retries and does not change underlying runtime/provider retry policy.Failures return stable categories rather than raw provider exceptions or rejected model output. Results distinguish successful, failed, interrupted, and never-started items. No model credentials, file access, message delivery, new config settings, dependency changes, or storage migrations are added. Documentation explains manual retry and the non-persistent response boundary.
Related, not duplicated: #137450 adds native Codex output constraints; #161344 connects embedded Lobster stages. All-state PR searches for
llm-taskbatch/parallel/concurrency found no matching batch implementation.Evidence
Main integration — 2026-11-14 (
e7b0db2b1202d8ac867d7840e62ea03cb80eaedd)Merged main
db8cab9d3ea38f2f6583ab9350bc568f19d47839into the original PR branch. GitHub now reports the PR can merge without conflicts. The sole content conflict was in the tool result path: default model selection stays with the completion runtime when no override is provided, and both single and batch calls return compact JSON text with the existing structured details intact.db8cab9d3ea38f2f6583ab9350bc568f19d47839, with no accepted P0–P2 findings. It reviewed the supplied public runtime contracts and fictional tests; it did not run the tests or independently verify provider internals. Reviewed tree:79a5648d43b221607ba281edd47096de78e4d5a6.action_requiredwith zero jobs started. Could a maintainer approve the pending fork workflow runs for this commit? The October CI and real-model Gateway evidence below belong to earlier commits. This follow-up did not exercise a live provider.Maintainer acceptance of the optional batching API remains open. Only public source and fictional fixtures were used for the repair and review. Maintainer branch edits remain disabled.
Previous main integration — 2026-10-27
Current integration head:
c83390ef3308588e834eb909d4abac13ec02a036. This merge preserves original PR head3b00bdbefd677053831294b62bbe4c978643bfdaand actual main4d8806c8c2e297af9bc06f5cc73d4b0a3a8f949bas its two parents.Resolved four conflicts while retaining main's inlined model selection, simplified fixtures, native
outputSchemaforwarding, and documented same-route native-schema fallback. Every batch item keeps the shared isolated completion owner. The batch scheduler adds no retries; the runtime's existing fallback is not disabled or presented as a one-provider-request guarantee.$idschema-forwarding test was run unchanged with the original PR production owner: one failed / 25 skipped, becauseoutputSchemawas undefined (76.66s wall time). Restoring the integrated owner byte-for-byte made the same test one passed / 25 skipped (30.19s). No new test, full-suite replay, or model call was added for this comparison.705dc6845c8c5df2f1054b4170215b7ebf09605c50565e6344070c6565c17725. Only the original five contribution files differ from main.For the October 27 head, checks completed: 39 successful, 65 skipped, zero failed or pending checks were reported. ClawSweeper's completed review of this exact integration head reports no actionable findings and accepts the original live proof together with the integration comparison; the remaining blocker is maintainer API acceptance. The separate hosted Codex attempt failed with an unknown service error, not a new code verdict. Earlier real-model/Gateway evidence below remains attributed to its original head and was not rerun for this integration. This work used only public source and fictional fixtures; no real account authorization, private material, raw logs, secrets or permission expansion. Maintainer acceptance of the optional batching API remains outstanding.
Historical implementation and runtime proof
git diff --checkpassed. After the final test-fixture type repair, the changed owner suite passed 24 tests in 12.85s wall time (the other 10 plugin tests retain their unchanged-input passing evidence). Documentation audit: 15,720 internal links checked, zero broken.fbd1b630) CI run 39254802659 passed, including production/test types, lint, changed boundary/extension tests, source contracts, guards, docs, andopenclaw/ci-gate. The applicable dependency/security gates also passed. This is not presented as CI for the follow-up commit below; new-head CI is pending. Skipped unrelated lanes are not counted as executed.Implementation is intentionally limited to the existing optional plugin and two documentation files. The shared model prompt and completion-selection rules remain unchanged; the optional tool schema gains the batch argument. Maintainer edits are disabled at the author's request to avoid granting fork Actions/Secrets access; requested changes can be applied by the author.
Deadline settlement follow-up (2026-10-21)
Follow-up head:
3b00bdbefd677053831294b62bbe4c978643bfda. The initial live runs retained successful results and stopped queued work, but one timed run returnedcompletion_failedfor the slow item instead ofcancelled. Its underlying provider/runtime failure cause was not established and is not inferred from the unit fixtures.Investigation independently reproduced a missing batch-owner check: if completion resolves or rejects after
expiresAtbut before the timer callback executes, the old code can publishokorcompletion_failedfor that expired item. The fix checks the existing deadline at admission and both settlement paths, without changing the deadline, routing, credentials, provider runtime, or error-redaction policy. It keeps earlier successes and prevents queued dispatch.fbd1b630for the intended late-result statuses (24 existing tests passed), then all 26 owner tests passed after the repair: 15.72s wall time, including cached worker preparation; test execution itself stayed below 5s. Existing registration/Doctor proof remains unchanged.git diff --checkpassed. Checks were serialized after a build-lock conflict; the rejected concurrent attempts were infrastructure failures, not counted as passing.Live behavior proof (2026-10-21)
Head:
3b00bdbefd677053831294b62bbe4c978643bfda. Built with the repository'sqaRuntimebuild profile and launched throughpnpm openclaw gateway run. A fresh local-only Gateway used separate config, state, and workspace, with only the optionalllm-tasktool exposed. Requests used the production authenticatedPOST /tools/invokeentry point and the existing host-authorized isolated runtime with a real model, not mocked completions. Native session discovery and additional tool capabilities were disabled. No personal notes, conversations, private source, configuration, credentials, or raw authentication logs are included in this evidence.Ordered partial outcomes: concurrency 2, shared schema requiring
categoryto bebillingortechnical, and three synthetic inputs. The task classified an invoice and a startup problem; an explicit negative-control input requested{"category":7}to exercise schema rejection. The two successful results survived their sibling's failure and all IDs remained in submission order.{"http":200,"status":"completed","results":[{"id":"request-a","status":"ok","category":"billing"},{"id":"request-b","status":"error","error":"schema_mismatch"},{"id":"request-c","status":"ok","category":"technical"}]} {"scenario":"ordered_partial_results","passed":true}Whole-batch deadline: six inputs, concurrency 1, a 10,000ms whole-batch budget. The task requested a tiny JSON object for the fast/queued inputs and a deliberately long numeric-array response for the slow input. The unchanged diagnostic assertion requires retained completed results, an interrupted active item, and at least one never-started queued item in the same run. Only categories/statuses are exported, not the generated array. The clean final-head run passed both scenarios without temporary diagnostic instrumentation:
{"gatewayReady":true,"head":"3b00bdbefd677053831294b62bbe4c978643bfda","cleanSource":true,"syntheticOnly":true} {"http":200,"status":"timed_out","results":[{"id":"fast","status":"ok","category":"billing"},{"id":"slow","status":"cancelled"},{"id":"queued-1","status":"not_started"},{"id":"queued-2","status":"not_started"},{"id":"queued-3","status":"not_started"},{"id":"queued-4","status":"not_started"}]} {"scenario":"whole_batch_deadline","elapsedMs":10019,"passed":true} {"cleanup":"gateway_exited"}The runtime proof is deliberately limited to this tool entry point and these synthetic scenarios, not model quality, a surrounding Lobster workflow, or a provider-side billing cutoff. A response reporting cancellation does not prove that the provider incurred no usage. Failures before the deadline/caller cancellation retain the existing
completion_failedcategory; expired settlements are cancelled even when the deadline timer callback has not yet run.The separate human owner decision is still outstanding: should
batch.items/batch.concurrencyand these per-item outcomes be accepted in the bundled optional plugin? No bot recommendation or passing check is presented as maintainer approval.