Repository navigation
Conversation
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.
Residual reads could decode an entire prepared xorb even when the caller requested a small chunk batch. Add a bounded decoded-batch cursor that verifies and opens each serialized source once, pins its descriptor before worker admission, and retains cancellation results for the next call. Native residual packing uses this API. Selected recipe leases or the push snapshot remain the lifetime owner.
Stacked on #598. The complete-source
read_nextAPI is present in published v1.2.4 (b4d5fd361f9a); retain that public contract and reject mixing it with a partially drained bounded read. The new module owns the cursor and pending worker; common source verification stays shared. One serialized source remains bounded by the xorb format; decoded results obey count/byte targets, allowing one oversized chunk to make progress.Validation on the combined candidate: four focused staging tests pass, covering exact source-open counts, detached bounded batches, corruption before return, and cancelled-call resumption. Strict staging all-target Clippy and formatting pass. Nineteen CLI publication/packing tests pass on the dependent publication change. CLI build is recorded separately. These are focused component checks; fresh combined 10 GiB and lifecycle qualification remain required.
Evidence map: native
pack_xorbsentersCoalescedChunkReadPlan::read_next_bounded; SQLite selects source groups, source handles are pinned, and shared xorb verification/decode provides payloads. Prepared and segment sources keep the same owner boundary. The capsule caller switches in the dependent publication PR. Current main uses complete-source decoded reads; published v1.2.4 confirms why its API remains. No staging schema or wire format changes.Is this the best fix? The existing residual planner owns batching and cancellation, so one cursor prevents repeat opens and oversized decoded allocations without adding another payload store. The implementation grows to hold bounded cursor/worker state and exercise real cancellation/lifetime behavior; the old public method remains for the cited release contract.
Draft only. The advisor plan and both excluded large-file audit reports are absent. No inventory, baseline, ignore, or product assertion is relaxed.