Skip to content

fix(packaging): exclude source-build ledgers from npm packages - #190030

Merged
vincentkoc merged 5 commits into
mainfrom
fix-package-build-metadata-publication
Nov 1, 2026
Merged

vincentkoc merged 5 commits into
mainfrom
fix-package-build-metadata-publication

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Build-only source-module ledgers are published in the main and bundled AI packages and count toward installed-tree limits enforced by shipped updaters.

User Impact

Installed packages omit unused build metadata while retaining runtime exports and package integrity inventories. Source builds retain the ledgers needed to construct standalone artifacts.

Why This Change Was Made

Exclude .source-module-urls directories at both owning package manifests. Tests exercise real npm and pnpm publication, independently packed AI, similarly named runtime directories, and filename/content inventories. Production delta: two manifest rules; no runtime, migration or budget changes.

The frozen baseline c2a39e4c includes the merged Brotli omission from #188097 and Workboard lint repair from #190044. Native signed composition preserves those changes and the original package commits.

The later signed follow-up copies only the landed three-file test/allocation delta from #190335. It corrects the independent Anthropic raw-stdin notification assumption that blocked earlier CI, preserving cancellation identity, diagnostic barriers and terminal-error singleton checks. No production event suppression or broader main refresh is introduced.

Evidence

  • Current composed source: ae2b4efb752c66c89ee4ad1782ae5073b17f1762; tree a9dbd21ae695cf92ea79997772731aac24719c5d. Its direct parent is the qualified packaging source a1dbb291; only two tests and their LF allocation differ. Every other tracked blob/mode and all 105 recorded package-proof inputs are unchanged.
  • Retained package proof at a1dbb291: eight focused Linux files passed 202 tests per runtime on Bun and Node. Root-only and AI-only in-memory manifest mutation controls each produced exactly two intended npm/pnpm failures, with no unhandled errors; original suites passed afterward. This is mutation proof, not a base-checkout reproduction.
  • At that same package source, canonical build, independent AI/root packing, tarball integrity and Linux npm12 installation passed. 178 source ledger files remained on disk; zero were packed. CLI version, AI imports and selected Doctor checks passed. Installed budget: 46,851 / 47,500 entries, displayed 568.4 / 900 MiB, with the canonical exact-byte comparator passing unchanged limits.
  • Retained package run:20 qualified phases, native/outer completion zero and settled. Candidate SHA-256 efd9be6645aa1257620a5a36c70176a15d52ebb45f8acfab0e7485ddb875adbd belongs to source a1dbb291, with carrier 9006eefc4e98684f26784df26459c23ff719d02f. It is not relabeled as a new composed-head build. A later best-effort portal-sync warning leaves portal inventory freshness unconfirmed, without invalidating its provider-stop receipt.
  • Fresh composed-head proof: actual frozen dependencies, targeted lint/format, the services test typecheck and both line ratchets passed. Both complete stdin/Anthropic suites passed 28 tests plus two assertion controls per runtime, on Node24.22.1 and pinned Bun 191755ec11, worker1. All ten phases settled naturally; source stayed unchanged and task scratch was removed.
  • Fresh incremental source review of a1dbb291 to ae2b4efb completed with zero findings and all preservation/settlement guards passing. It covers the test integration; the unchanged packaging implementation retains its separately accepted review.

The fresh proof command passed. Its original outer receipt remains STOP_UNCONFIRMED; a later read-only native status independently confirmed resource release and completed cleanup, with hostless terminal state. The original receipt was not rewritten. Current-head CI and both required CI gates passed. Security Review, OpenGrep, CodeQL and Critical Quality workflows passed. The separate CodeQL aggregate check is neutral because 17 configurations present on main are absent from this PR; this is not a blanket code-scanning clearance. Exact-head ClawSweeper review reports zero findings, no before-merge requests and no rank-up moves. No inherited-CI exception or waiver is applied.

CI attempt 1 had one Android request-arrival timeout in NodeRuntimeAgentSelectionTest.lateAgentListCannotEraseANewerPickerChoice before its newer-selection assertion (failed job). The test, owner and Gradle inputs matched the prior passing source; one same-head job-specific diagnostic rerun passed under the workflow's native rerun policy (attempt 2 job). No source, timeout or assertion changed. The initial failure remains recorded and its cause is not established. Follow-up: investigate that Android agent-list request-arrival timeout; no unrelated Android change is included here.

The selected Doctor smoke does not qualify the separate deferred-schema/R2 behavior in #186506. Follow-up: consolidate cancellation ownership between the package-build launcher and its implementation; that remains separate from these publication rules.

Keep source-module URL metadata in build trees for source AOT compilation, while excluding it from root and separately packed AI publication. Preserve runtime resources and canonical distribution inventories.

Allocate exactly 143 net regression-test lines for real npm/pnpm root and bundled-AI pack coverage, runtime exports, and inventory agreement; leave the shared baseline unchanged.
@vincentkoc vincentkoc self-assigned this Nov 1, 2026
@clawsweeper

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

