Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 8 additions & 23 deletions reflexio/server/services/playbook/publication.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,29 +669,14 @@ def restore_user_playbook_provisional_publication(
"""Reselect the retained predecessor and terminalize, under a fence."""
...

def confirm_user_playbook_provisional_publication(
self,
*,
lifecycle_id: int,
expected_fence: int,
expected_successor_fingerprint: str,
support_session_count: int,
refute_session_count: int,
global_coverage_numerator: int,
global_coverage_denominator: int,
target_coverage_numerator: int,
target_coverage_denominator: int,
) -> LifecycleTerminalResult:
"""Keep the successor and terminalize as confirmed, under a fence.

No ``reason`` parameter: ``confirmed_online_support`` is the only reason
this transition can record, so passing it would create a second place
the pairing could drift. The six counts are the evidence the boundary
decided on; the RPC re-checks the arithmetic itself and refuses an
inadmissible set rather than obeying it.
"""
...

# There is no ``confirm_...`` member. It was the third of a termination
# TRIPLE -- restore, confirm, displace -- and it is deleted rather than left
# declared: its only caller was a confirmation boundary that could never
# fire (no confirmation analyst was ever implementable, so the support tally
# was permanently zero), and a published successor is now KEPT until the
# tuner's own next evidence pass revises it. A declared-but-uncallable
# member of a Protocol obliges every backend to implement a transition
# nothing can ask for.
def displace_user_playbook_provisional_publication(
self, *, lifecycle_id: int
) -> LifecycleTerminalResult:
Expand Down
30 changes: 4 additions & 26 deletions reflexio/server/services/storage/storage_base/playbook/_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,32 +121,10 @@ def restore_user_playbook_provisional_publication(
"Storage backend does not support provisional user-playbook restoration"
)

def confirm_user_playbook_provisional_publication(
self,
*,
lifecycle_id: int,
expected_fence: int,
expected_successor_fingerprint: str,
support_session_count: int,
refute_session_count: int,
global_coverage_numerator: int,
global_coverage_denominator: int,
target_coverage_numerator: int,
target_coverage_denominator: int,
) -> "LifecycleTerminalResult":
"""Atomically keep the successor and terminalize as confirmed.

Declared here, alongside restore and displace, rather than as an
enterprise-only extra: the three are one termination triple over the
same lifecycle row, and their shared Protocol
(``UserPlaybookLifecycleTerminationStore``) lives in the OSS package. A
backend that satisfied two thirds of it would be a surface every reader
has to special-case.
"""
raise NotImplementedError(
"Storage backend does not support provisional user-playbook confirmation"
)

# No ``confirm_...`` stub: the termination triple is a PAIR now. Restore and
# displace remain; confirmation is deleted, because a published successor is
# kept until the tuner's next evidence pass revises it and no caller can ask
# for the transition. See ``UserPlaybookLifecycleTerminationStore``.
def displace_user_playbook_provisional_publication(
self, *, lifecycle_id: int
) -> "LifecycleTerminalResult":
Expand Down
Loading