Kevin Crutt commited on
Commit
9e84c49
·
1 Parent(s): 87b07e1

harden collision router sentinel free-address guards

Browse files
README.md CHANGED
@@ -46,12 +46,13 @@ The supervisor collision router converged in doctrine before it converged in byt
46
  - rule: a collision is only an error after classification
47
  - head guard: non-`COLLISION` HBP rows are held, not routed as collisions
48
  - precedence: runtime-bound fields (`os_pid`, `process_id`, `runtime_pid`, `port`, `flywheel_slot`, `port_port`) classify as REAL before any logical label
49
- - sentinel runtime values (`none`, `null`, `false`, `0`, empty, etc.) are absent and do not override logical labels
 
50
  - token inference is boundary-aware, so `fireworker` does not match `worker`
51
  - fallback token inference only reads dedicated classification fields (`kind`, `type`, `layer`, `class`, `role`, `scope`, `agent_kind`, `agent_type`, `collision`), not freeform names/routes/reasons
52
  - canonical logical vocabulary includes `supervisor`, `prof`, `professor`, and `council`; `write` is deliberately not a logical inference token
53
  - verdicts: logical preserve, real block until free address, real reroute draft when a free address is attested, mixed split
54
- - verification: `node --check`, CLI `--self-test` (`13/13`), and the portable test pyramid: unit (`14/14`), integration (`3/3`), suite (`8/8`), system (`3/3`), fabric-contract (`4/4`)
55
 
56
  ## Authority
57
 
 
46
  - rule: a collision is only an error after classification
47
  - head guard: non-`COLLISION` HBP rows are held, not routed as collisions
48
  - precedence: runtime-bound fields (`os_pid`, `process_id`, `runtime_pid`, `port`, `flywheel_slot`, `port_port`) classify as REAL before any logical label
49
+ - sentinel and zero-equivalent runtime values (`none`, `null`, `false`, `0`, `0.0`, `00`, `+0`, `-0`, empty, etc.) are absent and do not override logical labels
50
+ - free-address fields must pass the same presence check before a real collision can become reroute-ready; `-`, `0`, `none`, `null`, `false`, and zero-equivalents stay blocked
51
  - token inference is boundary-aware, so `fireworker` does not match `worker`
52
  - fallback token inference only reads dedicated classification fields (`kind`, `type`, `layer`, `class`, `role`, `scope`, `agent_kind`, `agent_type`, `collision`), not freeform names/routes/reasons
53
  - canonical logical vocabulary includes `supervisor`, `prof`, `professor`, and `council`; `write` is deliberately not a logical inference token
54
  - verdicts: logical preserve, real block until free address, real reroute draft when a free address is attested, mixed split
55
+ - verification: `node --check`, CLI `--self-test` (`15/15`), and the portable test pyramid: unit (`16/16`), integration (`3/3`), suite (`8/8`), system (`3/3`), fabric-contract (`4/4`)
56
 
57
  ## Authority
58
 
README.md.sha256 CHANGED
@@ -1 +1 @@
1
- D12095AB7839D595727EA681BA67C01A0DF628C25F518144BFB0B212DD42DCC0 README.md
 
1
+ 0BC38BAB2EAE126EE0F66CF6444B46125269D07031C74B1C7705580A39605299 README.md
specs/SUPERVISOR-COLLISION-ROUTER-SPEC.hbp CHANGED
@@ -3,7 +3,7 @@ LAW|rule=collision-is-only-error-after-classification|composes=LAW-ASOLARIA-NEUR
3
  INPUT|primary=HBP-row-string|shape=COLLISION|fields=agent_system+kind+role+os_pid+process_id+runtime_pid+port+flywheel_slot+port_port+free_hilbert+free_real_address|json=0
4
  INPUT|compat=JS-object-accepted-by-normalizeCollisionInput|status=compat-only-not-bilateral-wire|json=0
5
  CLASSORDER|step=0|rule=head-must-be-COLLISION-or-OBJECT-compat|non_collision_heads=HELD_NON_COLLISION_HEAD|json=0
