Kevin Crutt commited on
Commit ·
939cdac
1
Parent(s): b625129
liris: add odysseus scientific 3d field
Browse files- docs/LIRIS-ODYSSEUS-SCIENTIFIC-3D-FIELD-2026-06-14.hbp +7 -0
- docs/LIRIS-ODYSSEUS-SCIENTIFIC-3D-FIELD-2026-06-14.hbp.sha256 +1 -0
- reports/odysseus-mtp-scientific-3d.html +0 -0
- reports/odysseus-mtp-scientific-3d.html.sha256 +1 -0
- tests/fabric-agent-preload-catalog.unit.test.mjs +1 -0
- tests/fabric-agent-preload-catalog.unit.test.mjs.sha256 +1 -1
- tests/odysseus-scientific-3d-field.unit.test.mjs +53 -0
- tests/odysseus-scientific-3d-field.unit.test.mjs.sha256 +1 -0
- tests/supervisor-collision-router.system.test.mjs +3 -0
- tests/supervisor-collision-router.system.test.mjs.sha256 +1 -1
- tools/behcs/fabric-agent-preload-catalog.mjs +7 -1
- tools/behcs/fabric-agent-preload-catalog.mjs.sha256 +1 -1
- tools/behcs/odysseus-scientific-3d-field.mjs +186 -0
- tools/behcs/odysseus-scientific-3d-field.mjs.sha256 +1 -0
docs/LIRIS-ODYSSEUS-SCIENTIFIC-3D-FIELD-2026-06-14.hbp
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
ODYSCI3DCANONHDR|doc=LIRIS-ODYSSEUS-SCIENTIFIC-3D-FIELD-2026-06-14|date=2026-06-14|owner=liris|scope=odysseus-mtp-scientific-3d-pid-field-for-acer-cross-check|tag=DESCRIPTOR-ONLY|json=0
|
| 2 |
+
ODYSCI3DCANONMATH|source=tools/behcs/pre-existence-graph-exporter.mjs|formula=bh_index-sector*3072+lane*1024+glyph|cylinder_phase=bh_index-mod-6|cylinder_ring=floor-bh_index-div-6|distance=abs-delta-bh_index|json=0
|
| 3 |
+
ODYSCI3DCANONVIEW|viewer=reports/odysseus-mtp-scientific-3d.html|shows=real-coordinate-voxels+host-PID-descriptor-voxels+six-cylinder-phases+prime-cube-anchors+watcher-lanes+coordinate-table|json=0
|
| 4 |
+
ODYSCI3DCANONEVENTS|event_feed=deterministic-coordinate-replay-manifest|not_live_pid_telemetry=1|not_nanosecond_process-tracking=1|process_launch=0|json=0
|
| 5 |
+
ODYSCI3DCANONACER|cross_check=run-tools/behcs/odysseus-scientific-3d-field.mjs-and-compare-ODYSCI3D-rows|acer_may_add=live-telemetry-contract-or-phone-render-needs-after-attack|json=0
|
| 6 |
+
ODYSCI3DCANONGATE|provider_terms_apply=1|device_effect=0|cutover=0|process_launch=0|phone_render_not_claimed_by-this-descriptor=1|json=0
|
| 7 |
+
ODYSCI3DCANONFTR|status=SEALED-SCIENTIFIC-3D-FIELD-DESCRIPTOR|next=acer-cross-check-then-add-live-telemetry-needs-if-real|json=0
|
docs/LIRIS-ODYSSEUS-SCIENTIFIC-3D-FIELD-2026-06-14.hbp.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
7BC2E390AE502A2E041BB4A572F51BF519B6E2DFC33E8C3D98CE6A8D19426F01 LIRIS-ODYSSEUS-SCIENTIFIC-3D-FIELD-2026-06-14.hbp
|
reports/odysseus-mtp-scientific-3d.html
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
reports/odysseus-mtp-scientific-3d.html.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
DF0D4FB43018B7C49EB1B4CF1B07F699AB7348421A362FAA10DE94A0D3FF4E20 odysseus-mtp-scientific-3d.html
|
tests/fabric-agent-preload-catalog.unit.test.mjs
CHANGED
|
@@ -38,6 +38,7 @@ test('preload catalog includes the laws, tools, roles, and cadence agents need',
|
|
| 38 |
assert.ok(TOOLS.some((t) => t.id === 'frozen-slice-city-signal-lifecycle' && t.gate.includes('measured_200ns-0')));
|
| 39 |
assert.ok(TOOLS.some((t) => t.id === 'eight-byte-host-process-upgrade' && t.gate.includes('provider_compute_replaced-0')));
|
| 40 |
assert.ok(TOOLS.some((t) => t.id === 'odysseus-mtp-control-surface' && t.gate.includes('phone_render_proven_here-0')));
|
|
|
|
| 41 |
assert.ok(ROLES.some((r) => r.id === 'flywheel' && r.must_do.includes('compare-to-acer-local-truth')));
|
| 42 |
assert.ok(WORKFLOW.join('-').includes('memory-index-plan'));
|
| 43 |
assert.equal(toolById('token-cube-catalog-binder').gate, 'mint-write-live-DEFER_TO_OPERATOR');
|
|
|
|
| 38 |
assert.ok(TOOLS.some((t) => t.id === 'frozen-slice-city-signal-lifecycle' && t.gate.includes('measured_200ns-0')));
|
| 39 |
assert.ok(TOOLS.some((t) => t.id === 'eight-byte-host-process-upgrade' && t.gate.includes('provider_compute_replaced-0')));
|
| 40 |
assert.ok(TOOLS.some((t) => t.id === 'odysseus-mtp-control-surface' && t.gate.includes('phone_render_proven_here-0')));
|
| 41 |
+
assert.ok(TOOLS.some((t) => t.id === 'odysseus-scientific-3d-field' && t.gate.includes('live_pid_telemetry-0')));
|
| 42 |
assert.ok(ROLES.some((r) => r.id === 'flywheel' && r.must_do.includes('compare-to-acer-local-truth')));
|
| 43 |
assert.ok(WORKFLOW.join('-').includes('memory-index-plan'));
|
| 44 |
assert.equal(toolById('token-cube-catalog-binder').gate, 'mint-write-live-DEFER_TO_OPERATOR');
|
tests/fabric-agent-preload-catalog.unit.test.mjs.sha256
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
5B5B2E6BD8D80657AF30E1541A14B2DF2B852C150567C97B637089C3312E4B49 fabric-agent-preload-catalog.unit.test.mjs
|
tests/odysseus-scientific-3d-field.unit.test.mjs
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import assert from 'node:assert/strict';
|
| 2 |
+
import { readFileSync } from 'node:fs';
|
| 3 |
+
import test from 'node:test';
|
| 4 |
+
|
| 5 |
+
import {
|
| 6 |
+
DEFAULT_FIELD_NODES, FIELD_ID, VIEWER_REPORT,
|
| 7 |
+
buildScientificField, emitRows, selfTest,
|
| 8 |
+
} from '../tools/behcs/odysseus-scientific-3d-field.mjs';
|
| 9 |
+
|
| 10 |
+
test('odysseus scientific 3D field self-test passes', () => {
|
| 11 |
+
assert.equal(selfTest().ok, true);
|
| 12 |
+
});
|
| 13 |
+
|
| 14 |
+
test('field uses real BH coordinates from the pre-existence graph', () => {
|
| 15 |
+
const field = buildScientificField();
|
| 16 |
+
assert.equal(field.tool, FIELD_ID);
|
| 17 |
+
assert.equal(field.viewer_report, VIEWER_REPORT);
|
| 18 |
+
assert.equal(field.summary.nodes, DEFAULT_FIELD_NODES);
|
| 19 |
+
assert.equal(field.summary.phases, 6);
|
| 20 |
+
assert.ok(field.coordinates.every((n) => n.bh_index === n.sector * 3072 + n.lane * 1024 + n.glyph));
|
| 21 |
+
assert.ok(field.coordinates.every((n) => n.cylinder_phase === n.bh_index % 6));
|
| 22 |
+
assert.ok(field.coordinates.every((n) => n.cylinder_ring === Math.floor(n.bh_index / 6)));
|
| 23 |
+
});
|
| 24 |
+
|
| 25 |
+
test('host PID descriptors are plotted separately from potential field voxels', () => {
|
| 26 |
+
const field = buildScientificField();
|
| 27 |
+
assert.deepEqual(new Set(field.hosts.map((h) => h.agent_type)), new Set(['LOGICAL-WAVE', 'FROZEN-BRAIN', 'REAL-FREE']));
|
| 28 |
+
assert.ok(field.hosts.every((h) => h.host_handle_bytes === 8 && h.node_per_agent === 0 && h.process_launch === 0));
|
| 29 |
+
assert.ok(field.coordinates.every((n) => n.triad_state === 'POTENTIAL' && n.process_launch === 0));
|
| 30 |
+
});
|
| 31 |
+
|
| 32 |
+
test('coordinate event replay is explicitly not live nanosecond telemetry', () => {
|
| 33 |
+
const field = buildScientificField({ nodes: 64, frames: 16 });
|
| 34 |
+
assert.equal(field.summary.live_pid_telemetry, false);
|
| 35 |
+
assert.equal(field.summary.coordinate_replay_only, true);
|
| 36 |
+
assert.equal(field.replay.length, 16);
|
| 37 |
+
assert.ok(field.replay.every((e) => e.kind === 'COORDINATE_REPLAY_NOT_LIVE_TELEMETRY'));
|
| 38 |
+
assert.ok(field.replay.every((e) => e.live_pid_telemetry === 0 && e.process_launch === 0));
|
| 39 |
+
});
|
| 40 |
+
|
| 41 |
+
test('emitted rows are HBP-only and cross-checkable by Acer', () => {
|
| 42 |
+
const rows = emitRows({ nodes: 64, frames: 16 });
|
| 43 |
+
assert.ok(rows.every((row) => row.endsWith('|json=0') && !/[{\r\n]/.test(row)));
|
| 44 |
+
assert.ok(rows.some((row) => row.startsWith('ODYSCI3DMATH|') && row.includes('bh_index=sector*3072+lane*1024+glyph')));
|
| 45 |
+
assert.ok(rows.some((row) => row.startsWith('ODYSCI3DHOST|') && row.includes('host_handle_bytes=8')));
|
| 46 |
+
assert.ok(rows.some((row) => row.startsWith('ODYSCI3DEVENT|') && row.includes('live_pid_telemetry=0')));
|
| 47 |
+
assert.ok(rows.some((row) => row.startsWith('ODYSCI3DGATE|') && row.includes('not-live-nanosecond-PID-telemetry')));
|
| 48 |
+
});
|
| 49 |
+
|
| 50 |
+
test('tool stays descriptor-only and does not launch UI or devices', () => {
|
| 51 |
+
const source = readFileSync(new URL('../tools/behcs/odysseus-scientific-3d-field.mjs', import.meta.url), 'utf8');
|
| 52 |
+
assert.doesNotMatch(source, /from ['"]node:fs['"]|child_process|\bexecFile\b|\bexecSync\b|\bspawn\(|\bfetch\(|Invoke-WebRequest|Start-Process|node:http|node:net|createWriteStream/);
|
| 53 |
+
});
|
tests/odysseus-scientific-3d-field.unit.test.mjs.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
747C213D830CC34F57105AEBCF2FCC60CDE80CF5F44695568A63844178468D83 odysseus-scientific-3d-field.unit.test.mjs
|
tests/supervisor-collision-router.system.test.mjs
CHANGED
|
@@ -97,6 +97,7 @@ const sealedFiles = [
|
|
| 97 |
'docs/LIRIS-FROZEN-SLICE-CITY-SIGNAL-LIFECYCLE-2026-06-14.hbp',
|
| 98 |
'docs/LIRIS-EIGHT-BYTE-HOST-PROCESS-UPGRADE-2026-06-14.hbp',
|
| 99 |
'docs/LIRIS-ODYSSEUS-MTP-CONTROL-SURFACE-2026-06-14.hbp',
|
|
|
|
| 100 |
'docs/ACER-SLICE-ENGINE-LIVE-CRANK-RECEIPT-2026-06-13.hbp',
|
| 101 |
'docs/LIRIS-ROUTE-HEALTH-BASELINE-2026-06-13.hbp',
|
| 102 |
'docs/ACER-ROUTE-HEALTH-CROSS-VANTAGE-2026-06-13.hbp',
|
|
@@ -245,6 +246,7 @@ const sealedFiles = [
|
|
| 245 |
'tools/behcs/frozen-slice-city-signal-lifecycle.mjs',
|
| 246 |
'tools/behcs/eight-byte-host-process-upgrade.mjs',
|
| 247 |
'tools/behcs/odysseus-mtp-control-surface.mjs',
|
|
|
|
| 248 |
'tools/behcs/logical-extreme-stress.mjs',
|
| 249 |
'tools/behcs/logical-stress-cube-feed.mjs',
|
| 250 |
'tools/behcs/brown-hilbert-expansion-stress.mjs',
|
|
@@ -287,6 +289,7 @@ const sealedFiles = [
|
|
| 287 |
'tests/frozen-slice-city-signal-lifecycle.unit.test.mjs',
|
| 288 |
'tests/eight-byte-host-process-upgrade.unit.test.mjs',
|
| 289 |
'tests/odysseus-mtp-control-surface.unit.test.mjs',
|
|
|
|
| 290 |
'tests/logical-extreme-stress.unit.test.mjs',
|
| 291 |
'tests/logical-stress-cube-feed.unit.test.mjs',
|
| 292 |
'tests/brown-hilbert-expansion-stress.unit.test.mjs',
|
|
|
|
| 97 |
'docs/LIRIS-FROZEN-SLICE-CITY-SIGNAL-LIFECYCLE-2026-06-14.hbp',
|
| 98 |
'docs/LIRIS-EIGHT-BYTE-HOST-PROCESS-UPGRADE-2026-06-14.hbp',
|
| 99 |
'docs/LIRIS-ODYSSEUS-MTP-CONTROL-SURFACE-2026-06-14.hbp',
|
| 100 |
+
'docs/LIRIS-ODYSSEUS-SCIENTIFIC-3D-FIELD-2026-06-14.hbp',
|
| 101 |
'docs/ACER-SLICE-ENGINE-LIVE-CRANK-RECEIPT-2026-06-13.hbp',
|
| 102 |
'docs/LIRIS-ROUTE-HEALTH-BASELINE-2026-06-13.hbp',
|
| 103 |
'docs/ACER-ROUTE-HEALTH-CROSS-VANTAGE-2026-06-13.hbp',
|
|
|
|
| 246 |
'tools/behcs/frozen-slice-city-signal-lifecycle.mjs',
|
| 247 |
'tools/behcs/eight-byte-host-process-upgrade.mjs',
|
| 248 |
'tools/behcs/odysseus-mtp-control-surface.mjs',
|
| 249 |
+
'tools/behcs/odysseus-scientific-3d-field.mjs',
|
| 250 |
'tools/behcs/logical-extreme-stress.mjs',
|
| 251 |
'tools/behcs/logical-stress-cube-feed.mjs',
|
| 252 |
'tools/behcs/brown-hilbert-expansion-stress.mjs',
|
|
|
|
| 289 |
'tests/frozen-slice-city-signal-lifecycle.unit.test.mjs',
|
| 290 |
'tests/eight-byte-host-process-upgrade.unit.test.mjs',
|
| 291 |
'tests/odysseus-mtp-control-surface.unit.test.mjs',
|
| 292 |
+
'tests/odysseus-scientific-3d-field.unit.test.mjs',
|
| 293 |
'tests/logical-extreme-stress.unit.test.mjs',
|
| 294 |
'tests/logical-stress-cube-feed.unit.test.mjs',
|
| 295 |
'tests/brown-hilbert-expansion-stress.unit.test.mjs',
|
tests/supervisor-collision-router.system.test.mjs.sha256
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
AEE67D564FBA535D768DC9B098593298258C2025AD810A5F8723371B2D167319 supervisor-collision-router.system.test.mjs
|
tools/behcs/fabric-agent-preload-catalog.mjs
CHANGED
|
@@ -177,6 +177,12 @@ export const TOOLS = Object.freeze([
|
|
| 177 |
provides: 'odysseus-pattern-MTP-descriptor-backed-control-surface-plus-v8-map3d-band',
|
| 178 |
gate: 'descriptor-only-live_execution-0-cutover-0-phone_render_proven_here-0',
|
| 179 |
}),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 180 |
Object.freeze({
|
| 181 |
id: 'token-cube-catalog-binder',
|
| 182 |
path: 'tools/behcs/token-cube-catalog-binder.mjs',
|
|
@@ -351,7 +357,7 @@ export function selfTest() {
|
|
| 351 |
&& !!toolById('agent-cost-layer-boundary') && !!toolById('triad-host-router-gulp-pipeline')
|
| 352 |
&& !!toolById('pid-emitter-cost-envelope') && !!toolById('cellphone-host-bridge-boundary')
|
| 353 |
&& !!toolById('frozen-slice-city-signal-lifecycle') && !!toolById('eight-byte-host-process-upgrade')
|
| 354 |
-
&& !!toolById('odysseus-mtp-control-surface'));
|
| 355 |
add('slice-engine-law-preloaded', LAWS.some((law) => law.startsWith('slice-engine-law-'))
|
| 356 |
&& emitPreloadRows().some((row) => row.startsWith('FABPRELOADSLICEENGINE|')));
|
| 357 |
add('emitters-pipe-hookwall-gnn', EMITTERS.some((e) => e.id === 'hookwall') && EMITTERS.some((e) => e.id === 'gnn-edge'));
|
|
|
|
| 177 |
provides: 'odysseus-pattern-MTP-descriptor-backed-control-surface-plus-v8-map3d-band',
|
| 178 |
gate: 'descriptor-only-live_execution-0-cutover-0-phone_render_proven_here-0',
|
| 179 |
}),
|
| 180 |
+
Object.freeze({
|
| 181 |
+
id: 'odysseus-scientific-3d-field',
|
| 182 |
+
path: 'tools/behcs/odysseus-scientific-3d-field.mjs',
|
| 183 |
+
provides: 'scientific-3d-PID-coordinate-field-with-real-BH-coordinates-and-cross-check-replay',
|
| 184 |
+
gate: 'descriptor-only-process_launch-0-live_pid_telemetry-0-device_effect-0',
|
| 185 |
+
}),
|
| 186 |
Object.freeze({
|
| 187 |
id: 'token-cube-catalog-binder',
|
| 188 |
path: 'tools/behcs/token-cube-catalog-binder.mjs',
|
|
|
|
| 357 |
&& !!toolById('agent-cost-layer-boundary') && !!toolById('triad-host-router-gulp-pipeline')
|
| 358 |
&& !!toolById('pid-emitter-cost-envelope') && !!toolById('cellphone-host-bridge-boundary')
|
| 359 |
&& !!toolById('frozen-slice-city-signal-lifecycle') && !!toolById('eight-byte-host-process-upgrade')
|
| 360 |
+
&& !!toolById('odysseus-mtp-control-surface') && !!toolById('odysseus-scientific-3d-field'));
|
| 361 |
add('slice-engine-law-preloaded', LAWS.some((law) => law.startsWith('slice-engine-law-'))
|
| 362 |
&& emitPreloadRows().some((row) => row.startsWith('FABPRELOADSLICEENGINE|')));
|
| 363 |
add('emitters-pipe-hookwall-gnn', EMITTERS.some((e) => e.id === 'hookwall') && EMITTERS.some((e) => e.id === 'gnn-edge'));
|
tools/behcs/fabric-agent-preload-catalog.mjs.sha256
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
8F1B63CE7891284CD55F8F7EA9071CEEBEF4D94C922EFB711DEC078F1AA154BE fabric-agent-preload-catalog.mjs
|
tools/behcs/odysseus-scientific-3d-field.mjs
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env node
|
| 2 |
+
// odysseus-scientific-3d-field.mjs - cross-checkable scientific 3D PID field.
|
| 3 |
+
//
|
| 4 |
+
// Descriptor-only. This binds the Odysseus/MTP control surface to the real
|
| 5 |
+
// pre-existence coordinate graph for a scientific viewer: sector/lane/glyph,
|
| 6 |
+
// bh_index, mod-6 cylinders, watcher lanes, prime-cube anchors, and host PID
|
| 7 |
+
// descriptors. It does not claim live nanosecond telemetry, spawn processes,
|
| 8 |
+
// open a browser, or run the phone UI.
|
| 9 |
+
|
| 10 |
+
import { createHash } from 'node:crypto';
|
| 11 |
+
import { resolve } from 'node:path';
|
| 12 |
+
import { fileURLToPath } from 'node:url';
|
| 13 |
+
|
| 14 |
+
import { buildUpgrade } from './eight-byte-host-process-upgrade.mjs';
|
| 15 |
+
import { buildSurface } from './odysseus-mtp-control-surface.mjs';
|
| 16 |
+
import { PRIME_CUBE_PRIMES, PRIME_CUBES, runExporter } from './pre-existence-graph-exporter.mjs';
|
| 17 |
+
|
| 18 |
+
export const FIELD_ID = 'odysseus-scientific-3d-field.v1';
|
| 19 |
+
export const DEFAULT_FIELD_NODES = 512;
|
| 20 |
+
export const DEFAULT_EVENT_FRAMES = 96;
|
| 21 |
+
export const VIEWER_REPORT = 'reports/odysseus-mtp-scientific-3d.html';
|
| 22 |
+
|
| 23 |
+
const sha16 = (text) => createHash('sha256').update(String(text), 'utf8').digest('hex').slice(0, 16);
|
| 24 |
+
const isObj = (x) => x !== null && typeof x === 'object';
|
| 25 |
+
const safe = (x) => String(x ?? '').replace(/[|\r\n]/g, '_').replace(/[^A-Za-z0-9._:/+@=()-]+/g, '-').replace(/^-|-$/g, '') || 'empty';
|
| 26 |
+
const prop = (obj, key, fallback = '') => {
|
| 27 |
+
try { return isObj(obj) ? obj[key] : fallback; } catch { return fallback; }
|
| 28 |
+
};
|
| 29 |
+
|
| 30 |
+
function toCount(value, fallback, min = 1, max = 4096) {
|
| 31 |
+
const n = Number.parseInt(String(value ?? fallback), 10);
|
| 32 |
+
if (!Number.isFinite(n)) return fallback;
|
| 33 |
+
return Math.max(min, Math.min(max, n));
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
function coordinateRow(node) {
|
| 37 |
+
return Object.freeze({
|
| 38 |
+
name: safe(node.name),
|
| 39 |
+
pid: safe(node.pid),
|
| 40 |
+
sector: node.sector,
|
| 41 |
+
lane: node.lane,
|
| 42 |
+
glyph: node.glyph_binding,
|
| 43 |
+
bh_index: node.bh_index,
|
| 44 |
+
cylinder_phase: node.cylinder_phase,
|
| 45 |
+
cylinder_ring: node.cylinder_ring,
|
| 46 |
+
prime_band: node.prime_band,
|
| 47 |
+
prime_cube: node.prime_cube,
|
| 48 |
+
watcher_lane: safe(node.watcher_lane),
|
| 49 |
+
triad_state: safe(node.triad_state),
|
| 50 |
+
process_launch: 0,
|
| 51 |
+
});
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
function hostRow(host) {
|
| 55 |
+
return Object.freeze({
|
| 56 |
+
name: safe(host.name),
|
| 57 |
+
pid: safe(host.pid),
|
| 58 |
+
sha16: safe(host.sha16),
|
| 59 |
+
agent_type: safe(host.agent_type),
|
| 60 |
+
sector: host.sector,
|
| 61 |
+
lane: host.lane,
|
| 62 |
+
glyph: host.glyph,
|
| 63 |
+
bh_index: host.bh_index,
|
| 64 |
+
cylinder_phase: host.cylinder_phase,
|
| 65 |
+
cylinder_ring: host.cylinder_ring,
|
| 66 |
+
watcher: safe(host.watcher),
|
| 67 |
+
shape: safe(host.yin_yang_shape),
|
| 68 |
+
host_handle_bytes: host.host_handle_bytes,
|
| 69 |
+
node_per_agent: 0,
|
| 70 |
+
process_launch: 0,
|
| 71 |
+
});
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
function eventFrame(node, previous, index) {
|
| 75 |
+
const current = coordinateRow(node);
|
| 76 |
+
const prior = previous ? coordinateRow(previous) : current;
|
| 77 |
+
const delta = Math.abs(current.bh_index - prior.bh_index);
|
| 78 |
+
return Object.freeze({
|
| 79 |
+
index,
|
| 80 |
+
event_id: sha16([FIELD_ID, current.pid, index].join('|')),
|
| 81 |
+
kind: 'COORDINATE_REPLAY_NOT_LIVE_TELEMETRY',
|
| 82 |
+
pid: current.pid,
|
| 83 |
+
bh_index: current.bh_index,
|
| 84 |
+
cylinder_phase: current.cylinder_phase,
|
| 85 |
+
watcher_lane: current.watcher_lane,
|
| 86 |
+
delta_bh_index: delta,
|
| 87 |
+
triad_state: current.triad_state,
|
| 88 |
+
process_launch: 0,
|
| 89 |
+
live_pid_telemetry: 0,
|
| 90 |
+
});
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
export function buildScientificField(options = {}) {
|
| 94 |
+
const nodes = toCount(prop(options, 'nodes'), DEFAULT_FIELD_NODES, 6, 4096);
|
| 95 |
+
const frames = toCount(prop(options, 'frames'), DEFAULT_EVENT_FRAMES, 1, nodes);
|
| 96 |
+
const prefix = safe(prop(options, 'prefix') || 'SCI-PID');
|
| 97 |
+
const prex = runExporter({ nodes, prefix });
|
| 98 |
+
const upgrade = buildUpgrade();
|
| 99 |
+
const surface = buildSurface();
|
| 100 |
+
const coordinates = prex.nodes.map(coordinateRow);
|
| 101 |
+
const hosts = upgrade.hosts.map(hostRow);
|
| 102 |
+
const replay = coordinates.slice(0, frames).map((node, i) => eventFrame(node, coordinates[i - 1], i));
|
| 103 |
+
const phases = new Set(coordinates.map((n) => n.cylinder_phase));
|
| 104 |
+
const watchers = new Set(coordinates.map((n) => n.watcher_lane));
|
| 105 |
+
return Object.freeze({
|
| 106 |
+
tool: FIELD_ID,
|
| 107 |
+
viewer_report: VIEWER_REPORT,
|
| 108 |
+
coordinate_contract: Object.freeze({
|
| 109 |
+
source: 'tools/behcs/pre-existence-graph-exporter.mjs',
|
| 110 |
+
formula: 'bh_index=sector*3072+lane*1024+glyph',
|
| 111 |
+
cylinder_phase: 'bh_index-mod-6',
|
| 112 |
+
cylinder_ring: 'floor-bh_index-div-6',
|
| 113 |
+
distance: 'abs-delta-bh_index',
|
| 114 |
+
state: 'POTENTIAL-coordinate-field-not-live-process',
|
| 115 |
+
}),
|
| 116 |
+
prime_cube_primes: PRIME_CUBE_PRIMES,
|
| 117 |
+
prime_cubes: PRIME_CUBES,
|
| 118 |
+
coordinates: Object.freeze(coordinates),
|
| 119 |
+
hosts: Object.freeze(hosts),
|
| 120 |
+
replay: Object.freeze(replay),
|
| 121 |
+
summary: Object.freeze({
|
| 122 |
+
nodes: coordinates.length,
|
| 123 |
+
hosts: hosts.length,
|
| 124 |
+
phases: phases.size,
|
| 125 |
+
watchers: watchers.size,
|
| 126 |
+
lane_counts: prex.summary.lane_counts.join(','),
|
| 127 |
+
mtp_descriptor_backed: surface.summary.mtp_descriptor_backed,
|
| 128 |
+
process_launch: 0,
|
| 129 |
+
live_pid_telemetry: false,
|
| 130 |
+
coordinate_replay_only: true,
|
| 131 |
+
}),
|
| 132 |
+
});
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
export function emitRows(options = {}) {
|
| 136 |
+
try {
|
| 137 |
+
const field = buildScientificField(options);
|
| 138 |
+
const rows = [
|
| 139 |
+
`ODYSCI3DHDR|tool=${FIELD_ID}|viewer=${VIEWER_REPORT}|nodes=${field.summary.nodes}|hosts=${field.summary.hosts}|phases=${field.summary.phases}|watchers=${field.summary.watchers}|mtp_descriptor_backed=${field.summary.mtp_descriptor_backed}|process_launch=0|live_pid_telemetry=0|json=0`,
|
| 140 |
+
`ODYSCI3DMATH|formula=${field.coordinate_contract.formula}|cylinder_phase=${field.coordinate_contract.cylinder_phase}|cylinder_ring=${field.coordinate_contract.cylinder_ring}|distance=${field.coordinate_contract.distance}|state=${field.coordinate_contract.state}|json=0`,
|
| 141 |
+
`ODYSCI3DPRIMES|prime_cube_primes=${field.prime_cube_primes.join('+')}|prime_cubes=${field.prime_cubes.join('+')}|json=0`,
|
| 142 |
+
];
|
| 143 |
+
for (const host of field.hosts) {
|
| 144 |
+
rows.push(`ODYSCI3DHOST|name=${host.name}|agent_type=${host.agent_type}|pid_sha16=${host.sha16}|sector=${host.sector}|lane=${host.lane}|glyph=${host.glyph}|bh_index=${host.bh_index}|phase=${host.cylinder_phase}|ring=${host.cylinder_ring}|watcher=${host.watcher}|shape=${host.shape}|host_handle_bytes=${host.host_handle_bytes}|node_per_agent=0|process_launch=0|json=0`);
|
| 145 |
+
}
|
| 146 |
+
for (const node of field.coordinates.slice(0, 18)) {
|
| 147 |
+
rows.push(`ODYSCI3DCOORD|name=${node.name}|pid_sha16=${sha16(node.pid)}|sector=${node.sector}|lane=${node.lane}|glyph=${node.glyph}|bh_index=${node.bh_index}|phase=${node.cylinder_phase}|ring=${node.cylinder_ring}|prime_band=${node.prime_band}|prime_cube=${node.prime_cube}|watcher=${node.watcher_lane}|triad_state=${node.triad_state}|process_launch=0|json=0`);
|
| 148 |
+
}
|
| 149 |
+
for (const event of field.replay.slice(0, 12)) {
|
| 150 |
+
rows.push(`ODYSCI3DEVENT|index=${event.index}|event_id=${event.event_id}|kind=${event.kind}|pid_sha16=${sha16(event.pid)}|bh_index=${event.bh_index}|phase=${event.cylinder_phase}|watcher=${event.watcher_lane}|delta_bh_index=${event.delta_bh_index}|triad_state=${event.triad_state}|process_launch=0|live_pid_telemetry=0|json=0`);
|
| 151 |
+
}
|
| 152 |
+
rows.push('ODYSCI3DGATE|rule=scientific-viewer-plots-real-coordinate-field-and-deterministic-replay-only-not-live-nanosecond-PID-telemetry|provider_terms_apply=1|process_launch=0|device_effect=0|cutover=0|json=0');
|
| 153 |
+
return rows;
|
| 154 |
+
} catch {
|
| 155 |
+
return [
|
| 156 |
+
`ODYSCI3DHDR|tool=${FIELD_ID}|viewer=${VIEWER_REPORT}|nodes=0|hosts=0|phases=0|watchers=0|process_launch=0|live_pid_telemetry=0|json=0`,
|
| 157 |
+
'ODYSCI3DGATE|rule=emit-threw-held-invalid|provider_terms_apply=1|process_launch=0|device_effect=0|cutover=0|json=0',
|
| 158 |
+
];
|
| 159 |
+
}
|
| 160 |
+
}
|
| 161 |
+
|
| 162 |
+
export function selfTest() {
|
| 163 |
+
const checks = [];
|
| 164 |
+
const add = (name, ok) => checks.push({ name, ok: Boolean(ok) });
|
| 165 |
+
const field = buildScientificField();
|
| 166 |
+
add('uses-real-preexistence-coordinate-volume', field.summary.nodes === DEFAULT_FIELD_NODES && field.coordinates.every((n) => n.bh_index === n.sector * 3072 + n.lane * 1024 + n.glyph));
|
| 167 |
+
add('six-cylinder-phases-present', field.summary.phases === 6 && field.coordinates.every((n) => n.cylinder_phase === n.bh_index % 6 && n.cylinder_ring === Math.floor(n.bh_index / 6)));
|
| 168 |
+
add('rule-of-three-watchers-present', field.summary.watchers === 3 && field.coordinates.some((n) => n.watcher_lane === 'hookwall') && field.coordinates.some((n) => n.watcher_lane === 'gnn') && field.coordinates.some((n) => n.watcher_lane === 'shannon'));
|
| 169 |
+
add('host-descriptors-are-separate-and-held', field.hosts.length === 3 && field.hosts.every((h) => h.host_handle_bytes === 8 && h.node_per_agent === 0 && h.process_launch === 0));
|
| 170 |
+
add('replay-is-not-live-telemetry', field.summary.coordinate_replay_only === true && field.summary.live_pid_telemetry === false && field.replay.every((e) => e.kind === 'COORDINATE_REPLAY_NOT_LIVE_TELEMETRY' && e.live_pid_telemetry === 0 && e.process_launch === 0));
|
| 171 |
+
add('odysseus-mtp-bound', field.summary.mtp_descriptor_backed === 3);
|
| 172 |
+
add('prime-cube-anchors-bound', field.prime_cube_primes.length === 11 && field.prime_cubes.includes(13 ** 3) && field.prime_cubes.includes(131 ** 3));
|
| 173 |
+
add('rows-hbp-only', emitRows({ prefix: 'bad|prefix\nODYSCI3DGATE|process_launch=1' }).every((row) => row.endsWith('|json=0') && !/[\r\n{]/.test(row)));
|
| 174 |
+
add('total-never-throws', (() => { try { buildScientificField({ get nodes() { throw new Error('boom'); } }); emitRows(null); return true; } catch { return false; } })());
|
| 175 |
+
return { ok: checks.every((c) => c.ok), checks };
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
const isMain = process.argv[1] && fileURLToPath(import.meta.url) === resolve(process.argv[1]);
|
| 179 |
+
if (isMain) {
|
| 180 |
+
if (process.argv[2] === '--self-test') {
|
| 181 |
+
const r = selfTest();
|
| 182 |
+
for (const c of r.checks) console.log(`${c.ok ? 'PASS' : 'FAIL'} ${c.name}`);
|
| 183 |
+
process.exit(r.ok ? 0 : 1);
|
| 184 |
+
}
|
| 185 |
+
for (const row of emitRows()) console.log(row);
|
| 186 |
+
}
|
tools/behcs/odysseus-scientific-3d-field.mjs.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
3D7BBE4023C77AC53244C1A6756BA11B310D75A12D070FEB3A9DAAF9A42B9F04 odysseus-scientific-3d-field.mjs
|