@vincentkoc
vincentkoc marked this pull request as ready for review November 1, 2026 03:21
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug 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-repro Preliminary submission classification; full source review pending. labels Nov 1, 2026
@clawsweeper

clawsweeper Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR excludes source-build module ledgers from root and AI npm packages while preserving them in source build trees.

Example: Pack a build containing dist/.source-module-urls/build.json.

  • Before: The build ledger enters the published package and consumes installed-tree budget.
  • After: The ledger stays in the build tree but is omitted from the package; runtime exports remain included.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A minimal production fix with meaningful publication coverage and applicable retained package proof; exact-head CI is still running.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (linked_artifact): Retained Linux proof at a1dbb29 records canonical build, independent AI/root packing, tarball integrity, npm12 installation and runtime imports: 178 source ledgers remained and none shipped. The previous review accepted this evidence, and the inspected successor changes only the landed stdin tests and allocation. Direct log retrieval is blocked by this review environment's storage-host allowlist, so the recorded native completion was not independently replayed.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Published installations carry build-only ledger files that consume limited installed-tree capacity.
Reason: The maintainer-authored direction removes unused package contents with two focused manifest rules and preserves source-build functionality.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR fixes unnecessary package contents still present on main, with no actionable introduced defect found.

Priority: P2
Reviewed head: ae2b4efb752c66c89ee4ad1782ae5073b17f1762

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Mutation controls are documented instead of a pre-fix checkout run; no additional shipped-entry-point scenario is needed for the unchanged packaging inputs.
Agent review details

How this fits together

Package manifests select build outputs for npm publication, while distribution inventories describe the shipped files and standalone source builds consume the retained ledgers.

flowchart TD
  A[Source build] --> B[Runtime outputs and source ledgers]
  B --> C[Standalone source compiler]
  B --> D[Root and AI package manifests]
  D --> E[Published runtime packages]
  D --> F[Distribution inventories]
Loading

Technical review

Best possible solution:

Keep the exclusions in the existing package manifests, preserving source ledgers and canonical inventory generation.

Do we have a high-confidence way to reproduce the issue?

Current-main manifests include the dist trees that receive source-module ledgers; supplied mutation controls exercise the missing exclusions, but this review ran no reproduction.

Is this the best way to solve the issue?

The two manifest exclusions are the smallest complete fix: they use existing publication owners and inventory filtering without deleting source-build inputs or adding runtime machinery.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 46a33537efbf.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit c36710e adds scripts/lib/standalone-source-module-urls.mjs:5 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c36710ec04ba; files: scripts/lib/standalone-source-module-urls.mjs)
  • Dallin Romney: Raw commit d6d76cd adds package.json:88 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d6d76cd1a0d2; files: package.json)

PR surface

Tests +240, Config +2, Other +5. Total +247 across 10 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 6 272 32 +240
Docs 0 0 0 0
Config 2 2 0 +2
Generated 0 0 0 0
Other 2 5 0 +5
Total 10 279 32 +247

Review metrics

Metric Value Why it matters
Production versus test growth Production +2/−0; tests and test support +272/−32 The production fix stays in two manifests; additional coverage exercises distinct npm/pnpm publication, independent AI packing, inventory agreement and the already landed stdin contract repair.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Removing unused build files improves installed-package budget margin without changing runtime behavior or addressing an established current outage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-11-01T03:38:51.653Z sha 87a2e9c :: needs maintainer review before merge. :: none
  • reviewed 2026-11-01T09:58:35.221Z sha a1dbb29 :: needs maintainer review before merge. :: none

Reviewed November 1, 2026, 2:46 PM ET / 19:46 UTC (Revision 3).

Baseline-Refresh: 7a426d1dddcbcc390f79a4a248b308df2c79aff2
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Exact head: a1dbb291f4d5a21dd2d612c18280b8d2ac5511fd. The PR body now records the integrated Workboard repair, fresh affected lint, root/AI mutation controls, full package proof and installed-budget result. Please review this successor; hosted CI and native landing gates remain required.

@clawsweeper

clawsweeper Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 1, 2026
* fix(anthropic): validate cancellation across stdin notifications

* test(process): avoid returning from close promise executor

* test(process): preserve typed stdin error identity

(cherry picked from commit 50efbfd)
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact head ae2b4ef. The signed follow-up integrates the landed stdin test-contract repair from #190335. Current composed Node/Bun suites, services typecheck, static checks and incremental source review passed; unchanged package proof and its original artifact identity are documented in the updated PR body. Hosted CI remains an independent landing gate.

@clawsweeper

clawsweeper Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 1, 2026
@clawsweeper clawsweeper Bot removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 1, 2026
@vincentkoc
vincentkoc merged commit 5f229e0 into main Nov 1, 2026
432 of 434 checks passed
@vincentkoc
vincentkoc deleted the fix-package-build-metadata-publication branch November 1, 2026 20:13
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Nov 1, 2026
* fix(packaging): omit source-build ledgers from published packages