6
- CLASSORDER|step=1|rule=runtime-bound-fields-win-REAL-before-any-logical-label|fields=os_pid+process_id+runtime_pid+port+flywheel_slot+port_port|sentinels_absent=empty+0+none+null+false+undefined+na+n/a+dash|json=0
7
  CLASSORDER|step=2|rule=explicit-agent_system-logical-or-real|logical_state=LOGICAL_AGENT_COLLISION_ALLOWED|real_state=REAL_AGENT_NO_COLLISION_REQUIRED|json=0
8
  CLASSORDER|step=3|rule=evidence-token-inference-boundary-aware-not-substring-and-dedicated-fields-only|fields=kind+type+layer+class+role+scope+agent_kind+agent_type+collision|ignored_freeform=agent+front+address+route+reason+subject+required+action|mixed=real-and-logical-markers-held-for-split|examples=fireworker-does-not-match-worker;agent_sup-dan_omniflywheel_router_does-not-infer-real|json=0
9
  SCRVOCABREAL|canonical=real_agent+real-agent+realagent+runtime+physical+process+process_backed+daemon+free_agent+free-agent+shelless+worker+pid_runtime+runtime_pid+port.port+omniflywheel+revolver|json=0
@@ -13,12 +13,13 @@ CLASSORDER|step=4|rule=unclassified-held-for-file-level-review|no_guessing=1|jso
13
  VERDICT|logical=LOGICAL_COLLISION_PRESERVED_ROUTE_TO_SUPERVISOR|ok=1|target_router=logical-overlay-router|target_route=/api/constructions/atlas/system/council/dispatch-plan|json=0
14
  VERDICT|real_without_free_address=REAL_COLLISION_BLOCKED_NEEDS_FREE_ADDRESS|ok=0|target_router=real-runtime-address-router|target_route=/api/omniflywheel|gate=operator-pair-cosign-before-real-mint-or-launch|json=0
15
  VERDICT|real_with_free_address=REAL_COLLISION_REROUTE_READY_DRAFT|ok=1|target_router=real-runtime-address-router|target_route=/api/omniflywheel|gate=operator-pair-cosign-before-real-mint-or-launch|json=0
 
16
  VERDICT|mixed=MIXED_COLLISION_HELD_SPLIT_REQUIRED|ok=0|required=emit-separate-logical-and-real-HBP-rows-before-routing|json=0
17
  VERDICT|unclassified=UNCLASSIFIED_COLLISION_HELD|ok=0|required=add-agent_system-real-or-logical-or-review-source-diff|json=0
18
  OUTPUT|plan_rows=SUPCOLLIDEHDR+SUPCOLLIDEROUTE+SUPCOLLIDEGATES|row_format=HBP|json_object_on_wire=0|json=0
19
  SAFETY|mutates=0|executable=0|mints=0|launches=0|usb_writes=0|engine_edits=0|json=0
20
- VERIFY|required=node--check-router+router-cli-selftest-13of13|unit=14of14|integration=3of3|suite=8of8|system=3of3|fabric_contract=4of4|all_repo_tests=32of32|json=0
21
  CONVERGENCE|recommendation=acer-adopt-liris-HBP-row-input+4-state-real-taxonomy+unit-test-file|byte_convergence=copy-this-source-or-rebuild-to-this-spec-then-compare-sha256|json=0
22
- HARDENING|source=liris-adversarial-review+acer-confirmed-inherited-bugs+acer-real-office-system-probe|fixes=non_collision_head_guard+boundary_token_matching+runtime_sentinel_absent+freeform_identity_token_ignored|json=0
23
  VOCABDELTA|source=acer-poc+operator-decision|logical_add=supervisor+prof+professor+council|logical_remove=write|proof=acer_pyramid_29of29+liris_local_unit_14of14+cli_13of13+combined_18of18|json=0
24
  END|state=SPEC_READY_FOR_BILATERAL_CONVERGENCE_HARDENED|json=0
 
3
  INPUT|primary=HBP-row-string|shape=COLLISION|fields=agent_system+kind+role+os_pid+process_id+runtime_pid+port+flywheel_slot+port_port+free_hilbert+free_real_address|json=0
4
  INPUT|compat=JS-object-accepted-by-normalizeCollisionInput|status=compat-only-not-bilateral-wire|json=0
5
  CLASSORDER|step=0|rule=head-must-be-COLLISION-or-OBJECT-compat|non_collision_heads=HELD_NON_COLLISION_HEAD|json=0
