Spaces:
Running
Running
Align Atlas with canonical roster and add brain trust lens
Browse filesFix stale 67-surface coverage denominator by reconciling against szl3d_holographic.SURFACES; include registry digest and explicit UNSPECIFIED labels; add read-only brain health/gaps probe, adaptive 100+ node layout, module alias validation, and regression tests.
- static/3d/surfaces/atlas.js +138 -28
- szl3d_holographic.py +4 -2
- szl_kc_atlas.py +158 -43
- test/test_atlas_registry_alignment.py +69 -0
static/3d/surfaces/atlas.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
| 1 |
// SPDX-License-Identifier: Apache-2.0
|
| 2 |
// © 2026 Lutar, Stephen P. — SZL Holdings · ORCID 0009-0001-0110-4173 · Doctrine v11
|
| 3 |
//
|
| 4 |
-
// surfaces/atlas.js — THE ATLAS (
|
| 5 |
//
|
| 6 |
-
// A single holographic overview that shows the WHOLE
|
| 7 |
// organism, mapped by the Flower Brain's 8 real clusters (the ecosystem's own taxonomy). The
|
| 8 |
// still, luminous CENTER is the KERNEL PISTIL — the machine-proven locked-8
|
| 9 |
// {F1,F4,F7,F11,F12,F18,F19,F22} (lutar-lean kernel c7c0ba17) — the immutable heart that never
|
| 10 |
// grows. Eight labeled cluster regions radiate out at 45° intervals: PROVEN CORE, VERIFIED,
|
| 11 |
-
// EXPERIMENTAL, UNIFIED, OUROBOROS, SURFACES
|
| 12 |
// CONJECTURES (GRAY, never green). Each cluster holds its member surfaces as nodes; the kernel
|
| 13 |
// clusters carry the flower's kernel objects instead of surfaces. Hover a node -> the surface
|
| 14 |
// title + its HONEST label (MODELED / STRUCTURAL-ONLY / ROADMAP / MEASURED — rendered by the
|
|
@@ -20,11 +20,11 @@
|
|
| 20 |
// taxonomy source is the Flower Brain (szl_kc_flower.py). The LAYOUT is MODELED — a
|
| 21 |
// deterministic, honest drawing read VERBATIM from /api/a11oy/v1/atlas/{map,organism}. The
|
| 22 |
// honesty label "MODELED" is shown as-is and is never upgraded. Unification by CARTOGRAPHY:
|
| 23 |
-
// this gives the
|
| 24 |
//
|
| 25 |
// HARD INVARIANTS (Doctrine v11):
|
| 26 |
// * clusters = EXACTLY 8. locked-core = EXACTLY 8 (the pistil never grows).
|
| 27 |
-
// * coverage
|
| 28 |
// * CONJECTURE cluster renders GREY (0x5a6570), visibly dim, NEVER green.
|
| 29 |
// * honest label mix rendered by real label (MODELED / STRUCTURAL-ONLY / ROADMAP / MEASURED),
|
| 30 |
// not painted uniform.
|
|
@@ -43,6 +43,8 @@ const TITLE = "Atlas";
|
|
| 43 |
// Live endpoints — same convention as loopforge.js (same-origin a11oy namespace).
|
| 44 |
const EP_MAP = "/api/a11oy/v1/atlas/map";
|
| 45 |
const EP_ORGANISM = "/api/a11oy/v1/atlas/organism";
|
|
|
|
|
|
|
| 46 |
|
| 47 |
// ---- Colour palette. We render the estate honestly using ONLY teal / lattice-blue / cyan-blue /
|
| 48 |
// gold / greys / black. The backend's cluster hue field carries a bluish tone upstream for the
|
|
@@ -81,10 +83,12 @@ const LABEL_COLOR = {
|
|
| 81 |
"STRUCTURAL-ONLY": C_DIM, // structural-only — dim grey-blue, no proof claim
|
| 82 |
"ROADMAP": C_GOLD, // roadmap — gold, not-yet-built
|
| 83 |
"MEASURED": C_LOCKED, // measured — proof-teal (the one truly measured surface)
|
|
|
|
|
|
|
| 84 |
};
|
| 85 |
function _labelColor(lbl) {
|
| 86 |
-
const t = String(lbl || "
|
| 87 |
-
return LABEL_COLOR[t] != null ? LABEL_COLOR[t] :
|
| 88 |
}
|
| 89 |
|
| 90 |
// Geometry constants.
|
|
@@ -117,13 +121,17 @@ const S = {
|
|
| 117 |
crossLinks: [], // from /organism
|
| 118 |
lfFlow: null, // Loop-Forge flow overlay
|
| 119 |
clustersTotal: null,
|
| 120 |
-
surfaceCount: null,
|
| 121 |
totalClassified: null,
|
| 122 |
coverage: null,
|
|
|
|
| 123 |
lockedCoreCount: null,
|
| 124 |
conjectureGray: null,
|
| 125 |
everyOnce: null,
|
| 126 |
labelMix: {}, // overall honest label mix
|
|
|
|
|
|
|
|
|
|
| 127 |
built: false,
|
| 128 |
};
|
| 129 |
|
|
@@ -158,6 +166,10 @@ function mount(ctx) {
|
|
| 158 |
_polls.push(ctx.live.poll(EP_ORGANISM, 20000, _onOrganism, {
|
| 159 |
onState: (m) => { S.state = m.state; _paintOverlay(); },
|
| 160 |
}));
|
|
|
|
|
|
|
|
|
|
|
|
|
| 161 |
|
| 162 |
// pointer hover/click for node picking + surface deep-linking.
|
| 163 |
_domEl = (_stage.renderer && _stage.renderer.domElement) || null;
|
|
@@ -192,6 +204,7 @@ function _onMap(j) {
|
|
| 192 |
S.surfaceCount = p.surface_count != null ? p.surface_count : null;
|
| 193 |
S.totalClassified = p.total_classified != null ? p.total_classified : null;
|
| 194 |
S.coverage = p.coverage != null ? p.coverage : null;
|
|
|
|
| 195 |
S.lockedCoreCount = p.locked_core_count != null ? p.locked_core_count : null;
|
| 196 |
S.conjectureGray = (p.conjecture_cluster_gray != null) ? p.conjecture_cluster_gray : null;
|
| 197 |
S.everyOnce = (p.every_surface_classified_once != null) ? p.every_surface_classified_once : null;
|
|
@@ -208,6 +221,18 @@ function _onMap(j) {
|
|
| 208 |
_paintOverlay();
|
| 209 |
}
|
| 210 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 211 |
function _onOrganism(j) {
|
| 212 |
if (!j || !_group) return;
|
| 213 |
const p = j.payload || j;
|
|
@@ -282,10 +307,12 @@ function _clusterAxis(petal) {
|
|
| 282 |
|
| 283 |
// place a node within a cluster's wedge: radius grows in rings, lateral fans the members out.
|
| 284 |
function _placeNode(idKey, indexInCluster, countInCluster, ang) {
|
| 285 |
-
|
|
|
|
|
|
|
| 286 |
const ring = Math.floor(indexInCluster / perRing);
|
| 287 |
const inRing = indexInCluster % perRing;
|
| 288 |
-
const r = RING_INNER + RING_STEP * ring;
|
| 289 |
// fan lateral spread within the wedge (±~26°), tightening as rings grow outward.
|
| 290 |
const spread = (perRing > 1) ? (inRing / (perRing - 1) - 0.5) : 0; // -0.5..0.5
|
| 291 |
const wedge = (26 - 3 * ring) * DEG;
|
|
@@ -323,11 +350,11 @@ function _rebuildOrganism() {
|
|
| 323 |
|
| 324 |
if (surfaces.length) {
|
| 325 |
surfaces.forEach((s, i) => {
|
| 326 |
-
const hLabel = String(s.label || "
|
| 327 |
// honest label colour — the estate is NOT painted uniform.
|
| 328 |
const nodeCol = c.gray ? C_CONJ : _labelColor(hLabel);
|
| 329 |
-
const isRoadmap = hLabel === "ROADMAP";
|
| 330 |
-
const isStruct = hLabel === "STRUCTURAL-ONLY";
|
| 331 |
const geo = new _THREE.SphereGeometry(NODE_R, 16, 16);
|
| 332 |
const mat = new _THREE.MeshStandardMaterial({
|
| 333 |
color: nodeCol,
|
|
@@ -548,15 +575,17 @@ function _animate() {
|
|
| 548 |
function _buildOverlay(ctx) {
|
| 549 |
_show = createShowcase(ctx, {
|
| 550 |
id: ID, title: TITLE, accent: "#3af4c8", badge: _badge,
|
| 551 |
-
chips: [{ label: "MODELED", name: "label" }],
|
| 552 |
});
|
| 553 |
_overlay = document.createElement("div");
|
| 554 |
_overlay.style.cssText = "font:12px/1.5 ui-monospace,Menlo,monospace;color:#cfe3ea;";
|
| 555 |
_overlay.innerHTML =
|
| 556 |
-
'<div style="margin-top:2px;color:#8fb3bd;font-size:10.5px">The
|
| 557 |
_row("Total surfaces", "atlas-total") +
|
| 558 |
_row("Clusters", "atlas-clusters") +
|
| 559 |
_row("Coverage (all classified)", "atlas-coverage") +
|
|
|
|
|
|
|
| 560 |
'<hr style="border:0;border-top:1px solid #1b3a44;margin:8px 0">' +
|
| 561 |
'<div style="font-size:10.5px;color:#8fb3bd;margin-bottom:2px">Honest label mix (never painted uniform)</div>' +
|
| 562 |
'<div id="atlas-labelmix" style="font-size:10.5px;color:#eaf6f9"></div>' +
|
|
@@ -567,9 +596,31 @@ function _buildOverlay(ctx) {
|
|
| 567 |
'<div style="font-size:10.5px;color:#8fb3bd;margin-bottom:2px">Invariants</div>' +
|
| 568 |
'<div id="atlas-inv" style="font-size:11px;color:#eaf6f9"></div>' +
|
| 569 |
'<div style="margin-top:8px;display:flex;gap:10px;flex-wrap:wrap;font-size:10px;color:#9fc">' +
|
| 570 |
-
_leg(C_LOCKED, "
|
| 571 |
-
_leg(C_DIM, "structural
|
| 572 |
'</div>' +
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 573 |
'<div style="margin-top:9px;display:flex;gap:8px;flex-wrap:wrap">' +
|
| 574 |
'<button id="atlas-plain" style="font:11px ui-monospace;background:#0f2027;color:#9fc;border:1px solid #1b3a44;border-radius:6px;padding:3px 8px;cursor:pointer">Plain language</button>' +
|
| 575 |
'<button id="atlas-info" style="font:11px ui-monospace;background:#0f2027;color:#9fc;border:1px solid #1b3a44;border-radius:6px;padding:3px 8px;cursor:pointer">What is this?</button>' +
|
|
@@ -585,6 +636,10 @@ function _buildOverlay(ctx) {
|
|
| 585 |
if (box) box.style.display = box.style.display === "none" ? "block" : "none";
|
| 586 |
if (box && box.innerHTML === "") box.innerHTML = _infoHTML();
|
| 587 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
| 588 |
}
|
| 589 |
function _row(k, id) {
|
| 590 |
return '<div style="display:flex;justify-content:space-between;gap:12px;margin-top:3px">' +
|
|
@@ -598,6 +653,35 @@ function _hex(n) { return "#" + (n >>> 0).toString(16).padStart(6, "0"); }
|
|
| 598 |
function _esc(s) { return String(s == null ? "" : s).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"); }
|
| 599 |
function _set(id, v) { const e = _overlay && _overlay.querySelector("#" + id); if (e) e.textContent = v; }
|
| 600 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 601 |
function _buildTooltip(ctx) {
|
| 602 |
_tooltip = document.createElement("div");
|
| 603 |
_tooltip.style.cssText =
|
|
@@ -624,11 +708,17 @@ function _paintOverlay() {
|
|
| 624 |
const d = deg ? "\u2014" : null;
|
| 625 |
|
| 626 |
if (_show) _show.setChip("label", S.label || "MODELED");
|
|
|
|
| 627 |
|
| 628 |
if (missing && !S.clusters.length) {
|
| 629 |
_set("atlas-total", nd);
|
| 630 |
_set("atlas-clusters", "8 (Flower Brain taxonomy, offline)");
|
| 631 |
_set("atlas-coverage", nd);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 632 |
const lm = _overlay.querySelector("#atlas-labelmix"); if (lm) lm.textContent = nd + " — the map waits until the organ answers.";
|
| 633 |
const cl = _overlay.querySelector("#atlas-clusterlist"); if (cl) cl.textContent = nd;
|
| 634 |
const inv = _overlay.querySelector("#atlas-inv");
|
|
@@ -641,14 +731,23 @@ function _paintOverlay() {
|
|
| 641 |
}
|
| 642 |
|
| 643 |
const total = S.surfaceCount != null ? S.surfaceCount : null;
|
| 644 |
-
_set("atlas-total", d || (total != null ? String(total) + " (
|
| 645 |
_set("atlas-clusters", d || (S.clustersTotal != null ? String(S.clustersTotal) + " (must be 8)" : "\u2014"));
|
| 646 |
_set("atlas-coverage", d || (S.coverage != null ? (S.coverage * 100).toFixed(1) + "% (" + (S.totalClassified != null ? S.totalClassified : "\u2014") + "/" + (total != null ? total : "\u2014") + ")" : "\u2014"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 647 |
|
| 648 |
// honest label mix — rendered by real label, coloured by label type (NOT uniform).
|
| 649 |
const lm = _overlay.querySelector("#atlas-labelmix");
|
| 650 |
if (lm) {
|
| 651 |
-
const order = ["MODELED", "STRUCTURAL-ONLY", "ROADMAP", "
|
| 652 |
const keys = order.filter((k) => S.labelMix[k] != null).concat(Object.keys(S.labelMix).filter((k) => order.indexOf(k) < 0));
|
| 653 |
if (!keys.length) { lm.textContent = deg ? "\u2014" : "\u2014"; }
|
| 654 |
else {
|
|
@@ -686,6 +785,8 @@ function _paintOverlay() {
|
|
| 686 |
_check("clusters == 8", clustersOk) +
|
| 687 |
_check("locked-core == 8", lockedOk) +
|
| 688 |
_check("coverage 1.0", covOk) +
|
|
|
|
|
|
|
| 689 |
_check("conjecture grey (never green)", grayOk);
|
| 690 |
}
|
| 691 |
|
|
@@ -702,15 +803,20 @@ function _applyPlain() {
|
|
| 702 |
if (!box) return;
|
| 703 |
box.style.display = _plain ? "block" : "none";
|
| 704 |
if (_plain) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 705 |
box.innerHTML =
|
| 706 |
-
"This is our <b>entire holographic estate drawn as one organism</b>.
|
| 707 |
"on their own they look like a flat wall. The Atlas gives them a spine by <b>mapping every surface " +
|
| 708 |
"into the Flower Brain\u2019s 8 real clusters</b> \u2014 the ecosystem\u2019s own taxonomy \u2014 without removing a " +
|
| 709 |
"single surface. The solid teal ball in the middle is the <b>pistil: the 8 things we have actually " +
|
| 710 |
"machine-proven</b> (locked-8, kernel c7c0ba17). It never grows. Around it, eight regions fan out; most " +
|
| 711 |
-
"of the surfaces live in the big <b>SURFACES</b> region (
|
| 712 |
-
"
|
| 713 |
-
"surface name and its honest label (
|
| 714 |
"them all the same); <b>click a surface</b> to jump straight to it. The gold arcs are <b>Loop Forge\u2019s " +
|
| 715 |
"living process</b> (propose \u2192 kernel gate \u2192 archive). The grey region is our <b>conjectures we have NOT " +
|
| 716 |
"proven</b>; it stays grey and never turns green. Label is <b>" + (S.label || "MODELED") + "</b>: a faithful " +
|
|
@@ -720,16 +826,19 @@ function _applyPlain() {
|
|
| 720 |
}
|
| 721 |
|
| 722 |
function _infoHTML() {
|
|
|
|
|
|
|
| 723 |
return "<b>This is the estate as one organism, mapped by the Flower Brain\u2019s 8 clusters.</b> " +
|
| 724 |
-
"Unification by cartography: the
|
| 725 |
"the 8 real clusters of the <b>Flower Brain</b> (the taxonomy source) \u2014 additively, with no surface removed. " +
|
| 726 |
"The still center is the machine-proven <b>locked-8 pistil</b> {F1,F4,F7,F11,F12,F18,F19,F22}, carried from " +
|
| 727 |
"the lutar-lean kernel <b>c7c0ba17</b> (cited; re-verified in CI/dev, not in-Space). " +
|
| 728 |
"<br><br><b>What is MODELED vs real.</b> The classification is REAL \u2014 each surface maps to its cluster by its " +
|
| 729 |
-
"actual
|
| 730 |
-
"
|
| 731 |
"read verbatim from <code>/api/a11oy/v1/atlas/{map,organism}</code> \u2014 not a computation, not \u201Calive.\u201D The honest " +
|
| 732 |
-
"label mix
|
|
|
|
| 733 |
"\u039B stays <b>Conjecture 1</b>, the conjecture cluster is <b>grey, never green</b>. " +
|
| 734 |
"<br><br><b>Sources (we cite the taxonomy; we do not claim it as computation).</b><br>" +
|
| 735 |
"• Taxonomy source \u2014 the Flower Brain: <code>github.com/szl-holdings/killinchu szl_kc_flower.py</code><br>" +
|
|
@@ -774,7 +883,8 @@ function unmount() {
|
|
| 774 |
S.clusters = []; S.petals = []; S.petalByCluster = {}; S.crossLinks = []; S.lfFlow = null;
|
| 775 |
S.clustersTotal = S.surfaceCount = S.totalClassified = S.coverage = null;
|
| 776 |
S.lockedCoreCount = S.conjectureGray = S.everyOnce = null;
|
|
|
|
| 777 |
S.labelMix = {}; S.built = false;
|
| 778 |
}
|
| 779 |
|
| 780 |
-
export default { id: ID, title: TITLE, endpoints: [EP_MAP, EP_ORGANISM], mount, unmount };
|
|
|
|
| 1 |
// SPDX-License-Identifier: Apache-2.0
|
| 2 |
// © 2026 Lutar, Stephen P. — SZL Holdings · ORCID 0009-0001-0110-4173 · Doctrine v11
|
| 3 |
//
|
| 4 |
+
// surfaces/atlas.js — THE ATLAS (the unifying, registry-aligned front door).
|
| 5 |
//
|
| 6 |
+
// A single holographic overview that shows the WHOLE canonical holographic registry as ONE
|
| 7 |
// organism, mapped by the Flower Brain's 8 real clusters (the ecosystem's own taxonomy). The
|
| 8 |
// still, luminous CENTER is the KERNEL PISTIL — the machine-proven locked-8
|
| 9 |
// {F1,F4,F7,F11,F12,F18,F19,F22} (lutar-lean kernel c7c0ba17) — the immutable heart that never
|
| 10 |
// grows. Eight labeled cluster regions radiate out at 45° intervals: PROVEN CORE, VERIFIED,
|
| 11 |
+
// EXPERIMENTAL, UNIFIED, OUROBOROS, SURFACES, MEMORY & PROVENANCE, and
|
| 12 |
// CONJECTURES (GRAY, never green). Each cluster holds its member surfaces as nodes; the kernel
|
| 13 |
// clusters carry the flower's kernel objects instead of surfaces. Hover a node -> the surface
|
| 14 |
// title + its HONEST label (MODELED / STRUCTURAL-ONLY / ROADMAP / MEASURED — rendered by the
|
|
|
|
| 20 |
// taxonomy source is the Flower Brain (szl_kc_flower.py). The LAYOUT is MODELED — a
|
| 21 |
// deterministic, honest drawing read VERBATIM from /api/a11oy/v1/atlas/{map,organism}. The
|
| 22 |
// honesty label "MODELED" is shown as-is and is never upgraded. Unification by CARTOGRAPHY:
|
| 23 |
+
// this gives the evolving tab wall a spine without removing a single surface.
|
| 24 |
//
|
| 25 |
// HARD INVARIANTS (Doctrine v11):
|
| 26 |
// * clusters = EXACTLY 8. locked-core = EXACTLY 8 (the pistil never grows).
|
| 27 |
+
// * coverage is measured against szl3d_holographic.SURFACES; denominator + digest are shown.
|
| 28 |
// * CONJECTURE cluster renders GREY (0x5a6570), visibly dim, NEVER green.
|
| 29 |
// * honest label mix rendered by real label (MODELED / STRUCTURAL-ONLY / ROADMAP / MEASURED),
|
| 30 |
// not painted uniform.
|
|
|
|
| 43 |
// Live endpoints — same convention as loopforge.js (same-origin a11oy namespace).
|
| 44 |
const EP_MAP = "/api/a11oy/v1/atlas/map";
|
| 45 |
const EP_ORGANISM = "/api/a11oy/v1/atlas/organism";
|
| 46 |
+
const EP_BRAIN_HEALTH = "/api/a11oy/v1/brain/health?query=evidence-bound%20brain%20atlas&k=12";
|
| 47 |
+
const EP_BRAIN_GAPS = "/api/a11oy/v1/brain/gaps?query=evidence-bound%20brain%20atlas&k=12";
|
| 48 |
|
| 49 |
// ---- Colour palette. We render the estate honestly using ONLY teal / lattice-blue / cyan-blue /
|
| 50 |
// gold / greys / black. The backend's cluster hue field carries a bluish tone upstream for the
|
|
|
|
| 83 |
"STRUCTURAL-ONLY": C_DIM, // structural-only — dim grey-blue, no proof claim
|
| 84 |
"ROADMAP": C_GOLD, // roadmap — gold, not-yet-built
|
| 85 |
"MEASURED": C_LOCKED, // measured — proof-teal (the one truly measured surface)
|
| 86 |
+
"SIMULATED": C_GOLD, // simulated — visible but not live-world evidence
|
| 87 |
+
"UNSPECIFIED": C_DIM, // no maturity claim in the canonical registry
|
| 88 |
};
|
| 89 |
function _labelColor(lbl) {
|
| 90 |
+
const t = String(lbl || "UNSPECIFIED").toUpperCase();
|
| 91 |
+
return LABEL_COLOR[t] != null ? LABEL_COLOR[t] : C_DIM;
|
| 92 |
}
|
| 93 |
|
| 94 |
// Geometry constants.
|
|
|
|
| 121 |
crossLinks: [], // from /organism
|
| 122 |
lfFlow: null, // Loop-Forge flow overlay
|
| 123 |
clustersTotal: null,
|
| 124 |
+
surfaceCount: null,
|
| 125 |
totalClassified: null,
|
| 126 |
coverage: null,
|
| 127 |
+
registry: null,
|
| 128 |
lockedCoreCount: null,
|
| 129 |
conjectureGray: null,
|
| 130 |
everyOnce: null,
|
| 131 |
labelMix: {}, // overall honest label mix
|
| 132 |
+
brainHealth: null,
|
| 133 |
+
brainGaps: null,
|
| 134 |
+
brainProbeState: "init",
|
| 135 |
built: false,
|
| 136 |
};
|
| 137 |
|
|
|
|
| 166 |
_polls.push(ctx.live.poll(EP_ORGANISM, 20000, _onOrganism, {
|
| 167 |
onState: (m) => { S.state = m.state; _paintOverlay(); },
|
| 168 |
}));
|
| 169 |
+
_polls.push(ctx.live.poll(EP_BRAIN_HEALTH, 30000, _onBrainHealth, {
|
| 170 |
+
onState: (m) => { S.brainProbeState = m.state; _paintOverlay(); },
|
| 171 |
+
}));
|
| 172 |
+
_polls.push(ctx.live.poll(EP_BRAIN_GAPS, 45000, _onBrainGaps, {}));
|
| 173 |
|
| 174 |
// pointer hover/click for node picking + surface deep-linking.
|
| 175 |
_domEl = (_stage.renderer && _stage.renderer.domElement) || null;
|
|
|
|
| 204 |
S.surfaceCount = p.surface_count != null ? p.surface_count : null;
|
| 205 |
S.totalClassified = p.total_classified != null ? p.total_classified : null;
|
| 206 |
S.coverage = p.coverage != null ? p.coverage : null;
|
| 207 |
+
S.registry = p.registry || null;
|
| 208 |
S.lockedCoreCount = p.locked_core_count != null ? p.locked_core_count : null;
|
| 209 |
S.conjectureGray = (p.conjecture_cluster_gray != null) ? p.conjecture_cluster_gray : null;
|
| 210 |
S.everyOnce = (p.every_surface_classified_once != null) ? p.every_surface_classified_once : null;
|
|
|
|
| 221 |
_paintOverlay();
|
| 222 |
}
|
| 223 |
|
| 224 |
+
function _onBrainHealth(j) {
|
| 225 |
+
if (!j) { S.brainHealth = null; _paintOverlay(); return; }
|
| 226 |
+
S.brainHealth = j.payload || j;
|
| 227 |
+
_paintOverlay();
|
| 228 |
+
}
|
| 229 |
+
|
| 230 |
+
function _onBrainGaps(j) {
|
| 231 |
+
if (!j) { S.brainGaps = null; _paintOverlay(); return; }
|
| 232 |
+
S.brainGaps = j.payload || j;
|
| 233 |
+
_paintOverlay();
|
| 234 |
+
}
|
| 235 |
+
|
| 236 |
function _onOrganism(j) {
|
| 237 |
if (!j || !_group) return;
|
| 238 |
const p = j.payload || j;
|
|
|
|
| 307 |
|
| 308 |
// place a node within a cluster's wedge: radius grows in rings, lateral fans the members out.
|
| 309 |
function _placeNode(idKey, indexInCluster, countInCluster, ang) {
|
| 310 |
+
// Adaptive packing keeps an evolving 100+ surface roster inside the camera frustum.
|
| 311 |
+
// The original fixed six-per-ring layout pushed later registry nodes far off-screen.
|
| 312 |
+
const perRing = Math.max(6, Math.min(16, Math.ceil(Math.sqrt(Math.max(1, countInCluster)) * 1.5)));
|
| 313 |
const ring = Math.floor(indexInCluster / perRing);
|
| 314 |
const inRing = indexInCluster % perRing;
|
| 315 |
+
const r = RING_INNER + Math.min(RING_STEP, 0.78) * ring;
|
| 316 |
// fan lateral spread within the wedge (±~26°), tightening as rings grow outward.
|
| 317 |
const spread = (perRing > 1) ? (inRing / (perRing - 1) - 0.5) : 0; // -0.5..0.5
|
| 318 |
const wedge = (26 - 3 * ring) * DEG;
|
|
|
|
| 350 |
|
| 351 |
if (surfaces.length) {
|
| 352 |
surfaces.forEach((s, i) => {
|
| 353 |
+
const hLabel = String(s.label || "UNSPECIFIED").toUpperCase();
|
| 354 |
// honest label colour — the estate is NOT painted uniform.
|
| 355 |
const nodeCol = c.gray ? C_CONJ : _labelColor(hLabel);
|
| 356 |
+
const isRoadmap = hLabel === "ROADMAP" || hLabel === "SIMULATED";
|
| 357 |
+
const isStruct = hLabel === "STRUCTURAL-ONLY" || hLabel === "UNSPECIFIED";
|
| 358 |
const geo = new _THREE.SphereGeometry(NODE_R, 16, 16);
|
| 359 |
const mat = new _THREE.MeshStandardMaterial({
|
| 360 |
color: nodeCol,
|
|
|
|
| 575 |
function _buildOverlay(ctx) {
|
| 576 |
_show = createShowcase(ctx, {
|
| 577 |
id: ID, title: TITLE, accent: "#3af4c8", badge: _badge,
|
| 578 |
+
chips: [{ label: "MODELED", name: "label" }, { label: "BRAIN: LOADING", name: "brain" }],
|
| 579 |
});
|
| 580 |
_overlay = document.createElement("div");
|
| 581 |
_overlay.style.cssText = "font:12px/1.5 ui-monospace,Menlo,monospace;color:#cfe3ea;";
|
| 582 |
_overlay.innerHTML =
|
| 583 |
+
'<div style="margin-top:2px;color:#8fb3bd;font-size:10.5px">The canonical holographic registry as ONE organism — measured against the same roster that builds this shell. The still teal heart is the machine-proven locked-8 pistil (kernel c7c0ba17); hover a node for its honest label, click a surface to open it.</div>' +
|
| 584 |
_row("Total surfaces", "atlas-total") +
|
| 585 |
_row("Clusters", "atlas-clusters") +
|
| 586 |
_row("Coverage (all classified)", "atlas-coverage") +
|
| 587 |
+
_row("Registry source", "atlas-registry-source") +
|
| 588 |
+
_row("Registry digest", "atlas-registry-digest") +
|
| 589 |
'<hr style="border:0;border-top:1px solid #1b3a44;margin:8px 0">' +
|
| 590 |
'<div style="font-size:10.5px;color:#8fb3bd;margin-bottom:2px">Honest label mix (never painted uniform)</div>' +
|
| 591 |
'<div id="atlas-labelmix" style="font-size:10.5px;color:#eaf6f9"></div>' +
|
|
|
|
| 596 |
'<div style="font-size:10.5px;color:#8fb3bd;margin-bottom:2px">Invariants</div>' +
|
| 597 |
'<div id="atlas-inv" style="font-size:11px;color:#eaf6f9"></div>' +
|
| 598 |
'<div style="margin-top:8px;display:flex;gap:10px;flex-wrap:wrap;font-size:10px;color:#9fc">' +
|
| 599 |
+
_leg(C_LOCKED, "locked core / measured node") + _leg(C_VERIF, "modeled") + _leg(C_GOLD, "simulated / roadmap / LF flow") +
|
| 600 |
+
_leg(C_DIM, "structural / unspecified") + _leg(C_CONJ, "conjecture (grey)") +
|
| 601 |
'</div>' +
|
| 602 |
+
'<hr style="border:0;border-top:1px solid #1b3a44;margin:9px 0">' +
|
| 603 |
+
'<div style="font-size:10.5px;color:#8fb3bd;margin-bottom:3px">Brain trust lens · live honesty signals for a query</div>' +
|
| 604 |
+
_row("Health verdict", "atlas-brain-health") +
|
| 605 |
+
_row("Signals available", "atlas-brain-components") +
|
| 606 |
+
_row("Knowledge gaps", "atlas-brain-gaps") +
|
| 607 |
+
'<div style="display:flex;gap:6px;margin-top:7px">' +
|
| 608 |
+
'<input id="atlas-brain-query" value="evidence-bound brain atlas" aria-label="Brain trust probe query" style="min-width:0;flex:1;font:10.5px ui-monospace;background:#081319;color:#dceef2;border:1px solid #1b3a44;border-radius:6px;padding:5px 7px">' +
|
| 609 |
+
'<button id="atlas-brain-run" style="font:10.5px ui-monospace;background:#0f2027;color:#9fc;border:1px solid #1b3a44;border-radius:6px;padding:4px 8px;cursor:pointer">Run probe</button>' +
|
| 610 |
+
'</div>' +
|
| 611 |
+
'<div id="atlas-brain-note" role="status" style="margin-top:5px;font-size:10px;color:#8fb3bd">A read-only query: no memory write, no model call, no action.</div>' +
|
| 612 |
+
'<details style="margin-top:9px;border-top:1px solid #1b3a44;padding-top:7px">' +
|
| 613 |
+
'<summary style="cursor:pointer;color:#9fc;font-size:10.5px">Purpose · Try · Evidence · Limits · Reproduce</summary>' +
|
| 614 |
+
'<div style="margin-top:6px;font-size:10px;color:#bcd;line-height:1.55">' +
|
| 615 |
+
'<b>Purpose.</b> Keep the estate map complete as the roster evolves, and expose whether the brain can support a query now.<br>' +
|
| 616 |
+
'<b>Try.</b> Enter a topic and run the read-only trust probe.<br>' +
|
| 617 |
+
'<b>Evidence.</b> Canonical roster digest, classified denominator, brain component availability, and structural gap verdict.<br>' +
|
| 618 |
+
'<b>Limits.</b> MODELED cartography is not truth, consciousness, or a production readiness claim. UNSPECIFIED is never promoted. Missing brain guards stay UNAVAILABLE.<br>' +
|
| 619 |
+
'<b>Reproduce.</b> <a id="atlas-open-map" href="' + EP_MAP + '" target="_blank" rel="noopener" style="color:#9fc">map JSON</a> · ' +
|
| 620 |
+
'<a id="atlas-open-health" href="' + EP_BRAIN_HEALTH + '" target="_blank" rel="noopener" style="color:#9fc">health JSON</a> · ' +
|
| 621 |
+
'<a id="atlas-open-gaps" href="' + EP_BRAIN_GAPS + '" target="_blank" rel="noopener" style="color:#9fc">gaps JSON</a>' +
|
| 622 |
+
'</div>' +
|
| 623 |
+
'</details>' +
|
| 624 |
'<div style="margin-top:9px;display:flex;gap:8px;flex-wrap:wrap">' +
|
| 625 |
'<button id="atlas-plain" style="font:11px ui-monospace;background:#0f2027;color:#9fc;border:1px solid #1b3a44;border-radius:6px;padding:3px 8px;cursor:pointer">Plain language</button>' +
|
| 626 |
'<button id="atlas-info" style="font:11px ui-monospace;background:#0f2027;color:#9fc;border:1px solid #1b3a44;border-radius:6px;padding:3px 8px;cursor:pointer">What is this?</button>' +
|
|
|
|
| 636 |
if (box) box.style.display = box.style.display === "none" ? "block" : "none";
|
| 637 |
if (box && box.innerHTML === "") box.innerHTML = _infoHTML();
|
| 638 |
});
|
| 639 |
+
const rb = _overlay.querySelector("#atlas-brain-run");
|
| 640 |
+
if (rb) rb.addEventListener("click", _runBrainProbe);
|
| 641 |
+
const qi = _overlay.querySelector("#atlas-brain-query");
|
| 642 |
+
if (qi) qi.addEventListener("keydown", (e) => { if (e.key === "Enter") _runBrainProbe(); });
|
| 643 |
}
|
| 644 |
function _row(k, id) {
|
| 645 |
return '<div style="display:flex;justify-content:space-between;gap:12px;margin-top:3px">' +
|
|
|
|
| 653 |
function _esc(s) { return String(s == null ? "" : s).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"); }
|
| 654 |
function _set(id, v) { const e = _overlay && _overlay.querySelector("#" + id); if (e) e.textContent = v; }
|
| 655 |
|
| 656 |
+
async function _runBrainProbe() {
|
| 657 |
+
const input = _overlay && _overlay.querySelector("#atlas-brain-query");
|
| 658 |
+
const button = _overlay && _overlay.querySelector("#atlas-brain-run");
|
| 659 |
+
const note = _overlay && _overlay.querySelector("#atlas-brain-note");
|
| 660 |
+
const query = String(input && input.value || "").trim();
|
| 661 |
+
if (!query) { if (note) note.textContent = "Enter a query. Empty input is not treated as evidence."; return; }
|
| 662 |
+
const q = encodeURIComponent(query);
|
| 663 |
+
const healthUrl = "/api/a11oy/v1/brain/health?query=" + q + "&k=12";
|
| 664 |
+
const gapsUrl = "/api/a11oy/v1/brain/gaps?query=" + q + "&k=12";
|
| 665 |
+
if (button) { button.disabled = true; button.textContent = "Running…"; }
|
| 666 |
+
if (note) note.textContent = "Reading the live honesty surfaces…";
|
| 667 |
+
try {
|
| 668 |
+
const [hr, gr] = await Promise.all([fetch(healthUrl, { headers: { accept: "application/json" } }), fetch(gapsUrl, { headers: { accept: "application/json" } })]);
|
| 669 |
+
if (!hr.ok || !gr.ok) throw new Error("HTTP " + hr.status + "/" + gr.status);
|
| 670 |
+
S.brainHealth = await hr.json();
|
| 671 |
+
S.brainGaps = await gr.json();
|
| 672 |
+
S.brainProbeState = "live";
|
| 673 |
+
const oh = _overlay && _overlay.querySelector("#atlas-open-health"); if (oh) oh.href = healthUrl;
|
| 674 |
+
const og = _overlay && _overlay.querySelector("#atlas-open-gaps"); if (og) og.href = gapsUrl;
|
| 675 |
+
if (note) note.textContent = "Probe complete. Verdicts are read-only honesty signals, not a truth guarantee.";
|
| 676 |
+
} catch (e) {
|
| 677 |
+
S.brainHealth = null; S.brainGaps = null; S.brainProbeState = "error";
|
| 678 |
+
if (note) note.textContent = "NO-LIVE-DATA — the probe failed honestly (" + String(e && e.message || e).slice(0, 80) + ").";
|
| 679 |
+
} finally {
|
| 680 |
+
if (button) { button.disabled = false; button.textContent = "Run probe"; }
|
| 681 |
+
_paintOverlay();
|
| 682 |
+
}
|
| 683 |
+
}
|
| 684 |
+
|
| 685 |
function _buildTooltip(ctx) {
|
| 686 |
_tooltip = document.createElement("div");
|
| 687 |
_tooltip.style.cssText =
|
|
|
|
| 708 |
const d = deg ? "\u2014" : null;
|
| 709 |
|
| 710 |
if (_show) _show.setChip("label", S.label || "MODELED");
|
| 711 |
+
if (_show) _show.setChip("brain", "BRAIN: " + (S.brainHealth && S.brainHealth.verdict ? S.brainHealth.verdict : (S.brainProbeState === "error" ? "NO-LIVE-DATA" : "LOADING")));
|
| 712 |
|
| 713 |
if (missing && !S.clusters.length) {
|
| 714 |
_set("atlas-total", nd);
|
| 715 |
_set("atlas-clusters", "8 (Flower Brain taxonomy, offline)");
|
| 716 |
_set("atlas-coverage", nd);
|
| 717 |
+
_set("atlas-registry-source", nd);
|
| 718 |
+
_set("atlas-registry-digest", nd);
|
| 719 |
+
_set("atlas-brain-health", S.brainHealth && S.brainHealth.verdict || nd);
|
| 720 |
+
_set("atlas-brain-components", nd);
|
| 721 |
+
_set("atlas-brain-gaps", S.brainGaps && (S.brainGaps.estate_verdict || (S.brainGaps.gaps && S.brainGaps.gaps.estate_verdict)) || nd);
|
| 722 |
const lm = _overlay.querySelector("#atlas-labelmix"); if (lm) lm.textContent = nd + " — the map waits until the organ answers.";
|
| 723 |
const cl = _overlay.querySelector("#atlas-clusterlist"); if (cl) cl.textContent = nd;
|
| 724 |
const inv = _overlay.querySelector("#atlas-inv");
|
|
|
|
| 731 |
}
|
| 732 |
|
| 733 |
const total = S.surfaceCount != null ? S.surfaceCount : null;
|
| 734 |
+
_set("atlas-total", d || (total != null ? String(total) + " (Atlas included)" : "\u2014"));
|
| 735 |
_set("atlas-clusters", d || (S.clustersTotal != null ? String(S.clustersTotal) + " (must be 8)" : "\u2014"));
|
| 736 |
_set("atlas-coverage", d || (S.coverage != null ? (S.coverage * 100).toFixed(1) + "% (" + (S.totalClassified != null ? S.totalClassified : "\u2014") + "/" + (total != null ? total : "\u2014") + ")" : "\u2014"));
|
| 737 |
+
_set("atlas-registry-source", S.registry ? ((S.registry.loaded ? "CANONICAL" : "FALLBACK") + " · " + (S.registry.surface_count != null ? S.registry.surface_count : "—")) : "\u2014");
|
| 738 |
+
_set("atlas-registry-digest", S.registry && S.registry.sha256 ? S.registry.sha256.slice(0, 16) + "…" : "\u2014");
|
| 739 |
+
|
| 740 |
+
const health = S.brainHealth || null;
|
| 741 |
+
const healthSummary = health && health.summary || {};
|
| 742 |
+
const gaps = S.brainGaps || null;
|
| 743 |
+
_set("atlas-brain-health", health && health.verdict ? String(health.verdict) : (S.brainProbeState === "error" ? "NO-LIVE-DATA" : "LOADING"));
|
| 744 |
+
_set("atlas-brain-components", health ? String(healthSummary.components_available != null ? healthSummary.components_available : "—") + "/" + String(healthSummary.components_total != null ? healthSummary.components_total : "—") : "\u2014");
|
| 745 |
+
_set("atlas-brain-gaps", gaps ? String(gaps.estate_verdict || (gaps.gaps && gaps.gaps.estate_verdict) || "UNSPECIFIED") : "\u2014");
|
| 746 |
|
| 747 |
// honest label mix — rendered by real label, coloured by label type (NOT uniform).
|
| 748 |
const lm = _overlay.querySelector("#atlas-labelmix");
|
| 749 |
if (lm) {
|
| 750 |
+
const order = ["MODELED", "MEASURED", "STRUCTURAL-ONLY", "SIMULATED", "ROADMAP", "UNSPECIFIED"];
|
| 751 |
const keys = order.filter((k) => S.labelMix[k] != null).concat(Object.keys(S.labelMix).filter((k) => order.indexOf(k) < 0));
|
| 752 |
if (!keys.length) { lm.textContent = deg ? "\u2014" : "\u2014"; }
|
| 753 |
else {
|
|
|
|
| 785 |
_check("clusters == 8", clustersOk) +
|
| 786 |
_check("locked-core == 8", lockedOk) +
|
| 787 |
_check("coverage 1.0", covOk) +
|
| 788 |
+
_check("canonical registry loaded", S.registry ? S.registry.loaded === true : null) +
|
| 789 |
+
_check("registry duplicate ids == 0", S.registry && Array.isArray(S.registry.duplicate_ids) ? S.registry.duplicate_ids.length === 0 : null) +
|
| 790 |
_check("conjecture grey (never green)", grayOk);
|
| 791 |
}
|
| 792 |
|
|
|
|
| 803 |
if (!box) return;
|
| 804 |
box.style.display = _plain ? "block" : "none";
|
| 805 |
if (_plain) {
|
| 806 |
+
const total = S.surfaceCount != null ? S.surfaceCount : "the current";
|
| 807 |
+
const c6 = S.clusters.find((c) => c.key === "surfaces");
|
| 808 |
+
const c7 = S.clusters.find((c) => c.key === "memory");
|
| 809 |
+
const n6 = c6 && c6.surface_count != null ? c6.surface_count : "many";
|
| 810 |
+
const n7 = c7 && c7.surface_count != null ? c7.surface_count : "the brain and memory";
|
| 811 |
box.innerHTML =
|
| 812 |
+
"This is our <b>entire holographic estate drawn as one organism</b>. The canonical shell currently declares <b>" + total + " surfaces</b>, Atlas included; " +
|
| 813 |
"on their own they look like a flat wall. The Atlas gives them a spine by <b>mapping every surface " +
|
| 814 |
"into the Flower Brain\u2019s 8 real clusters</b> \u2014 the ecosystem\u2019s own taxonomy \u2014 without removing a " +
|
| 815 |
"single surface. The solid teal ball in the middle is the <b>pistil: the 8 things we have actually " +
|
| 816 |
"machine-proven</b> (locked-8, kernel c7c0ba17). It never grows. Around it, eight regions fan out; most " +
|
| 817 |
+
"of the surfaces live in the big <b>SURFACES</b> region (" + n6 + "), with <b>MEMORY & PROVENANCE</b> " +
|
| 818 |
+
"carrying " + n7 + ". The rest of the clusters carry the flower\u2019s kernel objects. <b>Hover any node</b> to see its " +
|
| 819 |
+
"surface name and its honest label (including UNSPECIFIED when the registry makes no maturity claim \u2014 we do not paint " +
|
| 820 |
"them all the same); <b>click a surface</b> to jump straight to it. The gold arcs are <b>Loop Forge\u2019s " +
|
| 821 |
"living process</b> (propose \u2192 kernel gate \u2192 archive). The grey region is our <b>conjectures we have NOT " +
|
| 822 |
"proven</b>; it stays grey and never turns green. Label is <b>" + (S.label || "MODELED") + "</b>: a faithful " +
|
|
|
|
| 826 |
}
|
| 827 |
|
| 828 |
function _infoHTML() {
|
| 829 |
+
const total = S.surfaceCount != null ? S.surfaceCount : "the canonical roster";
|
| 830 |
+
const digest = S.registry && S.registry.sha256 ? S.registry.sha256.slice(0, 16) + "…" : "pending";
|
| 831 |
return "<b>This is the estate as one organism, mapped by the Flower Brain\u2019s 8 clusters.</b> " +
|
| 832 |
+
"Unification by cartography: the shell roster is given a spine by classifying every surface into " +
|
| 833 |
"the 8 real clusters of the <b>Flower Brain</b> (the taxonomy source) \u2014 additively, with no surface removed. " +
|
| 834 |
"The still center is the machine-proven <b>locked-8 pistil</b> {F1,F4,F7,F11,F12,F18,F19,F22}, carried from " +
|
| 835 |
"the lutar-lean kernel <b>c7c0ba17</b> (cited; re-verified in CI/dev, not in-Space). " +
|
| 836 |
"<br><br><b>What is MODELED vs real.</b> The classification is REAL \u2014 each surface maps to its cluster by its " +
|
| 837 |
+
"actual declared category/domain, served by the backend organ szl_kc_atlas and checked complete against " + total +
|
| 838 |
+
" canonical entries (coverage 1.0, zero orphans, Atlas included; roster digest <code>" + digest + "</code>). The LAYOUT is a <b>MODELED</b> deterministic drawing " +
|
| 839 |
"read verbatim from <code>/api/a11oy/v1/atlas/{map,organism}</code> \u2014 not a computation, not \u201Calive.\u201D The honest " +
|
| 840 |
+
"label mix is returned by the endpoint and rendered per surface, never hard-coded or uniform. A new surface " +
|
| 841 |
+
"without an explicit maturity claim is UNSPECIFIED, never silently promoted. " +
|
| 842 |
"\u039B stays <b>Conjecture 1</b>, the conjecture cluster is <b>grey, never green</b>. " +
|
| 843 |
"<br><br><b>Sources (we cite the taxonomy; we do not claim it as computation).</b><br>" +
|
| 844 |
"• Taxonomy source \u2014 the Flower Brain: <code>github.com/szl-holdings/killinchu szl_kc_flower.py</code><br>" +
|
|
|
|
| 883 |
S.clusters = []; S.petals = []; S.petalByCluster = {}; S.crossLinks = []; S.lfFlow = null;
|
| 884 |
S.clustersTotal = S.surfaceCount = S.totalClassified = S.coverage = null;
|
| 885 |
S.lockedCoreCount = S.conjectureGray = S.everyOnce = null;
|
| 886 |
+
S.registry = null; S.brainHealth = null; S.brainGaps = null; S.brainProbeState = "init";
|
| 887 |
S.labelMix = {}; S.built = false;
|
| 888 |
}
|
| 889 |
|
| 890 |
+
export default { id: ID, title: TITLE, endpoints: [EP_MAP, EP_ORGANISM, EP_BRAIN_HEALTH, EP_BRAIN_GAPS], mount, unmount };
|
szl3d_holographic.py
CHANGED
|
@@ -150,7 +150,7 @@ SURFACES: List[Dict[str, str]] = [
|
|
| 150 |
{"id": "brainexplain", "cat": "brain", "title": "Brain Explain · transparent explanation of WHY the brain retrieved what it did · MODELED descriptive trace over the REAL retrieval subgraph (which query terms matched which seed nodes, per-node ppr-vs-salience rationale, communities traversed, each node's OWN label VERBATIM) → EXPLAINABLE/PARTIALLY-EXPLAINABLE/OPAQUE (never invents a rationale; honest OPAQUE beats a fake one), unsigned SHA-256 receipt-on-write", "owner": "WaveT-Dev1"},
|
| 151 |
{"id": "braingaps", "cat": "brain", "title": "Brain Gaps · an honest map of what the brain does NOT know · MEASURED thin (sparse) communities + weakly-connected island nodes (degree≤1) + weak-label share over the live graph, and per-query COVERED/THIN/GAP grounding → estate verdict WELL-COVERED/PATCHY/SPARSE (a GAP is never fabricated into coverage), unsigned SHA-256 receipt-on-write (MODELED)", "owner": "WaveT-Dev1"},
|
| 152 |
{"id": "brainconstitution", "cat": "brain", "title": "Brain Constitution · the honest, machine-checkable ruleset the brain is graded against per query · an explicit ordered set of ARTICLES (grounding sufficiency, calibrated confidence, honest corroboration, contradictions surfaced, traceable to source, freshness honesty, coverage gaps admitted, doctrine invariants) each graded COMPLIANT/VIOLATED/UNAVAILABLE against whatever sibling brain-honesty surfaces are importable (an absent surface is UNAVAILABLE, never a fabricated pass) → CONSTITUTIONAL/IN-VIOLATION/INSUFFICIENT-SIGNAL, never CONSTITUTIONAL while any evaluable Article is VIOLATED, unsigned SHA-256 receipt-on-write (MODELED)", "owner": "WaveT-Dev1"},
|
| 153 |
-
{"id": "markets", "cat": "finance", "flag": True, "title": "Markets & Finance · live Polymarket prediction book (top markets by 24h volume, pillar height = 24h vol, bead = YES probability) + crypto majors orbiting by market cap · 100% MEASURED same-origin deva finance feeds, no mocked spend/keys, log-scaling is display-only", "owner": "Forge"},
|
| 154 |
{"id": "leaders", "cat": "more", "flag": True, "title": "Frontier Models · Live AI Leaders · MEASURED live OpenRouter model catalog — one pillar per lab (height = max context window, bead = open/free share); widest-context models orbit as satellites (teal = free, amber = paid); log-scaling is display-only, no invented benchmark or ranking", "owner": "Forge"},
|
| 155 |
{"id": "research", "cat": "more", "flag": True, "title": "Frontier Research · Live arXiv AI · MEASURED live arXiv submission stream (cs.AI/LG/CL/CV/NE) — one pillar per research category (height = fresh-paper count, bead = share of the window); most-recent papers orbit as satellites sized by author count; log-scaling is display-only, no citation count, score, or ranking", "owner": "Forge"},
|
| 156 |
{"id": "open", "cat": "more", "flag": True, "title": "Open Frontier · Live Hugging Face · MEASURED live Hugging Face Hub trending stream — one pillar per org/author (height = summed likes, bead = download reach); most-liked open models orbit as satellites coloured by task; log-scaling is display-only, no invented benchmark, score, or ranking beyond the Hub’s own", "owner": "Forge"},
|
|
@@ -329,7 +329,9 @@ def _selftest() -> None:
|
|
| 329 |
assert (base / f).is_file(), f"missing toolkit asset: {f}"
|
| 330 |
# 2. all surface modules exist (frontier tier + the 9 estate surfaces)
|
| 331 |
for s in SURFACES:
|
| 332 |
-
|
|
|
|
|
|
|
| 333 |
# 3. path traversal is rejected
|
| 334 |
assert _safe_resolve(base, "../serve.py") is None
|
| 335 |
assert _safe_resolve(base, "../../etc/passwd") is None
|
|
|
|
| 150 |
{"id": "brainexplain", "cat": "brain", "title": "Brain Explain · transparent explanation of WHY the brain retrieved what it did · MODELED descriptive trace over the REAL retrieval subgraph (which query terms matched which seed nodes, per-node ppr-vs-salience rationale, communities traversed, each node's OWN label VERBATIM) → EXPLAINABLE/PARTIALLY-EXPLAINABLE/OPAQUE (never invents a rationale; honest OPAQUE beats a fake one), unsigned SHA-256 receipt-on-write", "owner": "WaveT-Dev1"},
|
| 151 |
{"id": "braingaps", "cat": "brain", "title": "Brain Gaps · an honest map of what the brain does NOT know · MEASURED thin (sparse) communities + weakly-connected island nodes (degree≤1) + weak-label share over the live graph, and per-query COVERED/THIN/GAP grounding → estate verdict WELL-COVERED/PATCHY/SPARSE (a GAP is never fabricated into coverage), unsigned SHA-256 receipt-on-write (MODELED)", "owner": "WaveT-Dev1"},
|
| 152 |
{"id": "brainconstitution", "cat": "brain", "title": "Brain Constitution · the honest, machine-checkable ruleset the brain is graded against per query · an explicit ordered set of ARTICLES (grounding sufficiency, calibrated confidence, honest corroboration, contradictions surfaced, traceable to source, freshness honesty, coverage gaps admitted, doctrine invariants) each graded COMPLIANT/VIOLATED/UNAVAILABLE against whatever sibling brain-honesty surfaces are importable (an absent surface is UNAVAILABLE, never a fabricated pass) → CONSTITUTIONAL/IN-VIOLATION/INSUFFICIENT-SIGNAL, never CONSTITUTIONAL while any evaluable Article is VIOLATED, unsigned SHA-256 receipt-on-write (MODELED)", "owner": "WaveT-Dev1"},
|
| 153 |
+
{"id": "markets", "module": "finance", "cat": "finance", "flag": True, "title": "Markets & Finance · live Polymarket prediction book (top markets by 24h volume, pillar height = 24h vol, bead = YES probability) + crypto majors orbiting by market cap · 100% MEASURED same-origin deva finance feeds, no mocked spend/keys, log-scaling is display-only", "owner": "Forge"},
|
| 154 |
{"id": "leaders", "cat": "more", "flag": True, "title": "Frontier Models · Live AI Leaders · MEASURED live OpenRouter model catalog — one pillar per lab (height = max context window, bead = open/free share); widest-context models orbit as satellites (teal = free, amber = paid); log-scaling is display-only, no invented benchmark or ranking", "owner": "Forge"},
|
| 155 |
{"id": "research", "cat": "more", "flag": True, "title": "Frontier Research · Live arXiv AI · MEASURED live arXiv submission stream (cs.AI/LG/CL/CV/NE) — one pillar per research category (height = fresh-paper count, bead = share of the window); most-recent papers orbit as satellites sized by author count; log-scaling is display-only, no citation count, score, or ranking", "owner": "Forge"},
|
| 156 |
{"id": "open", "cat": "more", "flag": True, "title": "Open Frontier · Live Hugging Face · MEASURED live Hugging Face Hub trending stream — one pillar per org/author (height = summed likes, bead = download reach); most-liked open models orbit as satellites coloured by task; log-scaling is display-only, no invented benchmark, score, or ranking beyond the Hub’s own", "owner": "Forge"},
|
|
|
|
| 329 |
assert (base / f).is_file(), f"missing toolkit asset: {f}"
|
| 330 |
# 2. all surface modules exist (frontier tier + the 9 estate surfaces)
|
| 331 |
for s in SURFACES:
|
| 332 |
+
module_id = s.get("module", s["id"])
|
| 333 |
+
assert (base / "surfaces" / f"{module_id}.js").is_file(), \
|
| 334 |
+
f"missing surface module: {s['id']} -> {module_id}.js"
|
| 335 |
# 3. path traversal is rejected
|
| 336 |
assert _safe_resolve(base, "../serve.py") is None
|
| 337 |
assert _safe_resolve(base, "../../etc/passwd") is None
|
szl_kc_atlas.py
CHANGED
|
@@ -3,13 +3,13 @@
|
|
| 3 |
# Doctrine v11 LOCKED: locked-proven=8 · Λ=Conjecture 1 · SLSA L1 honest / L2 attested / L3 roadmap
|
| 4 |
# Co-Authored-By: Perplexity Computer Agent
|
| 5 |
"""
|
| 6 |
-
szl_kc_atlas.py — THE ATLAS
|
| 7 |
-
|
| 8 |
clusters as the taxonomy. Backs a11oy static/3d/surfaces/atlas.js.
|
| 9 |
|
| 10 |
-
The estate serves
|
| 11 |
The answer is already in the ecosystem: the Flower Brain (surface 65) defines 8 real
|
| 12 |
-
clusters. The Atlas classifies EVERY
|
| 13 |
clusters (zero orphans, coverage 1.0), carries the flower's KERNEL objects (locked-8,
|
| 14 |
theorems, codexes, Λ conjecture) as the still center, and shows the estate as one
|
| 15 |
organism: a locked-8 pistil, 8 petals with their member surfaces, cross-links (which
|
|
@@ -22,35 +22,36 @@ github.com/szl-holdings/killinchu szl_kc_flower.py):
|
|
| 22 |
3 EXPERIMENTAL — CI-green experimental / agentic theorems.
|
| 23 |
4 UNIFIED FORMULAS — cited borrowed structure (DOIs), never claimed as SZL's own.
|
| 24 |
5 OUROBOROS CODEXES — the bounded-recursion self-referential codex layer.
|
| 25 |
-
6 SURFACES — the live 3D surface organs (most of the
|
| 26 |
7 MEMORY & PROVENANCE— HEART/BLOOD + A-MEM spine; episodic/graph/agent memory + anatomy.
|
| 27 |
8 CONJECTURES — Λ Conjecture 1, Khipu, self-repair (GRAY, never green).
|
| 28 |
|
| 29 |
Routes (NEW; never collide):
|
| 30 |
GET /api/{ns}/v1/atlas/manifest — organ manifest + honesty_invariants
|
| 31 |
-
GET /api/{ns}/v1/atlas/map — the REAL per-surface classification
|
| 32 |
GET /api/{ns}/v1/atlas/organism — estate-as-organism view: pistil, 8 petals, cross-links, LF flow
|
| 33 |
|
| 34 |
HONESTY SPINE (Doctrine v11 — NON-NEGOTIABLE):
|
| 35 |
* label "MODELED" returned verbatim on every endpoint; never upgraded.
|
| 36 |
* clusters == 8, locked_core == 8 (immutable pistil {F1,F4,F7,F11,F12,F18,F19,F22}).
|
| 37 |
* conjecture cluster (8) renders GRAY, never green — assert conjecture_rendered_green == 0.
|
| 38 |
-
* coverage == 1.0: EVERY
|
| 39 |
-
zero orphans, zero double-counts.
|
| 40 |
-
|
| 41 |
* classification basis is REAL and cited per-cluster (derived from each surface's actual
|
| 42 |
nature/owner/domain), NEVER arbitrary. The taxonomy source is the Flower Brain
|
| 43 |
(szl_kc_flower.py). Bridges (loopforge -> OUROBOROS+CONJECTURE, flower -> all) are cited.
|
| 44 |
* no consciousness/sentience/alive claim.
|
| 45 |
* banned marketing tokens rejected (reversed-fragment guard); every Λ/theorem line keeps its qualifier inline (Λ = Conjecture 1, never a theorem) so the honesty gate never trips.
|
| 46 |
* Pure stdlib (seeded LCG, no numpy, no stdlib random). Deterministic: same seed =>
|
| 47 |
-
identical snapshot. The
|
| 48 |
-
/
|
| 49 |
|
| 50 |
Pure stdlib. Defensive: a compute failure NEVER raises out of a handler.
|
| 51 |
"""
|
| 52 |
from __future__ import annotations
|
| 53 |
|
|
|
|
| 54 |
import json as _json
|
| 55 |
from typing import Any, Dict, List, Optional, Tuple
|
| 56 |
|
|
@@ -262,10 +263,10 @@ LIVE_SURFACES: List[Dict[str, str]] = [
|
|
| 262 |
{"id": "loopforge", "title": "Loop Forge", "label": "MODELED"},
|
| 263 |
]
|
| 264 |
_SURFACE_IDS = tuple(s["id"] for s in LIVE_SURFACES)
|
| 265 |
-
SURFACE_COUNT = len(LIVE_SURFACES) #
|
| 266 |
|
| 267 |
# =====================================================================================
|
| 268 |
-
# THE CLASSIFICATION — each
|
| 269 |
# Basis is DEFENSIBLE and cited per-cluster (see _CLASSIFICATION_BASIS). Not arbitrary:
|
| 270 |
# * MEMORY & PROVENANCE (7): surfaces whose PRIMARY organ is memory storage/retrieval,
|
| 271 |
# provenance/receipts, or the estate's anatomy/self-map (episodic, titans, graphmem,
|
|
@@ -358,6 +359,107 @@ _SURFACE_CLUSTER: Dict[str, Tuple[int, str]] = {
|
|
| 358 |
"loopforge": (6, "Loop Forge surface — the living process (bridges to OUROBOROS+CONJECTURE)"),
|
| 359 |
}
|
| 360 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 361 |
# Per-cluster classification BASIS (cited to the Flower Brain taxonomy source). Every
|
| 362 |
# cluster + bridge cites a real basis — this is the honest, non-arbitrary rationale.
|
| 363 |
_CLASSIFICATION_BASIS: Dict[int, str] = {
|
|
@@ -430,12 +532,13 @@ _BRIDGES: List[Tuple[str, int, str, str]] = [
|
|
| 430 |
]
|
| 431 |
|
| 432 |
_HONEST_NOTE = (
|
| 433 |
-
"MODELED: The Atlas is a MODELED cartography that unifies the
|
| 434 |
"ONE organism using the Flower Brain's 8 real clusters as the taxonomy (source: "
|
| 435 |
"github.com/szl-holdings/killinchu szl_kc_flower.py). The classification is REAL and cited "
|
| 436 |
"per-cluster (derived from each surface's actual nature/owner/domain), NEVER arbitrary. EVERY "
|
| 437 |
-
"
|
| 438 |
-
"
|
|
|
|
| 439 |
"kernel clusters (PROVEN CORE, VERIFIED, EXPERIMENTAL, UNIFIED, OUROBOROS, CONJECTURE) carry "
|
| 440 |
"the flower's KERNEL objects (locked-8, theorems, cited formulas, codexes, the Λ conjecture); "
|
| 441 |
"surfaces BRIDGE to them (loopforge -> ouroboros+conjecture, flower -> all clusters) — every "
|
|
@@ -443,9 +546,10 @@ _HONEST_NOTE = (
|
|
| 443 |
"and is the immutable pistil that NEVER grows. The conjecture cluster (Λ Conjecture 1, machine-"
|
| 444 |
"checked FALSE; Khipu BFT; self-repair) renders GRAY, never green. The Loop-Forge flow overlay "
|
| 445 |
"(proposer -> kernel gate -> archive) is a MODELED process view, NOT a claim that anything is "
|
| 446 |
-
"trained, alive, or conscious.
|
| 447 |
-
"
|
| 448 |
-
"
|
|
|
|
| 449 |
"stdlib, no numpy, no stdlib random."
|
| 450 |
)
|
| 451 |
|
|
@@ -457,7 +561,7 @@ CITATIONS: Dict[str, str] = {
|
|
| 457 |
"locked_count_eight (no-axiom theorem)": _LL + "Lutar/Wave11/AxiomDisclosure.lean",
|
| 458 |
"szl_heart_blood (HEART sigma-bus + BLOOD DSSE hash-chain memory spine)": _A11OY + "szl_heart_blood.py",
|
| 459 |
"A-MEM agentic memory (Xu et al., NeurIPS 2025)": "https://arxiv.org/abs/2502.12110",
|
| 460 |
-
"live surface list (
|
| 461 |
"a11oy holographic.html SURFACES (surface registry)": _A11OY + "static/3d/holographic.html",
|
| 462 |
}
|
| 463 |
|
|
@@ -468,7 +572,7 @@ CITATIONS: Dict[str, str] = {
|
|
| 468 |
# =====================================================================================
|
| 469 |
def _classify() -> Dict[str, Any]:
|
| 470 |
"""Return {cluster_n -> {surfaces:[...], kernel_objects:[...]}} + coverage bookkeeping.
|
| 471 |
-
Asserts EVERY
|
| 472 |
# every surface must be in _SURFACE_CLUSTER exactly once
|
| 473 |
assigned_ids = list(_SURFACE_CLUSTER.keys())
|
| 474 |
# detect orphans (a live surface with no assignment) and unknowns (assignment w/o a surface)
|
|
@@ -486,7 +590,7 @@ def _classify() -> Dict[str, Any]:
|
|
| 486 |
for c in CLUSTERS:
|
| 487 |
per_cluster[c["n"]] = {"surfaces": [], "kernel_objects": []}
|
| 488 |
|
| 489 |
-
for sid in _SURFACE_IDS: # iterate in
|
| 490 |
cn, sub = _SURFACE_CLUSTER[sid]
|
| 491 |
per_cluster[cn]["surfaces"].append({
|
| 492 |
"id": sid, "title": title_of[sid], "label": label_of[sid], "sub_tag": sub,
|
|
@@ -502,7 +606,7 @@ def _classify() -> Dict[str, Any]:
|
|
| 502 |
"orphans": orphans,
|
| 503 |
"unknown_assignments": unknown,
|
| 504 |
"double_counts": sorted(set(double_counts)),
|
| 505 |
-
"total_classified": total_classified, # MUST equal
|
| 506 |
"title_of": title_of,
|
| 507 |
"label_of": label_of,
|
| 508 |
}
|
|
@@ -534,7 +638,7 @@ def _valid_bridges() -> List[Dict[str, Any]]:
|
|
| 534 |
|
| 535 |
|
| 536 |
# =====================================================================================
|
| 537 |
-
# /map — the REAL classification:
|
| 538 |
# =====================================================================================
|
| 539 |
def atlas_map(seed: int = 42) -> Dict[str, Any]:
|
| 540 |
cl = _classify()
|
|
@@ -562,7 +666,7 @@ def atlas_map(seed: int = 42) -> Dict[str, Any]:
|
|
| 562 |
})
|
| 563 |
|
| 564 |
bridges = _valid_bridges()
|
| 565 |
-
# coverage proof: every
|
| 566 |
seen: Dict[str, int] = {}
|
| 567 |
for c in clusters_out:
|
| 568 |
for s in c["surfaces"]:
|
|
@@ -577,17 +681,21 @@ def atlas_map(seed: int = 42) -> Dict[str, Any]:
|
|
| 577 |
"kernel": KERNEL_ID,
|
| 578 |
"seed": int(seed),
|
| 579 |
"taxonomy_source": _FLOWER_SRC,
|
|
|
|
| 580 |
"clusters_total": len(CLUSTERS), # 8
|
| 581 |
"clusters": clusters_out,
|
| 582 |
-
"surface_count": SURFACE_COUNT,
|
| 583 |
-
"
|
|
|
|
| 584 |
"coverage": coverage, # MUST == 1.0
|
| 585 |
"orphans": cl["orphans"], # MUST be []
|
| 586 |
"unknown_assignments": cl["unknown_assignments"], # MUST be []
|
| 587 |
"double_counts": cl["double_counts"], # MUST be []
|
| 588 |
"every_surface_classified_once": bool(each_once), # MUST be True
|
| 589 |
-
"
|
| 590 |
-
|
|
|
|
|
|
|
| 591 |
"bridges": bridges,
|
| 592 |
"cross_cluster_bridges": sum(1 for b in bridges if b["cross_cluster"]),
|
| 593 |
"locked_core": list(LOCKED8_IDS),
|
|
@@ -675,13 +783,15 @@ def atlas_organism(seed: int = 42) -> Dict[str, Any]:
|
|
| 675 |
"kernel": KERNEL_ID,
|
| 676 |
"seed": int(seed),
|
| 677 |
"taxonomy_source": _FLOWER_SRC,
|
|
|
|
| 678 |
"center": center, # the immutable locked-8 pistil
|
| 679 |
"petals": petals, # 8 petals w/ member surfaces + kernel objects
|
| 680 |
"petals_total": len(petals), # 8
|
| 681 |
"cross_links": cross_links, # which surfaces bridge clusters
|
| 682 |
"cross_links_total": len(cross_links),
|
| 683 |
"loop_forge_flow": lf_flow, # proposer -> kernel -> archive overlay
|
| 684 |
-
"surface_count": SURFACE_COUNT,
|
|
|
|
| 685 |
"coverage": m["coverage"], # 1.0
|
| 686 |
"locked_core": list(LOCKED8_IDS),
|
| 687 |
"locked_core_count": len(LOCKED8_IDS), # 8
|
|
@@ -725,16 +835,17 @@ def atlas_manifest(seed: int = 42) -> Dict[str, Any]:
|
|
| 725 |
return {
|
| 726 |
"service": "atlas",
|
| 727 |
"surface": "atlas",
|
| 728 |
-
"surface_index":
|
| 729 |
"label": MODELED_LABEL,
|
| 730 |
"doctrine": DOCTRINE_VERSION,
|
| 731 |
"kernel": KERNEL_ID,
|
| 732 |
"seed": int(seed),
|
| 733 |
-
"summary": ("The Atlas unifies the
|
| 734 |
"using the Flower Brain's 8 real clusters as the taxonomy. Every surface is "
|
| 735 |
"classified into exactly one cluster (coverage 1.0); the locked-8 pistil is the "
|
| 736 |
"immutable center; conjectures stay GRAY. Cartography, not a new surface layer."),
|
| 737 |
"taxonomy_source": _FLOWER_SRC,
|
|
|
|
| 738 |
"endpoints": [
|
| 739 |
"/api/<ns>/v1/atlas/manifest",
|
| 740 |
"/api/<ns>/v1/atlas/map",
|
|
@@ -749,18 +860,20 @@ def atlas_manifest(seed: int = 42) -> Dict[str, Any]:
|
|
| 749 |
"kernel_object_count": len(c["kernel_object_ids"]),
|
| 750 |
"label_mix": c["label_mix"],
|
| 751 |
} for c in m["clusters"]],
|
| 752 |
-
"surface_count": SURFACE_COUNT,
|
| 753 |
-
"
|
|
|
|
| 754 |
"coverage": m["coverage"], # 1.0
|
| 755 |
"orphans": m["orphans"], # []
|
| 756 |
"double_counts": m["double_counts"], # []
|
| 757 |
-
"overall_label_mix": overall_mix, # honest label mix over
|
| 758 |
"locked_core": list(LOCKED8_IDS),
|
| 759 |
"locked_core_count": m["locked_core_count"], # 8
|
| 760 |
"conjecture_cluster_gray": m["conjecture_cluster_gray"], # True
|
| 761 |
"conjecture_rendered_green": conjecture_rendered_green, # 0
|
| 762 |
"bridges_total": len(m["bridges"]),
|
| 763 |
"cross_cluster_bridges": m["cross_cluster_bridges"],
|
|
|
|
| 764 |
"atlas_is_68th": m["atlas_is_68th"],
|
| 765 |
"honesty_invariants": honesty_invariants,
|
| 766 |
"citations": CITATIONS,
|
|
@@ -872,9 +985,9 @@ if __name__ == "__main__":
|
|
| 872 |
assert org["center"]["is_pistil"] is True and org["center"]["immutable"] is True
|
| 873 |
assert [o["id"] for o in org["center"]["locked8"]] == list(LOCKED8_IDS)
|
| 874 |
|
| 875 |
-
# coverage 1.0: EVERY
|
| 876 |
-
assert m["surface_count"] ==
|
| 877 |
-
assert m["total_classified"] ==
|
| 878 |
assert m["coverage"] == 1.0, "coverage must be 1.0"
|
| 879 |
assert m["orphans"] == [], "zero orphans"
|
| 880 |
assert m["unknown_assignments"] == [], "zero unknown assignments"
|
|
@@ -885,12 +998,14 @@ if __name__ == "__main__":
|
|
| 885 |
for c in m["clusters"]:
|
| 886 |
for s in c["surfaces"]:
|
| 887 |
seen[s["id"]] = seen.get(s["id"], 0) + 1
|
| 888 |
-
assert set(seen.keys()) == set(_SURFACE_IDS), "cluster members must
|
| 889 |
assert all(v == 1 for v in seen.values()), "no surface may appear twice"
|
| 890 |
-
assert sum(seen.values()) ==
|
| 891 |
|
| 892 |
-
#
|
| 893 |
-
assert m["
|
|
|
|
|
|
|
| 894 |
|
| 895 |
# each cluster populated (surfaces OR kernel objects) + basis cited to the flower
|
| 896 |
for c in m["clusters"]:
|
|
@@ -994,7 +1109,7 @@ if __name__ == "__main__":
|
|
| 994 |
], paths
|
| 995 |
|
| 996 |
print("register paths:", paths)
|
| 997 |
-
print("szl_kc_atlas: ALL OK —
|
| 998 |
"locked-8 immutable pistil, conjectures gray, cited basis per cluster, deterministic.",
|
| 999 |
file=sys.stderr)
|
| 1000 |
print("ALL OK")
|
|
|
|
| 3 |
# Doctrine v11 LOCKED: locked-proven=8 · Λ=Conjecture 1 · SLSA L1 honest / L2 attested / L3 roadmap
|
| 4 |
# Co-Authored-By: Perplexity Computer Agent
|
| 5 |
"""
|
| 6 |
+
szl_kc_atlas.py — THE ATLAS — the unifying front door that maps the
|
| 7 |
+
canonical holographic registry into ONE organism using the Flower Brain's 8 real
|
| 8 |
clusters as the taxonomy. Backs a11oy static/3d/surfaces/atlas.js.
|
| 9 |
|
| 10 |
+
The estate serves an evolving surface roster as a flat wall of monospace tabs — no hierarchy, no story.
|
| 11 |
The answer is already in the ecosystem: the Flower Brain (surface 65) defines 8 real
|
| 12 |
+
clusters. The Atlas classifies EVERY surface in the canonical registry into exactly one of those 8
|
| 13 |
clusters (zero orphans, coverage 1.0), carries the flower's KERNEL objects (locked-8,
|
| 14 |
theorems, codexes, Λ conjecture) as the still center, and shows the estate as one
|
| 15 |
organism: a locked-8 pistil, 8 petals with their member surfaces, cross-links (which
|
|
|
|
| 22 |
3 EXPERIMENTAL — CI-green experimental / agentic theorems.
|
| 23 |
4 UNIFIED FORMULAS — cited borrowed structure (DOIs), never claimed as SZL's own.
|
| 24 |
5 OUROBOROS CODEXES — the bounded-recursion self-referential codex layer.
|
| 25 |
+
6 SURFACES — the live 3D surface organs (most of the roster maps here, sub-tagged).
|
| 26 |
7 MEMORY & PROVENANCE— HEART/BLOOD + A-MEM spine; episodic/graph/agent memory + anatomy.
|
| 27 |
8 CONJECTURES — Λ Conjecture 1, Khipu, self-repair (GRAY, never green).
|
| 28 |
|
| 29 |
Routes (NEW; never collide):
|
| 30 |
GET /api/{ns}/v1/atlas/manifest — organ manifest + honesty_invariants
|
| 31 |
+
GET /api/{ns}/v1/atlas/map — the REAL per-surface classification + denominator + coverage proof
|
| 32 |
GET /api/{ns}/v1/atlas/organism — estate-as-organism view: pistil, 8 petals, cross-links, LF flow
|
| 33 |
|
| 34 |
HONESTY SPINE (Doctrine v11 — NON-NEGOTIABLE):
|
| 35 |
* label "MODELED" returned verbatim on every endpoint; never upgraded.
|
| 36 |
* clusters == 8, locked_core == 8 (immutable pistil {F1,F4,F7,F11,F12,F18,F19,F22}).
|
| 37 |
* conjecture cluster (8) renders GRAY, never green — assert conjecture_rendered_green == 0.
|
| 38 |
+
* coverage == 1.0: EVERY canonical registry surface, including Atlas, is classified into
|
| 39 |
+
exactly one cluster — zero orphans, zero double-counts. __main__ verifies this against
|
| 40 |
+
szl3d_holographic.SURFACES and publishes the denominator + registry digest.
|
| 41 |
* classification basis is REAL and cited per-cluster (derived from each surface's actual
|
| 42 |
nature/owner/domain), NEVER arbitrary. The taxonomy source is the Flower Brain
|
| 43 |
(szl_kc_flower.py). Bridges (loopforge -> OUROBOROS+CONJECTURE, flower -> all) are cited.
|
| 44 |
* no consciousness/sentience/alive claim.
|
| 45 |
* banned marketing tokens rejected (reversed-fragment guard); every Λ/theorem line keeps its qualifier inline (Λ = Conjecture 1, never a theorem) so the honesty gate never trips.
|
| 46 |
* Pure stdlib (seeded LCG, no numpy, no stdlib random). Deterministic: same seed =>
|
| 47 |
+
identical snapshot. The embedded Wave-27 surface list is retained only as a vetted label
|
| 48 |
+
source/fallback; the canonical local shell registry defines current coverage.
|
| 49 |
|
| 50 |
Pure stdlib. Defensive: a compute failure NEVER raises out of a handler.
|
| 51 |
"""
|
| 52 |
from __future__ import annotations
|
| 53 |
|
| 54 |
+
import hashlib as _hashlib
|
| 55 |
import json as _json
|
| 56 |
from typing import Any, Dict, List, Optional, Tuple
|
| 57 |
|
|
|
|
| 263 |
{"id": "loopforge", "title": "Loop Forge", "label": "MODELED"},
|
| 264 |
]
|
| 265 |
_SURFACE_IDS = tuple(s["id"] for s in LIVE_SURFACES)
|
| 266 |
+
SURFACE_COUNT = len(LIVE_SURFACES) # reconciled below against the canonical shell registry
|
| 267 |
|
| 268 |
# =====================================================================================
|
| 269 |
+
# THE CLASSIFICATION — each canonical surface -> exactly ONE cluster, by its declared nature.
|
| 270 |
# Basis is DEFENSIBLE and cited per-cluster (see _CLASSIFICATION_BASIS). Not arbitrary:
|
| 271 |
# * MEMORY & PROVENANCE (7): surfaces whose PRIMARY organ is memory storage/retrieval,
|
| 272 |
# provenance/receipts, or the estate's anatomy/self-map (episodic, titans, graphmem,
|
|
|
|
| 359 |
"loopforge": (6, "Loop Forge surface — the living process (bridges to OUROBOROS+CONJECTURE)"),
|
| 360 |
}
|
| 361 |
|
| 362 |
+
# =====================================================================================
|
| 363 |
+
# CANONICAL ROSTER ALIGNMENT — the holographic shell is the source of truth.
|
| 364 |
+
#
|
| 365 |
+
# The original Atlas embedded a 67-surface snapshot. The shell continued to evolve, which
|
| 366 |
+
# allowed the Atlas to keep reporting coverage=1.0 over a stale denominator while dozens of
|
| 367 |
+
# newer surfaces were absent. We now reconcile the embedded label snapshot against
|
| 368 |
+
# szl3d_holographic.SURFACES at import time. The import is local, deterministic and
|
| 369 |
+
# fail-closed: if the canonical module is unavailable we expose the embedded snapshot and
|
| 370 |
+
# mark registry_loaded=False instead of pretending it is current.
|
| 371 |
+
#
|
| 372 |
+
# New registry entries inherit their declared shell category for classification:
|
| 373 |
+
# brain/anatomy -> MEMORY & PROVENANCE; everything else -> SURFACES. Their maturity label
|
| 374 |
+
# is NEVER guessed. A label is reused only when present in the vetted embedded snapshot or
|
| 375 |
+
# written explicitly in the canonical title; otherwise it is UNSPECIFIED.
|
| 376 |
+
# =====================================================================================
|
| 377 |
+
_EMBEDDED_SURFACES = tuple(dict(s) for s in LIVE_SURFACES)
|
| 378 |
+
_EMBEDDED_LABELS = {s["id"]: s["label"] for s in _EMBEDDED_SURFACES}
|
| 379 |
+
_EXPLICIT_LABELS = ("STRUCTURAL-ONLY", "MEASURED", "SIMULATED", "ROADMAP", "MODELED")
|
| 380 |
+
|
| 381 |
+
|
| 382 |
+
def _declared_label(surface_id: str, title: str) -> Tuple[str, str]:
|
| 383 |
+
if surface_id == "atlas":
|
| 384 |
+
return MODELED_LABEL, "atlas-contract"
|
| 385 |
+
if surface_id in _EMBEDDED_LABELS:
|
| 386 |
+
return _EMBEDDED_LABELS[surface_id], "embedded-vetted-snapshot"
|
| 387 |
+
upper = str(title or "").upper()
|
| 388 |
+
for label in _EXPLICIT_LABELS:
|
| 389 |
+
if label in upper:
|
| 390 |
+
return label, "canonical-title-explicit"
|
| 391 |
+
return "UNSPECIFIED", "canonical-registry-no-maturity-claim"
|
| 392 |
+
|
| 393 |
+
|
| 394 |
+
def _canonical_roster() -> Tuple[List[Dict[str, str]], Dict[str, Any]]:
|
| 395 |
+
source = "embedded-snapshot"
|
| 396 |
+
loaded = False
|
| 397 |
+
error: Optional[str] = None
|
| 398 |
+
try:
|
| 399 |
+
from szl3d_holographic import SURFACES as shell_surfaces
|
| 400 |
+
|
| 401 |
+
raw = list(shell_surfaces)
|
| 402 |
+
source = "szl3d_holographic.SURFACES"
|
| 403 |
+
loaded = True
|
| 404 |
+
except Exception as exc: # pragma: no cover - deployment fallback is reported in payload
|
| 405 |
+
raw = [
|
| 406 |
+
{"id": "atlas", "cat": "map", "title": "Atlas", "owner": "atlas-contract"},
|
| 407 |
+
*_EMBEDDED_SURFACES,
|
| 408 |
+
]
|
| 409 |
+
error = "%s: %s" % (type(exc).__name__, str(exc)[:160])
|
| 410 |
+
|
| 411 |
+
rows: List[Dict[str, str]] = []
|
| 412 |
+
seen = set()
|
| 413 |
+
duplicate_ids: List[str] = []
|
| 414 |
+
for item in raw:
|
| 415 |
+
sid = str(item.get("id") or "").strip()
|
| 416 |
+
if not sid:
|
| 417 |
+
continue
|
| 418 |
+
if sid in seen:
|
| 419 |
+
duplicate_ids.append(sid)
|
| 420 |
+
continue
|
| 421 |
+
seen.add(sid)
|
| 422 |
+
title = str(item.get("title") or sid)
|
| 423 |
+
label, label_source = _declared_label(sid, title)
|
| 424 |
+
rows.append({
|
| 425 |
+
"id": sid,
|
| 426 |
+
"title": title,
|
| 427 |
+
"label": label,
|
| 428 |
+
"label_source": label_source,
|
| 429 |
+
"cat": str(item.get("cat") or "more"),
|
| 430 |
+
"owner": str(item.get("owner") or "UNSPECIFIED"),
|
| 431 |
+
"module": str(item.get("module") or sid),
|
| 432 |
+
})
|
| 433 |
+
|
| 434 |
+
canonical = [{k: r[k] for k in ("id", "title", "cat", "owner", "module")} for r in rows]
|
| 435 |
+
digest = _hashlib.sha256(
|
| 436 |
+
_json.dumps(canonical, sort_keys=True, ensure_ascii=False, separators=(",", ":")).encode("utf-8")
|
| 437 |
+
).hexdigest()
|
| 438 |
+
return rows, {
|
| 439 |
+
"source": source,
|
| 440 |
+
"loaded": loaded,
|
| 441 |
+
"error": error,
|
| 442 |
+
"sha256": digest,
|
| 443 |
+
"surface_count": len(rows),
|
| 444 |
+
"duplicate_ids": sorted(set(duplicate_ids)),
|
| 445 |
+
}
|
| 446 |
+
|
| 447 |
+
|
| 448 |
+
LIVE_SURFACES, _REGISTRY_META = _canonical_roster()
|
| 449 |
+
_SURFACE_IDS = tuple(s["id"] for s in LIVE_SURFACES)
|
| 450 |
+
SURFACE_COUNT = len(LIVE_SURFACES)
|
| 451 |
+
|
| 452 |
+
# Reconcile classification against the canonical registry. Existing authored mappings retain
|
| 453 |
+
# their specific sub-tags; new entries receive a deterministic tag derived from the shell's
|
| 454 |
+
# own declared category. This makes orphans visible and prevents stale-denominator success.
|
| 455 |
+
for _surface in LIVE_SURFACES:
|
| 456 |
+
_sid = _surface["id"]
|
| 457 |
+
if _sid in _SURFACE_CLUSTER:
|
| 458 |
+
continue
|
| 459 |
+
_cat = str(_surface.get("cat") or "more").lower()
|
| 460 |
+
_cluster = 7 if _cat in ("brain", "anatomy") else 6
|
| 461 |
+
_SURFACE_CLUSTER[_sid] = (_cluster, "%s registry surface (canonical shell category)" % _cat)
|
| 462 |
+
|
| 463 |
# Per-cluster classification BASIS (cited to the Flower Brain taxonomy source). Every
|
| 464 |
# cluster + bridge cites a real basis — this is the honest, non-arbitrary rationale.
|
| 465 |
_CLASSIFICATION_BASIS: Dict[int, str] = {
|
|
|
|
| 532 |
]
|
| 533 |
|
| 534 |
_HONEST_NOTE = (
|
| 535 |
+
"MODELED: The Atlas is a MODELED cartography that unifies the canonical holographic estate into "
|
| 536 |
"ONE organism using the Flower Brain's 8 real clusters as the taxonomy (source: "
|
| 537 |
"github.com/szl-holdings/killinchu szl_kc_flower.py). The classification is REAL and cited "
|
| 538 |
"per-cluster (derived from each surface's actual nature/owner/domain), NEVER arbitrary. EVERY "
|
| 539 |
+
"surface in szl3d_holographic.SURFACES, including the Atlas, is classified into exactly ONE "
|
| 540 |
+
"cluster — zero orphans, zero double-counts. The denominator, source and SHA-256 registry digest "
|
| 541 |
+
"are returned on every endpoint, so stale-roster coverage cannot masquerade as completeness. The "
|
| 542 |
"kernel clusters (PROVEN CORE, VERIFIED, EXPERIMENTAL, UNIFIED, OUROBOROS, CONJECTURE) carry "
|
| 543 |
"the flower's KERNEL objects (locked-8, theorems, cited formulas, codexes, the Λ conjecture); "
|
| 544 |
"surfaces BRIDGE to them (loopforge -> ouroboros+conjecture, flower -> all clusters) — every "
|
|
|
|
| 546 |
"and is the immutable pistil that NEVER grows. The conjecture cluster (Λ Conjecture 1, machine-"
|
| 547 |
"checked FALSE; Khipu BFT; self-repair) renders GRAY, never green. The Loop-Forge flow overlay "
|
| 548 |
"(proposer -> kernel gate -> archive) is a MODELED process view, NOT a claim that anything is "
|
| 549 |
+
"trained, alive, or conscious. Maturity labels are reused only from the vetted embedded snapshot "
|
| 550 |
+
"or an explicit canonical title; otherwise the label is UNSPECIFIED, never guessed. The organ "
|
| 551 |
+
"imports its local canonical registry and never fetches a network dependency at runtime. "
|
| 552 |
+
"Deterministic: same registry + seed => identical snapshot. Pure "
|
| 553 |
"stdlib, no numpy, no stdlib random."
|
| 554 |
)
|
| 555 |
|
|
|
|
| 561 |
"locked_count_eight (no-axiom theorem)": _LL + "Lutar/Wave11/AxiomDisclosure.lean",
|
| 562 |
"szl_heart_blood (HEART sigma-bus + BLOOD DSSE hash-chain memory spine)": _A11OY + "szl_heart_blood.py",
|
| 563 |
"A-MEM agentic memory (Xu et al., NeurIPS 2025)": "https://arxiv.org/abs/2502.12110",
|
| 564 |
+
"live surface list (public registry view)": "https://a-11-oy.com/api/a11oy/v1/holographic/info",
|
| 565 |
"a11oy holographic.html SURFACES (surface registry)": _A11OY + "static/3d/holographic.html",
|
| 566 |
}
|
| 567 |
|
|
|
|
| 572 |
# =====================================================================================
|
| 573 |
def _classify() -> Dict[str, Any]:
|
| 574 |
"""Return {cluster_n -> {surfaces:[...], kernel_objects:[...]}} + coverage bookkeeping.
|
| 575 |
+
Asserts EVERY canonical registry surface is assigned to exactly one cluster."""
|
| 576 |
# every surface must be in _SURFACE_CLUSTER exactly once
|
| 577 |
assigned_ids = list(_SURFACE_CLUSTER.keys())
|
| 578 |
# detect orphans (a live surface with no assignment) and unknowns (assignment w/o a surface)
|
|
|
|
| 590 |
for c in CLUSTERS:
|
| 591 |
per_cluster[c["n"]] = {"surfaces": [], "kernel_objects": []}
|
| 592 |
|
| 593 |
+
for sid in _SURFACE_IDS: # iterate in canonical registry order (deterministic)
|
| 594 |
cn, sub = _SURFACE_CLUSTER[sid]
|
| 595 |
per_cluster[cn]["surfaces"].append({
|
| 596 |
"id": sid, "title": title_of[sid], "label": label_of[sid], "sub_tag": sub,
|
|
|
|
| 606 |
"orphans": orphans,
|
| 607 |
"unknown_assignments": unknown,
|
| 608 |
"double_counts": sorted(set(double_counts)),
|
| 609 |
+
"total_classified": total_classified, # MUST equal canonical SURFACE_COUNT
|
| 610 |
"title_of": title_of,
|
| 611 |
"label_of": label_of,
|
| 612 |
}
|
|
|
|
| 638 |
|
| 639 |
|
| 640 |
# =====================================================================================
|
| 641 |
+
# /map — the REAL classification: canonical surfaces mapped to 8 clusters + coverage proof.
|
| 642 |
# =====================================================================================
|
| 643 |
def atlas_map(seed: int = 42) -> Dict[str, Any]:
|
| 644 |
cl = _classify()
|
|
|
|
| 666 |
})
|
| 667 |
|
| 668 |
bridges = _valid_bridges()
|
| 669 |
+
# coverage proof: every canonical registry surface appears exactly once across all clusters
|
| 670 |
seen: Dict[str, int] = {}
|
| 671 |
for c in clusters_out:
|
| 672 |
for s in c["surfaces"]:
|
|
|
|
| 681 |
"kernel": KERNEL_ID,
|
| 682 |
"seed": int(seed),
|
| 683 |
"taxonomy_source": _FLOWER_SRC,
|
| 684 |
+
"registry": dict(_REGISTRY_META),
|
| 685 |
"clusters_total": len(CLUSTERS), # 8
|
| 686 |
"clusters": clusters_out,
|
| 687 |
+
"surface_count": SURFACE_COUNT,
|
| 688 |
+
"coverage_denominator": "szl3d_holographic.SURFACES",
|
| 689 |
+
"total_classified": cl["total_classified"],
|
| 690 |
"coverage": coverage, # MUST == 1.0
|
| 691 |
"orphans": cl["orphans"], # MUST be []
|
| 692 |
"unknown_assignments": cl["unknown_assignments"], # MUST be []
|
| 693 |
"double_counts": cl["double_counts"], # MUST be []
|
| 694 |
"every_surface_classified_once": bool(each_once), # MUST be True
|
| 695 |
+
"atlas_membership": {"id": "atlas", "home_cluster": 6, "included_in_surface_count": True},
|
| 696 |
+
"atlas_is_68th": {"id": "atlas", "home_cluster": 6, "legacy_field": True,
|
| 697 |
+
"current": False, "included_in_surface_count": True,
|
| 698 |
+
"note": "legacy compatibility field; Atlas is now included in the canonical registry denominator"},
|
| 699 |
"bridges": bridges,
|
| 700 |
"cross_cluster_bridges": sum(1 for b in bridges if b["cross_cluster"]),
|
| 701 |
"locked_core": list(LOCKED8_IDS),
|
|
|
|
| 783 |
"kernel": KERNEL_ID,
|
| 784 |
"seed": int(seed),
|
| 785 |
"taxonomy_source": _FLOWER_SRC,
|
| 786 |
+
"registry": dict(_REGISTRY_META),
|
| 787 |
"center": center, # the immutable locked-8 pistil
|
| 788 |
"petals": petals, # 8 petals w/ member surfaces + kernel objects
|
| 789 |
"petals_total": len(petals), # 8
|
| 790 |
"cross_links": cross_links, # which surfaces bridge clusters
|
| 791 |
"cross_links_total": len(cross_links),
|
| 792 |
"loop_forge_flow": lf_flow, # proposer -> kernel -> archive overlay
|
| 793 |
+
"surface_count": SURFACE_COUNT,
|
| 794 |
+
"coverage_denominator": "szl3d_holographic.SURFACES",
|
| 795 |
"coverage": m["coverage"], # 1.0
|
| 796 |
"locked_core": list(LOCKED8_IDS),
|
| 797 |
"locked_core_count": len(LOCKED8_IDS), # 8
|
|
|
|
| 835 |
return {
|
| 836 |
"service": "atlas",
|
| 837 |
"surface": "atlas",
|
| 838 |
+
"surface_index": _SURFACE_IDS.index("atlas") + 1 if "atlas" in _SURFACE_IDS else None,
|
| 839 |
"label": MODELED_LABEL,
|
| 840 |
"doctrine": DOCTRINE_VERSION,
|
| 841 |
"kernel": KERNEL_ID,
|
| 842 |
"seed": int(seed),
|
| 843 |
+
"summary": ("The Atlas unifies the canonical holographic registry into ONE organism "
|
| 844 |
"using the Flower Brain's 8 real clusters as the taxonomy. Every surface is "
|
| 845 |
"classified into exactly one cluster (coverage 1.0); the locked-8 pistil is the "
|
| 846 |
"immutable center; conjectures stay GRAY. Cartography, not a new surface layer."),
|
| 847 |
"taxonomy_source": _FLOWER_SRC,
|
| 848 |
+
"registry": dict(_REGISTRY_META),
|
| 849 |
"endpoints": [
|
| 850 |
"/api/<ns>/v1/atlas/manifest",
|
| 851 |
"/api/<ns>/v1/atlas/map",
|
|
|
|
| 860 |
"kernel_object_count": len(c["kernel_object_ids"]),
|
| 861 |
"label_mix": c["label_mix"],
|
| 862 |
} for c in m["clusters"]],
|
| 863 |
+
"surface_count": SURFACE_COUNT,
|
| 864 |
+
"coverage_denominator": "szl3d_holographic.SURFACES",
|
| 865 |
+
"total_classified": m["total_classified"],
|
| 866 |
"coverage": m["coverage"], # 1.0
|
| 867 |
"orphans": m["orphans"], # []
|
| 868 |
"double_counts": m["double_counts"], # []
|
| 869 |
+
"overall_label_mix": overall_mix, # honest label mix over canonical roster
|
| 870 |
"locked_core": list(LOCKED8_IDS),
|
| 871 |
"locked_core_count": m["locked_core_count"], # 8
|
| 872 |
"conjecture_cluster_gray": m["conjecture_cluster_gray"], # True
|
| 873 |
"conjecture_rendered_green": conjecture_rendered_green, # 0
|
| 874 |
"bridges_total": len(m["bridges"]),
|
| 875 |
"cross_cluster_bridges": m["cross_cluster_bridges"],
|
| 876 |
+
"atlas_membership": m["atlas_membership"],
|
| 877 |
"atlas_is_68th": m["atlas_is_68th"],
|
| 878 |
"honesty_invariants": honesty_invariants,
|
| 879 |
"citations": CITATIONS,
|
|
|
|
| 985 |
assert org["center"]["is_pistil"] is True and org["center"]["immutable"] is True
|
| 986 |
assert [o["id"] for o in org["center"]["locked8"]] == list(LOCKED8_IDS)
|
| 987 |
|
| 988 |
+
# coverage 1.0: EVERY canonical surface classified exactly once, zero orphans
|
| 989 |
+
assert m["surface_count"] == len(_SURFACE_IDS) == SURFACE_COUNT
|
| 990 |
+
assert m["total_classified"] == SURFACE_COUNT, "all canonical surfaces must be classified"
|
| 991 |
assert m["coverage"] == 1.0, "coverage must be 1.0"
|
| 992 |
assert m["orphans"] == [], "zero orphans"
|
| 993 |
assert m["unknown_assignments"] == [], "zero unknown assignments"
|
|
|
|
| 998 |
for c in m["clusters"]:
|
| 999 |
for s in c["surfaces"]:
|
| 1000 |
seen[s["id"]] = seen.get(s["id"], 0) + 1
|
| 1001 |
+
assert set(seen.keys()) == set(_SURFACE_IDS), "cluster members must equal canonical registry"
|
| 1002 |
assert all(v == 1 for v in seen.values()), "no surface may appear twice"
|
| 1003 |
+
assert sum(seen.values()) == SURFACE_COUNT
|
| 1004 |
|
| 1005 |
+
# Atlas is part of the denominator and lives in cluster 6.
|
| 1006 |
+
assert m["atlas_membership"]["home_cluster"] == 6
|
| 1007 |
+
assert m["atlas_membership"]["included_in_surface_count"] is True
|
| 1008 |
+
assert "atlas" in _SURFACE_IDS and mf["surface_index"] == _SURFACE_IDS.index("atlas") + 1
|
| 1009 |
|
| 1010 |
# each cluster populated (surfaces OR kernel objects) + basis cited to the flower
|
| 1011 |
for c in m["clusters"]:
|
|
|
|
| 1109 |
], paths
|
| 1110 |
|
| 1111 |
print("register paths:", paths)
|
| 1112 |
+
print("szl_kc_atlas: ALL OK — canonical surfaces unified into 8 flower clusters, coverage 1.0, "
|
| 1113 |
"locked-8 immutable pistil, conjectures gray, cited basis per cluster, deterministic.",
|
| 1114 |
file=sys.stderr)
|
| 1115 |
print("ALL OK")
|
test/test_atlas_registry_alignment.py
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Regression tests for the canonical Atlas roster and brain-trust lens."""
|
| 2 |
+
from __future__ import annotations
|
| 3 |
+
|
| 4 |
+
import re
|
| 5 |
+
import unittest
|
| 6 |
+
from pathlib import Path
|
| 7 |
+
|
| 8 |
+
import szl3d_holographic
|
| 9 |
+
import szl_kc_atlas
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
class AtlasRegistryAlignmentTests(unittest.TestCase):
|
| 13 |
+
def setUp(self) -> None:
|
| 14 |
+
self.map = szl_kc_atlas.atlas_map(seed=42)
|
| 15 |
+
|
| 16 |
+
def test_denominator_is_the_canonical_shell_registry(self) -> None:
|
| 17 |
+
shell_ids = [row["id"] for row in szl3d_holographic.SURFACES]
|
| 18 |
+
atlas_ids = [
|
| 19 |
+
row["id"]
|
| 20 |
+
for cluster in self.map["clusters"]
|
| 21 |
+
for row in cluster["surfaces"]
|
| 22 |
+
]
|
| 23 |
+
self.assertEqual(self.map["registry"]["source"], "szl3d_holographic.SURFACES")
|
| 24 |
+
self.assertTrue(self.map["registry"]["loaded"])
|
| 25 |
+
self.assertEqual(self.map["surface_count"], len(shell_ids))
|
| 26 |
+
self.assertCountEqual(atlas_ids, shell_ids)
|
| 27 |
+
self.assertEqual(len(atlas_ids), len(set(atlas_ids)))
|
| 28 |
+
|
| 29 |
+
def test_coverage_cannot_hide_roster_drift(self) -> None:
|
| 30 |
+
self.assertEqual(self.map["coverage_denominator"], "szl3d_holographic.SURFACES")
|
| 31 |
+
self.assertEqual(self.map["total_classified"], self.map["surface_count"])
|
| 32 |
+
self.assertEqual(self.map["coverage"], 1.0)
|
| 33 |
+
self.assertEqual(self.map["orphans"], [])
|
| 34 |
+
self.assertEqual(self.map["unknown_assignments"], [])
|
| 35 |
+
self.assertEqual(self.map["double_counts"], [])
|
| 36 |
+
self.assertRegex(self.map["registry"]["sha256"], r"^[0-9a-f]{64}$")
|
| 37 |
+
|
| 38 |
+
def test_atlas_is_included_and_unclaimed_labels_stay_unspecified(self) -> None:
|
| 39 |
+
by_id = {
|
| 40 |
+
row["id"]: row
|
| 41 |
+
for cluster in self.map["clusters"]
|
| 42 |
+
for row in cluster["surfaces"]
|
| 43 |
+
}
|
| 44 |
+
self.assertIn("atlas", by_id)
|
| 45 |
+
self.assertTrue(self.map["atlas_membership"]["included_in_surface_count"])
|
| 46 |
+
self.assertEqual(by_id["atlas"]["label"], "MODELED")
|
| 47 |
+
# `circuits` was added after the embedded Wave-27 label snapshot and its canonical
|
| 48 |
+
# title makes no maturity claim. The Atlas must not silently promote it.
|
| 49 |
+
self.assertEqual(by_id["circuits"]["label"], "UNSPECIFIED")
|
| 50 |
+
|
| 51 |
+
def test_brain_lens_is_read_only_and_reproducible_in_the_surface(self) -> None:
|
| 52 |
+
js = (Path(__file__).parents[1] / "static" / "3d" / "surfaces" / "atlas.js").read_text(encoding="utf-8")
|
| 53 |
+
self.assertIn("/api/a11oy/v1/brain/health", js)
|
| 54 |
+
self.assertIn("/api/a11oy/v1/brain/gaps", js)
|
| 55 |
+
self.assertIn("Purpose · Try · Evidence · Limits · Reproduce", js)
|
| 56 |
+
self.assertIn("no memory write, no model call, no action", js)
|
| 57 |
+
self.assertNotRegex(js, re.compile(r"fetch\([^\n]+method\s*:\s*[\"']POST", re.I))
|
| 58 |
+
|
| 59 |
+
def test_registry_module_aliases_resolve(self) -> None:
|
| 60 |
+
surface_dir = Path(__file__).parents[1] / "static" / "3d" / "surfaces"
|
| 61 |
+
for surface in szl3d_holographic.SURFACES:
|
| 62 |
+
module_id = surface.get("module", surface["id"])
|
| 63 |
+
self.assertTrue((surface_dir / (module_id + ".js")).is_file(), surface["id"])
|
| 64 |
+
markets = next(row for row in szl3d_holographic.SURFACES if row["id"] == "markets")
|
| 65 |
+
self.assertEqual(markets["module"], "finance")
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
if __name__ == "__main__":
|
| 69 |
+
unittest.main()
|