Skip to content

feat(limits)!: raise disk-backed admission defaults for large ordinary targets - #14653

Merged
morluto merged 2 commits into
mainfrom
feat/raise-disk-backed-admission-defaults
Nov 26, 2026
Merged

morluto merged 2 commits into
mainfrom
feat/raise-disk-backed-admission-defaults

Conversation

@morluto

@morluto morluto commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Refs #14652. The full audit table, with the reasons for each default kept, is on the issue.

Behavior change

This raises four per-call input defaults whose work streams from disk or reads by range. Large but ordinary targets are now admitted without a retry:

Operation Field Old New Why it is safe
inspect_sqlite_database producer_limits.input_bytes 256 MiB 2 GiB Chunked copy into a private on-disk snapshot. node:sqlite reads it by page with mmap_size=0. The worker heap stays 256 MiB.
inspect_go_binary max_input_bytes 256 MiB 2 GiB One streaming hash pass, a header prefix, then range reads and chunked build-info search
inspect_rust_binary producer_limits.input_bytes 256 MiB 2 GiB One streaming hash pass, a header prefix and a windowed rustc scan
inspect_nuget_nupkg max_file_bytes 64 MiB 256 MiB (max 512 MiB) ZIP read by range. Only the directory and .nuspec are retained. Covers nuget.org's 250 MB package ceiling.

Each default still has one owner, its domain constant. The Rust field description, the Rust resource-guard limitation and the NuGet max_file_bytes description used to restate the old values; they now derive them from those constants. Heap-bound allowances (NTFS journal, ASAR header, managed and dispatch snapshots, release exposure, decoded capture JSON), agent-context budgets and tool-capture budgets are unchanged. The reasons are on the issue.

BREAKING CHANGE: callers that relied on the old default refusal must now pass the old value explicitly.

Validation

  • npm run test:focused -- tests/boundary/cli/artifactInputLimits.test.ts: default refusal boundary at 2 GiB + 1 for Go and Rust (sparse files)
  • npm run test:focused -- tests/acceptance/sqliteDatabaseCli.test.ts: combined database and WAL refusal at 2 GiB + 1 through CLI and MCP
  • npm run test:focused -- tests/acceptance/nugetNupkgCli.test.ts, tests/boundary/go/goBinaryProvider.test.ts, tests/boundary/rust/rustBinaryBudget.test.ts, npm run test:local -- src/sqlite/SqliteDatabaseSnapshotLimits.test.ts
  • npm run docs:check, plus oxfmt --check and oxlint on the changed files
  • I did not run the full typecheck or lint locally because the host was heavily loaded. CI runs them, and I pushed with --no-verify so the pre-push check:fast would not run.

Measurements

Peak memory below is the summed RSS of the whole process family, including the SQLite worker. Runs used a warm page cache on a heavily loaded host. Inputs were real small binaries padded to size and a generated SQLite database. "Before" is main with the larger budget passed explicitly; "after" is the new default.

Run Before After
Go, 1.5 GiB 0.94 s, 117 MiB 0.91 s, 117 MiB
Rust, 1.5 GiB 0.97 s, 117 MiB 0.97 s, 117 MiB
NuGet, 240 MiB 0.30 s, 117 MiB 0.30 s, 116 MiB
SQLite, 1.55 GiB, table window 5.4 s, 182 MiB 7.5 s, 173 MiB

Peak memory stays flat from about 200 MiB to 1.5 GiB inputs. The elapsed differences come from host load. Not measured: cold-cache runs, and real binaries with large read-only sections, which would add windowed scan time.

Remaining

No real-provider verification applies: these are offline readers, and the SQLite worker is REA's own.

…y targets

Raise four per-call input defaults whose work streams from disk or reads
by range, so large but ordinary targets are admitted without a retry:

- inspect_sqlite_database producer_limits.input_bytes: 256 MiB -> 2 GiB.
  The database and WAL stream into a private on-disk snapshot that
  node:sqlite reads by page with mmap disabled; the worker heap stays
  256 MiB.
- inspect_go_binary max_input_bytes: 256 MiB -> 2 GiB. One streaming
  hash pass, a header prefix and range reads with chunked build-info
  search.
- inspect_rust_binary producer_limits.input_bytes: 256 MiB -> 2 GiB.
  One streaming hash pass, a header prefix and a windowed rustc scan.
- inspect_nuget_nupkg max_file_bytes: 64 MiB -> 256 MiB, above
  nuget.org's 250 MB package ceiling. The ZIP is read by range; only
  the directory and .nuspec are retained.

Descriptions and remediation text that restated the old Rust and NuGet
values now derive from the owning constants.

BREAKING CHANGE: omitted input budgets for inspect_sqlite_database,
inspect_go_binary, inspect_rust_binary and inspect_nuget_nupkg now admit
larger files. Callers relying on the old default refusal must pass the
old value explicitly.
@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-26T04:21:36.379349Z
We couldn’t complete this review. Comment @codex review to try again.
d1f9320 Draft marked ready
ℹ️ 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 · No blocking issue was found in the latest change.RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] No blocking issue was found in the latest change.

Summary

Raises input defaults to 2 GiB for Go, Rust and SQLite, and 256 MiB for NuGet. Related descriptions and guides reflect those values.

  • Go binary inspection admits files up to 2 GiB by default.
  • Rust binary inspection admits files up to 2 GiB by default.
  • SQLite inspection accepts database and WAL files totaling 2 GiB by default.
  • NuGet package inspection admits files up to 256 MiB by default.

Reviews (2) · Last reviewed commit: "test(nuget): pin the default max_file_by..." · Reviewed by Greptile

Comment thread tests/acceptance/nugetNupkgCli.test.ts Resolved
@morluto
morluto merged commit 30be941 into main Nov 26, 2026
44 checks passed
@morluto
morluto deleted the feat/raise-disk-backed-admission-defaults branch November 26, 2026 04:49
vincentkoc added a commit that referenced this pull request Nov 26, 2026
…o-21113-20261126

* commit 'd63982890e70c55b09704249cde0327537e610f0':
  refactor(views): share default page request fields (#14633)
  test(dotnet): stop expecting required_value for the lower-bound path-depth refusal
  feat(limits)!: raise disk-backed admission defaults for large ordinary targets (#14653)
  feat(artifacts): back archive member counts with the artifact.member_count setting (#14650)

# Conflicts:
#	tests/acceptance/dotnetBundleJourney.test.ts
vincentkoc added a commit that referenced this pull request Nov 26, 2026
…-beta3-20261126

* commit 'd63982890e70c55b09704249cde0327537e610f0':
  refactor(views): share default page request fields (#14633)
  test(dotnet): stop expecting required_value for the lower-bound path-depth refusal
  feat(limits)!: raise disk-backed admission defaults for large ordinary targets (#14653)
  feat(artifacts): back archive member counts with the artifact.member_count setting (#14650)
  build(deps): update Knip to 6.46.1 (#14641)
  fix(native)!: report details.limit for remaining native reader budgets and make BEAM table rows adjustable (#14631)
  perf(ci): omit unused PR associations from timing queries (#14636)
  perf(ci): resolve small pinned test batches directly (#14638)

# Conflicts:
#	tests/acceptance/dotnetBundleJourney.test.ts
@morluto morluto added area: domain Domain logic, errors, and pure functions 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: domain Domain logic, errors, and pure functions enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant