fix(code-index): preserve deterministic text sizing evidence - #1774
Merged
Merged
Conversation
Text projection collapsed three different failures into BudgetExceeded: a real deadline, an unavailable reservation, and an indivisible batch whose record exceeds a fixed builder bound. The latter two lost their detail, and the background worker retried a deterministic refusal continuously while status could only say a read budget was exceeded. Keep deadline exhaustion as BudgetExceeded, retain reservation detail as unavailable, and project an indivisible batch or source-window overflow as a contract with its required and maximum bytes so convergence parks once and reports the actionable cause.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Live defect
After the nested-repository fix, the fresh 5,259-file generation completed (
phase=ready, all files/pages committed), but text projection failed before graph seating in a tight loop:That string discarded the cause.
map_text_artifact_errormapped all of these to the sameRetrievalPortError::BudgetExceeded:Unreserved(detail)(availability/capacity),BatchTooLarge { limit, required, maximum }after the source had already subdivided to one record (deterministic for this record/budget).text_artifact_builder_budgetalso returned bare BudgetExceeded when the retained source window alone exhausted the fixed reservation—also deterministic.Fix
BudgetExceeded.Unreserved(detail)becomesAuthorityUnavailablewith its reservation detail.BatchTooLargebecomesContract(error.to_string()), retaining limit/required/maximum. The convergence worker now parks it once instead of retrying the same bytes.Contractnaming needed and available bytes.This is diagnostic classification, not a budget increase. It exposes the exact remaining sizing defect so the next fix removes the cost rather than tuning a number.
Checked existing PRs first: the #1562/#1577 stack touches serving, but not these mappings or budget split.
Evidence: focused subdivision/reservation tests 2/2; all text-artifact runtime tests 20/20; rustfmt and IDE lints clean.