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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
//! The **graduation bridge** toward the full `wasm4pm` execution engine.
//!
//! `wasm4pm-compat` is, by design, a *structure-only* crate: it admits, refuses,
//! and round-trips the *shapes* of process evidence, but it executes nothing. This
//! module is the **only** public bridge that makes the boundary to the real engine
//! explicit. It implements **none** of `wasm4pm` — it merely lets a compat value
//! *declare itself a graduation candidate* and name *why* it must leave the compat
//! layer.
//!
//! ## The covenant
//!
//! > **Compat carries the evidence. `wasm4pm` adjudicates it.**
//!
//! When a host hits a wall that structure cannot answer — it needs a model
//! *discovered*, a conformance result *computed*, a log *replayed*, a receipt
//! *minted*, a benchmark *gated*, an object-centric query *executed*, or it finds
//! itself *rebuilding process mining locally* — that is not a bug in compat. It is
//! the signal to **graduate**. This module turns that signal into a typed,
//! reviewable [`crate::engine_bridge::GraduationCandidate`].
//!
//! ## What this module is **NOT**
//!
//! - **Not** an engine, and **not** a dependency on one. There is no `wasm4pm`
//! import here; the bridge is a *trait surface* a host (or the engine itself)
//! implements at the seam.
//! - **Not** an automatic escalator. Producing a candidate does not *perform*
//! graduation; it makes the case for it.
/// Why a compat value must graduate to the `wasm4pm` execution engine.
///
/// Each variant is a *trigger sign* — a capability that structure alone cannot
/// provide. These are the lawful reasons to cross out of the compat layer; naming
/// one is how a host says "I have reached the edge of structure." It is
/// **structure only**: a reason explains a need, it does not satisfy it.
/// A typed, reviewable case that a compat value should leave the compat layer for
/// the `wasm4pm` engine.
///
/// A `GraduationCandidate` bundles the [`GraduationReason`], a human-readable
/// `subject` naming what is graduating, and an opaque `evidence_ref` pointing at
/// the compat evidence that justifies the move. It is the artifact a reviewer (or
/// the engine's intake) reads to decide whether — and how — to adjudicate.
///
/// It is **structure only**: holding a candidate changes nothing; it is the *case
/// for* graduation, never the act of it.
/// The single public trait that bridges a compat value to `wasm4pm`.
///
/// An implementor produces a [`GraduationCandidate`] describing why and what it
/// would graduate. The trait deliberately implements **nothing** of the engine: it
/// is the seam where the structure-only world hands a reviewable case to the
/// execution world. The engine (or a host adapter) consumes candidates; compat only
/// produces them.
///
/// It is **structure only**: implementing it makes the boundary explicit, it does
/// not cross it.