Skip to content

fix: let source builds and Git updates finish on 8 GiB machines - #201901

Merged
fuller-stack-dev merged 10 commits into
openclaw:mainfrom
fuller-stack-dev:fix/update-build-memory-guard
Nov 19, 2026
Merged

fuller-stack-dev merged 10 commits into
openclaw:mainfrom
fuller-stack-dev:fix/update-build-memory-guard

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

A source build of current main does not fit in 8 GiB of memory. In an 8 GiB container with nothing else running, a cold pnpm build is OOM-killed in its declaration step, in 3 of 3 runs. That build runs during a Git install, a manual pnpm build, and openclaw update on a Git checkout when the installed updater is 2026.11.4 or 2026.11.5. The memory goes to the native TypeScript compiler, which #198661 made parallel. The build's memory guard cannot see that memory, because --max-old-space-size does not bound a Go child process.

User Impact

On a host where the build owner caps the build heap (below about 13 GiB of usable memory), the declaration step now runs single-threaded, and a cold build completes in an 8 GiB container. Hosts with more memory keep the parallel pass. Declaration output is the same in both modes.

The margin at 8 GiB is small. With a Gateway and a busy writer in the same 8 GiB container, the update passed, but the container peaked at 7848 MiB (7.66 GiB) of anonymous memory, 344 MiB under its limit, during the build. This PR does not claim that every 8 GiB host can build. When memory is too low, the existing guard refuses before touching anything, and the old build keeps serving; see the negative control below.

Why This Change Was Made

  • What the parallel pass costs. At 12 GiB it peaked at 8386 MiB (8.19 GiB) in its cgroup. The single-threaded pass peaked at 6101 MiB (5.96 GiB), and at 8 GiB it was not slower: 1m45s against the parallel pass's 2m15s at 12 GiB.
  • Who already decides memory. tsdown-build sizes the build heap. It grants its uncapped default (12288 MB) only when memory is ample, and it uses the same fact to allow two parallel runtime builds.
  • How the decision reaches the emitter. tsdown-build now hands its frozen budget to every build child in OPENCLAW_TSDOWN_MAX_OLD_SPACE_MB. build-all used to add it, and that duplicate is gone. A small shared module holds the threshold, so both use one rule. The emitter runs the compiler in parallel only when that budget is 12288 MB or more and stable type ordering is on. It never reads Node heap flags or V8's total heap limit.
  • What stays single-threaded. The Windows default (8192 MB) stays single-threaded. On a large Windows host that costs some speed; the output is identical. A run without the budget (a bare tsdown) also stays single-threaded, as before perf(build): emit tsdown declarations in one native compiler command-line pass #198661. An explicit OPENCLAW_TSDOWN_MAX_OLD_SPACE_MB of 12288 or more counts as a statement that memory is ample.

Which side runs this code. The build runs the scripts of the tree being built, so the candidate's code decides, under any installed updater.

