Skip to content

feat(metadata)!: give NTFS, Maven report and NuGet budgets typed per-call controls - #14629

Merged
morluto merged 2 commits into
mainfrom
feat/nuget-java-ntfs-limits
Nov 26, 2026
Merged

morluto merged 2 commits into
mainfrom
feat/nuget-java-ntfs-limits

Conversation

@morluto

@morluto morluto commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Summary

Part of #14236 and #14234. Gives the NTFS journal acquisition and the Maven/Gradle report allowances per-call controls, makes NuGet and Maven file-budget refusals report details.limit, and reclassifies the Ghidra installation-properties read.

Behavior change

  • inspect_ntfs_journal max_file_bytes (new; default 64 MiB, maximum safe integer; CLI --max-file-bytes): bounds each of the MFT and journal acquisitions read into memory. NTFS_JOURNAL_FILE_BYTES is now the bounds object the schema and ntfsJournalFileBytesLimit share. The service's retained acquisition cache is re-admitted under each call's budget, so lowering max_file_bytes refuses a larger cached read instead of silently reusing it (the documented rule that lowered admission must refuse cached state).
  • inspect_maven_gradle_metadata report_limits (new; CLI --report-limits JSON): dependency_rows (65,536), variants (4,096), exclusions (65,536), unresolved_records (65,536), xml_nodes (1,048,576), repeated_variant_name_chars (4,194,304), each up to 2^31-1. MAVEN_GRADLE_REPORT_LIMIT_BOUNDS replaces the six MAVEN_GRADLE_METADATA_* constants and the provider's per-allowance subject/unit table; the parser takes the resolved limits, and the duplicate MavenGradleReportAllowance union is replaced by the domain's field type.
  • Maven max_file_bytes and NuGet max_file_bytes / max_entries / max_nuspec_bytes refusals now carry details.limit built from MAVEN_GRADLE_FILE_BYTES and NUGET_NUPKG_BUDGETS, the same objects the schemas use (NUGET_NUPKG_LIMIT_MAXIMA is removed).

Registry and baseline

Ceiling Outcome
NTFS journal file control (max_file_bytes)
Maven/Gradle report allowances control (report_limits.*)
Ghidra installation-properties read (1 MiB) protocol: reads Ghidra's own application.properties, a short key=value installation descriptor of the bring-your-own provider; no analysis input passes through it

