Repository navigation
fix: honor composer prediction deadlines and cancel on send - #418
Merged
Merged
Conversation
iililiiilili
marked this pull request as ready for review
October 29, 2026 06:00
Contributor
Dependency GuardThis PR changes dependency-related files. Maintainers should confirm these changes are intentional. Changed files:
Maintainer follow-up:
|
Contributor
Dependency graph change authorizedThis PR includes dependency graph changes. A repository admin or member of
A later push changes the PR head SHA and requires a fresh security approval. |
Owner
|
/allow-dependencies-change |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #412
What Problem This Solves
Fixes an issue where Web composer predictions disappeared after ten seconds when a configured company model responded slowly. Separate browser, BFF, inference, and internal RPC deadlines prevented operators from choosing an appropriate wait. A new browser message also needed to cancel the previous prediction at dispatch, before its acknowledgment or the next model call.
Why This Change Was Made
The admin HTTP plugin owns
composerPredictionsTimeoutMsand advertises it to the authenticated Web client and BFF. Its default is 30,000 ms, with integer values from 1,000 to 300,000 ms. The BFF includes elapsed authorization/history time and passes the operation budget through the existing internal RPC transport.The canonical browser request observes the existing transport
onSentcallback. It retires the matching client/session's pending prediction immediately. A delayed acknowledgment can adopt the returned run ID without generating another dispatch cancellation; the old queue-only provenance write is removed.The CI follow-up fixes three type-aware lint diagnostics in the new abort/deadline tests. It also pins only
@openclaw/crabline>re2jsto 2.8.7, the patched version for GHSA-gg6h-894w-4m9c. Crabline 0.1.11 pins vulnerable 2.8.6 exactly; the parent-scoped override and lockfile must move together. Remove the override when Crabline adopts the patch. Audit policy remains unchanged.User Impact
After deploying an image containing this change, operators can merge this example into
plugins.entries.admin-http-rpc.config:{ "composerPredictionsEnabled": true, "composerPredictionsTimeoutMs": 60000 }Server enablement and account preferences retain their existing behavior and defaults. The model environment setting, private-network restriction, context/output bounds, single prediction slot, and priority for ordinary model calls remain in place. Refresh the Web page after changing the configured deadline.
Evidence
--mode uncommitted --engine codex) including the CI repair: exit 0, no accepted/actionable P0 findings. The sparse review copy's full-index diff and all 20 changed file hashes match the implementation checkout. The affected plugin tests passed again: 30 tests across two files.--overlay-onlyrouting as PlatformClaw CI, but its unchanged SDK declaration preparation hit the normal 300-second limit before the lint/type gates could complete. Whole-core test types were stopped during measured host memory pressure. Neither incomplete run is counted as passing; the required existing GitHub CI must verify remaining type/lint/build gates at this head.9c214f883b8c4ac29f544a60c06c98389717e3afcompleted: 62 checks passed, including builds, UI E2E, and Docker Smoke. The failing lint/security jobs prompted the follow-up above; the final gate failed as a consequence.bdd0a42902201059e77b1d7dbd458c2b7d8fe52a: CI, PlatformClaw CI, and Docker Smoke. The newsecurity-fastcheck passes; remaining runtime/lint checks are running. The dependency guard requires a repository administrator's current-head approval via the existing/allow-dependencies-changeflow; see the guard result.Configuration surfaces: one added plugin setting and a prediction deadline default of 30 seconds instead of ten. Server/account enablement defaults are unchanged. The original production/config delta is +170/-55 lines; the CI repair adds two workspace security-policy lines and a +6/-5 dependency lock delta, with no new production logic. Tests are counted separately. Growth implements the operator deadline contract and the canonical dispatch cancellation boundary. No database/protocol version changes. Codex review isolation flags were checked directly in the sibling
codex-rs/exec/src/cli.rs:36source.