Repository navigation
fix(limits): omit required_value when PE/native read budgets know only a lower bound - #14645
Conversation
…y a lower bound The reads counted before a read-budget refusal are a lower bound: later reads depend on structures not yet decoded, so retrying at that value can refuse again. Keep the bound in reported_limits.required_read_bytes and report no required_value, which promises the smallest admitting value.
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. SummaryThe PR stops claiming an exact retry budget when the reader knows only a lower bound.
Checks were limited to source review; tests were not run. GitHub access was unavailable, so whether another PR supersedes this one could not be verified. Reviews (3) · Last reviewed commit: "fix(limits): omit required_value when PE..." · Reviewed by Greptile |
Follow-up to #14625 (Greptile P1 on its final review).
Behavior change
artifactReadBudgetConstraint(PE imports/resources/certificates/load config/unwind ranges, hardening, native exports) reported the reads counted before the refusal asdetails.limit.required_value. That count is only a lower bound: later reads depend on structures not yet decoded (for example a signed PE refused at its header prefix still needs its certificate table), so retrying at that value can refuse again.required_valuepromises the smallest admitting value, so the read budget now omits it and keeps the bound indetails.reported_limits.required_read_bytes. The generated recovery therefore drops "at least N" for this limit.Docs:
limits-and-recovery.mdstates that a producer knowing only a lower bound omitsrequired_value;tool-design.mdsays to set it only for the complete need.Sibling check: the other
required_valueproducers report complete needs (pcap capture size, WASM path count across both fields, ELF source plus decoded section-name bytes).Validation
src/resources/artifactReadBudget.test.tsasserts the limit carries norequired_value;docs:check; oxfmt. Typecheck/lint left to CI (local machine under load; pushed without the pre-push hook).