Repository navigation
fix: Add bounded tier worker and verified background handoff - #824
Draft
buildingjoshbetter wants to merge 2 commits into
Draft
buildingjoshbetter wants to merge 2 commits into
buildingjoshbetter wants to merge 2 commits into
Conversation
This was referenced Oct 9, 2026
This branch has not been deployed
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.
Adds an opt-in bounded tier rebuild worker and a verified background database handoff. The public manager still uses its existing full-list path; this prerequisite does not yet reduce production tier-switch memory or activate a new tier.
The worker consumes one certified source page plus bounded prefix buffers, prepares the frozen target outside SQLite transactions, and commits completion/separation vectors with the paired receipt. It preserves the existing text construction, serialization, model choices and OOM retry bound. Its result distinguishes committed progress, captured-range completion and current-source completion;
activatedremains false. Ambiguous publication failures propagate instead of returning an obsolete cursor.The frozen job descriptor carries explicit target and database/source identity without retaining a corpus, connection or ownership token. A worker acquires its own maintenance owner, reopens with existing-only
mode=rw, checks identity before yielding, and closes/releases on interruption. Stable pathname and known-current caller association remain required. Durable selected-job binding and certified activation are subsequent work.Dependencies: #822 and #823. The base branch
fix/tier-streaming-prereqs-publish-v1combines those already-published runtime/source prerequisites. This PR adds only five files across two atomic commits; no unrelated private integration changes are included.Validation:
Publication full log SHA256:
a497ad44348a8387fce21e8110812f97867af0900ddccd30801d2f34865763ca.Combined full log SHA256:
e8c2699392e5c85ca2514cb90a5e09c2f007ab71077931f1038d623acf7237d6.Cancellation is cooperative at call boundaries; it cannot interrupt internal native or SQLite waits. Path observations cannot prove SQLite file-descriptor association, ABA replacement or same-epoch clones. The existing public route, selected-job lifecycle, final source fence, configuration/runtime reconciliation, inactive legacy reset and active-force staging still need work. Original Mac unified-memory improvement and native allocator reclamation remain unproven.
Refs #756, #795, #752, #297. No issue closure or release claim.