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
//! The Constitution — pr4xis's five guarantees, and the machinery that binds
//! the test suite to them.
//!
//! The `ontology` submodule defines the five guarantees ([`Guarantee`]) as a first-class
//! ontology. This module adds the *self-binding* layer: every test in the
//! workspace declares the guarantee it witnesses with the
//! [`praxis_value`](crate::praxis_value) attribute, which registers a
//! [`GuaranteeTag`] into the [`CONSTITUTION_TESTS`] distributed slice at link
//! time. A `constitution_coverage` meta-test then folds that slice into a
//! per-guarantee partition of the suite — so a guarantee cannot silently lose
//! coverage and a new test cannot escape classification.
//!
//! The classification is declared, not reverse-engineered from test names: a
//! claim's guarantee is first-class and discoverable, the same discipline the
//! rest of pr4xis applies to domain knowledge.
pub use ;
/// How strongly a test witnesses its guarantee.
///
/// An [`Example`](TestKind::Example) is a point-claim: it asserts the property
/// at one chosen input. A [`Property`](TestKind::Property) is a ∀-claim: a
/// `proptest!` that asserts the property for *every* input in a strategy's
/// domain, checked over many generated cases (proptest's default sample budget
/// is 256, configurable via `PROPTEST_CASES`). A property is a stronger witness
/// than an example — the case count is a sampling budget, not a test count, so
/// a property is still **one** test here, distinguished only by its kind.
/// The constitutional guarantee(s) a single test witnesses.
///
/// `primary` is the guarantee the test most directly evidences — the partition
/// key, so every tagged test falls in exactly one bucket. `secondary` records
/// any further guarantees an irreducible test also witnesses (e.g. a property
/// asserting that a mutated `.prx` is always rejected witnesses Honesty
/// primarily, but also Verifiability and Determinism) without forcing an
/// artificial split. `kind` distinguishes a point-claim from a ∀-claim, so
/// coverage can report depth (how many witnesses are properties) as well as
/// breadth.
/// Every test tagged with [`praxis_value`](crate::praxis_value) or
/// [`register_praxis_value!`](crate::register_praxis_value), gathered at link
/// time.
///
/// Native targets only — `linkme` is unsupported on wasm32, where the slice is
/// empty (fail-closed: the coverage meta-test does not run there).
pub static CONSTITUTION_TESTS: ;
/// Register a test's constitutional guarantee(s) without an attribute.
///
/// Companion to the [`praxis_value`](crate::praxis_value) attribute for tests
/// the attribute cannot wrap — chiefly `proptest! { #[test] fn .. }` blocks,
/// where the test function is generated by another macro and so is not an
/// `ItemFn` the attribute can parse. Place the call at module scope, next to
/// the test:
///
/// ```text
/// proptest! {
/// #[test]
/// fn prop_mutated_prx_always_rejected(..) { .. }
/// }
/// pr4xis::register_praxis_value!(prop_mutated_prx_always_rejected, Honest, Verifiable, Deterministic);
/// ```
///
/// The first guarantee is primary; any others are secondary. The named
/// function is not checked to exist here — the completeness gate (registry
/// length vs the live `--list` count) is what catches an untagged test or a
/// tag whose name has no test.
/// Per-crate completeness-gate support: emit pr4xis-core's own tag set so
/// `scripts/constitution-gate.sh pr4xis` can diff it against `--list`. This
/// binds the substrate crate's tests to the constitution exactly as the domains
/// crate is bound — the constitution covers its own foundation, not only the
/// reasoning layer.