Skip to content

refactor(playbook): drop the provisional confirmation seam - #505

Merged
guangyu-reflexio merged 1 commit into
mainfrom
feat/offline-tuner-keep-unless-revised
Sep 14, 2026
Merged

guangyu-reflexio merged 1 commit into
mainfrom
feat/offline-tuner-keep-unless-revised

Conversation

@guangyu-reflexio

@guangyu-reflexio guangyu-reflexio commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

The open-source half of the enterprise keep-unless-revised change
(ReflexioAI/reflexio-enterprise#1157, merged as 98686f2f0). The enterprise
gitlink on main already points at this commit
, so landing this is what moves
that pointer off a feature branch.

What this removes

confirm_user_playbook_provisional_publication, from the storage protocol and
the storage_base declaration. 2 files, +12 / −49.

It was one third of a termination triple over the same lifecycle row —
restore, displace, confirm — declared here rather than as an
enterprise-only extra because the shared Protocol
(UserPlaybookLifecycleTerminationStore) lives in this package.

Why it is safe to delete rather than leave declared

The enterprise side removed its implementation and its only caller, and it
did so because the transition was unreachable, not merely unused:

  • confirm was reached only through OpenWorldConfirmationBoundary, whose
    decision required a ConfirmationSessionAnalyst.
  • That analyst had no implementation, no prompt id, no output type and no schema
    slot, and QualificationCase rejected role="confirmation" at parse time — so
    no qualification case could be authored for the role at all.
  • ConfirmationTally therefore always reported zero supporting sessions against
    a required minimum of two. 0 >= 2 is false for every input.

So the enterprise design replaced "revert unless confirmed after 14 days" with
"keep until the next evidence pass revises it". Publication is now written
terminal at publish time; nothing confirms, and nothing reverts automatically.
A declaration for a transition that can never be taken is a surface that reads
as a capability.

What stays

restore and displace are untouched. The two-thirds Protocol that remains is
the deliberate shape, and the comment replacing the deleted member says so — a
future reader finding a termination pair rather than a triple should find the
reason in place rather than infer an omission.

Verification

Carried on the enterprise branch that merged as #1157:

Gate Result
pytest reflexio_ext/tests -m "not integration" 8348 passed, 3 failed
Failing-test-id set vs baseline unchanged — no new failures
Coverage 68.30% (ratchet 68.0%)
pyright 0 errors, 0 warnings
import reflexio OK

The three failures are pre-existing and proven so: two are migration-inventory
gates red on enterprise main because of an unrelated workstream's unowned
migration (20260910100000_durable_sliding_extraction.sql), and the third is an
unrelated deploy-topology test.

Summary by CodeRabbit

  • Changes
    • Removed confirmation-based completion for provisional playbook publications.
    • Playbook lifecycle handling now retains restore and displace operations as the available actions.
    • Published successors remain available for review until supporting evidence is provided.

The lifecycle termination triple is a pair. `restore` and `displace` remain;
`confirm_user_playbook_provisional_publication` is deleted from both the shared
`UserPlaybookLifecycleTerminationStore` Protocol and the storage base's
default-raising stub.

It was never callable. The transition required a confirmation analyst that is a
Protocol with no implementation, and `QualificationCase` refuses
`role="confirmation"` at parse time, so the support tally the boundary compared
against its two-session floor was permanently zero. Every publication therefore
reverted at its deadline regardless of quality.

The enterprise adapter's implementation and its only caller are already gone. A
published revision is now KEPT until the tuner's own next evidence pass revises
it, so nothing can ask for the transition -- and a declared-but-uncallable
Protocol member obliges every backend to implement one anyway.

The SQL routine is untouched: dropping it is a contract migration that needs its
own rollout sequencing.
@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Essentials

Run ID: 5ca65d1a-290d-4dc0-9460-c7efaef12d1d

📥 Commits

Reviewing files that changed from the base of the PR and between bd1990a and d815db4.

📒 Files selected for processing (2)
  • reflexio/server/services/playbook/publication.py
  • reflexio/server/services/storage/storage_base/playbook/_user.py

Included review availability: Your plan provides up to 5 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The playbook lifecycle termination interfaces no longer declare provisional publication confirmation. Restore and displace operations remain available. The user playbook store documentation reflects the reduced interface.

Changes

Playbook termination interfaces

Layer / File(s) Summary
Remove provisional publication confirmation
reflexio/server/services/playbook/publication.py, reflexio/server/services/storage/storage_base/playbook/_user.py
Removed the confirmation operation and its evidence-count parameters. Updated documentation to describe restore and displace as the remaining termination operations.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Suggested reviewers: yyiilluu

Merge Risk: ⚪ Minimal · up to d815d

The removed confirmation transition has no current dependency, so this interface cleanup is ready to merge.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: removal of the provisional confirmation interface from the playbook lifecycle and storage declarations.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/offline-tuner-keep-unless-revised

Comment @coderabbitai help to get the list of available commands.

@guangyu-reflexio
guangyu-reflexio merged commit d85ebd7 into main Sep 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant