Repository navigation
fix(artifacts): name the ASAR header admission budget - #6172
Merged
Merged
Conversation
Keep the 16 MiB ASAR header/index ceiling fixed and report that budget, the lack of a runtime override, and that source selection does not bypass header admission. Refs #5910 Co-authored-by: morluto <morluto@users.noreply.github.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
[Medium impact] The PR appears safe to merge; it clarifies recovery without changing the ASAR admission boundary. SummaryNames the existing ASAR header/index allowance without changing its 16 MiB ceiling.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Direct header check] --> C[Named ASAR admission failure]
B[Archive classification] --> C
C --> D[Preserve through cleanup]
D --> E[Artifact operation error]
E --> F[Shared CLI and MCP error fields]
Reviews (1) · Last reviewed commit: "fix(artifacts): name the ASAR header adm..." · Reviewed by Greptile |
2 tasks done
15 of 22 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refs #5910 (parent #5808). ASAR header/index admission stays a fixed 16 MiB / 16777216 byte policy. When that budget fails, the public error names the budget, says this release has no runtime override, and says that selecting fewer sources or narrowing an internal path does not bypass it.
Problem and expected behavior
MAX_ASAR_HEADER_BYTESinsrc/artifacts/AsarHeader.tsrejects a header before the archive index is decoded. The projected limit recovery was "Artifact is too large to process safely. Narrow the requested path or use a smaller artifact." That text does not identify header/index admission, does not say whether the ceiling can change, and suggests path narrowing that cannot skip the prerequisite header read.The ceiling is a fixed implementation admission for this release. No caller argument or configuration setting already controls it. The numeric cap is unchanged.
Change and scope
Header admission failures from direct decode and from archive classification share one recovery. It names ASAR header/index admission, 16 MiB / 16777216 bytes, that this release has no runtime override, why source selection does not bypass the index read, and the supported alternative: analyze an extracted application directory, or supply an archive whose header fits. Raising
max_heap_mbor host memory does not raise it. Repeating the unchanged request fails the same way.Other artifact limit failures keep the existing generic recovery. Electron page resolution still refuses an oversized header as an unauthorized member; that path does not emit this artifact-operation message. The header cache's separate 16 MiB retention across eight archives is unchanged and does not raise admission.
Intentionally not in this PR: MCP response budgets (#6005), process regex (#6099), and browser/native/engine limit slices already merged. No new setting and no ASAR streaming.
Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.
Contract and boundary impact
src/artifacts/AsarHeader.ts; the public message is the CLI/MCP analysis-error projection.inventory_artifact,inspect_artifact, andanalyze_javascript_applicationnow return the named header-admission recovery for this limit.details.admissionisasar-headeranddetails.maximum_header_bytesis 16777216. Tool schemas are unchanged.cleanup_incomplete.docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs andskills/; edit authored instructions in.agents/skills/reverse-engineer-anything/and never commit build outputs): authored skill text only. No package or catalog change.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
tests/boundary/filesystem/asarHeaderAdmission.test.tslocks the recovery wording, the direct 16 MiB boundary, public inventory andanalyze_javascript_applicationprojection, and thatsource_pathsplusmax_heap_mbstill hit the same admission. Unrelated artifact limits keep the generic recovery.admitAsarHeaderand archive classification. The ~532 MB / ~102,600-file archive cited in [Bug] Limit errors omit adjustment controls and leave hard-coded ceilings unexplained #5910 was not re-run.messageandremediation.actionareASAR header/index admission is limited to 16 MiB / 16777216 bytes. This release has no runtime override. Selecting fewer sources or narrowing an internal path does not bypass header admission, because the archive index is read before any member can be selected. Raising max_heap_mb or available host memory does not raise it. Analyze an extracted application directory, which does not admit an ASAR header, or supply an archive whose header fits this allowance. Repeating the unchanged request fails the same way.For evidence-bearing changes:
Validation performed
npm run check:fast— passed (typecheck and lint).npm run test:focused -- tests/boundary/filesystem/asarHeaderAdmission.test.ts src/artifacts/AsarHeader.test.ts tests/boundary/filesystem/artifactInventoryRegularRoot.test.ts— 15 tests passed.npm run test:focused -- tests/boundary/filesystem/asarHeaderAdmission.test.ts src/artifacts/AsarHeader.test.ts src/artifacts/inventory/ArtifactGraphConstruction.test.ts— ArtifactGraphConstruction.test.ts passed (28 tests) before the final admission-test assertion fix; that source did not change afterward.Compatibility, safety, and release
Author readiness
Human owner: @morluto
Before merge
type(scope): outcome.