Keep source-module URL metadata in build trees for source AOT compilation, while excluding it from root and separately packed AI publication. Preserve runtime resources and canonical distribution inventories.

Allocate exactly 143 net regression-test lines for real npm/pnpm root and bundled-AI pack coverage, runtime exports, and inventory agreement; leave the shared baseline unchanged.

* test(packaging): type fixture package names

* test(packaging): complete declared publication fixture inputs

* test(anthropic): cover repeated stdin failure notifications (#190335)

* fix(anthropic): validate cancellation across stdin notifications

* test(process): avoid returning from close promise executor

* test(process): preserve typed stdin error identity

(cherry picked from commit 50efbfd)
(cherry picked from commit 5f229e0)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 2, 2026
…law#190030)

* fix(packaging): omit source-build ledgers from published packages

Keep source-module URL metadata in build trees for source AOT compilation, while excluding it from root and separately packed AI publication. Preserve runtime resources and canonical distribution inventories.

Allocate exactly 143 net regression-test lines for real npm/pnpm root and bundled-AI pack coverage, runtime exports, and inventory agreement; leave the shared baseline unchanged.

* test(packaging): type fixture package names

* test(packaging): complete declared publication fixture inputs

* test(anthropic): cover repeated stdin failure notifications (openclaw#190335)

* fix(anthropic): validate cancellation across stdin notifications

* test(process): avoid returning from close promise executor

* test(process): preserve typed stdin error identity

(cherry picked from commit 0285717)
vincentkoc added a commit that referenced this pull request Nov 2, 2026
* test(e2e): align legacy operator requested exec policy

* fix(doctor): preserve legacy upgrade backups and native assignments

* fix(doctor): retain opt-in backup discovery typing

* test(doctor): compare captured file bytes directly

* fix(doctor): inspect admitted state schema content

* fix: refresh the reviewed correction baseline

Baseline-Refresh: e20ab99aad2669c5ee844498d5e939d0a1031cd8

* test(doctor): avoid shadowing state descriptor

* fix(package): restore installed entry budget (#188097)

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit d6d76cd)

* fix(packaging): exclude source-build ledgers from npm packages (#190030)

* fix(packaging): omit source-build ledgers from published packages

Keep source-module URL metadata in build trees for source AOT compilation, while excluding it from root and separately packed AI publication. Preserve runtime resources and canonical distribution inventories.

Allocate exactly 143 net regression-test lines for real npm/pnpm root and bundled-AI pack coverage, runtime exports, and inventory agreement; leave the shared baseline unchanged.

* test(packaging): type fixture package names

* test(packaging): complete declared publication fixture inputs

* test(anthropic): cover repeated stdin failure notifications (#190335)

* fix(anthropic): validate cancellation across stdin notifications

* test(process): avoid returning from close promise executor

* test(process): preserve typed stdin error identity

(cherry picked from commit 50efbfd)
(cherry picked from commit 5f229e0)

* fix: refresh the reviewed correction baseline

Baseline-Refresh: 131d3c9a10faf98d2bdb4e2b79051307c1e88f4f
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: Dallin Romney <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 3, 2026
…186506)

* test(e2e): align legacy operator requested exec policy

* fix(doctor): preserve legacy upgrade backups and native assignments

* fix(doctor): retain opt-in backup discovery typing

* test(doctor): compare captured file bytes directly

* fix(doctor): inspect admitted state schema content

* fix: refresh the reviewed correction baseline

Baseline-Refresh: e20ab99aad2669c5ee844498d5e939d0a1031cd8

* test(doctor): avoid shadowing state descriptor

* fix(package): restore installed entry budget (openclaw#188097)

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 1864046)

* fix(packaging): exclude source-build ledgers from npm packages (openclaw#190030)

* fix(packaging): omit source-build ledgers from published packages

Keep source-module URL metadata in build trees for source AOT compilation, while excluding it from root and separately packed AI publication. Preserve runtime resources and canonical distribution inventories.

Allocate exactly 143 net regression-test lines for real npm/pnpm root and bundled-AI pack coverage, runtime exports, and inventory agreement; leave the shared baseline unchanged.

* test(packaging): type fixture package names

* test(packaging): complete declared publication fixture inputs

* test(anthropic): cover repeated stdin failure notifications (openclaw#190335)

* fix(anthropic): validate cancellation across stdin notifications

* test(process): avoid returning from close promise executor

* test(process): preserve typed stdin error identity

(cherry picked from commit 0285717)
(cherry picked from commit dcfd10f)

* fix: refresh the reviewed correction baseline

Baseline-Refresh: 131d3c9a10faf98d2bdb4e2b79051307c1e88f4f
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: Dallin Romney <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: anthropic P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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