Repository navigation
10 Quality Requirements
This chapter elaborates the quality goals named in section 1.2 and adds secondary quality requirements. The five priority quality goals from section 1.2 are reproduced here with measurable scenarios; secondary qualities are listed without elaboration in the quality tree and called out only where they have load-bearing implications.
Prism’s quality requirements derive from two sources. The five priority qualities (P1–P5) are restated from section 1.2 (Quality Goals); they are the architecture’s primary quality commitments and each is elaborated below as a measurable scenario. The five secondary qualities (S1–S5) are properties Prism exhibits as architectural consequences but does not itself promote to priority status; they are listed in the Quality Tree with cross-references to where each is normatively specified elsewhere in the wiki.
The full set of quality requirements is bound to the architectural constraints of section 2 (TC-01 through TC-06): every quality is the user-facing or author-facing expression of one or more constraints. A conforming Prism implementation that satisfies all six constraints satisfies every quality requirement listed in this chapter; the chapter does not introduce additional commitments beyond those constraints.
The quality tree organizes Prism’s quality concerns hierarchically. The five priority qualities (P1 through P5) trace directly to section 1.2; the secondary qualities (S1 through S5) are properties Prism exhibits that are not load-bearing on the architecture but are nevertheless normative.
| Category | Quality | Priority | Source |
|---|---|---|---|
| Performance efficiency | Zero-cost runtime | P1 | Quality Goal 1; constraint TC-01 |
| Operability | Author-infrastructure-free operation | P2 | Quality Goal 2; constraint TC-06 |
| Verifiability | Local verification | P3 | Quality Goal 3; constraints TC-05, TC-06 |
| Reliability (compile-time) | Bilateral compile-time enforcement of UORassembly | P4 | Quality Goal 4; constraint TC-04 |
| Reliability (runtime) | Replay equivalence | P5 | Quality Goal 5; constraint TC-05 |
| Portability | Hardware-platform agnosticism within Rust target set | S1 |
#![no_std] posture, section 8 |
| Maintainability | Container-level dependency minimality | S2 | ADR-005 |
| Security (sealing) | Sealed certified types unconstructable from outside | S3 | Constraint TC-02; ADR-011 |
| Interoperability | Trace and certificate wire-format stability | S4 | ADR-008, ADR-009; section 8 |
| Usability (author) | Procedural-macro ergonomics for shape declaration | S5 | Section 5.1, prism whitebox |
Each priority quality is specified as a measurable scenario. A conforming Prism implementation MUST exhibit the behavior each scenario specifies.
Quality: P1 — Zero-cost runtime.
Source: Constraint TC-01.
Scenario: An application author compiles a crate that imports
prism against a release-mode cargo build profile (opt-level = 3,
lto = true, codegen-units = 1).
Stimulus: The compiled executable runs on the user’s hardware and
invokes pipeline::run on a Validated<CompileUnit, FinalPhase>.
Response: The executable performs the work the author specified plus
the principal data path’s certificate emission, with no Prism runtime
layer mediating any portion of it. Trait dispatches that appear in the
Rust source are resolved monomorphically by the toolchain at compile
time. The disassembled output of prism's pipeline::run contains
direct calls into uor-foundation's primitive operations (and direct
calls into uor-foundation's mint primitives at the
Datum/Triad/Derivation/FreeRank admission stages), the author’s chosen
axis impls (per the A: AxisTuple + Hasher substrate parameter —
invoked type-associatedly via <A as Hasher>::initial() for
content-addressing), and the author’s chosen resolver impls (per the
R: ResolverTuple substrate parameter per ADR-036 — for ψ-chain routes,
the application’s NerveResolver / PostnikovResolver /
HomotopyGroupResolver / KInvariantResolver impls in the canonical
k-invariants branch), with no virtual table dispatch, no string-keyed
lookups, no runtime type inspection. The catamorphism’s per-variant
fold-rules (ADR-029) are realized as monomorphic evaluations of
Term-tree structure across the twenty-one Term variants: each
variant’s fold-rule resolves to direct primitive-operation calls or
direct calls into the resolver impls (the ResolverTuple’s
Has<Category>Resolver<A> marker-trait accessors per ADR-036 for the
eight resolver-bound ψ-Term variants — Term::Nerve,
Term::ChainComplex, Term::HomologyGroups, Term::CochainComplex,
Term::CohomologyGroups, Term::PostnikovTower,
Term::HomotopyGroups, Term::KInvariants); pure byte-slicing for
Term::ProjectField per ADR-033; bounded iteration with
iteration-counter binding for Term::Recurse per ADR-034; pure
computation on already-resolved homology groups for Term::Betti per
ADR-035. The ψ-residuals discipline per ADR-035 + ADR-056 forbids direct
syntactic emissions of Term::FirstAdmit, Term::AxisInvocation, and
byte-comparison/concat PrimitiveOps from the route body’s syntactic
surface (the prism_model!-declared route closure body); compound
verbs per ADR-024, axis impl bodies per ADR-055, and resolver bodies per
ADR-046 may compose the full substrate vocabulary internally because
fold-fusion per ADR-054 inlines them through the catamorphism without
exposing residual forms at the route surface. The compiled binary’s
route-surface evaluation is structurally inferred — admission at the
route surface is a property of the value’s k-invariant signature, not a
search predicate over byte values. No runtime dispatch occurs in the
catamorphism’s evaluation.
Response measure: The executable’s runtime cost is bounded by: the
cost of the canonical hash axis invocation at certificate emission
(called exactly once through <A as Hasher>::initial()); the cost of
the catamorphism’s fold-rules applied to the route’s Term tree (per
ADR-029, including the resolver invocations through the ResolverTuple’s
per-category accessors for resolver-bound ψ-Term variants per ADR-036 —
per ADR-060 each resolver returns a TermValue directly, constructing
an Inline carrier of foundation-derived width, a Borrowed carrier
over upstream bytes with no copy, or a Stream carrier for unbounded
outputs, with no per-stage allocation for Inline/Borrowed); the cost
of consuming the route input as a borrowed &'a [u8] source (per
ADR-023; per ADR-060 the input flows as a TermValue::Borrowed, not
into a fixed ROUTE_INPUT_BUFFER_BYTES stack buffer); the cost of
carrying the catamorphism’s output as a TermValue (per ADR-028 +
ADR-060 — Inline for outputs within the derived inline width,
Borrowed/Stream otherwise, with no fixed ROUTE_OUTPUT_BUFFER_BYTES
buffer and, for Stream, peak resident memory of the derived inline
width plus the chunk source’s state rather than the full output); and
the cost of writing the trace’s events. There is no measurable overhead
beyond these costs.
Quality: P2 — Author-infrastructure-free operation.
Source: Constraint TC-06.
Scenario: An application author distributes an executable to a user. After distribution, the author’s compilation environment is permanently shut down; the author’s name servers, package registries, and any other infrastructure the author may have operated are decommissioned.
Stimulus: The user runs the executable on their hardware and invokes its functionality.
Response: The executable functions correctly. It produces the same outputs it would have produced before the author’s infrastructure was decommissioned; it produces traces and certificates with the same content; it performs verification (if it includes the verifier) with the same results.
Response measure: The executable’s behavior is bit-identical to its behavior before the author’s infrastructure was decommissioned. Network attempts the executable might make are bounded to whatever the application’s domain logic does, not to anything Prism contributes; Prism contributes no network calls.
Quality: P3 — Local verification.
Source: Constraints TC-05, TC-06.
Scenario: An application user receives a Trace and the matching
Hasher selection identifier. The user’s verification environment is
air-gapped: no network, no external service reachable, no infrastructure
operated by the author or any third party available.
Stimulus: The user invokes
certify_from_trace(trace, hasher_instance) in the verification
environment.
Response: The verifier returns either
Certified<GroundingCertificate> (if the trace is well-formed and the
hasher identifier matches) or a typed ReplayError (otherwise). The
verifier does not attempt network communication, does not invoke any of
the author’s deciders, and does not invoke any cryptographic hash
function.
Response measure: Verification completes in time bounded by the
trace’s event count (which itself is bounded by the trace event-count
ceiling carried by the application’s selected HostBounds). No network
operation appears in the verification’s system call profile. No
invocation of the Hasher's hashing method appears in the
verification’s call profile.
Quality: P4 — Bilateral compile-time enforcement of UORassembly.
Source: Constraint TC-04.
Scenario A — Author-side: An application author writes a crate that
imports prism but supplies a ConstrainedTypeShape impl whose
const-evaluable validation does not satisfy prism's bound (e.g., the
impl declares an out-of-range constraint depth).
Stimulus A: The author invokes cargo build on their crate.
Response A: The toolchain rejects the build with a typed compile-time error pointing at the violated UORassembly clause.
Response measure A: The build fails. No executable is produced. The author’s error message identifies which clause of the UORassembly contract (section 8) was violated and at what position in their source.
Scenario B — Foundation-side: A hypothetical alternative
uor-foundation crate is published whose surface does not satisfy
prism's declared bounds (e.g., a sealed type’s signature differs from
what prism requires, or a mint primitive’s signature changes).
Stimulus B: An author or an automated build attempts to compile
prism against this alternative foundation.
Response B: The toolchain rejects prism's compilation with a typed
compile-time error pointing at the violated bound.
Response measure B: prism's build fails against the non-conforming
foundation. The author’s downstream crate cannot be built either,
because its dependency on prism is broken at the foundation level.
Quality: P5 — Replay equivalence.
Source: Constraint TC-05.
Scenario: An application author runs prism's pipeline::run and
obtains (Grounded<T>, Trace). The author distributes the trace
(separately or alongside the Grounded<T> value) to the user. The user
receives the trace and the matching Hasher selection identifier.
Stimulus: The user invokes prism-verify's re-exported
certify_from_trace(trace, hasher_instance) (whose implementation lives
in prism's replay component) where hasher_instance matches the
author’s selection.
Response: The verifier returns Certified<GroundingCertificate>
whose embedded certificate is bit-identical to the certificate the
author’s original Grounded<T> carried.
Response measure: For every (grounded, trace) pair produced by
pipeline::run with Hasher H, applying
certify_from_trace(trace, H_instance).certificate() produces the same
byte sequence as grounded.certificate(). This holds for all valid
inputs the architecture admits; there is no input class for which
equality fails.
This trace-replay equivalence is the T2 tier of ADR-058’s
closure-lossless taxonomy — κ-label-identity — read at the certificate
boundary: two outputs are T2-equivalent iff they share a κ-label under
the framework’s σ-projection, and TC-05 replay equivalence is exactly
that κ-label-identity surfaced as certificate bit-identity. Per ADR-058,
substrate-independence here is binary: a conforming substrate emits
the byte-identical certificate; a non-conforming substrate fails closed
at certify_from_trace rather than degrading. There is no
statistical-regression form of cross-substrate agreement — the
discrimination is structural.
Quality: P6 — Zero-cost typed-bandwidth admission (ADR-048 + ADR-047 U6).
Source: Constraint TC-01 (zero-cost monomorphization) + ADR-048
(TypedCommitment substrate surface) + ADR-047 (Hardening Principle U6
bandwidth-additivity) + ADR-054 (Fold-Fusion Principle) + ADR-055
(universal substrate-Term verb body discipline via the
SubstrateTermBody supertrait bound — guarantees fold-fusion’s
structural reach through every axis surface at compile time, making the
zero-cost commitment structurally enforceable rather than
implementation-heuristic-dependent).
Scenario: An application author declares a
PrismModel<H, B, A, R, C> with C carrying a K-fold typed-bandwidth
conjunction
AndCommitment<AndCommitment<… AndCommitment<TargetCommitment, SingletonCommitment<P_1>>, …>, SingletonCommitment<P_K>>
over UOR observable predicates per ADR-049. Each P_i is a
foundation-declared ObservablePredicate impl (Stratum<P>,
WalshHadamardParity, UltrametricCloseTo<P>, AffineParity, or
LexicographicLessEqThreshold) at its declared per-predicate acceptance
probability under the Hardening Principle’s U1 axiom (1/2 for the
bit-/parity-shape observables; the closed-form
(value(target) + 1) / 256^|target| for LexicographicLessEqThreshold
per ADR-049).
Stimulus: The author invokes forward(input) on a stream of inputs;
for each invocation, the catamorphism’s resolver-bound ψ_9 emits the
κ-label, then C::evaluate(kappa_label) is consulted per ADR-048’s
post-resolver dispatch.
Response A — runtime cost: For each forward(input) invocation that
produces a Grounded<Output> (success arm), the per-invocation runtime
cost of C::evaluate is zero beyond the K inlined predicate
evaluations — no allocation, no dynamic dispatch, no indirect call. The
AndCommitment<A, B> chain monomorphizes to a sequence of K inlined
ObservablePredicate::evaluate calls the compiler unrolls.
Response measure A — runtime: At any K ∈ [0, 32], the
per-forward invocation wall-clock overhead of evaluating C is
bounded above by K · t_eval where t_eval is the per-predicate
evaluation cost (each predicate is O(digest_byte_length) — a single
pass over the digest bytes for the observable’s structural-property
read). No per-invocation heap allocation occurs; the forward body’s
stack frame is O(1) in K (the type-level chain unrolls; the runtime
call sequence is depth-K inlined calls). A conformance harness measuring
per-forward allocation counts MUST report 0 allocations attributable
to C.
Response B — empirical bandwidth scaling: Across an empirical sweep
of K ∈ [0, MAX_K] at the application’s selected admission probability
α, the expected number of forward(input) invocations to find a κ-label
satisfying C::evaluate = true MUST match α^-1 · 2^K · (1 ± ε) per
ADR-047’s U6 bandwidth-additivity axiom (where ε is bounded by sampling
variance at the test’s sample size).
Response measure B — empirical bandwidth: At N=100 invocations per K
across K ∈ [0, 8], the observed ratio of empirical-mean-trial-count to
α^-1 · 2^K MUST sit within ±30% (≈ 4σ at the per-K standard error of
2(K+log2(α-1))/√N). Sample-size scaling per the Hardening Principle’s
U6 reaches ± 10% at N=10⁴. The architectural commitment is
equality at scale, not a worst-case upper bound; degradation beyond
±30% signals a structural attack on the σ-projection (TR-16 — the
canonical hash axis fails Hardening Principle conformance).
The secondary qualities (S1 through S5) are noted here without scenario elaboration. They are normative — an implementation that does not exhibit them does not conform — but their measurable expressions follow from the architecture’s structure rather than from independent scenarios.
| Quality | Where elaborated |
|---|---|
| S1 — Hardware-platform agnosticism within Rust target set | Section 7 (Deployment View, Hardware envelope); section 8 (#![no_std] Posture) |
| S2 — Container-level dependency minimality | Section 5.1 (Whitebox Overall System); ADR-005 |
| S3 — Sealed certified types unconstructable from outside | Section 5 Level 3 (enforcement sealing mechanism); section 8 (Sealing Discipline); ADR-011 |
| S4 — Trace and certificate wire-format stability | Section 8 (Trace Wire Format, Certificate Format); ADR-008, ADR-009 |
| S5 — Procedural-macro ergonomics for shape declaration | Section 5.1 (prism whitebox); section 5 Level 2 (prism component decomposition) |
Generated from sources at UOR-Framework.wiki. Do not edit pages directly via the GitHub web UI — edits are overwritten by the next build. See README for the authoring workflow.