fix(witness): §S74 candidate 1 — revive room-walker witness trio + re-lock geomap baseline - #90
Merged
Conversation
…+ 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.jshad front-doored on the pruned/tmp/wt-fable-livewire/modellersince that worktree was removed — every run printed all-SKIPpass=0 fail=0, exit 0 (green-but-vacuous, §S61.3 class B).LIVEWIREnow resolves:ARC_DB_DIRenv override →~/bim-ootb/modeller→ the old /tmp path (first existing dir wins); per-building SKIP kept for genuinely absent DBs.sql.jsrequires → theloadSqlJs()candidate loop already used bywitness_disc_walk_shim.js(§S74 landmine 6)./home/red1/bim-compiler/scripts/compile_rooms.pyexec → 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 onspatial_structure+rel_contained_in_space; totals 51/33/207/6/201/45), fillpass=18 fail=0, wellformedpass=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):
room_walker.js:990–998,merged_from2–3) or R-REJECT's post-decomposeSUSPECT_OPENflag (:1063, enclosure 0.391 < 0.50). Re-locked to exempt exactly those two; unexplained multi-row suspects still FAIL.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.pywas RED onbaseline_iou_recall == 1while 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). NowRESULT: GREEN, exit 0. The artifact'sdb_md5line 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)
mergeRoomsgroup order flipped toObject.keys()in a scratch copy → paritypass=4 fail=2exit 1 (Clinic + Hospital same-count/wrong-room-per-guid — the:974–985historical red re-demonstrated).KNOWN_TYPESentry dropped → wellformedpass=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