3b increment 5b: wire pkgstate verification into .commit_session - #8
Merged
Merged
Conversation
Step 6 of the commit lifecycle (contract 4.7) was the last deferred step. .commit_session now cross-checks a committed preview's resolved records against native ground truth via .verify() and CAPTURES the verdict onto the returned outcome (verified / verify_detail). Verification is observational: it runs only on the success path (an ok/no_op that will be returned, not signaled), never raises, and never changes the close/open decision. A disagreeing post-state is verified = FALSE plus a detail on the outcome, not a signal -- so the outcome is still written (step 7) and the outcome-before-signal order holds. A known failure or a left-open effect is not verified (neither has a trustworthy post-state). Independence from the helper's self-report (4.7) means a clean ok whose post-state disagrees is a failure. The pkgstate reader is behind the existing injectable seam, so the whole lifecycle stays hermetic (fake session-ops + fake pkcheck + fake reader). The durable-record post-state fields that carry the verdict to the broker remain the VM-gated increment; here the verdict lands on the outcome object only. The exported per-verb apt_<verb>() entrypoint is still its own later increment.
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.
Wires step 6 of the commit lifecycle (contract §4.3 / §4.7) into `.commit_session` -- the last deferred step before the exported per-verb API. The predicates from 5a now run inside the lifecycle and their verdict is captured onto the outcome.
What lands
Invariants held
Scope boundary
The durable-record post-state fields (`observed`/`changed`) that carry the verdict to the broker remain the VM-gated increment; here the verdict lands on the returned outcome object only. `.outcome_record()` stays minimal. The exported per-verb `apt_()` entrypoint is still its own later increment.
Verification
Held as a draft for review.