Skip to content

fix(limits): omit required_value when PE/native read budgets know only a lower bound - #14645

Merged
morluto merged 1 commit into
mainfrom
fix/read-budget-lower-bound
Nov 26, 2026
Merged

morluto merged 1 commit into
mainfrom
fix/read-budget-lower-bound

Conversation

@morluto

@morluto morluto commented Nov 26, 2026

Copy link
Copy Markdown
Owner

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 as details.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_value promises the smallest admitting value, so the read budget now omits it and keeps the bound in details.reported_limits.required_read_bytes. The generated recovery therefore drops "at least N" for this limit.

Docs: limits-and-recovery.md states that a producer knowing only a lower bound omits required_value; tool-design.md says to set it only for the complete need.

Sibling check: the other required_value producers report complete needs (pcap capture size, WASM path count across both fields, ELF source plus decoded section-name bytes).

Validation

src/resources/artifactReadBudget.test.ts asserts the limit carries no required_value; docs:check; oxfmt. Typecheck/lint left to CI (local machine under load; pushed without the pre-push hook).

…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.
@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-26T03:44:19.060400Z
We couldn’t complete this review. Comment @codex review to try again.
d1e62e2 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.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

The PR stops claiming an exact retry budget when the reader knows only a lower bound.

  • Artifact read refusals show the counted bytes without calling them an exact retry size.

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

@morluto
morluto merged commit 49187f1 into main Nov 26, 2026
41 checks passed
@morluto
morluto deleted the fix/read-budget-lower-bound branch November 26, 2026 04:17
@morluto morluto added area: domain Domain logic, errors, and pure functions bug Something isn't working 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 bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant