Repository navigation
feat(artifacts)!: give Deno, wxapkg and tar readers artifact_limits controls - #14620
Conversation
…ontrols Deno compile, wxapkg and tar readers refused large ordinary inputs at fixed allowances with no recovery. Their admission budgets are now per-call artifact_limits.deno, .wxapkg and .tar fields with today's values as defaults, and each refusal reports details.reader_limit. artifact_limits.expanded_bytes now also applies to Deno and wxapkg. The shared artifact path registry names its owning group's path_parts and path_nodes controls instead of a fixed fallback. audit_release_exposure max_file_bytes keeps its 256 MiB default but is no longer capped there; its refusal reports details.limit. The Deno VFS recursion depth is registered as a representation bound and the wxapkg member-I/O allowance as derived from expanded_bytes. BREAKING CHANGE: artifactReaderLimitsSchema now requires deno, wxapkg and tar groups, so saved Evidence whose effective_limits predates them fails validation and must be re-inspected. A release-exposure refusal at max_file_bytes reports details.limit instead of a fixed_ceiling refusal.
Codex Review Summary: ❌ FailedThis 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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
[Medium impact] The PR appears safe to merge; both earlier findings are addressed and no new blocking issue was found. SummaryAdds per-call
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[CLI or MCP request] --> B[Validate selected limits]
B --> C[Resolve omitted defaults]
C --> D[Deno, wxapkg, or tar reader]
D --> E{Within selected limits?}
E -->|Yes| F[Continue inspection or extraction]
E -->|No| G[Return reader_limit details]
G --> H[Caller raises the named limit and retries]
Reviews (2) · Last reviewed commit: "fix(artifacts): keep Deno indexed paths ..." · Reviewed by Greptile |
…ounted retained size artifact_limits.deno.path_parts now has a minimum of 2: indexed fallbacks live under a reserved top-level namespace directory, so a one-part selection could only refuse the whole inspection. The retained-bytes refusal no longer reports a required value, because the bounded byte count stops at the allowance and understates it.
Summary
Part of #14236 and #14234. Deno compile, wxapkg and tar readers refused a large but ordinary build or archive at fixed allowances with no recovery inside REA. Those admission budgets are now per-call
artifact_limitsfields, defaulting to today's values, and each refusal reportsdetails.reader_limitnaming the field, effective value, range and (where measured) required value.audit_release_exposuremax_file_bytesis no longer capped at its default and reportsdetails.limit.Behavior change
artifact_limits.deno(new):metadata_json_bytes(8 MiB),vfs_header_json_bytes(32 MiB),table_records(100,000 per specifier/redirect/remote table),specifier_text_bytes(8 MiB),remote_body_bytes(256 MiB),vfs_entries(100,000),vfs_name_units(32 Mi UTF-16 units),retained_bytes(256 MiB),path_parts(256; also the indexed-fallback depth, as for Bun),path_nodes(250,000).artifact_limits.wxapkg(new):table_bytes(16 MiB),directory_bytes(64 MiB).artifact_limits.tar(new):extended_header_bytes(1 MiB),metadata_bytes(64 MiB).artifact_limits.expanded_bytesnow also applies to Deno and wxapkg; their plaintext-work refusals were untyped prose and now reportreader_limit.src/resources/ArtifactPaths.ts): a budgeted registry now names its owning group (bun,dotnet_bundle,deno) and always refuses through that group'spath_parts/path_nodes. The fixed "artifact path depth/tree allowance" fallback (only Deno used it) and the per-readerlimitFailurecallbacks are removed.audit_release_exposuremax_file_bytes: default stays 256 MiB; maximum is nowNumber.MAX_SAFE_INTEGER(reads are held in memory, so host heap is an independent constraint, the same reasoning asmax_native_index_bytes). The refusal carries anAnalysisParameterLimitbuilt fromRELEASE_EXPOSURE_FILE_BYTES, the same bounds object the schema uses.artifactReaderLimitMaximumnow reads each field's maximum from the group schema instead of a hard-coded list of representation-bound parameter names, so the reported range cannot drift from what the next call accepts.inspect_desktop_application's one-at-a-time slot is an occupied admission and now declaresmeasuredExhaustion.Registry and baseline
artifact_limits.deno.*)artifact_limits.wxapkg.*)artifact_limits.tar.*)path_parts/path_nodes)max_file_bytes,details.limit)walkEntriesrecursion so a nested VFS JSON cannot exhaust the call stackexpanded_bytesboundsPending ceilings: 80 -> 66 overall (#14236: 28 -> 14). Authored-only refusals: 103 -> 102.
Measurable
required_value(for the foundation follow-up): every new Deno, wxapkg-table and tar-extended-header refusal already passes the claimed size or count; wxapkg directory and tar metadata refusals come from aBudgetcharge and report no required value; release exposure's file-size refusal does not yet carry the observed size.Contract impact
artifactReaderLimitsSchemarequires the three new groups, so saved Evidence whoseeffective_limitspredates them fails validation and must be re-inspected (same as the ISO 9660 group). A release-exposure refusal atmax_file_bytesno longer reports afixed_ceilingrefusal.inspect_artifact,extract_artifactandaudit_release_exposureare updated.Validation
tests/acceptance/artifactReaderLimitsCli.test.ts: real CLI refusal (details.reader_limit) and recovery of the same Deno, wxapkg and tar artifact with identical occurrences.tests/boundary/mcp/wxapkgMcp.test.ts: compiled MCP refusal atwxapkg.table_bytes, then the raised value admits the table.tests/acceptance/releaseExposureCli.test.ts: CLI refusal namesmax_file_byteswith its range; a raised value completes.readerLimit; the Deno retained-units and tar global-pax tests now use small selected limits instead of building tens of MiB.npm run test:focusedon the 23 affected files (about 880 tests),oxfmt --check .,oxlint,node scripts/verify/architecture-guards.mjs,node scripts/verify/fixed-ceilings.mjs,npm run docs:check,tsc --noEmit.