Repository navigation
fix(core): extract a long capture session in chunks, fail an oversized one alone - #1673
Merged
Merged
Conversation
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
| rest.chars() | ||
| .take_while(char::is_ascii_digit) | ||
| .collect::<String>() | ||
| .parse::<u16>() |
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.
What
[capture] chunk_charscharacters (default 24000, minimum 64) instead of one request. Turns are packed on turn boundaries; a single turn larger than the budget is split at a newline or whitespace, else on a character boundary.capture:<session>:<batch>source. All chunks are extracted before anything is stored, so the batch stays one unit for the lease, the attempts count and the leftovers withdrawal.extraction::is_input_too_large), now fails that session only: it counts an attempt and the run goes on with the sessions behind it. A 429 or 5xx still stops the run.configuration.md,cli-reference.md) and CHANGELOG updated.Why
extract_sessionjoined every pending turn into one request. A long session made the provider answer 400, which stopped the run and doubled the wait, and the same oldest session was claimed first again, so one long conversation delayed all capture extraction for hours.Note: every chunk is a request of up to two minutes, so
lease_minutesshould stay above the longest session's time (documented). CORE contract: capture routes are LAB, no route or response change.Testing
New tests in
capture.rs: chunk packing and the oversized-turn split (whitespace and multibyte), a session over the budget is extracted in more than one call with every fact stored once under one source, a session the provider always refuses is failed aftermax_attemptswhile the next session still runs, the error classification, and a crash halfway through chunk stores is re-run whole without duplicates.cargo test -p uteke-core --lib(1076 passed),cargo clippy --workspace --all-targets -- -D warnings.Closes #1664