refactor(javascript): name heap and deadline flags from the bound limit, not remediation text (#11448)

* refactor(javascript): bind max_heap_mb and analysis_timeout_ms flags from the limit, not remediation text

The CLI projection now also names the flag of a registered setting limit that carries a request parameter (javascript.max_heap_mb, javascript.analysis_timeout_ms). The JavaScript worker heap and timeout remediation and the web bundle heap remediation no longer name CLI flags; a web bundle heap exhaustion that a larger max_heap_mb raises now binds max_heap_mb as its per-call control.

* test(javascript): assert the adapter-neutral heap remediation in the worker order audit

* refactor(managed): bind max_snapshot_bytes as the per-call control of a managed snapshot refusal (#11453)
This commit is contained in:
morluto authored and GitHub committed 2026-11-16 05:24:16 +08:00
1 parent c475a6fac0
commit 8c9cceceb4
14 files changed
+111 -19

No files matched your search

@@ -62,7 +62,7 @@ it("names max_heap_mb, its range, and the budgets it does not raise", () => {
expect(projected.remediation.action).toContain(
String(JAVASCRIPT_WORKER_HEAP_MIB_MAXIMUM),
);
expect(projected.remediation.action).toContain("--max-heap-mb");
expect(projected.remediation.action).not.toContain("--");
expect(projected.remediation.action).toContain("next analysis");
expect(projected.remediation.action).toContain("new worker");
expect(projected.remediation.action).toContain("parent result budget");
@@ -127,7 +127,7 @@ it("attributes V8 heap exhaustion to max_heap_mb only when that flag is enforced
"exhausted its 1024 MiB V8 old-space heap (max_heap_mb)",
);
expect(node.remediationAction).toContain("max_heap_mb");
expect(node.remediationAction).toContain("--max-heap-mb");
expect(node.remediationAction).not.toContain("--");
const bun = javaScriptWorkerHeapExhaustionRecovery({
heapFlagsEnforced: false,
heapMb: 1024,