Jessedbrown Claude Fable 5 commited on
Commit
784cc94
·
1 Parent(s): 29096e6

acer: STEP|166 live cross-machine parity - sealed baseline + regenerate-and-compare test

Browse files

- tools/behcs/d22-parity-probe.mjs: 9 fixed probe cases covering all 7 D22
verbs; rows are host-free and timestamp-free so regeneration must be
byte-identical on every machine
- docs/D22-PARITY-BASELINE-2026-06-11.hbp: baseline generated and sealed on
acer (bundle_sha16=335a1023ceec4946); determinism confirmed by double-run
byte-compare before sealing
- tests/d22-parity-probe.unit.test.mjs: regenerates rows from local
execution and byte-compares against the sealed baseline -- a pyramid pass
on liris IS the STEP|166 bilateral byte-match, live on every future run
- sealed all three into the lattice; pyramid 51/51 on acer

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

docs/D22-PARITY-BASELINE-2026-06-11.hbp ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ D22PARITYHDR|step=166|verbs_covered=7of7|cases=9|rule=rows-byte-identical-on-every-machine|json=0
2
+ D22PARITY|case=01|verb=tuple_to_english|input_sha16=590b80583f801fc5|output_sha16=dc044d91927cc6f5|state=IMPLEMENTED_THIN_ADAPTER|json=0
3
+ D22PARITY|case=02|verb=tuple_to_english|input_sha16=5adbcab43a8aca52|output_sha16=8750b3f3dc16acd6|state=IMPLEMENTED_THIN_ADAPTER|json=0
4
+ D22PARITY|case=03|verb=english_to_tuple|input_sha16=e49b6d849e9547a1|output_sha16=d8908880d34a934c|state=IMPLEMENTED_ALREADY_TUPLE_PACKET|json=0
5
+ D22PARITY|case=04|verb=english_to_tuple|input_sha16=9b7fba624d0ddefd|output_sha16=bf63c61980f36ab7|state=DRAFT_ROUTE_ONLY_NOT_EXECUTABLE|json=0
6
+ D22PARITY|case=05|verb=ix_to_tuple|input_sha16=b5fa93a1c83dcb1b|output_sha16=eb768c05e536db20|state=DRAFT_ROUTE_ONLY_NOT_EXECUTABLE|json=0
7
+ D22PARITY|case=06|verb=hilbert_to_human|input_sha16=b3858eb42f52ecc1|output_sha16=f86d1808f1d5c2ee|state=IMPLEMENTED_SHALLOW_DESCRIPTOR|json=0
8
+ D22PARITY|case=07|verb=crlt_merge|input_sha16=aab8eb2dc67ab270|output_sha16=6308e3c68b9fbc10|state=IMPLEMENTED_SHALLOW_MERGE|json=0
9
+ D22PARITY|case=08|verb=auto_transition_all_languages|input_sha16=67079a38dfb024d4|output_sha16=58e125b618b2a9b4|state=PLAN_MATRIX_ONLY|json=0
10
+ D22PARITY|case=09|verb=namespace_walk|input_sha16=74234e98afe7498f|output_sha16=8931acc659829323|state=IMPLEMENTED_NAMESPACE_READ|json=0
11
+ D22PARITYFTR|cases=9|bundle_sha16=335a1023ceec4946|exit=byte-match-when-regenerated-file-equals-sealed-baseline|json=0
docs/D22-PARITY-BASELINE-2026-06-11.hbp.sha256 ADDED
@@ -0,0 +1 @@
 
 
1
+ 65D3E003891C3A44F958AC198102C018E4D2AAEAA7E8A7D48A97BF13CF23A3AF D22-PARITY-BASELINE-2026-06-11.hbp
tests/d22-parity-probe.unit.test.mjs ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import assert from 'node:assert/strict';
2
+ import { readFileSync } from 'node:fs';
3
+ import test from 'node:test';
4
+
5
+ import { emitParityRows } from '../tools/behcs/d22-parity-probe.mjs';
6
+
7
+ // STEP|166 live cross-machine byte-compare: the baseline was generated and
8
+ // sealed on acer; every machine that runs this pyramid regenerates the rows
9
+ // from its own local execution and byte-compares against the sealed bytes.
10
+ // A pass on liris IS the bilateral byte-match the plan step requires.
11
+ test('STEP|166: regenerated parity rows byte-match the sealed baseline', () => {
12
+ const regenerated = emitParityRows().join('\n') + '\n';
13
+ const baseline = readFileSync(
14
+ new URL('../docs/D22-PARITY-BASELINE-2026-06-11.hbp', import.meta.url),
15
+ 'utf8',
16
+ );
17
+ assert.equal(regenerated, baseline, 'this machine produced different bytes than the sealed baseline');
18
+ });
19
+
20
+ test('parity rows stay HBP-only and host-free', () => {
21
+ const rows = emitParityRows();
22
+ assert.ok(rows.every((row) => row.endsWith('json=0')));
23
+ assert.ok(rows.every((row) => !row.includes('{"')));
24
+ assert.ok(rows.every((row) => !/host=|\d{4}-\d{2}-\d{2}T/.test(row)), 'rows must carry no host or timestamp');
25
+ });
tests/d22-parity-probe.unit.test.mjs.sha256 ADDED
@@ -0,0 +1 @@
 
 
1
+ 86B3BA853E7BBBE91A3A82A30454ED66A8525D40BAE5B6EBB2F7DED7465D6884 d22-parity-probe.unit.test.mjs
tests/supervisor-collision-router.system.test.mjs CHANGED
@@ -22,6 +22,7 @@ const sealedFiles = [
22
  'docs/ACER-CONVERGENCE-COMPONENT-2-2026-06-11.hbp',
23
  'docs/LIRIS-D22-VERB-ADAPTER-2026-06-11.hbp',
24
  'docs/ACER-READBACK-D22-2026-06-11.hbp',
 
25
  'specs/SUPERVISOR-COLLISION-ROUTER-SPEC.hbp',
26
  'tools/behcs/supervisor-collision-router.mjs',
27
  'tools/behcs/supervisor-collision-router.hbp',
@@ -32,8 +33,10 @@ const sealedFiles = [
32
  'tools/behcs/d22-verb-adapter.mjs',
33
  'tools/behcs/d22-verb-adapter.hbp',
34
  'tools/behcs/d22-verb-adapter.hbi',
 
35
  'tools/omni-processor/omnitranslator-v0.js',
36
  'tests/d22-verb-adapter.unit.test.mjs',
 
37
  'tests/supervisor-collision-router.unit.test.mjs',
38
  'tests/supervisor-collision-router.integration.test.mjs',
39
  'tests/supervisor-collision-router.suite.test.mjs',
 
22
  'docs/ACER-CONVERGENCE-COMPONENT-2-2026-06-11.hbp',
23
  'docs/LIRIS-D22-VERB-ADAPTER-2026-06-11.hbp',
24
  'docs/ACER-READBACK-D22-2026-06-11.hbp',
25
+ 'docs/D22-PARITY-BASELINE-2026-06-11.hbp',
26
  'specs/SUPERVISOR-COLLISION-ROUTER-SPEC.hbp',
27
  'tools/behcs/supervisor-collision-router.mjs',
28
  'tools/behcs/supervisor-collision-router.hbp',
 
33
  'tools/behcs/d22-verb-adapter.mjs',
34
  'tools/behcs/d22-verb-adapter.hbp',
35
  'tools/behcs/d22-verb-adapter.hbi',
36
+ 'tools/behcs/d22-parity-probe.mjs',
37
  'tools/omni-processor/omnitranslator-v0.js',
38
  'tests/d22-verb-adapter.unit.test.mjs',
39
+ 'tests/d22-parity-probe.unit.test.mjs',
40
  'tests/supervisor-collision-router.unit.test.mjs',
41
  'tests/supervisor-collision-router.integration.test.mjs',
42
  'tests/supervisor-collision-router.suite.test.mjs',
tests/supervisor-collision-router.system.test.mjs.sha256 CHANGED
@@ -1 +1 @@
1
- 7062485FD5AA5F0B03D8DB035D3ED73E5ECCED1FD9CFE4FC3FBAFCC74CEB2F30 supervisor-collision-router.system.test.mjs
 
1
+ 923ADD88C55FF31F1DAFD9D272AEEF257F9C46BE213B3453908F0025194D7C59 supervisor-collision-router.system.test.mjs
tools/behcs/d22-parity-probe.mjs ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env node
2
+ import { createHash } from 'node:crypto';
3
+ import { resolve } from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
5
+
6
+ import { D22_VERBS, runD22Verb } from './d22-verb-adapter.mjs';
7
+
8
+ // STEP|166 exit=byte-match: every row below must be byte-identical on every
9
+ // machine that regenerates it, so nothing host-, path-, or time-dependent
10
+ // may enter the rows. The sealed baseline in docs/ is the cross-machine
11
+ // compare target; the unit test regenerates and byte-compares on each run.
12
+ const PROBE_CASES = Object.freeze([
13
+ { id: '01', verb: 'tuple_to_english', input: { from: 'liris', to: 'acer', verb: 'test.ping', input_a: '1' } },
14
+ { id: '02', verb: 'tuple_to_english', input: '@packet from=acer verb=parity x=1' },
15
+ { id: '03', verb: 'english_to_tuple', input: '@packet from=parity verb=ok' },
16
+ { id: '04', verb: 'english_to_tuple', input: 'translate this naturally' },
17
+ { id: '05', verb: 'ix_to_tuple', input: 'IX-459 beast discovery' },
18
+ { id: '06', verb: 'hilbert_to_human', input: 'PID-H9E2A-A07-W104-P00-N00000' },
19
+ { id: '07', verb: 'crlt_merge', input: [{ from: 'liris', verb: 'one' }, '@packet to=acer input_a=2'] },
20
+ { id: '08', verb: 'auto_transition_all_languages', input: '@packet verb=test' },
21
+ { id: '09', verb: 'namespace_walk', input: null },
22
+ ]);
23
+
24
+ function sha16(value) {
25
+ const text = typeof value === 'string' ? value : JSON.stringify(value);
26
+ return createHash('sha256').update(text).digest('hex').slice(0, 16);
27
+ }
28
+
29
+ export function emitParityRows() {
30
+ const verbsCovered = new Set(PROBE_CASES.map((c) => c.verb));
31
+ const rows = [
32
+ `D22PARITYHDR|step=166|verbs_covered=${verbsCovered.size}of${D22_VERBS.length}|cases=${PROBE_CASES.length}|rule=rows-byte-identical-on-every-machine|json=0`,
33
+ ];
34
+ const outputs = [];
35
+ for (const probe of PROBE_CASES) {
36
+ const out = runD22Verb(probe.verb, probe.input);
37
+ const serialized = JSON.stringify(out);
38
+ outputs.push(serialized);
39
+ rows.push(
40
+ `D22PARITY|case=${probe.id}|verb=${probe.verb}|input_sha16=${sha16(probe.input)}|output_sha16=${sha16(serialized)}|state=${out.state}|json=0`,
41
+ );
42
+ }
43
+ rows.push(
44
+ `D22PARITYFTR|cases=${PROBE_CASES.length}|bundle_sha16=${sha16(outputs.join('\n'))}|exit=byte-match-when-regenerated-file-equals-sealed-baseline|json=0`,
45
+ );
46
+ return rows;
47
+ }
48
+
49
+ const isMain = process.argv[1] && fileURLToPath(import.meta.url) === resolve(process.argv[1]);
50
+
51
+ if (isMain) {
52
+ process.stdout.write(emitParityRows().join('\n') + '\n');
53
+ }
tools/behcs/d22-parity-probe.mjs.sha256 ADDED
@@ -0,0 +1 @@
 
 
1
+ FA9BBDBDB143ED052E21D2A288A276AF08A1E52F63C070745971ABDBDC507BB9 d22-parity-probe.mjs