Repository navigation
fix: Add certified tier selection and serving admission - #826
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 two unused prerequisites for safe streamed tier switching: a process-wide serving admission guard and a database-only certified selection journal. The public manager and request paths are unchanged in this PR.
The serving guard admits concurrent readers, reentrant nested operations and explicitly reserved child work while draining for exclusive activation. It rejects stale, forged, foreign-process and conflicting-identity tokens. Cancellation and deadlines are checked before admission; they do not impose a hard return-time bound while condition cleanup reacquires its mutex.
The journal stores bounded, strictly validated intent and selected records in existing metadata. Final selection owns one writer transaction, verifies the current source and paired receipt, compares the selected job and expected generation, then publishes registry/model metadata and retires exactly that successful job marker together. Config acknowledgement is generation-fenced; an unacknowledged selection cannot be replaced. Config/runtime projection remains separate and is not claimed by a database commit. Existing binding/source APIs and prior assertions are retained.
Validation:
Combined full log SHA256:
df53642321ee03b6e601d3101d902866755d771052efffd79314df2cca388f2f.Publication full log SHA256:
3081cef511d4f392c6507528205440a5fc23d8420ce6deb565e39e11fa8cabce.Callers still must establish coherent old state, an inactive target, maintenance ownership and a drained serving boundary. Final paired certification scans the pair once under the writer; its large-corpus latency remains unmeasured. Same-thread lease lifecycle and explicit cleanup of never-admitted child reservations are required. Native file-descriptor association, ABA replacement, config/runtime atomicity, public bounded routing and production memory reduction remain unproven. The original Mac memory incident is not claimed fixed.
Refs #795 and #756. Stacked on #825. Draft only; no issue closure or release claim.