Skip to content

fix: keep Plugin SDK declarations within the build limit - #203083

Merged
roboclaw-bot merged 2 commits into
mainfrom
openclaw/nimble-shell-87f7a3
Nov 21, 2026
Merged

roboclaw-bot merged 2 commits into
mainfrom
openclaw/nimble-shell-87f7a3

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • The same full canonical unified declaration build on pinned main f4f365140c10 falls 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.
  • Normal artifact verification passes for all 164 public SDK subpaths, and export registration is synchronized.
  • Complete before/after public API comparison covers 164 modules / 3,911 exports: no entrypoint or export additions/removals and no direct signature changes. The expected projection representation change affects 174 reachable declaration closures.
  • Complete before/after factory return types are bidirectionally assignable. 35 affected consumer tests, core typechecking, focused lint/format, and diff checks pass.
  • Local independent review could not run because of the existing reviewer setup. After that limitation was reported, the maintainer directed landing without waiting for it; no clean local-review result is claimed. The hosted ClawSweeper review of head 53d83a683a3b subsequently 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

roboclaw-bot and others added 2 commits November 21, 2026 12:38
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
@clawsweeper

clawsweeper Bot commented Nov 21, 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.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS labels Nov 21, 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. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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 Nov 21, 2026
@clawsweeper

clawsweeper Bot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: The PR reports 5,406,367 bytes against a 5,385,536-byte limit.
  • After: The PR reports 5,366,167 bytes with the same exports and unchanged limit.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused and apparently correct, with concrete reported build and compatibility validation; no runtime demonstration is required.
Proof confidence 🐚 platinum hermit (4/6) This declaration-emission optimization changes no user-visible runtime behavior; canonical build and API-comparison results are reported publicly in the PR body.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Oversized generated declarations consume the SDK build budget and can block source builds.
Reason: The maintainer-authored direction yields additional declaration headroom through a narrow type annotation, although the original build failure is already repaired on main.

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
Reviewed head: 53d83a683a3bced103753cbce355b600f3c20447

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Worker environment projection keeps the original intent (2d6a5d7: Separate environment access from the service composition root without changing projected runtime behavior.)
  • Tunnel status contract keeps the original intent (4d62efe: Reuse existing environment lifecycle and transport contracts for conversation-attached Crabbox applications.)

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

PR surface

Source +16. Total +16 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 17 1 +16
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 17 1 +16

Preflight source

Source 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 cluster

Relationship: partial_overlap
Canonical: #203000
Summary: Both changes address the same reported declaration-budget overage through different named-type boundaries; the merged repair already restores the build.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add P2: Additional declaration headroom is useful build maintenance; the original build-limit failure already has a merged repair.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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: Additional declaration headroom is useful build maintenance; the original build-limit failure already has a merged repair.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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 November 21, 2026, 7:54 AM ET / 12:54 UTC.

@roboclaw-bot
roboclaw-bot merged commit a48440b into main Nov 21, 2026
152 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/nimble-shell-87f7a3 branch November 21, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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