What this PR does not change: the build memory guard (MEASURED_MIN_TSDOWN_HEAP_MB = 4352, from #123979). Measured on this base, its floor is too low, not too high:

  • A cold build alone is OOM-killed at 5 GiB with the guard's own 4352 MB heap.
  • It is also killed at 6 GiB, with the guard's heap or with 4352 MB or 3584 MB.
  • It passes at 7 GiB.
  • Neither a smaller heap nor four rolldown threads moved the 6 GiB result. The pressure is native memory plus the build's own parent processes, not the heap.

A per-process sample at the moment of the kill at 6 GiB:

Process RSS
tsdown child 4.9 GB
build-all 869 MB
tsdown-build wrapper 343 MB
pnpm 123 MB

The guard also counts pnpm's own memory as competing: at 5 GiB alone it computed a 4310 MB heap and refused. Raising the floor would refuse more hosts, and I have no data for hosts with fewer than 16 CPUs. So this is recorded as a follow-up, not changed here.

Evidence

Recordings (cold pnpm build, container memory.max 8 GiB, no swap, 16 CPUs, nothing else running). Full raw logs are not attached because the artifact store rejected uploads from this machine.

RED, base eb381dceef2: write-unified-entry-dts fails after 1m4.6s, oom_kill 1, memory.peak 8192 MiB, 155 s.

build-8gib-red.mp4

GREEN, final head 75ddce3266b: every phase done, write-unified-entry-dts 1m46.3s, oom_kill 0, memory.peak 6993 MiB, 273 s.

build-8gib-green-75ddce3.mp4

GREEN, earlier head 5697d27a366 (same reproduction): oom_kill 0, memory.peak 7327 MiB, 254 s.

build-8gib-green.mp4

Isolated build floor (cold pnpm build of the base, alone, 16 CPUs, no swap):

Limit Heap Declaration pass Result Wall Peak anon
8 GiB guard (7347) parallel (base) OOM kill in declarations, 2 of 2 runs 155-176 s 8093-8097 MiB (7.9 GiB)
12 GiB guard (11520) parallel (base) ok 302 s 8386 MiB (8.19 GiB)
8 GiB guard (7424) single-threaded (this PR) ok 273 s 6473 MiB (6.32 GiB)
7 GiB guard (6400) single-threaded ok 259 s 6641 MiB (6.49 GiB)
6 GiB guard, 4352, 3584 single-threaded OOM kill in tsdown runtime phase 70-75 s 5888-5985 MiB (5.75-5.84 GiB)
5 GiB forced 4352 single-threaded OOM kill in tsdown runtime phase 58 s 4915 MiB (4.80 GiB)
4.5 GiB forced 3840 single-threaded OOM kill in tsdown runtime phase 53 s 4596 MiB (4.49 GiB)

Measured floor alone: between 6 and 7 GiB.

openclaw update cells (Docker update matrix, managed Gateway serving, writer at 8 MiB/s on a 512 MiB agent database, Git tag on the beta channel):

Cell Installed, target Memory Result Update wall Build Outage Peak anon
In-place, head 2026.11.5 to 5697d27 8 GiB ok, serves 5697d27 1125 s 497 s (declarations 4m26s, single-threaded) 272 s 7848 MiB (7.66 GiB), no OOM kill
Release layout, head main ea74900 to 5697d27 8 GiB ok (conversion plus target) 414 s 144 s + 133 s (no declaration pass) 6.8 s + 13.3 s 7878 MiB (7.69 GiB), no OOM kill
In-place, head (repeat) 2026.11.5 to 8040c3c 8 GiB ok 1058 s 510 s 249 s 7617 MiB (7.44 GiB), no OOM kill
Negative control 2026.11.5 to 5697d27 6 GiB guard refused before removing anything; still serving 2026.11.5, readyz true 96 s refused at 9 s 0 5865 MiB (5.73 GiB)
In-place, base 2026.11.4 to eb381dc 8 GiB build passed (423 s, parallel, peak 7953 MiB (7.77 GiB)); the update then failed in the 2026.11.4 updater's own SQLite validation (known, unrelated) 631 s 423 s 0 7953 MiB (7.77 GiB)

Notes on the cells:

  • Outage timing. The 272 s outage happens during activation (Git import 126 s, Doctor 63 s), after the build has finished. Earlier 12 GiB and 8 GiB cells from 2026.11.4/2026.11.5 to release/2026.11.10 had 203 s and 179 s outages.
  • Negative control output. The refusal message the update printed: "The resolved OpenClaw build heap is 2796MB, and a full build needs 4352MB ... Stopping before any build output is removed." The run record ends preflight-no-good-commit with the next action openclaw triage.
  • Base-target cell. It shows the parallel pass can also squeeze through at 8 GiB under a Gateway. Isolated, it failed every time.

Tests

  • test/scripts/native-declaration-boundary.test.ts: one test now compiles a 16-module fixture in fresh Node processes, setting the planner budget (OPENCLAW_TSDOWN_MAX_OLD_SPACE_MB) per case:
    • without stable ordering at a 12288 MB budget;
    • with stable ordering at a capped 7424 MB budget;
    • with stable ordering at a 12287 MB budget, at a 7424 MB budget with an inherited --max_old_space_size=12288, and with no budget but --max-old-space-size=12288;
    • with stable ordering at a 12288 MB budget.
  • It asserts that each mode is deterministic and that the capped and uncapped stable passes emit identical declarations and maps. Off Windows, a recording wrapper around the fixture's real compiler shows which config the compiler received: single-threaded for the first three, parallel for the last.
  • Red on the base emitter: the 7424 MB case receives a parallel config. Red on two earlier versions of this PR: the total-heap check admitted the 12287 MB case, and the flag-reading check admitted the underscored-alias case. Green on the head.
  • test/scripts/tsdown-build.test.ts (adjacent owner guard): the tsdown child's env now carries the budget. It is 4352 for a capped plan, 12288 on an unconstrained host and 8192 for the Windows default. These assertions fail on the base.
  • test/scripts/build-all.test.ts: unchanged; its existing child-env assertions still pass with the duplicate removed.
  • Run: node scripts/run-vitest.mjs test/scripts/tsdown-build.test.ts test/scripts/build-all.test.ts test/scripts/native-declaration-boundary.test.ts: 163 passed, 3 skipped.
  • Also run: pnpm tsgo:scripts; the root tooling typecheck; pnpm lint:scripts; oxfmt; git diff --check; the baseline ratchets, all ok. The test-lines ratchet is +68.
  • pnpm tsgo:test:root failed on 4 unrelated release-* test files inherited from main at the time; that has not been rechecked on the current head.

Audit and review

  • The touched test file was audited in full. The two-case determinism it.each was replaced by the single test above. Its parallel case ran in-process under the test runtime (Bun), where the heap fact does not exist, so it could no longer select parallel mode.

  • The new test keeps the compiles and equality checks on Windows and adds a cross-mode equality check. No other case changed.

  • An independent read-only review found nothing blocking. Its should-fix items:

    • cross-mode equality: added;
    • Windows coverage: kept;
    • Windows stays single-threaded, and the threshold is coupled to the owner's default: both documented in the code comment.
  • autoreview does not run on this machine.

  • Second independent review (final design): nothing blocking. It asked that tsdown-build export the budget itself and share the threshold; both are done. It also asked to note that Windows stays single-threaded and that the threading check does not run on Windows (the compiles and equality checks do).

  • ClawSweeper round 1 (on 8040c3c): overall C, proof B, patch C. Its four findings, all fixed:

    • the total-heap check admitted a capped 12287 MB budget: fixed (the final head reads the planner's budget), with a test case;
    • temporary paths inside shell quotes in the test wrapper: the wrapper now derives its paths from $0;
    • wrong arithmetic in the comment: corrected;
    • release/2026.11.6 listed as running declarations: corrected; v2026.11.6 skips them.
  • ClawSweeper round 3 (on the final head 75ddce3): overall B, proof B, patch B, "patch is correct". Its one finding asked this description to name the planner budget as the threading input, and it now does.

  • ClawSweeper round 2 (on 27dc770): overall D, proof D, patch C. Its finding was that an inherited --max_old_space_size=12288 alias survives the planner's rewrite and admitted the parallel pass. Fixed by reading the planner's budget, with a test case. It also said the full-build proof predated the final logic; the final-head recording above answers that.

Head. The update cells ran on 5697d27 and 8040c3c. The final head differs only in how the emitter learns the admitted budget. At the guard-computed budget in these cells (below 12288 MB) every version chooses the same single-threaded mode. Main merges since then touch no build code; the release-layout runner change (#201917) belongs to the installed updater, not the target build.

Not proven

  • Repeatability at 8 GiB. Two in-place runs passed, peaking at 7848 MiB (7.66 GiB) and 7617 MiB (7.44 GiB). Runs with an extra 1 GiB resident and at 12 GiB were done after merge; see the headroom comment on this PR. 8 GiB works in these cells but is marginal.
  • Fewer CPUs. Only checked after merge at 5 GiB on 4 CPUs, where the build is still OOM-killed.
  • Windows and real systemd. Not run on Windows, on bare-metal systemd hosts, or as a Gateway-initiated update.
  • The guard's floor. It is stale (it admits builds that are then killed between about 5 and 6.5 GiB of memory limit). That is not changed here.

Steps left to a person: none for builds that fit. When memory truly is too low, the update ends with the old build serving and a recorded failure. The run record names openclaw triage as the agent route. Adding memory cannot be automated.

Correction: peak-memory figures in this description are exact MiB from cgroup memory.stat (anon, whole container). An earlier version divided MiB by 1000 and labeled the result GiB.

… heap is uncapped

The parallel native declaration pass (openclaw#198661) holds Go memory outside
--max-old-space-size. A cold build of main is OOM-killed in that pass in
an 8 GiB container even with nothing else running; the single-threaded
pass completes there. Parallel emit now needs the build owner's uncapped
default heap, which it grants only when memory is ample.
Compare the capped single-threaded and uncapped parallel passes in one
fixture, keep the compiles running on Windows, and document which hosts
stay single-threaded.
@clawsweeper

clawsweeper Bot commented Nov 19, 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 scripts Repository scripts size: S labels Nov 19, 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: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. 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 19, 2026
@clawsweeper

clawsweeper Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

The PR makes native declaration emission single-threaded unless stable type ordering and the build process’s ample-memory heap budget both permit parallel emission.

Example: A cold source build runs in an 8 GiB container with the normal 7424 MiB build heap.

  • Before: Stable type ordering permits parallel native compilation despite the capped Node heap; the author reports two declaration-stage OOM kills.
  • After: The native compiler runs single-threaded; the author reports that the build completes.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The patch is focused and source-consistent, but the changed behavior lacks sufficient execution evidence for merge.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Source builders and Git-checkout users can have their build killed during declaration emission on an 8 GiB machine.
Reason: Restoring build completion has clear value, and the maintainer-authored PR explicitly accepts slower declaration emission on capped hosts while retaining parallel emission on ample-memory hosts.

Regression provenance

Regression provenance — verified: source commit 5a7d1718aa56 by Ayaan Zaidi; canonical PR #198661 (blame-to-merge-commit).

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it addresses a concrete source-build failure with a focused change, and source review found no introduced correctness or security defect.

Priority: P2
Reviewed head: 5697d27a366f42d0e75651f9d24168c048ee4d17

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Provide redacted logs or terminal captures showing the pinned head completing a cold build in 8 GiB and a Git update from v2026.11.5 with settings intact, plus the regression test failing on base and passing on head; redact IPs, keys, phone numbers, and non-public endpoints.
Agent review details

How this fits together

Source builds and Git-update candidate builds invoke tsdown, whose declaration plugin passes source roots and compiler options to the native emitter and receives declarations, source maps, and input inventories.

flowchart TD
  A[Source build or Git update] --> B[Build memory owner]
  B --> C[Tsdown process with selected heap]
  C --> D[Native declaration emitter]
  D --> E[Single or parallel compiler pass]
  E --> F[Declarations and input inventory]
Loading

Technical review

Best possible solution:

Keep declaration emission in its existing owner and admit parallel mode only when stable ordering and the existing ample-memory build budget both allow it.

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

The source exposes the reported path: stable ordering enables native parallel compilation even when the build wrapper caps Node’s heap; the author reports two cold-build OOMs in 8 GiB, but this read-only review did not independently reproduce the memory failure.

Is this the best way to solve the issue?

The change is a small, coherent repair that consumes the existing build-memory decision, preserves the fast path on ample-memory hosts, and extends the existing real-compiler fixture without adding another scheduler or memory-discovery owner.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 44267df6c5ea.

Provenance checked

  • Parallel declaration admission changes intended behavior with a stated reason (5a7d171: The CLI compiler pass enabled parallel emission under stable type ordering to reduce build time while preserving deterministic declarations.)
  • Declaration determinism coverage keeps the original intent (5a7d171: Fresh compiler passes must preserve inferred declaration bytes and source maps; the revised fixture retains this contract and compares capped and uncapped stable-ordering output.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Jason (Json): Raw commit a32fc09 adds scripts/lib/native-declaration-emitter.mts:435 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a32fc09b4ce0; files: scripts/lib/native-declaration-emitter.mts)
  • Ayaan Zaidi: Raw commit 5a7d171 adds scripts/lib/native-declaration-emitter.mts:371 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 5a7d1718aa56; files: scripts/lib/native-declaration-emitter.mts)
  • Peter Steinberger: Raw commit cbb17e8 adds scripts/lib/native-declaration-emitter.mts:149 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: cbb17e87e980; files: scripts/lib/native-declaration-emitter.mts)

PR surface

Tests +52, Other +20. Total +72 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 77 25 +52
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 21 1 +20
Total 2 98 26 +72

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.

Labels

Label changes:

  • add P2: The reported failure prevents source builds and Git-checkout updates on constrained machines, with a focused build-tooling scope.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab 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: The reported failure prevents source builds and Git-checkout updates on constrained machines, with a focused build-tooling scope.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab 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 19, 2026, 10:25 AM ET / 15:25 UTC.

…ot the total heap

V8's heap_size_limit adds the young generation, so a planner-capped
12287 MB old space still read as uncapped. Read the --max-old-space-size
the build owner wrote instead, and keep the test wrapper's paths out of
shell source.
build-all hands every build child its frozen budget in
OPENCLAW_TSDOWN_MAX_OLD_SPACE_MB. Reading Node heap flags could still
admit the parallel pass when an inherited underscored alias survived the
planner's rewrite.
…y child

tsdown-build now exports OPENCLAW_TSDOWN_MAX_OLD_SPACE_MB itself, so
direct tsdown-build runs carry the budget that build-all used to add,
and the declaration emitter shares the owner's uncapped-heap threshold
instead of copying it.
@fuller-stack-dev
fuller-stack-dev merged commit eedb353 into openclaw:main Nov 19, 2026
125 checks passed
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash.

@fuller-stack-dev
fuller-stack-dev deleted the fix/update-build-memory-guard branch November 19, 2026 20:02
@fuller-stack-dev

fuller-stack-dev commented Nov 19, 2026 •

Copy link
Copy Markdown
Member Author

Headroom follow-up for this change: how much margin 8 GiB really has.

These cells use the same Docker update matrix as the PR evidence. In each, installed 2026.11.5 does an in-place Git update to 8040c3c, which has the same build behavior as the merged head. A managed Gateway is serving, and a writer runs at 8 MiB/s on a 512 MiB agent database. 16 CPUs, no swap.

Cell Result Update wall Build Gateway outage Peak anon (whole container)
8 GiB, run 1 (5697d27) ok 1125 s 497 s 272 s 7848 MiB (7.66 GiB)
8 GiB, run 2 ok 1058 s 510 s 249 s 7617 MiB (7.44 GiB)
8 GiB + 1 GiB held by another process, first openclaw update refused before removing anything; still serving 2026.11.5, readyz true 96 s refused at 8 s ("resolved OpenClaw build heap is 3162MB, and a full build needs 4352MB") 0 n/a
8 GiB + 1 GiB held, plain repeat openclaw update ok, now serving the new build 818 s 424 s not recorded 8146 MiB (7.96 GiB), no OOM kill
12 GiB ok 759 s 412 s 180 s 8269 MiB (8.08 GiB)

What this says:

  • Is 8 GiB enough? It works but is marginal. Every 8 GiB pass ran the container within 344-575 MiB of its 8192 MiB limit during the build (the ballast run within 46 MiB).
  • With 1 GiB more held elsewhere (a larger Gateway heap): the guard's verdict depends on the moment it samples. The first attempt was refused while the updater's own transient memory was resident. The next attempt was admitted and passed at 8146 of 8192 MiB.
  • Outage at 8 versus 12 GiB: the outage is 70-90 s longer at 8 GiB (249-272 s against 180 s). It is not the build, which runs before the Gateway stops. Activation steps slow down under memory pressure: Git import took 126 s against 91 s, and Doctor 63 s against 37 s.

The guard itself is out of scope for this PR. It admits builds that are then killed between about 5 and 6.5 GiB, and it refuses or admits near 8 GiB depending on transient memory. That goes to a follow-up.

Not attached: the cells' raw logs. The artifact store rejects uploads from the machine that ran them.

Peak figures are exact MiB of cgroup memory.stat anon for the whole container: Gateway, writer, updater CLI, ballast and build tree together. An earlier draft divided MiB by 1000.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 20, 2026
…claw#201901)

* fix(build): run the declaration pass single-threaded unless the build heap is uncapped

The parallel native declaration pass (openclaw#198661) holds Go memory outside
--max-old-space-size. A cold build of main is OOM-killed in that pass in
an 8 GiB container even with nothing else running; the single-threaded
pass completes there. Parallel emit now needs the build owner's uncapped
default heap, which it grants only when memory is ample.

* test(build): prove both declaration modes emit identical output

Compare the capped single-threaded and uncapped parallel passes in one
fixture, keep the compiles running on Windows, and document which hosts
stay single-threaded.

* fix(build): admit parallel declarations from the planned old space, not the total heap

V8's heap_size_limit adds the young generation, so a planner-capped
12287 MB old space still read as uncapped. Read the --max-old-space-size
the build owner wrote instead, and keep the test wrapper's paths out of
shell source.

* fix(build): take declaration threading from the planned heap budget

build-all hands every build child its frozen budget in
OPENCLAW_TSDOWN_MAX_OLD_SPACE_MB. Reading Node heap flags could still
admit the parallel pass when an inherited underscored alias survived the
planner's rewrite.

* refactor(build): let tsdown-build hand its frozen heap budget to every child

tsdown-build now exports OPENCLAW_TSDOWN_MAX_OLD_SPACE_MB itself, so
direct tsdown-build runs carry the budget that build-all used to add,
and the declaration emitter shares the owner's uncapped-heap threshold
instead of copying it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts size: S 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