Skip to content

feat(artifacts)!: give Deno, wxapkg and tar readers artifact_limits controls - #14620

Merged
morluto merged 2 commits into
mainfrom
feat/artifact-limits-deno-wxapkg-tar
Nov 26, 2026
Merged

morluto merged 2 commits into
mainfrom
feat/artifact-limits-deno-wxapkg-tar

Conversation

@morluto

@morluto morluto commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

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_limits fields, defaulting to today's values, and each refusal reports details.reader_limit naming the field, effective value, range and (where measured) required value. audit_release_exposure max_file_bytes is no longer capped at its default and reports details.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_bytes now also applies to Deno and wxapkg; their plaintext-work refusals were untyped prose and now report reader_limit.
  • Path registry (src/resources/ArtifactPaths.ts): a budgeted registry now names its owning group (bun, dotnet_bundle, deno) and always refuses through that group's path_parts/path_nodes. The fixed "artifact path depth/tree allowance" fallback (only Deno used it) and the per-reader limitFailure callbacks are removed.
  • audit_release_exposure max_file_bytes: default stays 256 MiB; maximum is now Number.MAX_SAFE_INTEGER (reads are held in memory, so host heap is an independent constraint, the same reasoning as max_native_index_bytes). The refusal carries an AnalysisParameterLimit built from RELEASE_EXPOSURE_FILE_BYTES, the same bounds object the schema uses.
  • artifactReaderLimitMaximum now 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 declares measuredExhaustion.

Registry and baseline

Ceiling Outcome
Deno retained metadata, section byte allowances, table records, VFS entries, VFS retained names control (artifact_limits.deno.*)
wxapkg member table, directory representation control (artifact_limits.wxapkg.*)
tar extended header, member metadata control (artifact_limits.tar.*)
artifact path depth / tree control (owning group's path_parts / path_nodes)
release exposure input control (max_file_bytes, details.limit)
Deno VFS depth (512) representation: bounds walkEntries recursion so a nested VFS JSON cannot exhaust the call stack
wxapkg directory-and-chunk I/O derived: 4x (member count + 64 KiB chunks of declared bytes), which expanded_bytes bounds

Pending 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 a Budget charge and report no required value; release exposure's file-size refusal does not yet carry the observed size.

Contract impact

  • BREAKING: artifactReaderLimitsSchema requires the three new groups, so saved Evidence whose effective_limits predates them fails validation and must be re-inspected (same as the ISO 9660 group). A release-exposure refusal at max_file_bytes no longer reports a fixed_ceiling refusal.
  • Advertised schema summaries for inspect_artifact, extract_artifact and audit_release_exposure are 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 at wxapkg.table_bytes, then the raised value admits the table.
  • tests/acceptance/releaseExposureCli.test.ts: CLI refusal names max_file_bytes with its range; a raised value completes.
  • Unit tests for Deno section/VFS, tar and wxapkg assert readerLimit; the Deno retained-units and tar global-pax tests now use small selected limits instead of building tens of MiB.
  • npm run test:focused on 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.
  • No real-provider coverage is involved; these are offline readers.

…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.
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-26T02:02:14.135353Z
We couldn’t complete this review. Comment @codex review to try again.
d1b91ad PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@greptile-apps

greptile-apps Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; both earlier findings are addressed and no new blocking issue was found.RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The PR appears safe to merge; both earlier findings are addressed and no new blocking issue was found.

Summary

Adds per-call artifact_limits controls for Deno, wxapkg, and tar readers, with structured refusal details. It also raises the supported max_file_bytes range for release-exposure audits.

  • Deno compile readers let callers raise their per-call admission limits.
  • wxapkg readers let callers raise the member-table and directory limits.
  • Tar readers let callers raise extended-header and metadata limits.
  • Release-exposure audits let callers raise the file-read limit.
  • Shared reader-limit schemas report the range callers can select.

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]
Loading

Reviews (2) · Last reviewed commit: "fix(artifacts): keep Deno indexed paths ..." · Reviewed by Greptile

Comment thread src/artifacts/deno/DenoVirtualFs.ts Resolved
…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.
@morluto
morluto merged commit 3dae567 into main Nov 26, 2026
44 checks passed
@morluto
morluto deleted the feat/artifact-limits-deno-wxapkg-tar branch November 26, 2026 02:35
@morluto morluto added area: evidence Evidence, artifacts, and reconstruction enhancement New feature or request labels Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: evidence Evidence, artifacts, and reconstruction enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant