1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! Symbol broadcast cancellation protocol.
//!
//! This module provides cancellation tokens, broadcast messages, and cleanup
//! coordination for symbol stream operations. Cancellation is a protocol:
//! it propagates correctly to stop generation, abort transmissions, clean up
//! partial symbol sets, and notify peers.
//!
//! [`progress_certificate`] provides martingale-based statistical certificates
//! that cancellation drain is making progress toward quiescence.
// `protocol_validator_test_suite` references a pre-refactor snapshot of
// `protocol_state_machines`:
// - pattern-matches against `TransitionResult::Invalid` / `ObligationEvent::Abort`
// / `ObligationState::Aborted` as tuple variants when they are struct variants;
// - constructs `RegionContext` / `TaskContext` / `ObligationContext` with fields
// (`child_count`, `active_tasks`, `region_state`, `has_cleanup`,
// `permits_available`) that no longer exist;
// - calls `validator.track_region(...)`, `track_task(...)`, `track_obligation(...)`,
// `validate_task_start(...)`, `validate_task_completion(...)`,
// `validate_region_close(...)`, `validate_obligation_commit(...)` — none of
// these exist on the current `CancelProtocolValidator`, which only exposes
// `validate_region_transition` / `validate_task_transition` /
// `validate_obligation_transition`;
// - reads `validator.validation_level` (field is private);
// - uses `ValidationLevel::Off` / `Development` / `Production` (real variants are
// `None` / `Basic` / `Full` / `Debug`);
// - uses `RegionEvent::Create` / `AddTask` / `RemoveTask` / `BeginDrain` /
// `CompleteDrain` / `Finalize`, `TaskEvent::CompleteDrain` /
// `AcknowledgeCancel`, `ObligationEvent::Create` — none of which exist in
// the current enums;
// - constructs ids via `RegionId::new(...)` / `TaskId::new(...)` /
// `ObligationId::new(...)` which are spelled `new_ephemeral` / `new_for_test`
// / `from_arena` in the current types.
//
// Under `#[cfg(test)]` this compiles during `cargo test` and blows up the lib
// test target with ~139 type errors. Gate it out entirely with `#[cfg(any())]`
// until the harness is rewritten against the current validator API — this
// matches the pattern used for `tests/trace_event_golden_artifacts.rs`. The
// inline `#[cfg(test)]` tests in `protocol_state_machines.rs` already cover
// the transition machinery end-to-end, so no unique coverage is lost.
pub use ;
pub use ;
pub use ;
pub use ;