Repository navigation
[Feature]: Add a supported context budget / skip policy for Skill Workshop Experience Review on oversized sessions - #159687
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: blocked before merge. Reviewed September 27, 2026, 12:58 PM ET / 16:58 UTC (Revision 4). ClawSweeper reviewWhat this changesThe branch adds optional size limits and skip-or-fail handling for oversized Skill Workshop Experience Reviews, records skipped outcomes, and updates the runner, protocol, docs, and tests. Merge readiness⛔ Blocked before merge - 4 items remain This is a useful candidate for the linked oversized-review request. The latest head addresses the prior default-compatibility finding, and the supplied production-path proof supports the configured skip behavior. Acceptance of three new core settings and the guarded recovery policy still needs a Skill Workshop owner’s decision. Priority: P2 Review scores
Verification
How this fits togetherSkill Workshop starts a detached review after an eligible foreground turn and reads that turn’s retained model context. The review runner then submits a prompt to the provider and records the outcome in curator state. flowchart LR
A[Completed foreground turn] --> B[Retained model context]
B --> C{Configured review guard}
C -->|Fits| D[Review runner]
C -->|Oversized| E[Skipped or failed outcome]
D --> F[Provider]
F --> G[Curator outcome]
Decision needed
Why: The linked request asks for maintainer guidance, and the branch establishes a lasting configuration and recovery contract that source correctness alone cannot authorize. Before merge
Agent review detailsSecurityNone. PR surfaceSource +309, Tests +793, Docs +18, Generated 0. Total +1120 across 28 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the default review behavior, adopt a maintainer-approved guard in the existing Workshop owner, and retain an explicit curator outcome for each rejected review. Do we have a high-confidence way to reproduce the issue? Not applicable as a feature request. Current-main source lacks a review guard, and the linked report describes an oversized retained session; the supplied branch proof exercises the proposed guarded path. Is this the best way to solve the issue? Unclear pending product approval. The opt-in implementation preserves existing defaults and keeps the policy with the Workshop review owner, but maintainers must choose whether these settings and recovery semantics should be supported. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e2aa96231351. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
017aeb0 to
c54e8f6
Compare
c54e8f6 to
043f082
Compare
043f082 to
2b1e440
Compare
…tch overflow, and prove state upgrade - Require complete evidence admission for experience review via overflow: 'reject', avoiding silent truncation of earlier requirements or omitted tool result bodies (addresses ClawSweeper P1). - Distinguish late provider context overflow after dispatch from preflight overflow; keep post-dispatch overflows as failed outcomes with their error preserved (addresses ClawSweeper P2). - Remove unused exports in attempt-prompt-preflight and review-overflow to clear knip dead code check. - Extract detached review overflow tests to attempt-recovery.review-overflow.test.ts to comply with line-cap ratchet (cap 1000). - Add state-upgrade test verifying pre-fix curator state without skipped outcome is safely preserved when recording a skipped review.
…settings Core config surface grows 2463 -> 2466 for skills.workshop.autonomous maxReviewContextTokens, maxReviewContextBytes, and overflowPolicy.
2b1e440 to
676312c
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
Closes #150238
What Problem This Solves
Fixes: Skill Workshop Experience Review dies on an oversized assembled prompt when one foreground turn contains too much tool output, even if the source session itself is well inside its context window. Until now there was no supported budget or skip policy for that review.
User Impact
Operators can configure a review guard:
skills.workshop.autonomous.maxReviewContextBytesbounds context acquisition before assembly.skills.workshop.autonomous.maxReviewContextTokenscaps the assembled review prompt below the model window.skills.workshop.autonomous.overflowPolicyselectsskip(default once any guard is set) orfail.With a guard configured, an oversized detached review is rejected whole before provider dispatch and recorded as
skippedwith anoversized-requestreason. It does not spend a provider call and it does not fail asAgent couldn't generate a response.SetoverflowPolicy: "fail"to surface the same rejection as a failure.Installations that configure no guard keep the exact previous review path: unlimited context acquisition, no pre-dispatch admission check, no change to any review outcome. Upgrading never silently changes review behavior.
Ordinary foreground sessions keep their existing compaction and recovery behavior in all cases.
Why This Change Was Made
The review was loading the full retained model context and then admitting a prompt that preflight already knew could not fit. A shortened selection would drop earlier requirements and tool evidence, so a configured guard does not do that.
maxReviewContextBytesset, context admission usesoverflow: "reject"plus a 10,000-event cap: only the complete retained context is admitted, and exceeding the bound rejects the whole review before assembly.fitsstops provider submission for a review-owned run.skippedis reserved for that pre-dispatch rejection. A providercontext_overflowafter dispatch stays a failed review: no compaction retry, failover, or model rotation.maxReviewContextTokensis constrained to1024..2,000,000andmaxReviewContextBytesto1024..268,435,456(256 MiB) in both schema and resolver, rejecting out-of-range values instead of silently reducing them.skipped, and an existing curator state is upgraded by recording that outcome beside its previous outcomes.Evidence
Validated on an isolated build host against the rebased head, because the authoring machine had no disk left for a local build.
Real behavior proof, not a mocked runner:
That case runs the detached review through the real provider endpoint and tool owners with a configured guard (
maxReviewContextTokens: 1,024,overflowPolicy: "skip"). The local provider server receives zero requests, and the curator state recordsoutcome: "skipped"withoversized-request: estimatedPromptTokens=<n> promptBudgetBeforeReserve=<n>.Unit coverage on the current head adds the upgrade-compatibility guarantee:
preserves the unbounded review path when no guard is configuredproves nolimits, nocontextTokenBudget, and noreviewOverflowPolicyreach the run when nothing is configured.passes the configured bound and records a skipped oversized review,surfaces an oversized review when the operator chooses fail, andrecords a provider context overflow after dispatch as a failed reviewcover the guarded paths.preserves pre-fix curator outcomes when recording a skipped reviewcovers stored-state upgrade.Also validated:
check:max-lines-ratchet --base origin/main: 738 grandfathered suppressions, no new violationcheck:line-cap-ratchet --base origin/main: changed source files show no new violations or over-cap growthconfig:docs:check:docs/.generated/config-baseline.sha256anddocs/.generated/config-baseline.counts.jsonmatchReview follow-up
All prior review findings are addressed on this head:
failed; only the pre-dispatch rejection isskipped.maxReviewContextTokensandmaxReviewContextBytesenforce their2,000,000and256 MiBcaps inOpenClawSchemarather than silently reducing out-of-range values at runtime. Documented indocs/tools/skill-workshop/configuration.mdand covered insrc/skills/workshop/config.test.ts.The config growth is intentional and recorded in the generated config baseline: three optional review settings.
Full repository CI remains the PR check.