`packs.compiler._blend_feature_versors` ignores its strength argument and
returns the target verbatim. All three "nudge" sites — cross-language alignment
(0.10), morphology clustering (0.40), mount-time domain resonance (0.40) — are
therefore total overwrites, and ADR-0015's two explicit requirements ("a
weighted graph, not a translation table"; "without flattening their
distinctions") are violated bit-exactly.
Measured: mounting the depth packs onto English REMOVES 37 distinct coordinates
(239 surfaces -> 202 points). English alone is collision-free (220/220), Greek
alone is collision-free (11/11), so the loss is created by the mount. Nine
English question words -- ask, question, what, who, where, how, why, when,
which -- share one coordinate, dragged there by a single Greek verb in their
primary domain. `word`, `דבר`, `דברים` and `λόγος` are one point. English is the
mount-time prototype, so the design's depth-anchor roles run backwards: the
depth languages are deleted into the articulation surface.
Four more findings in the same layer:
* 63 of 83 authored alignment edges resolve to nothing -- including every edge
of the two packs serving actually grounds HE/GRC against -- because
`_infer_foreign_pack_ids` maps id prefixes through a table hardcoded to the
original three packs, and a miss is a silent `continue`. The corpus was
grown 7.5x; the growth was never connected.
* `algebra.holonomy.holonomy_encode` never closes. The reverse walk was
deleted at fca6216e and the docstring describing it left in place; `alpha`
is validated and never read (alpha=0.0 and alpha=1.0 return bit-identical
arrays) while core/physics/biography.py:94 passes it.
* Four token-level "resonance proofs" are green because the compared arrays
are the same array -- the open follow-up the 2026-06-14 clause-level finding
explicitly deferred, now closed as decoration.
* The cure was already one layer down and never called: algebra/rotor.py has
shipped `rotor_power` + `word_transition_rotor` (the group geodesic) since
the algebra layer's first commit. A naive lerp leaves the versor group and
VocabManifold.update() correctly refuses it -- the overwrite is what a lerp
degrades into once the guard bites. The guard was right; the escape was not.
This is the missing half of every "geometry adds nothing" verdict: no operator
can distinguish what its ground does not distinguish.
Lands as instrument, not repair -- ../core is the quarry, and L2 is rebuilt in
the keel with these measurements as its provenance. The four decoration tests
are deliberately left standing and named in the analysis doc: green-for-the-
wrong-reason and red are different signals, and replacing them belongs to the
rebuild.
* evals/logos/manifold_collapse.py -- deterministic, bit-exact census
* tests/test_manifold_collapse_floor.py -- both directions plus the
English-alone control that attributes the loss to the mount. Two sabotages
observed red: a real interpolation (ValueError from the versor guard, which
is how the cure was found) and disabling the mount site (37 -> 3, which is
how the 34/2/1 site attribution was measured).
Also lands the FA-1 gate PRE-REGISTRATION -- criterion, corpus, negative
classes and anti-gaming rules committed here so they demonstrably predate any
discrimination number, per the ADR-0252 §5 precedent. The repairs it tests are
mechanism (the geodesic, the closed loop, fail-closed edge resolution), not
tuning; the declared strengths are used as written and are not free parameters.
Charter and gap register corrected where this contradicts them: the corpus is
83 edges not 11, the holonomy machinery is not core/physics/digest.py, and
FA-1's "the gate has never been measured" was false -- the 2026-06-14 negative
exists and is pinned. That error, made in the document that records the
three-negatives correction, is the fourth instance of the pattern this arc
keeps finding, and is recorded as such rather than quietly fixed.
[Verification]: uv run core test --suite smoke -q -> 782 passed in 224.37s, EXIT=0
112 lines
4.7 KiB
Python
112 lines
4.7 KiB
Python
"""The manifold-collapse instrument — how many distinct meanings the ground still holds.
|
||
|
||
Foundations Audit FA-1 (L2, the logos layer / G-25).
|
||
|
||
ADR-0015 states the requirement the three-language design must satisfy: aligned
|
||
clauses resonate *"without flattening their distinctions"*, and cross-language
|
||
alignment is *"a weighted graph, **not** a translation table"*. This module
|
||
measures whether the compiled manifold honours that — by the bluntest possible
|
||
test, which is also the exact one: **do two surfaces occupy the same coordinate?**
|
||
|
||
Coordinates are compared bit-exactly (``ndarray.tobytes()``). There is no
|
||
tolerance to tune and no metric to argue about: either two words are the same
|
||
point in the semantic ground or they are not. A tolerance would have hidden this
|
||
finding — the collisions measured here are exact equality, not near-equality.
|
||
|
||
The instrument reports both the **mounted** configuration (what the runtime
|
||
actually grounds against) and the **per-pack controls**. The controls are what
|
||
make it a diagnosis instead of a number: if English alone is collision-free and
|
||
English *mounted with the depth packs* is not, then mounting Hebrew and Greek —
|
||
the operation designed to add depth — is what removes distinctions.
|
||
|
||
Deliberately narrow: this measures the compiled ground only. Whether a *corrected*
|
||
compiler restores discrimination is a separate, pre-registered experiment
|
||
(``docs/analysis/logos-substrate-collapse-2026-07-28.md`` §"What FA-1 asks next").
|
||
"""
|
||
|
||
from __future__ import annotations
|
||
|
||
import json
|
||
from collections import defaultdict
|
||
from dataclasses import dataclass
|
||
|
||
from packs import load_pack
|
||
from packs.compiler import load_mounted_packs
|
||
|
||
#: The trilingual mount is the CORE-Logos configuration of ADR-0005/0015:
|
||
#: English as articulation surface, Hebrew as depth anchor, Greek as relational depth.
|
||
TRILINGUAL: tuple[str, ...] = ("en_minimal_v1", "he_logos_micro_v1", "grc_logos_micro_v1")
|
||
|
||
|
||
@dataclass(frozen=True)
|
||
class CollapseReport:
|
||
"""Exact, deterministic census of coordinate collisions in a compiled ground."""
|
||
|
||
config: tuple[str, ...]
|
||
surfaces: int
|
||
distinct_coordinates: int
|
||
#: Each group is the sorted tuple of surfaces sharing one bit-identical coordinate.
|
||
groups: tuple[tuple[str, ...], ...]
|
||
|
||
@property
|
||
def surfaces_in_collision(self) -> int:
|
||
return sum(len(group) for group in self.groups)
|
||
|
||
@property
|
||
def coordinates_lost(self) -> int:
|
||
"""Distinctions the ground can no longer make: surfaces − distinct coordinates."""
|
||
return self.surfaces - self.distinct_coordinates
|
||
|
||
def as_dict(self) -> dict:
|
||
return {
|
||
"config": list(self.config),
|
||
"surfaces": self.surfaces,
|
||
"distinct_coordinates": self.distinct_coordinates,
|
||
"coordinates_lost": self.coordinates_lost,
|
||
"collision_groups": len(self.groups),
|
||
"surfaces_in_collision": self.surfaces_in_collision,
|
||
"groups": [list(group) for group in self.groups],
|
||
}
|
||
|
||
|
||
def _census(manifold) -> tuple[int, int, tuple[tuple[str, ...], ...]]:
|
||
by_coordinate: dict[bytes, list[str]] = defaultdict(list)
|
||
for index in range(len(manifold)):
|
||
by_coordinate[manifold.get_versor_at(index).tobytes()].append(manifold.get_word_at(index))
|
||
groups = tuple(
|
||
sorted(
|
||
(tuple(sorted(surfaces)) for surfaces in by_coordinate.values() if len(surfaces) > 1),
|
||
key=lambda group: (-len(group), group),
|
||
)
|
||
)
|
||
return len(manifold), len(by_coordinate), groups
|
||
|
||
|
||
def measure_mounted(pack_ids: tuple[str, ...] = TRILINGUAL) -> CollapseReport:
|
||
"""Census the mounted union — the ground the runtime grounds turns against."""
|
||
surfaces, distinct, groups = _census(load_mounted_packs(pack_ids))
|
||
return CollapseReport(config=pack_ids, surfaces=surfaces, distinct_coordinates=distinct, groups=groups)
|
||
|
||
|
||
def measure_pack(pack_id: str) -> CollapseReport:
|
||
"""Census one pack compiled alone — the control that isolates the mount-time site."""
|
||
_, manifold = load_pack(pack_id)
|
||
surfaces, distinct, groups = _census(manifold)
|
||
return CollapseReport(config=(pack_id,), surfaces=surfaces, distinct_coordinates=distinct, groups=groups)
|
||
|
||
|
||
def measure_all(pack_ids: tuple[str, ...] = TRILINGUAL) -> dict[str, CollapseReport]:
|
||
"""The mounted census plus every per-pack control, keyed for direct comparison."""
|
||
reports = {"mounted": measure_mounted(pack_ids)}
|
||
for pack_id in pack_ids:
|
||
reports[pack_id] = measure_pack(pack_id)
|
||
return reports
|
||
|
||
|
||
def main() -> int:
|
||
print(json.dumps({key: report.as_dict() for key, report in measure_all().items()}, indent=2, ensure_ascii=False))
|
||
return 0
|
||
|
||
|
||
if __name__ == "__main__":
|
||
raise SystemExit(main())
|