6
+ CLASSORDER|step=1|rule=runtime-bound-fields-win-REAL-before-any-logical-label|fields=os_pid+process_id+runtime_pid+port+flywheel_slot+port_port|sentinels_absent=empty+0+none+null+false+undefined+na+n/a+dash|zero_equivalents_absent=0.0+00+plus0+minus0+0x0|json=0
7
  CLASSORDER|step=2|rule=explicit-agent_system-logical-or-real|logical_state=LOGICAL_AGENT_COLLISION_ALLOWED|real_state=REAL_AGENT_NO_COLLISION_REQUIRED|json=0
8
  CLASSORDER|step=3|rule=evidence-token-inference-boundary-aware-not-substring-and-dedicated-fields-only|fields=kind+type+layer+class+role+scope+agent_kind+agent_type+collision|ignored_freeform=agent+front+address+route+reason+subject+required+action|mixed=real-and-logical-markers-held-for-split|examples=fireworker-does-not-match-worker;agent_sup-dan_omniflywheel_router_does-not-infer-real|json=0
9
  SCRVOCABREAL|canonical=real_agent+real-agent+realagent+runtime+physical+process+process_backed+daemon+free_agent+free-agent+shelless+worker+pid_runtime+runtime_pid+port.port+omniflywheel+revolver|json=0
 
13
  VERDICT|logical=LOGICAL_COLLISION_PRESERVED_ROUTE_TO_SUPERVISOR|ok=1|target_router=logical-overlay-router|target_route=/api/constructions/atlas/system/council/dispatch-plan|json=0
14
  VERDICT|real_without_free_address=REAL_COLLISION_BLOCKED_NEEDS_FREE_ADDRESS|ok=0|target_router=real-runtime-address-router|target_route=/api/omniflywheel|gate=operator-pair-cosign-before-real-mint-or-launch|json=0
15
  VERDICT|real_with_free_address=REAL_COLLISION_REROUTE_READY_DRAFT|ok=1|target_router=real-runtime-address-router|target_route=/api/omniflywheel|gate=operator-pair-cosign-before-real-mint-or-launch|json=0
16
+ FREEADDRESS|rule=free-address-fields-must-pass-presentValue-before-reroute-ready|fields=free_real_address+free_hilbert+next_free_hilbert+target_free_range+free_range|blocked_if=empty+0+0.0+00+plus0+minus0+none+null+false+undefined+na+n/a+dash|valid_example=1604-1621|json=0
17
  VERDICT|mixed=MIXED_COLLISION_HELD_SPLIT_REQUIRED|ok=0|required=emit-separate-logical-and-real-HBP-rows-before-routing|json=0
18
  VERDICT|unclassified=UNCLASSIFIED_COLLISION_HELD|ok=0|required=add-agent_system-real-or-logical-or-review-source-diff|json=0
19
  OUTPUT|plan_rows=SUPCOLLIDEHDR+SUPCOLLIDEROUTE+SUPCOLLIDEGATES|row_format=HBP|json_object_on_wire=0|json=0
20
  SAFETY|mutates=0|executable=0|mints=0|launches=0|usb_writes=0|engine_edits=0|json=0
21
+ VERIFY|required=node--check-router+router-cli-selftest-15of15|unit=16of16|integration=3of3|suite=8of8|system=3of3|fabric_contract=4of4|all_repo_tests=34of34|json=0
22
  CONVERGENCE|recommendation=acer-adopt-liris-HBP-row-input+4-state-real-taxonomy+unit-test-file|byte_convergence=copy-this-source-or-rebuild-to-this-spec-then-compare-sha256|json=0
23
+ HARDENING|source=liris-adversarial-review+acer-confirmed-inherited-bugs+acer-real-office-system-probe+acer-adversarial-sweep-wf_27029b9b|fixes=non_collision_head_guard+boundary_token_matching+runtime_sentinel_absent+zero_equivalent_runtime_absent+free_address_sentinel_guard+freeform_identity_token_ignored|json=0
24
  VOCABDELTA|source=acer-poc+operator-decision|logical_add=supervisor+prof+professor+council|logical_remove=write|proof=acer_pyramid_29of29+liris_local_unit_14of14+cli_13of13+combined_18of18|json=0
