Skip to content

Preserve source coverage and add bounded adjudication correction - #224

Merged
morgaesis merged 5 commits into
mainfrom
fix/source-batch-capacity-packing
Oct 20, 2026
Merged

morgaesis merged 5 commits into
mainfrom
fix/source-batch-capacity-packing

Conversation

@morgaesis

Copy link
Copy Markdown
Contributor

Large diffs can exhaust the source batch allowance despite unused capacity, and correctable adjudication output can terminate a review without a valid result.

Reuse spare source batch capacity with cached escaped sizes, falling back to the exact original layout when source batches exceed admission or provider selection is limited to five batches. Allow one shared correction for malformed adjudication JSON, unsupported refutations, or missing required causal references, preserving complete validation against immutable inputs within the original deadline and remaining budget. Update the coverage fixture and benchmark tests, and allow populated-baseline recalibration when the evaluator contract changes while retaining execution from main, first attempts, ten immutable sample slots, and provenance checks. Set the CLI version to 0.9.21.

Focused offline packing and adjudication checks passed, and the corrected mock benchmark passed 70/70 cases.

On overflow, place each whole source unit in the first earlier batch with
enough escaped-JSON capacity. Cache escaped sizes during packing to avoid
repeated payload scans.

Preserve source units, hunk ownership, citations and request admission.
Continue to fail closed when review coverage is incomplete.
Reuse spare source batch capacity and cache escaped byte sizes. Keep the
exact next-fit inventory when the packed source count exceeds admission
or the provider selects five batches.

Allow one correction shared by adjudication parsing and the two
recoverable semantic rules. Validate both logical calls against immutable
original inputs, retaining the original deadline and shared provider caps.
Keep invalid output fail closed and preserve usage accounting.

Update the partial-coverage fixture and historical calibration tests.
Permit recalibration of a populated baseline when the evaluator contract
changes, after verifying prior provenance and retaining current-main,
first-attempt execution with ten immutable sample slots. Report sample
uploads from their actual outcomes and set the CLI version to 0.9.21.
Assert the exact byte-cap cause and typed local admission classification,
zero HTTP requests, and zero reserved attempts. Check that the formatted
review error preserves the precise cause.
Retain the validator cause when adjudication fails. Update integration
mocks to accept only the fixed correction suffix and assert exact request
phases, immutable inputs and known usage receipts.

Validation: E2E suites with default and no default features, relevant
adjudication and admission tests, formatting and all-target Clippy.
Classify unknown candidate IDs at the strict validator so they use the correction
attempt shared by syntax and semantic errors. Preserve strict identity checks and
residual admission.

Decode legacy and phased adjudication records with closed shape and phase checks.
Exercise exact request roles, attempt counts, usage and fail-closed publication
with local mocks.

@postil-dev postil-dev Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

info 1 advisory finding open
1 finding posted inline

Review details

Comment thread src/llm.rs
@morgaesis
morgaesis merged commit 87037ab into main Oct 20, 2026
10 checks passed
@morgaesis
morgaesis deleted the fix/source-batch-capacity-packing branch October 20, 2026 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant