mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 06:45:22 +00:00
[PR #3550] [CLOSED] fix(javascript): keep parent budget exhaustion from advising more memory #5816
Closed
opened 2026-10-31 01:09:39 +00:00 by bsakaguchi
·
0 comments
No Branch/Tag specified
main
codex/procedure-reference-stacked
release-please--branches--main--components--rea-agents
release-please--branches--main--components--rea-agents--release-notes
codex/kuna-independent-retry
codex/byte-search-overlay-coverage
codex/open-failure-target-receipt
codex/kuna-xref-evidence
codex/ghidra-ambiguous-procedure-recovery
codex/function-source-bundle
codex/trace-function-integration-prototype
codex/snapshot-source-closure
codex/recorded-evidence-array-pages
codex/evidence-recovery-redesign
codex/trace-feature-address-scope
codex/call-discovery-scope
codex/ghidra-literal-candidate-evidence
codex/decompile-directory-independent-retry
codex/retry-provenance-base
codex/value-flow-capability-experiment
codex/ghidra-containing-instruction
cursor/readme-discord-button-ef9f
dependabot/github_actions/actions/setup-node-7.1.0
dependabot/github_actions/actions/upload-artifact-7.0.2
dependabot/npm_and_yarn/npm-minor-and-patch-d8d97ce6df
codex/kuna-1989
fix/8559-native-ui-fixture-ownership
fix/8555-go-verifier-mcp-ownership
codex/provider-capability-recovery
fix/8642-rizin-target-stdin
codex/ghidra-memory-effect-scope
codex/ghidra-annotation-entry-selector
codex/ghidra-readonly-recovery
codex/ghidra-regex-verifier-recovery
codex/evidence-discovery-view-guidance
fix/8545-bulk-append-overflow
fix/8428-navigation-refusal-alternatives
codex/address-context-recovery
codex/matching-member-limitations
codex/unknown-scope-contract
codex/evidence-view-guidance
feat/8373-native-trace-views
codex/ghidra-snapshot-verifier-binding
codex/elf-export-visibility
codex/evidence-view-recovery
codex/native-reference-cli-help
codex/provider-candidate-observation-scope
codex/kuna-session-verification
codex/ghidra-switch-lifetime-guidance
codex/pseudocode-paging-discovery
codex/clarify-evidence-view-support
codex/kuna-xrefs-selector-recovery
codex/context-capacity-recovery
codex/evidence-closure-large-links
codex/same-function-evidence-identity
codex/ghidra-verifier-inspected-jdk
codex/audit-guided-workflows
codex/crash-prompt-retained-dossiers
codex/analysis-view-error-recovery
codex/kuna-verifier-target-selection
codex/ghidra-selected-project-call-coverage
codex/docs-native-analysis-scope
codex/ghidra-java-socket-boundary
codex/ghidra-retained-snapshot-verifier
codex/ghidra-search-inventory-facts
fix/8284-zero-argument-parameter-bindings
fix/8198-ui-action-handler-offset
fix/8257-elf-entry-label-identity
fix/8304-deferred-output-schema-projection
fix/8277-call-path-computed-target-uncertainty
fix/pr-8089-conflicts
fix/ci-static-duplicate-export
dependabot/npm_and_yarn/lint-staged-17.6.0
dependabot/github_actions/actions/download-artifact-8.0.2
dependabot/npm_and_yarn/write-file-atomic-8.0.0
dependabot/npm_and_yarn/canonicalize-5.1.0
dependabot/github_actions/actions/cache/restore-6.1.0
dependabot/npm_and_yarn/toon-format/toon-4.4.0
dependabot/github_actions/actions/deploy-pages-5.0.1
codex/review-fixes-pr-2403
codex/review-fixes-pr-2400
codex/process-terminal-width
codex/test-brittleness-cleanup
verify/7167-browser-connect-macos
fix/7167-browser-connect
feat/native-matching-allowance-setting
feat/browser-scenario-dry-run
test/managed-caller-parameters-20261024
codex/parser-fortythird-boundaries
fix/6926-pinvoke-platform-decorations-20261023
fix/6889-har-body-encoding-20261023
fix/6888-sqlite-schema-budget-20261023
fix/dependency-security-gates-6708
cursor/evidence-overwrite-rebase-b4ac
feat/4057-verify-native-exports
fix/windows-acl-observer-overhead-20261022
cursor/erlang-beam-restack-4476
cursor/pe-certificate-review-bf32
fix/6116-javascript-application-fs-errors
fix/6061-unmapped-runtime-script-unknown
feat/browser-scenario-summary
fix/pe-certificates
codex/verify-3407
cursor/rebase-5699
cursor/rebase-5352
cursor/rebase-5600
cursor/fix-cli-schema-omission-10a8
codex/audit-hopper-shutdown-reasons-20261021
fix/demangle-swift-omitted-record
fix/nib-boolean-value-types
cursor/cancellation-partial-observation-a5ac
fix/ib-object-limit-reasons
fix/electron-fuse-limit-advice
fix/kuna-doctor-dangling-cache
fix/fixed-budget-refusal-advice
fix/js-ipc-listener-dedup
fix/js-return-member-provenance
fix/dmg-integrity-retry-advice
fix/ida-doctor-readiness
fix/kuna-version-probe-output-drain
fix/legacy-swift-runtime-name-matching
fix/dylib-lazy-load-commands
fix/browser-scenario-startup-cancel
fix/swift-nested-punycode-classification
fix/compare-unselected-scopes
fix/objc-method-budget-coverage
fix/dmg-mounted-root-observations
audit/ci-tests-20261019-round2
release/6.7.0
fix/wabt-cleanup-retry-resolution
fix/electron-fuse-elf-pe-architecture
fix/native-plist-descriptor-ownership
fix/kuna-caller-cleanup-ownership
experiment/atomic-codemode-20261016
review/first-contributor-3776
fix/call-resolution-full-read-cycles
fix/member-mutation-selection-repeat
experiment/atomic-re-tools-20261015
perf/member-mutation-lazy-origins
perf/static-network-mutation-index
fix/hopper-startup-lifecycle
audit/3050-windows-proof-20261015
feat/windows-window-capture-2183
audit/3049-windows-proof-20261015
audit/3735-macos-fixtures-20261015
fix/batch-decompile-null-pseudocode
fix/kuna-inventory-honors-jobs
experiment/browser-codemode-tool-design-20261015
fix/hopper-clean-runtime-argv
codex/review-2049-27f1b367
review-fixes/pr-2787-routing
fix/3360-scoped-this-emitters
fix/3367-replaced-global-effects
fix/3838-compact-any-value-items
test/hopper-download-probe-20261015
codex/windows-runtime-creation-red-green-20261015
codex/windows-readonly-root-red-green-20261015
codex/windows-root-share-red-green-20261015
codex/exp-1685-win-mcp-startup
codex/bug-sweep-20261015
investigate/2190-windows-package-phases
investigate/3543-macos-cli-deadline
perf/3281-reverse-tools-feedback-quality
fix/3406-hopper-doctor-fixture
fix/3341-wrapper-require-test-context
fix/3301-owned-uninstall-fixtures
fix/3164-compiler-input-ownership
fix/pcap-cleanup-stdout-newline-20261014
perf/interface-builder-summary
codex/review-fixes-pr-1977
fix/ghidra-effective-jvm-platform
fix/docs-turkish-rust-link-20261013
fix/main-maintenance-ci-20261010
fix/recover-binary-session-process-effects
codex/review-fixes-pr-2457
codex/ci-required-cancellation-gate
fix/main-format-baseline-20261013
fix/setup-preserve-entry-fields
cursor/restore-main-checks-1ffc
fix/ghidra-bridge-hashmap-import
codex/shared-ci-jadx-json-default-20261013
codex/shared-ci-ghidra-test-groups-20261013
codex/shared-ci-java-fixture-format-20261013
codex/fix-intrinsic-invocation-boundaries
test/release-preflight-reusable-jobs
test/js-parameter-provenance-expectation
fix/linux-hopper-verification-current
test/2419-ghidra-elf-probe-size
followup/pr-1544-native-ida
codex/fold-pr-2230-contribution
docs/readme-responsible-use
fix/issue-2064
fix/issue-2050
fix/issue-2053
fix/issue-1968
fix/issue-1945
experiment/codemode-bridge-20261011
fix/tool-effects-negative-wording-1904-20261012
fix/1842-electron-interop-provenance
feat/recover-javascript-multi-input
refactor/website-i18n-prep
fix/nativeaot-pe-virtual-extent
fix/browser-verifier-ci-hang
fix/pe-resources-input-selection
docs/beginner-friendly-guides
docs/beginner-setup-guide
fix/javascript-analysis-worker-1563
fix/1649-ghidra-duplicate-names
fix/javascript-export-keys-integration-1369
test/maintenance-boundary-contracts-20261011
review/javascript-export-keys-1369
review/process-live-progress-1483
test/javascript-1495-growth-ratio
fix/ci-escape-timing
docs/normalized-terminal-geometry-1450
release/6.3.0
archive/release-6.3.0-pr1381
release/6.2.0
fix/electron-preload-dynamic-override
fix/javascript-self-referential-bundler-edges
release/6.1.0
cursor/grok-client-cherry-pick-0b56
feat/signature-posture
feat/dyld-shared-cache
feat/artifact-integrity-policy
feat/pkg-inventory
release/6.0.0
chore/sync-release-5.0.0
release/5.0.0
cursor/cloud-agent-node-787e
fix/javascript-xhr-open-endpoints
review/pr-711-realpath-fallback-wording
cleanup/replay-confinement
codex/test-suite-performance
codex/issue-foundations
codex/address-open-issues-2026-07-20
agent/javascript-vite-rollup-esbuild-adapters
agent/process-cleanup
agent/triage-integration
agent/unknown-commands-registry
feat/mcp-identity-metadata
morlvps/issue_cleanup
codex/installer-redesign
morl/roadmap-investigation-core
morl/roadmap-investigation-docs
release-please--branches--main--components--rea
rea-agents-6.8.0
rea-agents-6.7.0
rea-agents-6.6.0
experiment/atomic-codemode-wait-runtime-20261016
rea-agents-6.5.0
rea-agents-6.4.0
rea-agents-6.3.0
rea-agents-6.2.0
rea-agents-6.1.0
rea-agents-6.0.0
rea-agents-5.0.0
rea-agents-4.1.0
rea-agents-4.0.1
rea-agents-4.0.0
rea-agents-3.2.1
rea-agents-3.2.0
rea-agents-3.1.0
rea-agents-3.0.0
rea-agents-2.7.0
rea-agents-2.6.0
rea-agents-2.5.1
rea-agents-2.5.0
rea-agents-2.4.0
rea-agents-2.3.0
rea-agents-2.2.0
rea-agents-2.1.0
rea-agents-2.0.0
rea-agents-1.7.0
rea-agents-1.6.0
rea-agents-1.5.0
rea-agents-1.4.0
rea-agents-1.3.0
rea-agents-1.2.0
rea-agents-1.1.0
rea-agents-1.0.0
rea-agents-0.5.0
rea-agents-0.4.0
rea-agents-0.3.0
rea-0.2.1
rea-0.2.0
Labels
Clear labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
Mirrored from GitHub Pull Request
question
roadmap
triage
No labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
question
roadmap
triage
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
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#5816
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/morluto/rea/pull/3550
Author: @Antruly
Created: 10/14/2026
Status: ❌ Closed
Base:
main← Head:fix/js-parent-budget-remediation-invariant📝 Commits (8)
170a3effix(javascript): advise the parent result budget after a static checkpoint5ea5a67fix(javascript): give the parent budget remediation one owner9e73670test(javascript): drive the static-checkpoint parent budget through the CLIf200310test(javascript): keep the trigger fixture inside the worker's fact budget5dfa560Merge remote-tracking branch 'origin/main' into fix/js-parent-budget-remediation-invariantb6abd86Merge remote-tracking branch 'origin/main' into fix/js-parent-budget-remediation-invariant5406eccMerge remote-tracking branch 'origin/main' into fix/js-parent-budget-remediation-invariant7cde632Merge remote-tracking branch 'origin/main' into fix/js-parent-budget-remediation-invariant📊 Changes
5 files changed (+155 additions, -17 deletions)
View changed files
📝
src/domain/analysisErrorPresentation.ts(+23 -13)📝
src/domain/analysisErrorProjection.test.ts(+61 -0)📝
src/domain/javascript/javascriptAnalysisResourceControls.ts(+10 -0)📝
src/javascript/analysis/JavaScriptAnalysisWorker.ts(+6 -4)➕
tests/acceptance/applications/javascriptStaticCheckpointBudgetCli.test.ts(+55 -0)📄 Description
Summary
analyze_javascript_applicationstops the remaining sources when the parentresult budget is exhausted while retaining a static checkpoint. That error told
the user to "Retry with sufficient memory", which cannot help, because the limit
belongs to the parent result budget. Fixes #3538.
Problem and expected behavior
JavaScriptAnalysisWorkerraised thisAnalysisResourceConstraintErrorwithparent_result_budget_exhausted: truebut without aremediationAction, soanalysisErrorPresentationfell back to the generic memory advice. Its threesibling parent-budget paths (module facts, semantic graph, expanded application
relationships) already state the opposite: the limit belongs to the parent
result budget and a larger worker heap does not raise it.
Reported (base revision):
After this change:
Consolidation with #3545
Draft #3545, opened by the reporter, changes the same worker error to the same
sentence. That overlap is real, and it is not surprising: #3538 quotes the
sibling remediation verbatim as the expected text, so there is essentially one
sentence that satisfies the request, and any fix converges on it. This PR began
from the same issue and landed on the same line independently.
morluto compared both against main at
fc712b3and asked for the two sets ofprotection to be consolidated before either PR is retired: this PR's shared
remediation owner and presentation fallback, and #3545's constrained-heap public
CLI trigger.
9e73670takes that trigger into this branch, so this PR nowcarries both, and #3545 can close once it does.
The test comes from #3545 (
b2aa24d), the file being the only thing thatcommit needed from it. Rinkia ran it against
5ea5a676before it landed hereand reported it passing. #3538 stays open until this fix is delivered.
greptile then reviewed
9e73670and found the fixture itself at fault, whichit was;
f200310reduces it so that the parent result budget is the only limitthe test exercises. See Review follow-up for the measurements.
I kept the worker line rather than delete it, because the throw site is where the
inconsistency with its three sibling paths is visible, and it is the line a
future reader goes looking for. The fallback below is not an exact substitute:
it composes the same clause, but its leading sentence says "the retained facts",
because a producer that states nothing has not said the facts are static, so
deleting the worker line would lose that word. An earlier draft of this paragraph
claimed the two were equivalent; see Review follow-up.
What this PR adds beyond the sentence is the second question: where the guarantee
should live so that the next producer of this flag cannot make the same mistake.
Change and scope
src/javascript/analysis/JavaScriptAnalysisWorker.ts: pass{ remediationAction }to the static-checkpoint parent-budget error. Theclause stating the invariant now comes from a shared constant; the leading
sentence stays at the site, because what was retained differs per path.
src/domain/javascript/javascriptAnalysisResourceControls.ts: own that clauseas
JAVASCRIPT_PARENT_RESULT_BUDGET_REMEDIATION. Two sibling paths in theworker already stated the clause verbatim, and this PR was about to add a third
at the throw site plus a fourth in the fallback, of a sentence that must not
drift; the four now compose one string, and no user-visible text changes. A
fifth path states the same fact inside a sentence of its own.
src/domain/analysisErrorPresentation.ts: when amemoryresourceconstraint reports
parent_result_budget_exhausted: trueand carries noexplicit remediation, return the parent budget remediation instead of the
generic memory advice. An explicit
remediationActionstill takesprecedence; a constraint of another kind keeps the advice for its own resource,
because the clause names the worker heap and does not describe those limits;
genuine worker-heap limits keep the existing memory advice.
src/domain/analysisErrorProjection.test.ts: four deterministic unit tests(see evidence below). They construct the error directly, so they need no heap
window and no worker process.
tests/acceptance/applications/javascriptStaticCheckpointBudgetCli.test.ts:the end-to-end trigger, taken from #3545. It drives the public CLI under a
256 MiB parent heap and asserts that the run reports
parent_result_budget_exhaustedwith the parent budget remediation. The firstsource is 5,000 lines rather than 30,000, so that the worker's own
complete-fact budget is not also in play; see Review follow-up.
Why the fallback sits in presentation selection
#3538 asks, optionally, for a test asserting that every error reporting
parent_result_budget_exhausted: truecarries a parent-budget remediation, sothat new paths cannot regress to the generic memory advice. I did not manage to
write that test against the throw site. Reaching it needs a parent heap window
and an owned worker process, so an acceptance test can only cover the one path
it drives, and a unit test cannot construct that state at all — it would only
restate the one string.
Where the wrong advice is actually chosen is narrower and easier to pin:
analysisErrorRemediationActionsees amemoryconstraint with no explicitremediation and falls through to the generic branch. Making the flag the worker
already reports an input to that decision turns the invariant into something a
plain object can check, and it holds for memory producers that have not been
written yet. A constraint of another kind is not described by that clause, so
the flag does not redirect it; see Review follow-up.
For this one path the worker line and the fallback are therefore redundant with
each other. I kept both because the explicit line states the intent where the
error is built, and the fallback keeps the invariant true where a producer does
not state it. That is a preference, not a requirement, and I am happy to be
told otherwise.
Review follow-up
rahul05ranjan reviewed
170a3efand raised two non-blocking nits. Both werechecked against the code and hold, so
5ea5a67addresses them.byte-identical copies on main rather than one, and this PR was adding a third
and a fourth: the root cause is that one user-visible sentence had no owner,
which is the same question this PR asks about the invariant. The structural fix
is the shared constant, composed at all four sites; each site keeps its own
leading sentence, so nothing the caller sees changes.
memory. Confirmed: a constraint of anotherkind reporting the flag was answered with advice about the worker heap. The
clause names the worker heap, so its applicability is the memory constraint;
the fallback now requires that kind, and a constraint of another kind keeps the
advice for its own resource rather than being aligned with a limit the clause
does not describe. A test pins that path
(
keeps a constraint's own advice when another resource reports the flag),and it passes on
origin/maintoo, so it pins the scoping rather than thefix.
greptile re-reviewed
5ea5a67at a 5/5 confidence score with no inlinefindings, then reviewed
9e73670and raised one P1 against the new fixture.It holds, and
f200310addresses it: greptile re-reviewedf200310at 5/5 withno new findings, and resolved its inline thread. It reviewed the merged head
5dfa560at 5/5 as well, with no inline findings.Fixture exceeds the checkpoint limit (greptile, P1 on
9e73670). Confirmed,and it measures exactly: the 30,000-line first source's complete static facts
are 9,824,883 bytes against the worker's 8 MiB complete-fact budget, so
JavaScriptAnalysisWorkerServerraises a transport constraint before writingthe checkpoint, and the parent never retains that source's facts. A 4096 MiB
parent heap shows the outcome plainly: the run completes with one finding and
a per-file observation failure for
a-large.mjscarryingresource: "transport"and "JavaScript static checkpoint exceeds itscomplete-fact byte budget".
Two details differ from the finding as written, and the second is worse than
the finding says. The test does not fail while parsing: the transport failure
is recorded per file, the analysis continues, and the run's final error is
still the flagged parent-capacity error, which is why the file passed here.
What is worse is that the over-limit checkpoint was load-bearing for the
assertion. With a first source inside the budget, the same 256 MiB heap stops
the run on
a-large.mjs— measured, not inferred — so the original fixturepassed only because the transport limit removed the first source from the
parent. That is two limits in one test, asserting the parent result budget.
f200310reduces the first source to 5,000 lines, whose complete static factsare 1,613,878 bytes, 19% of the budget, and asserts the source the message
names now. The parent result budget is the only limit left in the test, and
the constrained-heap trigger #3545 supplied is otherwise kept.
Remaining duplication: the expanded-application-relationships path states
increasing the worker heap alone does not increase itinside a sentence of itsown (
JavaScriptAnalysisWorker, when returning complete static facts for a filenode). It is not byte-identical to the clause, and making it compose the constant
would change that path's user-visible text, so I left it in place. Its wording
can still drift from the constant, and that is the one copy worth a follow-up if
a maintainer wants it folded in.
Intentionally not included: budget sizing, ordering app-owned sources before
node_modules, partial-observation payload size, and--source-pathhints inthe remediation text (all context-only in #3538).
Follow the contribution scope.
Scope decision: not applicable (ordinary fix of user-facing remediation within
existing boundaries).
Branch update
The head was 204 commits behind
main, so the tree under review was not theone a merge would produce.
5dfa560mergesmain@663d07f02into thebranch. Added and removed lines in the PR diff are unchanged by it — the same
five files, the same 155 additions and 17 deletions — and the commits greptile
reviewed stay in history, so the tree a reviewer checks out is the tree that was
measured. Both reproductions were repeated on it; see Validation performed.
GitHub Actions has now run on this revision. Until 2026-10-15 20:42 UTC the
workflow run was held at
completed / action_required, where GitHub parks runsof fork PRs until a maintainer approves them; once approved it executed to
completion and every selected lane passed (run
38795669711):
Classify changes,Static checks,Docs Generation,Build package,Source tests,Build bundled Windows x64 native controls, all fiveTest shardjobs,binary_layout,recorded_crash,javascript_recovery,web_network, the foursqlite-runtimeversions,Native package baseline (linux x64),Portable tests, andCI required.The lanes that were not selected for this change (
nativeaot,website,ghidra_bridge,evm,browser,web_runtime,web_source_map,Real Apple artifact CLI/MCP E2E,Reconstruction readiness,Source-built conformance fixtures,Reverse tools quality,Windows capability and package lane) were skipped by change classification,as on
main.Branch updates while awaiting review (
b6abd867,5406eccf)mainmoved to1b56237c, and the branch became unmergeable again(
mergeable_state: dirty). One file conflicted,src/domain/analysisErrorPresentation.ts, and in one hunk: this branchrestructures the
AnalysisResourceConstraintErrorbranch ofanalysisErrorRemediationActionto return an explicitremediationActionand to add the exhausted-parent-budget clause, while
mainappended its newAnalysisTimeoutErrorhandling directly after that same branch. The twochanges are independent, so the resolution keeps this branch's block and
appends
main's; nothing was adjudicated.b6abd867is that merge.The resolution is checkable rather than asserted: against
origin/main, themerged file's added and removed lines are identical to this branch's own
additions and removals against its merge base, so neither side lost a change.
The PR diff is still the same five files at the same 155 additions and 17
deletions as before the merge.
mainalso changed the error algebra this branch sits on, without conflicting:AnalysisResourceConstraintErrorgained an optionalretryableoption, theprojection's retryability rule became
error.retryable ?? error.resource === "capacity", andanalysisErrorBasegained cleanup-attribution ownership. Theparent-budget constraint is
resource: "memory", so it stays non-retryableunder the new rule, the new option is optional, so this branch's constructions
and assertions are unaffected, and
maindid not touch remediation selectionfor resource constraints.
mainthen landed a themed run of error-algebra and cleanup-ownership commits(roughly one every five minutes), so the branch went unmergeable again. Waiting
for it to settle produced
5406eccf, which mergesmain@150e996a. The onlyconflict was again
analysisErrorPresentation.ts, and again only textual: thisbranch adds its remediation-clause import where
mainrewrote theanalysisErrorBaseimport to bring inresolvedAnalysisError. Both are kept.main's function-body change in that file merged automatically:analysisErrorRemediationAction,analysisErrorCategory, andanalysisErrorUserMessagenow start by resolving the error. The parent-budgetclause reads the resolved error, which is the same view the other presentation
functions got, and the focused runs below exercise that path.
The same check holds for
5406eccf: againstorigin/main, the merged file'sadded and removed lines match this branch's own additions and removals against
its merge base, and the PR diff is unchanged at five files, 155 additions and
17 deletions.
Contract and boundary impact
JavaScriptAnalysisWorkererrorconstruction;
analysisErrorPresentationremediation selection.fix for #3538.
remediation.actiontext changes, for this one error path.
category, message and
reported_limitsare unchanged, so the partialobservation and its Evidence are unaffected.
applicable.
docs/public/product-catalog.json), package, orinstallation impact: none.
Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
src/domain/analysisErrorProjection.test.ts—advises the parent result budget when it is exhausted,keeps an explicit remediation when the parent budget is exhausted,keeps the worker memory advice without parent exhaustion,keeps a constraint's own advice when another resource reports the flag; andtests/acceptance/applications/javascriptStaticCheckpointBudgetCli.test.ts—explains parent budget exhaustion after a static checkpoint, taken from#3545 with the first source reduced to 5,000 lines.
each fixture's
a-large.mjsfacts: 9,824,883 bytes for 30,000 lines (117% ofthe 8 MiB limit, so no checkpoint is written and the source fails as
resource: "transport"), and 1,613,878 bytes for 5,000 lines (19%).origin/main@1438422dfand the new tests kept,npx vitest run src/domain/analysisErrorProjection.test.tsfails exactly one test —advises the parent result budget when it is exhausted, withexpected 'Review the reported worker memory lim…' to contain 'parent result budget'. That is the string reported in #3538. The three companion tests passon the base revision, so they are not restating the fix: one pins explicit
remediationActionprecedence, one keeps the generic memory advice for limits alarger worker heap really does raise, and one keeps a non-memory constraint's
own advice when it reports the flag.
origin/main,npm run test:focused -- tests/acceptance/applications/javascriptStaticCheckpointBudgetCli.test.tsreaches the path through the real CLI and fails the same way,
expected 'Review the reported worker memory lim…' to contain 'parent result budget'. So the flag, the message, and the reported limits were already righton main; the remediation was the only thing wrong, which is the conclusion the
unit-level reproduction reaches as well.
heap-derived result budget, not the fixture's size. Measured on Linux x64 /
Node 24.21.0, with either fixture: a 192 MiB or 384 MiB parent heap completes
the run, and 224, 256, 288 and 320 MiB stop it on the parent result budget.
256 MiB sits inside that window, and the test is skipped on Bun as its sibling
is. No other platform was run, so the window's width elsewhere is unmeasured;
the finding that led to
f200310was found by reading the fixture rather thanby a failure, and the window is the part of this test most likely to need
adjustment if another platform disagrees. Everything below was verified on
Linux x64 / Node 24.21.0 only.
For evidence-bearing changes:
Validation performed
npx vitest run src/domain/analysisErrorProjection.test.ts— 57 passed.npx vitest run src/domain/analysisErrorProjection.test.tswith both changedsource files restored to
origin/main— 1 failed (the invariant test), 56passed; the failure is the reported
Review the reported worker memory lim…advice.
npx vitest run --project domain— 184 files passed, 3032 passed, 3 skipped.npm run test:focused -- tests/acceptance/applications/javascriptCheckpointReserveCli.test.ts— 3 passed, driving the sibling parent-budget path through the real CLI under a
448 MiB and a 640 MiB parent heap and asserting that the remediation names the
parent result budget. That is also what shows the shared clause still reaches a
real caller.
npm run test:focused -- tests/acceptance/applications/javascriptStaticCheckpointBudgetCli.test.ts— 1 passed (3.0 s), driving the static-checkpoint parent budget through the real
CLI under a 256 MiB parent heap.
the same command with the two changed source files restored to
origin/main— 1 failed, on
expected 'Review the reported worker memory lim…' to contain 'parent result budget', with the message assertion naminga-large.mjspassing, so the run reaches the parent result budget and not the transport
limit.
the fixture under a 4096 MiB parent heap, before and after the reduction — the
reduced fixture completes with both checkpoints transferred, so no
complete-fact budget is reached.
the fixture under 192, 224, 256, 288, 320 and 384 MiB parent heaps — 192 and
384 complete; the rest stop on the parent result budget naming the first
source.
after merging
main@663d07f02(5dfa560), on a tree rebuilt withnpm ciandnpm run build:cached:npm run test:focused -- src/domain/analysisErrorProjection.test.ts tests/acceptance/applications/javascriptStaticCheckpointBudgetCli.test.ts—59 passed (58 unit, 1 CLI at 2.6 s).
the same command with the three changed source files restored to the merged
origin/main— 2 failed, 57 passed: the unit invariant case and the CLI case,both on the reported
Review the reported worker memory lim…advice. The unitfile holds one more case than the independent reproduction in this thread saw
(58 against 57), because
mainadded a browser-budget case to it in57a23f0.after the merge:
npm run check:fast— exit 0 (typecheck, lint), andnpx oxfmt --checkon the five changed files — clean.npx tsc --noEmit— exit 0.npx oxfmt --check .— all files use the correct format.npm run lint— exit 0, module boundaries checked in 1885 source files,including the new
domain/analysisErrorPresentation→domain/javascript/javascriptAnalysisResourceControlsdependency.after merging
main@1b56237c(b6abd867), with the conflict aboveresolved:
npm run build:cached— 3 successful;npm run check:fast— 2successful (typecheck, lint);
npx oxfmt --check .— clean over 3814 files;npm run docs:check— passed;turbo run lint:built knip— 4 successful.npm run test:focused -- src/domain/analysisErrorProjection.test.ts src/domain/providerCleanupError.test.tsonb6abd867— 63 passed (58 in theprojection file, including the four parent-budget cases this branch adds, plus
the 5 cleanup-attribution cases
mainadds).npm run test:focused -- tests/acceptance/applications/javascriptStaticCheckpointBudgetCli.test.tsonb6abd867— 1 passed (3.0 s).after merging
main@150e996a(5406eccf), with the import conflictabove resolved:
npm run build:cached— 3 successful;npm run check:fast—2 successful (typecheck, lint);
npx oxfmt --check .— clean over 3836 files;npm run docs:check— passed;turbo run lint:built knip— 4 successful; thetwo focused runs above repeated on that revision — 63 and 1 passed.
not run on
b6abd867or5406eccf:npm run check:pr(the fulltest:run, python tests,jscpd,scan:todos) and real-providerverification. Local Node was 24.21.0 against the pinned 24.18.0.
Compatibility, safety, and release
analysis only, Linux x64. No provider, process, or native path is touched.
one error's remediation plus the fallback that selects it; no new process,
file, or network behavior. No secrets in the diff.
Author readiness
Human owner: @Antruly
Before merge
type(scope): outcome.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.