25
  END|state=SPEC_READY_FOR_BILATERAL_CONVERGENCE_HARDENED|json=0
specs/SUPERVISOR-COLLISION-ROUTER-SPEC.hbp.sha256 CHANGED
@@ -1 +1 @@
1
- FFF159B2D3643047BF55BFA8255A66AAA104ED9CFDF8C8FA1A3FB9160E1131F1 SUPERVISOR-COLLISION-ROUTER-SPEC.hbp
 
1
+ DB7D0E870A9DC4EE8E171B2948825EBE3BED63F1ABF92650BEC028C1D15404B3 SUPERVISOR-COLLISION-ROUTER-SPEC.hbp
tests/supervisor-collision-router.unit.test.mjs CHANGED
@@ -56,6 +56,15 @@ test('sentinel runtime values are absent and do not override logical labels', ()
56
  assert.equal(plan.state, 'LOGICAL_COLLISION_PRESERVED_ROUTE_TO_SUPERVISOR');
57
  });
58
 
 
 
 
 
 
 
 
 
 
59
  test('real collision can become draft-ready with an attested free range', () => {
60
  const plan = planCollisionRoute('COLLISION|agent_system=real|kind=free_agent|free_hilbert=1604-1621|json=0');
61
  assert.equal(plan.ok, true);
@@ -63,6 +72,21 @@ test('real collision can become draft-ready with an attested free range', () =>
63
  assert.match(plan.required, /1604-1621/);
64
  });
65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  test('token inference uses boundaries instead of substrings', () => {
67
  const plan = planCollisionRoute('COLLISION|role=fireworker|json=0');
68
  assert.equal(plan.ok, false);
 
56
  assert.equal(plan.state, 'LOGICAL_COLLISION_PRESERVED_ROUTE_TO_SUPERVISOR');
57
  });
58
 
59
+ test('numeric-zero-equivalent runtime values are absent', () => {
60
+ for (const value of ['0.0', '00', '+0', '-0', '0x0']) {
61
+ const plan = planCollisionRoute(`COLLISION|agent_system=logical|role=supervisor|port=${value}|json=0`);
62
+ assert.equal(plan.ok, true, value);
63
+ assert.equal(plan.classification, 'LOGICAL_AGENT', value);
64
+ assert.equal(plan.state, 'LOGICAL_COLLISION_PRESERVED_ROUTE_TO_SUPERVISOR', value);
65
+ }
66
+ });
67
+
68
  test('real collision can become draft-ready with an attested free range', () => {
69
  const plan = planCollisionRoute('COLLISION|agent_system=real|kind=free_agent|free_hilbert=1604-1621|json=0');
70
  assert.equal(plan.ok, true);
 
72
  assert.match(plan.required, /1604-1621/);
73
  });
74
 
75
+ test('sentinel and zero-equivalent free addresses do not unblock real collisions', () => {
76
+ for (const field of ['free_real_address', 'free_hilbert', 'next_free_hilbert', 'target_free_range', 'free_range']) {
77
+ for (const value of ['-', '0', '0.0', '00', '+0', '-0', 'none', 'null', 'false']) {
78
+ const plan = planCollisionRoute(`COLLISION|agent_system=real|kind=free_agent|${field}=${value}|json=0`);
79
+ assert.equal(plan.ok, false, `${field}=${value}`);
80
+ assert.equal(plan.classification, 'REAL_AGENT', `${field}=${value}`);
81
+ assert.equal(plan.state, 'REAL_COLLISION_BLOCKED_NEEDS_FREE_ADDRESS', `${field}=${value}`);
82
+ }
83
+ }
84
+ const livePort = planCollisionRoute('COLLISION|port=4949|free_real_address=-|json=0');
85
+ assert.equal(livePort.ok, false);
86
+ assert.equal(livePort.classification, 'REAL_AGENT');
87
+ assert.equal(livePort.state, 'REAL_COLLISION_BLOCKED_NEEDS_FREE_ADDRESS');
88
+ });
89
+
90
  test('token inference uses boundaries instead of substrings', () => {
91
  const plan = planCollisionRoute('COLLISION|role=fireworker|json=0');
92
  assert.equal(plan.ok, false);
tests/supervisor-collision-router.unit.test.mjs.sha256 CHANGED
@@ -1 +1 @@
1
- 5854AD9E0A364CEFAE7730A30479660F31B19D9C2E95D432FEF65CF163320BFF supervisor-collision-router.unit.test.mjs
 
1
+ C6918820C58ED52939643A82E17D055EBC4F0ED78A4604BB464CA607AEAA2D3F supervisor-collision-router.unit.test.mjs
tools/behcs/supervisor-collision-router.hbi CHANGED
@@ -2,4 +2,4 @@ SUPCOLLIDEROUTERINDEX|host=liris|target=supervisor-collision-router.hbp|tool=sup
2
  INDEXROW|row=1|kind=hdr|state=collision_classifier_declared|json=0
3
  INDEXROW|row=3|kind=logical|route=/api/constructions/atlas/system/council/dispatch-plan|json=0
4
  INDEXROW|row=4|kind=real|route=/api/omniflywheel|json=0
5
- INDEXROW|row=7|kind=verify|state=node_check+unit_14of14+combined_18of18+cli_13of13_pass|hardening=head_guard+boundary_tokens+runtime_sentinels+freeform_identity_ignored+canonical_vocab_delta|vocab=logical_add_supervisor_prof_professor_council_remove_write|runtime_bound_precedence=REAL_before_logical_label|json=0
 
2
  INDEXROW|row=1|kind=hdr|state=collision_classifier_declared|json=0
3
  INDEXROW|row=3|kind=logical|route=/api/constructions/atlas/system/council/dispatch-plan|json=0
4
  INDEXROW|row=4|kind=real|route=/api/omniflywheel|json=0
5
+ INDEXROW|row=7|kind=verify|state=node_check+unit_16of16+combined_20of20+cli_15of15_pass|hardening=head_guard+boundary_tokens+runtime_sentinels+zero_equivalent_runtime_absent+free_address_sentinel_guard+freeform_identity_ignored+canonical_vocab_delta|vocab=logical_add_supervisor_prof_professor_council_remove_write|runtime_bound_precedence=REAL_before_logical_label|json=0
tools/behcs/supervisor-collision-router.hbi.sha256 CHANGED
@@ -1 +1 @@
1
- F8ECF8D3F91C13529159273877502236BD91664E8FD136327CD72B326B113794 supervisor-collision-router.hbi
 
1
+ 97AD9A83BA77C6BE5AE1C7E5D781C79EA5F2541E0F456540B89B94A302DB0CD9 supervisor-collision-router.hbi
tools/behcs/supervisor-collision-router.hbp CHANGED
@@ -4,6 +4,6 @@ SUPCOLLIDEROUTERSYSTEM|kind=LOGICAL|members=supervisors+profs+roles+reasoners+se
4
  SUPCOLLIDEROUTERSYSTEM|kind=REAL|members=runtime_pid+process_backed+free_agent+omniflywheel_port_port|collisions=BUGS|action=BLOCK_UNTIL_FREE_REAL_ADDRESS|dispatch=omniflywheel|route=/api/omniflywheel|json=0
5
  SUPCOLLIDEROUTERBRIDGE|kind=SURFACE_TRANSLATION|router=tools/behcs/omnidirectional-translator-router.mjs|when=surface_or_fabric_endpoint_bridge_needed|state=PLANNED_OR_EXISTING_PAIRS_ONLY|json=0
6
  SUPCOLLIDEROUTERVERDICT|logical=LOGICAL_COLLISION_PRESERVED_ROUTE_TO_SUPERVISOR|real_without_free_address=REAL_COLLISION_BLOCKED_NEEDS_FREE_ADDRESS|real_with_free_address=REAL_COLLISION_REROUTE_READY_DRAFT|mixed=MIXED_COLLISION_HELD_SPLIT_REQUIRED|json=0
7
- SUPCOLLIDEROUTERVERIFY|syntax=node_check_PASS|unit=node_test_14of14_PASS|combined_translator_router_tests=18of18_PASS|cli_selftest=13of13_PASS|hardening=non_collision_head_guard+boundary_token_matching+runtime_sentinel_absent+freeform_identity_token_ignored|canonical_vocab=logical_add_supervisor_prof_professor_council_remove_write|runtime_bound_precedence=os_pid_port_flywheel_REAL_before_logical_label|rows=HBP_ONLY|mutates=0|mints=0|launches=0|usb_writes=0|engine_edits=0|json=0
8
- SUPCOLLIDEROUTERSHA|mjs_sha256=BA2E47CFA83CA1AB0DF56ABE43493C6CD88DB6DDCFC2AFA258BCEA8A77F836DC|test_sha256=5854AD9E0A364CEFAE7730A30479660F31B19D9C2E95D432FEF65CF163320BFF|translator_router_sha256=DDE1A74CF3D4D055D536935CF50179748B3304EA4735EE4541AD56FAD38273F5|json=0
9
  SUPCOLLIDEROUTEREND|state=READY_DRAFT_NO_EXECUTION|json=0
 
4
  SUPCOLLIDEROUTERSYSTEM|kind=REAL|members=runtime_pid+process_backed+free_agent+omniflywheel_port_port|collisions=BUGS|action=BLOCK_UNTIL_FREE_REAL_ADDRESS|dispatch=omniflywheel|route=/api/omniflywheel|json=0
5
  SUPCOLLIDEROUTERBRIDGE|kind=SURFACE_TRANSLATION|router=tools/behcs/omnidirectional-translator-router.mjs|when=surface_or_fabric_endpoint_bridge_needed|state=PLANNED_OR_EXISTING_PAIRS_ONLY|json=0
6
  SUPCOLLIDEROUTERVERDICT|logical=LOGICAL_COLLISION_PRESERVED_ROUTE_TO_SUPERVISOR|real_without_free_address=REAL_COLLISION_BLOCKED_NEEDS_FREE_ADDRESS|real_with_free_address=REAL_COLLISION_REROUTE_READY_DRAFT|mixed=MIXED_COLLISION_HELD_SPLIT_REQUIRED|json=0
7
+ SUPCOLLIDEROUTERVERIFY|syntax=node_check_PASS|unit=node_test_16of16_PASS|combined_translator_router_tests=20of20_PASS|cli_selftest=15of15_PASS|hardening=non_collision_head_guard+boundary_token_matching+runtime_sentinel_absent+zero_equivalent_runtime_absent+free_address_sentinel_guard+freeform_identity_token_ignored|canonical_vocab=logical_add_supervisor_prof_professor_council_remove_write|runtime_bound_precedence=os_pid_port_flywheel_REAL_before_logical_label|rows=HBP_ONLY|mutates=0|mints=0|launches=0|usb_writes=0|engine_edits=0|json=0
8
+ SUPCOLLIDEROUTERSHA|mjs_sha256=E1B01511D0F141842805C6404921DD095753670A38B003FE0746B6B31B918D62|test_sha256=C6918820C58ED52939643A82E17D055EBC4F0ED78A4604BB464CA607AEAA2D3F|translator_router_sha256=DDE1A74CF3D4D055D536935CF50179748B3304EA4735EE4541AD56FAD38273F5|json=0
9
  SUPCOLLIDEROUTEREND|state=READY_DRAFT_NO_EXECUTION|json=0
tools/behcs/supervisor-collision-router.hbp.sha256 CHANGED
@@ -1 +1 @@
1
- DE684BE5E511D57F9F19CE6EBA232B04B538B9C17FD40FED75B413D56A6C6737 supervisor-collision-router.hbp
 
1
+ DFD0A20E0D2F0C75AA760FF47D02DE4916A0768FABC716C86F3D7C3B5A22DA5F supervisor-collision-router.hbp
tools/behcs/supervisor-collision-router.mjs CHANGED
@@ -102,7 +102,11 @@ function truthy(value) {
102
  const SENTINELS = new Set(['', '0', 'none', 'null', 'false', 'undefined', 'na', 'n/a', '-']);
103
 
104
  function presentValue(value) {
105
- return !SENTINELS.has(lowerValue(value));
 
 
 
 
106
  }
107
 
108
  function escapeRegExp(value) {
@@ -293,7 +297,10 @@ function hasSurfaceBridge(fields) {
293
  }
294
 
295
  function freeRealAddress(fields) {
296
- return fields.free_real_address || fields.free_hilbert || fields.next_free_hilbert || fields.target_free_range || fields.free_range || '';
 
 
 
297
  }
298
 
299
  export function planCollisionRoute(input) {
@@ -459,9 +466,25 @@ export function selfTest() {
459
  sentinelRuntime.classification === 'LOGICAL_AGENT' &&
460
  sentinelRuntime.state === 'LOGICAL_COLLISION_PRESERVED_ROUTE_TO_SUPERVISOR');
461
 
 
 
 
 
 
 
 
 
462
  const realReady = planCollisionRoute('COLLISION|agent_system=real|kind=free_agent|free_hilbert=1604-1621|json=0');
463
  add('real-reroute-ready-with-free-address', realReady.ok && realReady.state === 'REAL_COLLISION_REROUTE_READY_DRAFT');
464
 
 
 
 
 
 
 
 
 
465
  const substring = planCollisionRoute('COLLISION|role=fireworker|json=0');
466
  add('boundary-token-match-no-substring',
467
  !substring.ok &&
 
102
  const SENTINELS = new Set(['', '0', 'none', 'null', 'false', 'undefined', 'na', 'n/a', '-']);
103
 
104
  function presentValue(value) {
105
+ const lowered = lowerValue(value);
106
+ if (SENTINELS.has(lowered)) return false;
107
+ const numeric = Number(lowered);
108
+ if (Number.isFinite(numeric) && numeric === 0) return false;
109
+ return true;
110
  }
111
 
112
  function escapeRegExp(value) {
 
297
  }
298
 
299
  function freeRealAddress(fields) {
300
+ for (const key of ['free_real_address', 'free_hilbert', 'next_free_hilbert', 'target_free_range', 'free_range']) {
301
+ if (presentValue(fields[key])) return cleanValue(fields[key]);
302
+ }
303
+ return '';
304
  }
305
 
306
  export function planCollisionRoute(input) {
 
466
  sentinelRuntime.classification === 'LOGICAL_AGENT' &&
467
  sentinelRuntime.state === 'LOGICAL_COLLISION_PRESERVED_ROUTE_TO_SUPERVISOR');
468
 
469
+ const zeroEquivalentRuntime = ['0.0', '00', '+0', '-0', '0x0'].map((port) =>
470
+ planCollisionRoute(`COLLISION|agent_system=logical|role=supervisor|port=${port}|json=0`));
471
+ add('zero-equivalent-runtime-values-ignored',
472
+ zeroEquivalentRuntime.every((plan) =>
473
+ plan.ok &&
474
+ plan.classification === 'LOGICAL_AGENT' &&
475
+ plan.state === 'LOGICAL_COLLISION_PRESERVED_ROUTE_TO_SUPERVISOR'));
476
+
477
  const realReady = planCollisionRoute('COLLISION|agent_system=real|kind=free_agent|free_hilbert=1604-1621|json=0');
478
  add('real-reroute-ready-with-free-address', realReady.ok && realReady.state === 'REAL_COLLISION_REROUTE_READY_DRAFT');
479
 
480
+ const freeAddressSentinels = ['-', '0', '0.0', '00', '+0', '-0', 'none', 'null', 'false'].map((free_hilbert) =>
481
+ planCollisionRoute(`COLLISION|agent_system=real|kind=free_agent|free_hilbert=${free_hilbert}|json=0`));
482
+ add('sentinel-free-addresses-do-not-unblock-real-collision',
483
+ [...freeAddressSentinels, planCollisionRoute('COLLISION|port=4949|free_real_address=-|json=0')].every((plan) =>
484
+ !plan.ok &&
485
+ plan.classification === 'REAL_AGENT' &&
486
+ plan.state === 'REAL_COLLISION_BLOCKED_NEEDS_FREE_ADDRESS'));
487
+
488
  const substring = planCollisionRoute('COLLISION|role=fireworker|json=0');
489
  add('boundary-token-match-no-substring',
490
  !substring.ok &&
tools/behcs/supervisor-collision-router.mjs.sha256 CHANGED
@@ -1 +1 @@
1
- BA2E47CFA83CA1AB0DF56ABE43493C6CD88DB6DDCFC2AFA258BCEA8A77F836DC supervisor-collision-router.mjs
 
1
+ E1B01511D0F141842805C6404921DD095753670A38B003FE0746B6B31B918D62 supervisor-collision-router.mjs