Skip to content

fix(witness): §S74 candidate 1 — revive room-walker witness trio + re-lock geomap baseline - #90

Merged
red1oon merged 1 commit into
fable/meshdb-livewirefrom
fix/s74-room-witness-revive
Aug 23, 2026
Merged

fix(witness): §S74 candidate 1 — revive room-walker witness trio + re-lock geomap baseline#90
red1oon merged 1 commit into
fable/meshdb-livewirefrom
fix/s74-room-witness-revive

Conversation

@red1oon

@red1oon red1oon commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Executes prompts/SCRIPT_LENGTH_REFACTOR_SEAMS.md §S74's priority-1 verdict: revive the dead witness locks before any structural refactor. Witness-side only — zero product lines changed. Full evidence trail appended as §S74's 2026-08-23 addendum in the same file.

Fix 1 — the dead LIVEWIRE front door

witness_room_walker_parity.js / witness_room_fill.js / witness_room_wellformed.js had front-doored on the pruned /tmp/wt-fable-livewire/modeller since that worktree was removed — every run printed all-SKIP pass=0 fail=0, exit 0 (green-but-vacuous, §S61.3 class B).

  • LIVEWIRE now resolves: ARC_DB_DIR env override → ~/bim-ootb/modeller → the old /tmp path (first existing dir wins); per-building SKIP kept for genuinely absent DBs.
  • Hardcoded absolute sql.js requires → the loadSqlJs() candidate loop already used by witness_disc_walk_shim.js (§S74 landmine 6).
  • Parity's hardcoded /home/red1/bim-compiler/scripts/compile_rooms.py exec → ROOT-relative (it was silently testing the PRIMARY checkout's py from any worktree).
  • KNOWN_TYPES += SUSPECT_ELONGATED/SUSPECT_LARGE (specced latent-misfire fix).

Before/after: all three all-SKIP vacuous → parity pass=6 fail=0 (6/6 buildings byte-identical on spatial_structure + rel_contained_in_space; totals 51/33/207/6/201/45), fill pass=18 fail=0, wellformed pass=19 fail=0, all zero-SKIP.

Revival exposed two witness assumptions gone stale during the dead-gate window (product moved 2026-07-12/13 while the witnesses stayed frozen at 2026-07-11; py+js remained byte-identical throughout, so these are test-side, not product defects):

  • fill F2 "SUSPECT rooms have exactly ONE row": 7 multi-rect suspects fleet-wide, each explained by R-MERGE rect-concat (room_walker.js:990–998, merged_from 2–3) or R-REJECT's post-decompose SUSPECT_OPEN flag (:1063, enclosure 0.391 < 0.50). Re-locked to exempt exactly those two; unexplained multi-row suspects still FAIL.
  • wellformed W3 "zero wall cells inside any rect": red on ALL SIX buildings because §WALL-SNAP (room_walker.js:432–467, 2026-07-13) puts every rect edge ON its wall's continuous near face. Depth-classified fleet-wide: 16,391 hits at depth ≤1 (the snap boundary band), ZERO at depth ≥2. Re-locked: band contact reported (snapBandHits=), never failed; depth ≥2 — a wall genuinely inside a room — still FAILs.

Fix 2 — stale geomap exact-lock

scripts/witness_geomap_tier3.py was RED on baseline_iou_recall == 1 while the flood-fill baseline measures 3/21 over 3 candidates (confirmed fresh before editing). Re-locked 1→3 with a dated comment; assertion shape untouched (exact-lock + BEATS strict inequality both kept). Now RESULT: GREEN, exit 0. The artifact's db_md5 line is re-recorded to the fixture DB's actual hash (DB rebuilt 2026-07-10 after the artifact was committed; all scored numbers re-verified identical).

Perturbation proof (revived gates can still go red)

  • mergeRooms group order flipped to Object.keys() in a scratch copy → parity pass=4 fail=2 exit 1 (Clinic + Hospital same-count/wrong-room-per-guid — the :974–985 historical red re-demonstrated).
  • One KNOWN_TYPES entry dropped → wellformed pass=14 fail=5 (badType 9/23/1/8/13).

No auto-merge — left for review per dispatch instructions.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GmNVMG9ZGcKygz4zXuCe6m

…+ re-lock geomap baseline

Witness-side only, zero product lines. Executes SCRIPT_LENGTH_REFACTOR_SEAMS.md §S74's
priority-1 verdict (revive the dead locks before any structural refactor).

Fix 1 — dead LIVEWIRE front door (parity/fill/wellformed were all-SKIP pass=0 fail=0
exit-0 since /tmp/wt-fable-livewire was pruned):
- LIVEWIRE = ARC_DB_DIR env override -> ~/bim-ootb/modeller -> old /tmp path (first
  existing dir); per-building SKIP kept.
- Hardcoded /home/red1/bim-compiler node_modules/sql.js requires -> loadSqlJs()
  candidate loop (witness_disc_walk_shim.js pattern); parity's hardcoded primary-checkout
  compile_rooms.py exec -> ROOT-relative (same landmine class).
- KNOWN_TYPES += SUSPECT_ELONGATED/SUSPECT_LARGE (specced latent-misfire fix).
Revival exposed two witness assumptions gone stale during the dead-gate window, both
re-locked against measured product behavior (py+js byte-identical throughout):
- fill F2: multi-rect suspects from R-MERGE (merged_from>1) and R-REJECT's late
  SUSPECT_OPEN are exempt; unexplained multi-row suspects still FAIL.
- wellformed W3: depth<=1 wall-cell contact = the §WALL-SNAP boundary band (16,391
  hits fleet-wide, ZERO at depth>=2), reported not failed; depth>=2 still FAILs.

Fix 2 — witness_geomap_tier3.py stale exact-lock: baseline_iou_recall re-locked 1->3
(measured 3/21 over 3 candidates, flood baseline improved since 2026-07-02); assertion
shape untouched. Artifact db_md5 re-recorded to the fixture's actual hash.

Witnessed: parity pass=6 fail=0 (6/6 byte-identical), fill pass=18 fail=0, wellformed
pass=19 fail=0 (all zero-SKIP), geomap GREEN exit 0. Perturbations both go red:
Object.keys() merge order -> parity pass=4 fail=2; dropped KNOWN_TYPE -> wellformed
pass=14 fail=5. Full trail in §S74's 2026-08-23 addendum.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GmNVMG9ZGcKygz4zXuCe6m
@red1oon
red1oon merged commit e32fbc7 into fable/meshdb-livewire Aug 23, 2026
1 check failed
@red1oon
red1oon deleted the fix/s74-room-witness-revive branch August 23, 2026 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant