Skip to main content

Module metric_check

Module metric_check 

Source
Expand description

Metric-completeness descriptor + the “queryability claim == code” gate.

The .10d header carries a MetricCompletenessDescriptor declaring, per v-branch, which COORDINATE axes the distance metric folds. The parser rejects any descriptor that diverges from Tensor10D::full_distance’s actual v-branch behaviour — this is the mechanical barrier that enforces the honest-limitation contract: a developer cannot claim an axis is queryable under a metric the kernel does not actually fold.

Current reality (encoded as the proposed default):

  • v=0 Euclidean folds x,y,z,t,α,μ,σ (all seven COORDINATEs)
  • v=1 Cyclic/Toroidal folds x,y,z only
  • v=2 Hyperbolic folds x,y,z only
  • v>=3 Boundary clique folds no coordinate axes (byte-equality on v)

This is option (b) “document the limitation” per Timothy’s 2026-07-04 decision. P7.9 (making the non-Euclidean metrics axis-complete via product / warped-product manifolds and a clique-graph) is deferred as future geometry design work — see the progress log and the P7.9 task entry.

Reference: docs/plans/native-computational-geometry.md §4.1 honest limitation, and the cross-cutting gate “Honest axis-role taxonomy & metric-completeness (queryability claim == code)”.

Structs§

MetricBranchDescriptor
One row of the metric-completeness table: the metric used for a single v-class and the bitmask of COORDINATE axes it folds.
MetricCompletenessDescriptor
The full metric-completeness table carried in the .10d header. One row per v-class; branches[3] is the v >= 3 catch-all.
MetricDivergence
Error raised when a descriptor diverges from full_distance’s actual behaviour. Carries enough detail to name the offending branch + axis in the parser’s rejection message.

Enums§

MetricKind
A u8 tag identifying the metric kind a branch implements. Mirrors the dispatch in Tensor10D::full_distance.

Constants§

BOUNDARY_CLIQUE_BRANCH_INDEX
Index of the v >= 3 catch-all branch in a MetricCompletenessDescriptor.
METRIC_BRANCH_COUNT
Number of v-branch descriptors the header carries: the three explicit classes (0, 1, 2) plus one catch-all for v >= 3.

Functions§

probe_folded_axes
Probe full_distance for one branch and return the bitmask of COORDINATE axes it actually folds. Only COORDINATE axes are probed — SELECTOR axes are excluded by definition and a descriptor claiming to fold one is a divergence.
proposed_metric_descriptor
The proposed (not-yet-frozen) metric-completeness descriptor encoding the current full_distance reality — option (b), the documented limitation. The header’s descriptor field is initialised from this by super::header::Container10dHeader::proposed.
verify_descriptor_against_reality
Verify a MetricCompletenessDescriptor against the actual Tensor10D::full_distance behaviour. Returns the first divergence found, or Ok(()) if every branch’s declared folded_axes and metric_kind match reality.