[PR #1809] [MERGED] fix(build): preserve resource controls in strict Turbo tasks #4830

Closed
opened 2026-10-31 00:55:29 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1809
Author: @N0zoM1z0
Created: 10/11/2026
Status: ✅ Merged
Merged: 10/11/2026
Merged by: @morluto

Base: main ← Head: fix/turbo-resource-environment-20261011


📝 Commits (1)

  • 7ce6e91 fix(build): preserve resource controls in strict Turbo tasks

📊 Changes

3 files changed (+49 additions, -4 deletions)

View changed files

📝 docs/testing.md (+5 -0)
📝 tests/boundary/filesystem/dependencyInstall.test.ts (+43 -4)
📝 turbo.json (+1 -0)

📄 Description

Summary

Fixes #1805. Default strict Turbo tasks dropped caller-selected Go concurrency/memory and Node worker-pool controls. Pass through GOMAXPROCS, GOMEMLIMIT, and UV_THREADPOOL_SIZE so constrained builds and checks receive those settings. Their values do not invalidate deterministic build caches.

Problem and expected behavior

On main ed084b3, a real npm run build:cached task graph with a small compiler fixture receives null for all three explicitly supplied controls. The new regression fails on that configuration while the five existing cases pass. The task should receive the exact caller values and continue filtering unrelated variables.

Change and scope

Add the three resource controls to globalPassThroughEnv, document their runtime scope, and reuse the existing cached-build fixture to verify strict filtering and cache reuse after changing resource values.

Contract and boundary impact

  • Semantic owner and earliest changed stage: root Turbo task environment.
  • CLI/MCP/tool-catalog contract: none.
  • Provider/target compatibility: none; local verification used Linux x64 with Node 24.18.0/npm 11.16.0/Turbo 2.11.7.
  • Evidence/provenance/reconstruction contract: none.
  • Process authority and cleanup: none; these runtime controls are not a hard process-family memory limit.
  • Generated metadata/package/install impact: no tracked generated output or dependency change; ordinary prepack dry-run passed.

Evidence and regression coverage

  • Executed cached-build boundary regression: base 1 failed/5 passed; final 6 passed.
  • Exact resource values survive strict execution; an unlisted sentinel remains absent. Changing only those values produces cache hits with no misses.
  • Fresh compiled REA analyzed a 101-byte, three-file JavaScript target through the public CLI and stdio MCP. Complete Evidence validation, normalized-result parity, source digests, and post-call ping passed.
  • Proof gaps: default parallel cold compilation was stopped by the explicitly enforced Flameox workload memory budget; it was not completed locally. Earlier profiling attempts did not forward the outer wrapper's environment. No overall compiler-memory reduction or real external-provider behavior is claimed.

Validation performed

  • Exact Vitest filesystem boundary file — 6 passed.
  • Fresh npm run compile -- --singleThreaded under Flameox, then npm run artifacts:skills — passed; sampled complete-family peak 1,238,822,912 bytes.
  • npm run typecheck -- --singleThreaded, npm run lint, touched-file format check, architecture guards, test discovery, and git diff --check — passed.
  • Public small-target CLI/MCP probe — passed.
  • npm pack --dry-run --json including normal prepack — passed; cached task outputs were reused.

Compatibility, safety, and release

  • Breaking changes/migration: none.
  • Real Hopper/Ghidra/browser verification: not applicable to this build-environment change.
  • Package/release metadata: none.
  • Privacy/containment: only three named resource controls are added; strict filtering remains enabled. No ambient environment, credentials, build products, or local profiling files are committed.

Review checklist

  • Concrete issue and one focused outcome with a Conventional Commit title.
  • Executed base failure and regression, owning documentation, and applicable public runtime checks.
  • Final diff checked for unrelated changes, secrets, and unsupported claims.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/1809 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/11/2026 **Status:** ✅ Merged **Merged:** 10/11/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/turbo-resource-environment-20261011` --- ### 📝 Commits (1) - [`7ce6e91`](https://github.com/morluto/rea/commit/7ce6e912730afd75f116d879f0bf06e2a183eafd) fix(build): preserve resource controls in strict Turbo tasks ### 📊 Changes **3 files changed** (+49 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `docs/testing.md` (+5 -0) 📝 `tests/boundary/filesystem/dependencyInstall.test.ts` (+43 -4) 📝 `turbo.json` (+1 -0) </details> ### 📄 Description ## Summary Fixes #1805. Default strict Turbo tasks dropped caller-selected Go concurrency/memory and Node worker-pool controls. Pass through `GOMAXPROCS`, `GOMEMLIMIT`, and `UV_THREADPOOL_SIZE` so constrained builds and checks receive those settings. Their values do not invalidate deterministic build caches. ## Problem and expected behavior On main `ed084b3`, a real `npm run build:cached` task graph with a small compiler fixture receives `null` for all three explicitly supplied controls. The new regression fails on that configuration while the five existing cases pass. The task should receive the exact caller values and continue filtering unrelated variables. ## Change and scope Add the three resource controls to `globalPassThroughEnv`, document their runtime scope, and reuse the existing cached-build fixture to verify strict filtering and cache reuse after changing resource values. ## Contract and boundary impact - Semantic owner and earliest changed stage: root Turbo task environment. - CLI/MCP/tool-catalog contract: none. - Provider/target compatibility: none; local verification used Linux x64 with Node 24.18.0/npm 11.16.0/Turbo 2.11.7. - Evidence/provenance/reconstruction contract: none. - Process authority and cleanup: none; these runtime controls are not a hard process-family memory limit. - Generated metadata/package/install impact: no tracked generated output or dependency change; ordinary prepack dry-run passed. ## Evidence and regression coverage - Executed cached-build boundary regression: base 1 failed/5 passed; final 6 passed. - Exact resource values survive strict execution; an unlisted sentinel remains absent. Changing only those values produces cache hits with no misses. - Fresh compiled REA analyzed a 101-byte, three-file JavaScript target through the public CLI and stdio MCP. Complete Evidence validation, normalized-result parity, source digests, and post-call ping passed. - Proof gaps: default parallel cold compilation was stopped by the explicitly enforced Flameox workload memory budget; it was not completed locally. Earlier profiling attempts did not forward the outer wrapper's environment. No overall compiler-memory reduction or real external-provider behavior is claimed. ## Validation performed - Exact Vitest filesystem boundary file — 6 passed. - Fresh `npm run compile -- --singleThreaded` under Flameox, then `npm run artifacts:skills` — passed; sampled complete-family peak 1,238,822,912 bytes. - `npm run typecheck -- --singleThreaded`, `npm run lint`, touched-file format check, architecture guards, test discovery, and `git diff --check` — passed. - Public small-target CLI/MCP probe — passed. - `npm pack --dry-run --json` including normal prepack — passed; cached task outputs were reused. ## Compatibility, safety, and release - Breaking changes/migration: none. - Real Hopper/Ghidra/browser verification: not applicable to this build-environment change. - Package/release metadata: none. - Privacy/containment: only three named resource controls are added; strict filtering remains enabled. No ambient environment, credentials, build products, or local profiling files are committed. ## Review checklist - [x] Concrete issue and one focused outcome with a Conventional Commit title. - [x] Executed base failure and regression, owning documentation, and applicable public runtime checks. - [x] Final diff checked for unrelated changes, secrets, and unsupported claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 00:55:29 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#4830
No description provided.