Repository navigation
fix(tooling): bound compiler profiling memory and lifetime - #160096
vincentkoc wants to merge 3 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 28, 2026, 7:23 AM ET / 11:23 UTC (Revision 7). ClawSweeper reviewWhat this changesThe branch runs TypeScript compiler profiling through shared memory admission, streams large file inventories and explanations to artifacts, adds process tests, and documents the bounded workflow. Merge readiness⛔ Blocked before merge - 5 items remain Keep this PR open. The bounded Linux profiler addresses a real source-level problem, but the branch disables an existing macOS and Windows workflow without a qualified way to retrieve remote reports or explicit acceptance of that compatibility change. The prior request to expose helper status 75 does not match the profiler CLI's existing exit-status behavior. Priority: P2 Review scores
Verification
How this fits togetherThe compiler profiler is a developer CLI that launches TypeScript compiler phases for selected project graphs. It collects diagnostics and file lists, then writes local reports and optional trace artifacts. flowchart LR
A[Profiler command] --> B[Selected graphs]
B --> C[Host admission]
C --> D[Contained compiler phases]
D --> E[Streamed artifacts]
E --> F[Summary reports]
Decision needed
Why: The PR intentionally changes an existing developer workflow, and source review cannot authorize that platform tradeoff. Before merge
Findings
Agent review detailsSecurityNone. PR surfaceTests +456, Other +138. Total +594 across 3 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the bounded Linux execution and provide a verified macOS and Windows remote or VM route that returns reports and optional artifacts before retiring native profiling. Do we have a high-confidence way to reproduce the issue? Yes for the source-level mechanism: current main launches compiler phases synchronously and retains their output without process-tree memory admission. This read-only review did not run a memory-exhaustion workload. Is this the best way to solve the issue? Not yet. The Linux containment path is focused, but a qualified way to use and retrieve profiling artifacts from macOS and Windows is needed before replacing those native workflows. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 162dea17b031. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
a739453 to
529c7e3
Compare
|
@clawsweeper re-review Please review exact head |
|
🦞👀 Re-review progress:
|
83a06a8 to
0dc704c
Compare
0dc704c to
c776851
Compare
|
@clawsweeper re-review Please review current head |
|
🦞👀 Re-review progress:
|
Related: #160010
Depends on: #160094
What Problem This Solves
Compiler profiling retained large output buffers while launching another unbounded compiler process.
User Impact
Every compiler phase uses shared host admission and kernel process-tree containment. File inventories and explanations stream to disk with the previous 256 MiB per-stream allowance and only a 64 KiB diagnostic tail in memory. Ordinary diagnostics have a 16 MiB combined capture limit. Reports publish only after all selected phases and cleanup succeed.
Platform decision pending: this implementation requires verified Linux kernel containment and refuses native macOS/Windows execution before launching a compiler. A complete bounded remote/VM profiler workflow, including retrieval of generated artifacts, still needs qualification from those hosts and explicit acceptance of the compatibility change. General lint/compiler activation remains in subsequent slices; this PR is held until that decision and proof are resolved.
Why This Change Was Made
The profiler owns phase execution and capture. It now reuses canonical admission, managed-process, and artifact owners, keeps cancellation active through cleanup, completes short file writes, attempts both descriptor closes, and preserves uncertain child ownership through cleanup errors. Synchronous compiler launches and retained raw phase-result objects are removed.
Evidence
Current head:
c7768510d67b0b1f2f128efa41fefe1937721069, patch-identically rebased onto40019980f2687648942b0788fb8523fef58ff7ffafter #160187 landed. All three commits compare identically with their reviewed versions. Prior focused process/static proof is retained. Exact-head hosted CI is green, including the aggregate gate. Exact-head ClawSweeper review found no source defect and blocks merge on the non-Linux compatibility decision and qualified alternative described above.Exact source
83a06a8968cdab79ca09a218026fe02df71a6595on Blacksmith Testbox, verified 3,681-input SHA256 manifestba472d34aec5176db3ca1ce64aa6ec90ddc89e1f9f09f31acf740650c157540b:Production/tooling +228/-90, tests +420/-0, docs +36/-0. Growth owns asynchronous bounded capture, streaming artifacts, and cleanup; no dependency changes. No matched runtime speedup is claimed by this entrypoint repair.