11//! Deterministic Quint Connect replays through the real `protocol.rs`.
22
3- use quint_connect:: quint_test;
3+ use quint_connect:: { quint_run , quint_test} ;
44
55use super :: driver:: MutationCursorDriver ;
66
@@ -20,3 +20,119 @@ use super::driver::MutationCursorDriver;
2020fn mutation_cursor_transports_non_default_arguments ( ) -> impl Driver {
2121 MutationCursorDriver :: default ( )
2222}
23+
24+ /// Replays `testStartObservesBeforeActivation`: the freshness-boundary
25+ /// semantics for a `Start` observation.
26+ #[ quint_test(
27+ spec = "../spec/mutation_cursor.qnt" ,
28+ test = "testStartObservesBeforeActivation"
29+ ) ]
30+ fn mutation_cursor_start_observes_before_activation ( ) -> impl Driver {
31+ MutationCursorDriver :: default ( )
32+ }
33+
34+ /// Replays `testCloseObservesBeforeDeactivation`.
35+ #[ quint_test(
36+ spec = "../spec/mutation_cursor.qnt" ,
37+ test = "testCloseObservesBeforeDeactivation"
38+ ) ]
39+ fn mutation_cursor_close_observes_before_deactivation ( ) -> impl Driver {
40+ MutationCursorDriver :: default ( )
41+ }
42+
43+ /// Replays `testContendedIntervalsRemainAiContended`.
44+ #[ quint_test(
45+ spec = "../spec/mutation_cursor.qnt" ,
46+ test = "testContendedIntervalsRemainAiContended"
47+ ) ]
48+ fn mutation_cursor_contended_intervals_remain_ai_contended ( ) -> impl Driver {
49+ MutationCursorDriver :: default ( )
50+ }
51+
52+ /// Replays `testNoChangeHookReplayCannotStealFutureChange`.
53+ #[ quint_test(
54+ spec = "../spec/mutation_cursor.qnt" ,
55+ test = "testNoChangeHookReplayCannotStealFutureChange"
56+ ) ]
57+ fn mutation_cursor_no_change_hook_replay_cannot_steal_future_change ( ) -> impl Driver {
58+ MutationCursorDriver :: default ( )
59+ }
60+
61+ /// Replays `testConcurrentObservationsHaveOneWinner`.
62+ #[ quint_test(
63+ spec = "../spec/mutation_cursor.qnt" ,
64+ test = "testConcurrentObservationsHaveOneWinner"
65+ ) ]
66+ fn mutation_cursor_concurrent_observations_have_one_winner ( ) -> impl Driver {
67+ MutationCursorDriver :: default ( )
68+ }
69+
70+ /// Replays `testTaintInvalidatesPreparedObservation`.
71+ #[ quint_test(
72+ spec = "../spec/mutation_cursor.qnt" ,
73+ test = "testTaintInvalidatesPreparedObservation"
74+ ) ]
75+ fn mutation_cursor_taint_invalidates_prepared_observation ( ) -> impl Driver {
76+ MutationCursorDriver :: default ( )
77+ }
78+
79+ /// Replays `testRecoveryEstablishesBaseline`.
80+ #[ quint_test(
81+ spec = "../spec/mutation_cursor.qnt" ,
82+ test = "testRecoveryEstablishesBaseline"
83+ ) ]
84+ fn mutation_cursor_recovery_establishes_baseline ( ) -> impl Driver {
85+ MutationCursorDriver :: default ( )
86+ }
87+
88+ /// Replays `testClosedScopeCannotReactivate`.
89+ #[ quint_test(
90+ spec = "../spec/mutation_cursor.qnt" ,
91+ test = "testClosedScopeCannotReactivate"
92+ ) ]
93+ fn mutation_cursor_closed_scope_cannot_reactivate ( ) -> impl Driver {
94+ MutationCursorDriver :: default ( )
95+ }
96+
97+ /// Guarded-no-op regression: replays
98+ /// `testMbtGuardedPrepareInvokesRealPrepare`
99+ /// (`init.then(prepare(Attempt0, Start(...))).then(prepare(Attempt0,
100+ /// Advance(...)))`), where the second `prepare` guards because `Attempt0` is
101+ /// no longer `Available`. A passing replay proves the driver still calls
102+ /// `protocol::prepare` on the guarded step — dispatch is on the `MbtAction`
103+ /// variant Quint recorded, never skipped because Quint's own state happened
104+ /// not to change — and independently reaches the same no-op outcome.
105+ #[ quint_test(
106+ spec = "../spec/mutation_cursor.qnt" ,
107+ test = "testMbtGuardedPrepareInvokesRealPrepare"
108+ ) ]
109+ fn mutation_cursor_guarded_prepare_invokes_real_prepare ( ) -> impl Driver {
110+ MutationCursorDriver :: default ( )
111+ }
112+
113+ /// Guarded-no-op regression: replays
114+ /// `testMbtGuardedRecoverInvokesRealRecover` (`init.then(recover(WT0))`),
115+ /// where `recover` guards because `WT0` is neither tainted, externally
116+ /// tainted, nor needing rebaseline. A passing replay proves the driver still
117+ /// calls `protocol::recover` on the guarded step and independently reaches
118+ /// the same no-op outcome.
119+ #[ quint_test(
120+ spec = "../spec/mutation_cursor.qnt" ,
121+ test = "testMbtGuardedRecoverInvokesRealRecover"
122+ ) ]
123+ fn mutation_cursor_guarded_recover_invokes_real_recover ( ) -> impl Driver {
124+ MutationCursorDriver :: default ( )
125+ }
126+
127+ /// Generated-trace refinement: replays Quint-generated randomized
128+ /// traces through the real `protocol.rs`, comparing `ModelState` against
129+ /// Quint's semantic state after every step. Reproducible with a fixed
130+ /// `QUINT_SEED`.
131+ #[ quint_run(
132+ spec = "../spec/mutation_cursor.qnt" ,
133+ max_samples = 500 ,
134+ max_steps = 30
135+ ) ]
136+ fn mutation_cursor_generated_traces_refine_rust_protocol ( ) -> impl Driver {
137+ MutationCursorDriver :: default ( )
138+ }
0 commit comments