Repository navigation
fix: keep Plugin SDK declarations within the build limit - #203083
Conversation
Retain the named persisted worker record in projection return types instead of repeatedly expanding the complete union. Runtime behavior and public signatures remain unchanged. Co-authored-by: vincentkoc <[email protected]>
Worked on by: - @vincentkoc Co-authored-by: vincentkoc <[email protected]> OpenClaw-Publication: 38585825-7ebd-823d-aac3-687f964bbc08
|
🦞👀 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: needs maintainer review before merge. What this changesThis PR names the worker environment projection type to reduce generated Plugin SDK declarations without changing runtime behavior. Example: The full canonical declaration build on the reported baseline.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR provides a focused declaration-size reduction with no identified correctness defect; main already restores the failing build through #203000, so its remaining value is additional declaration headroom. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe worker environment access owner projects stored lease records into service results whose inferred types reach generated SDK declarations. flowchart LR
A[Stored worker records] --> B[Environment access projection]
B --> C[Worker environment service]
C --> D[Reachable SDK types]
D --> E[Unified declaration build]
E --> F[Public declaration budget]
Technical reviewBest possible solution: Retain the existing projection owner and named record union while gaining declaration headroom without raising budgets or removing exports. Do we have a high-confidence way to reproduce the issue? The PR provides concrete baseline and candidate build measurements, but this read-only review ran no builds and the original over-budget baseline predates the separate merged repair. Is this the best way to solve the issue? The annotation is a small, complete way to prevent repeated type expansion while preserving the existing projection implementation and discriminated record. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c949daa031c6. Provenance checked
TestingProof path: none. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +16. Total +16 across 1 file. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. 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 Reviewed November 21, 2026, 7:54 AM ET / 12:54 UTC. |
What Problem This Solves
The full Plugin SDK declaration build exceeded its existing size limit on the tested main baseline. The separate repair in #203000 has since restored main's build; this change adds further declaration headroom by avoiding another repeated type expansion.
User Impact
More declaration headroom under the unchanged build limit, with no runtime behavior changes, API removals, migrations, or configuration changes.
Why This Change Was Made
Name the worker environment projection in terms of the existing persisted record instead of repeatedly expanding that record through inferred service return types. This preserves the complete lease-state union and all projection fields without changing the runtime implementation, public contract, or size budget.
Evidence
f4f365140c10falls from 5,406,367 to 5,366,167 bytes: 40,200 bytes smaller, below the unchanged 5,385,536-byte limit. These are measurements of that baseline, not current main after fix(build): restore local builds without growing SDK declarations #203000.53d83a683a3bsubsequently completed with no actionable findings. That read-only review did not run builds. Required exact-head CI passed, and GitHub review/security gates remain enforced.Contributor credit
Requested by @vincentkoc.
Work sessions
Linked for team reference; these sessions aren’t public.
Worked on by