Pending ceilings on this base: 80 -> 77 (#14236: 28 -> 25). Authored-only refusals: 103 -> 101 (MavenGradleMetadataProvider, NugetNupkgProvider).

Measured values for required_value once the foundation change lands: every Maven report refusal already carries required in reported_limits; NuGet entry and nuspec refusals carry the parse-limit maximum only; NTFS knows the retained acquisition size.

Contract impact

  • BREAKING: NTFS and Maven report refusals report details.limit instead of a fixed_ceiling refusal; inspect_ntfs_journal and inspect_maven_gradle_metadata gain optional inputs (advertised schema summaries updated).

Validation

  • tests/boundary/mcp/ntfsJournal.test.ts: CLI refusal at max_file_bytes with the full details.limit; over MCP, an admitted call, then a lowered call refused on the retained acquisition, then a raised call admitted.
  • tests/acceptance/nugetNupkgCli.test.ts: CLI refusal at max_entries with the full details.limit, then the default admits the same package.
  • src/java/MavenGradleMetadataParser.test.ts: report_limits.variants and repeated_variant_name_chars refusals report details.limit, and the raised value reports the same document. tests/boundary/filesystem/mavenGradleMetadata.test.ts: max_file_bytes limit.
  • npm run test:focused on 13 files (176 tests), oxfmt --check ., lint report, architecture guards, fixed-ceilings.mjs, docs:check, tsc --noEmit.

…call controls

inspect_ntfs_journal refused acquisitions above a fixed 64 MiB allowance;
it now takes max_file_bytes (default 64 MiB) and re-admits a retained
acquisition under the call's budget, so lowering it cannot reuse a larger
cached read. inspect_maven_gradle_metadata refused at six fixed report
allowances; they are now report_limits fields (CLI --report-limits JSON)
with today's values as defaults. Maven max_file_bytes and NuGet
max_file_bytes, max_entries and max_nuspec_bytes refusals now report
details.limit from the same bounds objects the schemas use.

The Ghidra installation-properties read allowance is registered as a
protocol bound: it reads the provider's own short installation
descriptor, not analysis input.

BREAKING CHANGE: NTFS and Maven report refusals report details.limit
instead of a fixed_ceiling refusal, and parseMavenGradleMetadata and the
inspect_ntfs_journal input contract gain the new controls.
@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:34:56.799928Z
We couldn’t complete this review. Comment @codex review to try again.
2eab743 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 reviewed changes appear safe to merge, with all four previous findings addressed.RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The reviewed changes appear safe to merge, with all four previous findings addressed.

Summary

This PR adds per-call NTFS and Maven/Gradle report controls and structured budget details for Maven and NuGet refusals.

  • NTFS callers can set a byte budget for each acquisition.
  • Maven and Gradle callers can set limits on report expansion.
  • NuGet refusals name the budget that stopped package inspection.
  • The Ghidra properties read is now classed as a protocol limit.

Reviews (2) · Last reviewed commit: "fix(metadata): keep omitted NTFS budgets..." · Reviewed by Greptile

Comment thread src/domain/windows/ntfsJournalQuery.ts Resolved
Comment thread src/java/MavenGradleMetadataProvider.ts Resolved
…ximum recovery

inspect_ntfs_journal recorded the default max_file_bytes as if the caller
had chosen it; the field is now optional and resolved for execution only,
so Evidence keeps omission. A host allocation failure while holding an
admitted acquisition is reported as measured memory exhaustion instead
of generic I/O. A Maven report refusal whose need exceeds the control's
maximum no longer suggests raising it. A public CLI/MCP test covers
report_limits refusal and recovery for a POM.
@morluto
morluto merged commit 4f66985 into main Nov 26, 2026
41 checks passed
@morluto
morluto deleted the feat/nuget-java-ntfs-limits branch November 26, 2026 02:55
@morluto morluto added the enhancement New feature or request label Nov 26, 2026
trism-prism added a commit to trism-prism/rea that referenced this pull request Nov 28, 2026
Rebased onto main; the devicetree and NuGet parts were dropped here (landed via morluto#14622 and morluto#14629). This commit now carries only the pyc part.

Refusals of the per-call budgets on inspect_devicetree, inspect_nuget_nupkg
and inspect_python_pyc carried recovery only in remediation prose. Each
owner now keeps one bounds object that feeds both its input schema and a
structured details.limit (parameter, effective value, unit, range, default).

A pyc limit that depends on max_objects and max_depth together reports
related_parameters instead of a single range. The fixed decoded devicetree
allowance is reported as a fixed ceiling and registered as pending.

Refs morluto#14234
vincentkoc pushed a commit that referenced this pull request Nov 30, 2026
* fix(limits): report details.limit for pyc budget refusals

Rebased onto main; the devicetree and NuGet parts were dropped here (landed via #14622 and #14629). This commit now carries only the pyc part.

Refusals of the per-call budgets on inspect_devicetree, inspect_nuget_nupkg
and inspect_python_pyc carried recovery only in remediation prose. Each
owner now keeps one bounds object that feeds both its input schema and a
structured details.limit (parameter, effective value, unit, range, default).

A pyc limit that depends on max_objects and max_depth together reports
related_parameters instead of a single range. The fixed decoded devicetree
allowance is reported as a fixed ceiling and registered as pending.

Refs #14234

* test(python): expect field-only pyc recovery text and the CLI limit flag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant