Commit ·
44c3880
1
Parent(s): 57583a3
acer: F1+F2 - audit lane to HBP pipe rows, honest safety receipt
Browse files- F1: core logAudit now appends OMNITRANSAUDIT HBP pipe rows to
logs/omnitranslator-audit.hbp (was NDJSON = JSON on a hot receipt lane);
translated content referenced by output_sha16, never inlined, so rows
stay pipe-safe; new unit test seals the rule (no '{"', json=0 close)
- F2: OMNITRANSSAFETY row now declares mutates=audit-hbp-append-only
(was mutates=0 while translate() appended to disk every call); .hbi
safety index row matches
- descriptor OMNITRANSSHA core/test hashes + 4 sidecars regenerated;
pyramid 41/41 on acer; F5 (D22 verb adapter) left open for liris
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- tests/omnidirectional-translator-router.unit.test.mjs +12 -0
- tests/omnidirectional-translator-router.unit.test.mjs.sha256 +1 -1
- tools/behcs/omnidirectional-translator-router.hbi +1 -1
- tools/behcs/omnidirectional-translator-router.hbi.sha256 +1 -1
- tools/behcs/omnidirectional-translator-router.hbp +3 -3
- tools/behcs/omnidirectional-translator-router.hbp.sha256 +1 -1
- tools/omni-processor/omnitranslator-v0.js +22 -11
- tools/omni-processor/omnitranslator-v0.js.sha256 +1 -1
tests/omnidirectional-translator-router.unit.test.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import assert from 'node:assert/strict';
|
|
|
|
| 2 |
import test from 'node:test';
|
| 3 |
|
| 4 |
import {
|
|
@@ -41,6 +42,17 @@ test('unknown endpoints are blocked', () => {
|
|
| 41 |
assert.ok(plan.gates.includes('unknown-to:not_a_surface'));
|
| 42 |
});
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
test('status emits HBP rows and self-test passes', () => {
|
| 45 |
const rows = statusRows();
|
| 46 |
assert.ok(rows[0].startsWith('OMNITRANSHDR|ok=1|component=2'));
|
|
|
|
| 1 |
import assert from 'node:assert/strict';
|
| 2 |
+
import { readFileSync } from 'node:fs';
|
| 3 |
import test from 'node:test';
|
| 4 |
|
| 5 |
import {
|
|
|
|
| 42 |
assert.ok(plan.gates.includes('unknown-to:not_a_surface'));
|
| 43 |
});
|
| 44 |
|
| 45 |
+
test('audit lane emits HBP pipe rows, not JSON', () => {
|
| 46 |
+
routeTranslate('@packet from=acer verb=audit.probe input_a=2', 'omnilanguage', 'json');
|
| 47 |
+
const auditUrl = new URL('../logs/omnitranslator-audit.hbp', import.meta.url);
|
| 48 |
+
const rows = readFileSync(auditUrl, 'utf8').trim().split('\n');
|
| 49 |
+
const last = rows[rows.length - 1];
|
| 50 |
+
assert.ok(last.startsWith('OMNITRANSAUDIT|'), 'audit row must be an HBP pipe row');
|
| 51 |
+
assert.ok(last.endsWith('|json=0'), 'audit row must close with json=0');
|
| 52 |
+
assert.ok(!last.includes('{"'), 'audit lane must carry no JSON');
|
| 53 |
+
assert.match(last, /\|output_sha16=[0-9a-f]{16}\|/, 'content referenced by sha16, never inlined');
|
| 54 |
+
});
|
| 55 |
+
|
| 56 |
test('status emits HBP rows and self-test passes', () => {
|
| 57 |
const rows = statusRows();
|
| 58 |
assert.ok(rows[0].startsWith('OMNITRANSHDR|ok=1|component=2'));
|
tests/omnidirectional-translator-router.unit.test.mjs.sha256
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
449C76F2140674581E08E4A5CABB0F7C07172BE4E2B2A3DA0F4D3B2F0EA2D10E omnidirectional-translator-router.unit.test.mjs
|
tools/behcs/omnidirectional-translator-router.hbi
CHANGED
|
@@ -3,7 +3,7 @@ INDEXROW|row=1|kind=header|component=architecture-component-2|json=0
|
|
| 3 |
INDEXROW|row=2|kind=law|route=deterministic-table-lookup-before-llm|json=0
|
| 4 |
INDEXROW|row=3|kind=core|implemented_pairs=2|planned_dialects=4|json=0
|
| 5 |
INDEXROW|row=4|kind=fabric|planned_endpoints=10|executable=0|json=0
|
| 6 |
-
INDEXROW|row=5|kind=safety|mutates=
|
| 7 |
INDEXROW|row=6|kind=verify|required=node-check+node-test+self-test|json=0
|
| 8 |
INDEXROW|row=7|kind=sha|fields=core_sha256+router_sha256+test_sha256|json=0
|
| 9 |
INDEXROW|row=8|kind=footer|state=READY_FOR_BILATERAL_PULL_AND_ACER_COMPARE|json=0
|
|
|
|
| 3 |
INDEXROW|row=2|kind=law|route=deterministic-table-lookup-before-llm|json=0
|
| 4 |
INDEXROW|row=3|kind=core|implemented_pairs=2|planned_dialects=4|json=0
|
| 5 |
INDEXROW|row=4|kind=fabric|planned_endpoints=10|executable=0|json=0
|
| 6 |
+
INDEXROW|row=5|kind=safety|mutates=audit_hbp_append_only|mints=0|launches=0|usb_writes=0|json=0
|
| 7 |
INDEXROW|row=6|kind=verify|required=node-check+node-test+self-test|json=0
|
| 8 |
INDEXROW|row=7|kind=sha|fields=core_sha256+router_sha256+test_sha256|json=0
|
| 9 |
INDEXROW|row=8|kind=footer|state=READY_FOR_BILATERAL_PULL_AND_ACER_COMPARE|json=0
|
tools/behcs/omnidirectional-translator-router.hbi.sha256
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
6DC185FFF60E14E7E697C2F6F57A5540894D93529B23266B2A28227E36ED8558 omnidirectional-translator-router.hbi
|
tools/behcs/omnidirectional-translator-router.hbp
CHANGED
|
@@ -2,7 +2,7 @@ OMNITRANSROUTERHDR|host=liris|component=architecture-component-2|tool=tools/behc
|
|
| 2 |
OMNITRANSLAW|rule=known-glyphs-and-implemented-pairs-use-table-lookup-not-llm|composes=TARGET-ARCHITECTURE-VISION-2026-06-10+LAW-ASOLARIA-NEURAL-NETWORK|json=0
|
| 3 |
OMNITRANSCORE|source=tools/omni-processor/omnitranslator-v0.js|implemented_pairs=omnilanguage->json+json->omnilanguage|planned_dialects=IX+LX+XL+plain_english|shield=novalum-token-preserved-with-redacted-across-host-flag|json=0
|
| 4 |
OMNITRANSFABRIC|planned_endpoints=hbp+hbi+mcp_pipe+webmcp+cube+whiteroom+shannon+frozen_slice+geospatial_agent+hrm_agent|execution=DRAFT_ROUTE_ONLY_NOT_EXECUTABLE|gate=fabric-token-binding-required+cosign-for-T0-T1-engine-remap|json=0
|
| 5 |
-
OMNITRANSSAFETY|mutates=
|
| 6 |
OMNITRANSVERIFY|required=node--check-router+node-test-router+router-self-test|json=0
|
| 7 |
-
OMNITRANSSHA|core_sha256=
|
| 8 |
-
OMNITRANSFTR|state=
|
|
|
|
| 2 |
OMNITRANSLAW|rule=known-glyphs-and-implemented-pairs-use-table-lookup-not-llm|composes=TARGET-ARCHITECTURE-VISION-2026-06-10+LAW-ASOLARIA-NEURAL-NETWORK|json=0
|
| 3 |
OMNITRANSCORE|source=tools/omni-processor/omnitranslator-v0.js|implemented_pairs=omnilanguage->json+json->omnilanguage|planned_dialects=IX+LX+XL+plain_english|shield=novalum-token-preserved-with-redacted-across-host-flag|json=0
|
| 4 |
OMNITRANSFABRIC|planned_endpoints=hbp+hbi+mcp_pipe+webmcp+cube+whiteroom+shannon+frozen_slice+geospatial_agent+hrm_agent|execution=DRAFT_ROUTE_ONLY_NOT_EXECUTABLE|gate=fabric-token-binding-required+cosign-for-T0-T1-engine-remap|json=0
|
| 5 |
+
OMNITRANSSAFETY|mutates=audit-hbp-append-only(logs/omnitranslator-audit.hbp)|audit_format=hbp-pipe-rows-content-by-sha16|mints=0|launches=0|usb_writes=0|engine_edits=0|external_calls=0|json=0
|
| 6 |
OMNITRANSVERIFY|required=node--check-router+node-test-router+router-self-test|json=0
|
| 7 |
+
OMNITRANSSHA|core_sha256=E589BB9A21F4F2BDA3594801FDDDE3524D5E6D7409A8F610E8B2A367EC1B72FC|router_sha256=C0A7DDA0ED0827C6275B9A715F19E1E2B97CA9D682194E1D7DC70F5640EC762D|test_sha256=449C76F2140674581E08E4A5CABB0F7C07172BE4E2B2A3DA0F4D3B2F0EA2D10E|json=0
|
| 8 |
+
OMNITRANSFTR|state=AUDIT_LANE_HBP_SAFETY_ROW_HONEST_BILATERAL_F1_F2_CLOSED|json=0
|
tools/behcs/omnidirectional-translator-router.hbp.sha256
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
391120ECC0E1CBA1E0D6D0B5763EFCB6CF748AF759866B5E67EB88A35DEE9C08 omnidirectional-translator-router.hbp
|
tools/omni-processor/omnitranslator-v0.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
| 1 |
"use strict";
|
| 2 |
|
|
|
|
| 3 |
const fs = require("node:fs");
|
| 4 |
const path = require("node:path");
|
| 5 |
|
| 6 |
const ASOLARIA_ROOT = path.resolve(__dirname, "..", "..");
|
| 7 |
const LOG_DIR = path.join(ASOLARIA_ROOT, "logs");
|
| 8 |
-
const LOG_FILE = path.join(LOG_DIR, "omnitranslator.
|
| 9 |
|
| 10 |
const NOVALUM_PATTERN = /novalum/i;
|
| 11 |
const NOVALUM_CUBE_MARKERS = [103823, 389017, 704969];
|
|
@@ -33,17 +34,27 @@ function ensureDir(dir) {
|
|
| 33 |
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
| 34 |
}
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
function logAudit(entry) {
|
| 37 |
ensureDir(LOG_DIR);
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
| 47 |
}
|
| 48 |
|
| 49 |
function containsNovalumToken(value) {
|
|
@@ -142,7 +153,7 @@ function translate(input, fromDialect, toDialect) {
|
|
| 142 |
verb: "omnitranslate",
|
| 143 |
pair: key,
|
| 144 |
shielded,
|
| 145 |
-
|
| 146 |
});
|
| 147 |
|
| 148 |
return result;
|
|
|
|
| 1 |
"use strict";
|
| 2 |
|
| 3 |
+
const crypto = require("node:crypto");
|
| 4 |
const fs = require("node:fs");
|
| 5 |
const path = require("node:path");
|
| 6 |
|
| 7 |
const ASOLARIA_ROOT = path.resolve(__dirname, "..", "..");
|
| 8 |
const LOG_DIR = path.join(ASOLARIA_ROOT, "logs");
|
| 9 |
+
const LOG_FILE = path.join(LOG_DIR, "omnitranslator-audit.hbp");
|
| 10 |
|
| 11 |
const NOVALUM_PATTERN = /novalum/i;
|
| 12 |
const NOVALUM_CUBE_MARKERS = [103823, 389017, 704969];
|
|
|
|
| 34 |
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
| 35 |
}
|
| 36 |
|
| 37 |
+
function sha16(value) {
|
| 38 |
+
const text = typeof value === "string" ? value : JSON.stringify(value);
|
| 39 |
+
return crypto.createHash("sha256").update(text).digest("hex").slice(0, 16);
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
// Audit is a hot receipt lane: HBP pipe-rows only, JSON stays cold.
|
| 43 |
+
// Content is referenced by sha16, never inlined, so rows stay pipe-safe.
|
| 44 |
function logAudit(entry) {
|
| 45 |
ensureDir(LOG_DIR);
|
| 46 |
+
const row = [
|
| 47 |
+
"OMNITRANSAUDIT",
|
| 48 |
+
`ts=${new Date().toISOString()}`,
|
| 49 |
+
`verb=${entry.verb}`,
|
| 50 |
+
`pair=${entry.pair}`,
|
| 51 |
+
`shielded=${entry.shielded ? 1 : 0}`,
|
| 52 |
+
`output_sha16=${entry.output_sha16}`,
|
| 53 |
+
"chain=LX-491",
|
| 54 |
+
"cube_tags=D12_ECHO+D11_PROOF",
|
| 55 |
+
"json=0",
|
| 56 |
+
].join("|");
|
| 57 |
+
fs.appendFileSync(LOG_FILE, row + "\n");
|
| 58 |
}
|
| 59 |
|
| 60 |
function containsNovalumToken(value) {
|
|
|
|
| 153 |
verb: "omnitranslate",
|
| 154 |
pair: key,
|
| 155 |
shielded,
|
| 156 |
+
output_sha16: sha16(output),
|
| 157 |
});
|
| 158 |
|
| 159 |
return result;
|
tools/omni-processor/omnitranslator-v0.js.sha256
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
E589BB9A21F4F2BDA3594801FDDDE3524D5E6D7409A8F610E8B2A367EC1B72FC omnitranslator-v0.js
|