Repository navigation
Conversation
|
Codex review: needs changes before merge. Reviewed July 16, 2026, 4:55 AM ET / 08:55 UTC. Summary PR surface: Tests +49, Other +35. Total +84 across 6 files. Reproducibility: yes. The PR provides a concrete current-main reproduction on an approximately 12 GB Linux host without swap, including repeated kernel OOM kills and before/after peak-memory measurements. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review findings
Review detailsBest possible solution: Keep the supported configuration-group split, but derive the invocation plan from the effective declaration mode so environment- and CLI-disabled declaration builds both retain the existing two-pass path. Do we have a high-confidence way to reproduce the issue? Yes. The PR provides a concrete current-main reproduction on an approximately 12 GB Linux host without swap, including repeated kernel OOM kills and before/after peak-memory measurements. Is this the best way to solve the issue? No, not quite. Named tsdown filters and sequential groups are a narrow, dependency-supported fix, but the planner must first preserve every supported no-declaration fast path, including forwarded Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a5d1d9e473ba. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Tests +49, Other +35. Total +84 across 6 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
2a42d55 to
6441abb
Compare
6441abb to
f178b71
Compare
|
Maintainer deep review complete. I rebased the branch and kept the core grouping design: AI declarations, package declarations, then the unified declaration graph run sequentially, while configs inside the package group remain parallel. I also repaired three forwarded-argument regressions before landing:
Proof:
The contributor's 12 GB no-swap source-build proof peaked at 8.36 GiB. The measured grouping cost was about 17 seconds versus unified-only declaration proof; the no-DTS path remains unchanged. Exact-head CI is now the remaining merge gate. |
|
Merged via squash.
|
* fix: reduce peak memory in source builds * fix(build): preserve CLI no-dts fast path * fix(build): preserve forwarded tsdown selectors --------- Co-authored-by: openclaud11-sys <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
* fix: reduce peak memory in source builds * fix(build): preserve CLI no-dts fast path * fix(build): preserve forwarded tsdown selectors --------- Co-authored-by: openclaud11-sys <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
AI-assisted: yes. I reviewed the implementation, test results, and final diff.
What Problem This Solves
Fixes an issue where contributors running a normal source build on memory-constrained Linux hosts could have the kernel kill
tsdownwhile declaration generation was active. The failure reproduced on a 12 GB host with no swap because the package declaration graphs and the much larger unified graph ran concurrently.Why This Change Was Made
Declaration-enabled builds now run the AI config, package configs, and unified config in order. This prevents their peak memory use from overlapping. No-DTS builds keep the existing two-invocation fast path, and caller-provided tsdown filters keep the original single-main-invocation behavior.
The group names live in one shared module so the tsdown config and build wrapper cannot drift independently.
User Impact
Contributors can complete ordinary source builds on hosts where the previous concurrent declaration build exhausted system memory. Docker and other no-DTS builds retain their existing performance characteristics.
Evidence
mainthrough011d0279; the existing Docker OOM fix does not cover ordinary Linuxpnpm build.pnpm buildpassed on current-main commit0f32033dplus this patch in 550 seconds. Peak aggregate RSS was 8,358,492 KiB, swap remained disabled, and the low-memory guard did not trigger.OPENCLAW_RUN_NODE_SKIP_DTS_BUILD=1 node scripts/tsdown-build.mjscompleted in 14 seconds with the existing 2/2 invocation shape.test/scripts/tsdown-build.test.tsandtest/scripts/tsdown-config.test.ts.oxfmt --check.src/gateway/worker-environments/workspace-reconcile.ts, reproduced after stashing this patch on cleanmain.--filterand-Fbehavior.A repository-wide 282-shard test run was not used as proof. It surfaced unrelated gateway-suite failures outside the changed files and was stopped; the affected build tests and complete production build passed.
Agent Transcript
Sanitized Codex session transcript