Repository navigation
feat(limits)!: register producer.output_bytes as the session default for bounded producer output - #14648
Conversation
…or bounded producer output inspect_packet_capture, decode_signal_recording and inspect_signal_decoders share BOUNDED_PRODUCER_LIMITS, and an agent decoding several large captures or recordings raised producer_limits.output_bytes on every call. The registered setting producer.output_bytes (seed REA_PRODUCER_OUTPUT_BYTES, default 4 MiB) now supplies the omitted field. A per-call value wins, then the runtime override, then the seed, then the default. An output refusal reports the setting's limit with its parameter and source, so the generated recovery names both routes.
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] No new blocking issue was found; these exact changes are already present on local SummaryAdds
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Producer call] --> B{Explicit output budget?}
B -- Yes --> F[Use request value]
B -- No --> C{Runtime override?}
C -- Yes --> G[Use runtime value]
C -- No --> D{Launch seed?}
D -- Valid --> H[Use launch value]
D -- Absent --> I[Use 4 MiB default]
D -- Invalid --> J[Retry retained cleanup, then refuse]
F --> K[Collect output under selected budget]
G --> K
H --> K
I --> K
K --> L{Budget exceeded?}
L -- Yes --> M[Report control, source and recovery]
L -- No --> N[Parse and report effective limits]
Reviews (7) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile |
…eanup, forward it through setup, and cover the seed
…ut_bytes relatedProviders
The session setting and per-call field are already on details.limit. The refusal carries the same control, setting, and source.
|
@greptileai please review the current head |
Summary
Part of #14237. This registers one session-adjustable default for the producer-output limit family: the analysis setting
producer.output_bytes, launch seedREA_PRODUCER_OUTPUT_BYTES, changeable withupdate_analysis_settings. It supplies the omittedproducer_limits.output_bytesfor the producers that shareBOUNDED_PRODUCER_LIMITS:inspect_packet_capture,decode_signal_recordingandinspect_signal_decoders.Why one setting, and why these operations
The cost. Every setting ID is enumerated in
update_analysis_settings' advertised schema, so each new setting costs tokens in every session. This PR adds exactly one.Why it is worth it. An agent decoding a series of large captures or recordings hits the same 4 MiB output budget each time. Without a session default it must repeat
producer_limits.output_byteson every call.Why only these operations. They form one family in code. They share
BOUNDED_PRODUCER_LIMITS, retain plain producer text, and have the same 4 MiB default and1..MAX_SAFE_INTEGERrange, so one setting limit reports their bounds correctly.Deliberately excluded:
inspect_packet_fieldshas a 32 MiB glossary default; a session value would silently lower it.inspect_pcap_capturehas an 8 MiB default and a 128 MiB maximum.Folding any of these in would need per-operation defaults, which one setting limit cannot report.
No
capture.*reuse. The existingcapture.*settings are a different family: web-capture decoder heap and TShark JSON expansion.No
diagnostic_bytessetting. Only pwntools and EVM offer that field, and neither is a plausible repeated session raise.Behavior
producer_limits.output_byteswins, then the runtime override, thenREA_PRODUCER_OUTPUT_BYTES, then the 4 MiB default. The result'slimits.output_bytesreports the value in force.REA_PRODUCER_OUTPUT_BYTESis a configuration refusal; it is not replaced by the default.setting,parameter: "producer_limits.output_bytes",source, andupdate_modeofruntime, orparameterfor a request value).update_analysis_settingsfor this session, or the launch variable on the CLI.required_value: the capture stops at the budget, so the need is not measured.ArtifactAnalysisResources.commandContextnow takes the output control from its caller instead of building a parameter limit itself. Its duplicated recovery prose is removed, matching fix(limits)!: let apktool and assetutil take producer_limits.output_bytes and type Android and process capture refusals #14624.Evidence and regression coverage
tests/boundary/signals/recordingProvider.test.ts:source: "default". Its recovery names bothproducer_limits.output_bytesandproducer.output_bytes.source: "runtime", and an 8 MiB override admits the same 5 MiB output.source: "request"andupdate_mode: "parameter".src/application/AnalysisSettings.test.tspasses with the new setting.Validation performed
The machine was under heavy load, so per the coordinator I ran one targeted file at a time. CI runs typecheck, full lint and the broad suites.
AnalysisSettings.test.ts: passednpm run build:cached(src compile): cleannpm run verify:advertised-schemas -- --update-summary:inspect_analysis_settingsandupdate_analysis_settingssummaries updatednpm run docs:check,node scripts/verify/architecture-guards.mjs,node scripts/verify/rea-numeric-limits.mjs: passedDocs
docs/reference/limits-and-recovery.md: new "Session default for producer output" section with the setting ID, the seed, anupdate_analysis_settingsexample, the precedence, and the excluded operation.docs/reference/rea-limit-inventory.md: new row.Compatibility
Breaking: refusals at this budget now report a setting limit (with
parameterandsource) indetails.limitin place of a bare parameter limit. Admission behavior is unchanged when the setting and its seed are unset.