# Anchor demo — bug list and development cycle

Measured, not guessed. Every entry says how it was found and how it was verified. The point of
this file is that "it works" and "it is broken on basic questions" were both true at once for days,
because nobody had ever run the thing against questions it had not been shown.

**Harness:** `zoo_harness.mjs` loads the REAL functions out of `index.html` (no reimplementation, no
second copy to drift), stubs the browser, and scores an uncurated question zoo generated by
`demo_probe.py` sampling the shipped shards at random.

```
py -3.13 demo_probe.py --n 40 --seed 99 --out site/_zoo.jsonl
node --max-old-space-size=8192 zoo_harness.mjs site/_zoo.jsonl
```

## Answer rate

| run | sample | pass rate |
|---|---|---:|
| baseline | 30 questions, seed 4242 | **40.0%** |
| after entity-linking redesign | same 30 | **90.0%** |
| hold-out, never seen during fixing | 40 questions, seed 99 | **97.5%** |

---

## FIXED

### B1 — Entity linking shredded multi-word names *(16 of 18 failures)*
`findEntities` stripped stop-words **before** forming spans, then preferred whichever fragment was
best attested. Result:
```
"Tbilisi State Conservatoire" -> [Tbilisi | State | conservatoire]
"Anastasia at This Address"   -> [Anastasia | at | address]
"J. J. Johnston"              -> [J. | J. | Johnston]
```
Root cause was a fix for a different bug: the compound-vs-split rule added to stop `"car wheel"`
being read as one entity. It preferred split parts when better attested, so `Tbilisi`(many facts)
beat `Tbilisi State Conservatoire`(few). **A local fix for a rare case broke the common case.**

*Fixed:* one rule instead of a pile of special cases — **longest contiguous span wins**. Internal
function words are kept because they are part of the name; only the question's framing is trimmed,
and only from the ends. A second entity is sought in the leftover words, so two-entity questions
still work. Verified: 40% -> 90%.

### B2 — The asked-about relation was treated as part of the name
`"what country is Nirauli in"` trimmed only `what`, because the scan stops at the first non-framing
word. That left `country is` to win as a longer span than `Nirauli` — and there really is a subject
called **"Country Is"**, so it confidently answered *United States of America* for seven different
villages.

*Fixed:* the goal relation's own words are framing too, trimmed from both ends. Verified: 90% -> 97.5%.

### B3 — Harness reported 0% from its own bug
First run showed 0/30 ERROR. Cause was in the harness, not the engine: `let RELS` inside the page
script is a **lexical binding**, not a property of the vm sandbox, so `sandbox.RELS = …` created a
second invisible global and the engine kept seeing `null`. Recorded because it would have been
published as an engine failure.

*Fixed:* boot the index from inside the vm context.

### B4 — Harness OOM at 4GB
A parsed shard is roughly 10x its gzipped size and the harness cached them on top of the page's own
cache. *Fixed:* single bounded cache (24 shards, FIFO eviction).

### B5 — A path was presented as an assertion
`"is a caliper used in a car"` returned `caliper -> automotive -> automobile -> car` **with a
composed percentage**, implying a part-of relation the graph never recorded. In a graph this dense
most pairs connect within a few hops, so path-existence is nearly always true and says almost
nothing. *Fixed:* path results state that they are association, not assertion, in the result itself.

### B6 — New question mid-search did nothing
While thinking, the button was a pure STOP, so typing a new question and pressing it halted the old
search and started nothing — you had to press twice. Before that, the button was `disabled` during
a search, and **a disabled button emits no click event at all**, so the preempt path was
unreachable. *Fixed:* button stays live; a press with different text supersedes, same text stops.

### B7 — Per-subject cap deleted the demo's own headline answer
The exporter kept the first 80 facts per subject in row order, discarding 1,046,813 facts (1.58%)
while only 11,056 subjects (0.091%) ever exceeded it — including `Australia -capital-> Canberra`.
*Fixed:* cap removed, all 66,404,117 facts ship. Cost 9MB.

### B8 — Stale disclosure
The cap was removed and the page kept telling readers "each subject carries at most 80 facts".
Honest disclosure rots like any other claim. *Fixed:* copy corrected, and `audit_demo.py` now reads
`MAX_PER_SUBJECT` out of the exporter and fails the build if the page quotes a different number.

### B9 — Renderer swap took the graph model with it
An edit that replaced the 2D canvas with three.js sliced out `gClear`/`gNode`/`gEdge`/`physics`,
then `loop`/`startLoop`/`stopLoop`, then `tick`. *Fixed:* model restored; it is not the renderer.

### B10 — A 2D context permanently blocks WebGL
One leftover `getContext("2d")` line from the old renderer silently killed the entire three.js
scene — a canvas that has ever returned a 2d context can never return a webgl one.

### B12 - Completed chains were invisible in the 3D view until the very end
`n.on`/`e.on` (the "on the answer chain" role) were set only by the final replay, and only for
the single best chain. The search is DESIGNED to run long - so for its whole duration the stage
showed growth but none of the reasoning it had already finished. Reported by RJ as "the
visualization doesn't show the chains". *Fixed:* `liveAdd` marks every chain's nodes and edges
the moment it completes, and the render loop rebuilds on a role-change flag, not only when the
node count changes.

### B13 - The screen froze during fetch phases; no live narration existed
`traceFlush()` was only called inside the fact-scanning loop, so during a long stretch of
awaited shard downloads nothing painted - "it keeps working but there is no more updates after a
few seconds". The engine was working; the screen was not. *Fixed:* a 300ms interval owned by the
run flushes the trace and repaints during awaits, plus a fixed bottom narration bar: one plain
sentence about the current step, a progress bar whose fill is the position in the current hop's
lead list (and which pulses during downloads, because download time is not knowable), and live
step/chain counters. The "What just happened" panel now also states it is working, per question,
from the moment the search starts.

---

## Claude-contrast harness (added after the zoo)

`zoo_harness.mjs` chain mode runs the page's real `reason()` end to end and compares the
top-ranked chain against a frontier-model reference answer. The model is the CONTRAST, not a
component - the engine stays zero-weights. Bounded (30 fetches, depth 4) and disclosed.

First run: 0/8 - every chain started from the entity **"of the"**, which is literally a subject in
this graph (`of the -time period-> Roman Empire`). Connectives between the goal and the name were
not junk. After the junk-span guard (a span may CONTAIN function words but may not consist of
nothing else): **4/8 agree**, and the four differences are each informative:

| question | claude | engine | what it reveals |
|---|---|---|---|
| capital of Melbourne's country | Canberra | (0 chains) | harness bound artifact - works at full budget in the browser (89.7%) |
| capital of Barcelona's country | Madrid | Catalonia | **O7: inverse relations conflated** |
| capital of Munich's country | Berlin | Bavaria | O7 again |
| genre of Abbey Road's performer | rock | The Beatles | stops one hop short of the asked relation |

### B14 - O7: inverse relations conflated; and the asked-for relation was table-ordered
Two causes, one failure class (confidently wrong):
(a) `relMatches` used substring matching, so `capital of` - the INVERSE of `capital` - satisfied
the bare goal, and the engine answered Catalonia for the capital of Barcelona's country.
*Fixed:* a bare goal never matches its own `<goal> of` form.
(b) `readQuery` returned the FIRST alias in table order, so "the genre of the performer of
Abbey Road" got goal `performer` and stopped one hop short, answering a band to a genre
question. *Fixed:* the outermost ask wins - the relation the question names first is the one it
asks for (`location`/"where" excepted: a question word, not the asked-for noun).
Verified: contrast 4/8 -> 6/8 (Barcelona->Madrid, Munich->Berlin, Abbey Road walks
performer->genre and lands on "Rock and roll"; that row still strings-differs from the
reference "rock", which is a normalization artifact, not a wrong answer). Zoo held at 97.5%.
Suite floor raised: chainAgree 4 -> 6.

### B18 - counting questions were structurally unanswerable, and it was not a parser bug
"how many types of bear have brown hair" produced `entities=[brown hair, many]`. The real cause
was deeper than the parse: membership is only ever stored FORWARD (`grizzly bear -IsA-> bear`)
and the shards are keyed by SUBJECT, so enumerating a class's members was not hard, it was
IMPOSSIBLE - the direction is not in the data. Measured before building: head-matching from
bear's own neighbours verified **0** members.
*Fixed:* `build_types_index.mjs` inverts every membership fact into parent -> [child, sources],
bucketed by PARENT in the same 512-way scheme, so a class lookup is one fetch through the
existing cache path. 7,903,120 pairs over 241,099 parents, 67MB gzipped. It adds no facts: each
pair is a fact already in the graph, read in the other direction. A COUNT lane then enumerates,
filters, counts and shows the evidence for every member.

### B19 - THE AUTORUN WAS STILL THERE, and I said it was browser cache
RJ reported the page starting a question by itself. I removed the boot-tail and tab-click
autoruns, checked the deployed HTML, found none, and told him the rest was a cached copy. A
THIRD autorun lived inside the index-load `.then()` and fired on every load. Worse, its
`reason()` call bumped the search generation counter, so it silently aborted whatever was
running: the first counting run died at its first ownership check, and the first question of
every harness run was being corrupted too - removing it took the chain contrast from 6/8 to
**7/8**, a bar I had attributed to a harness bound. Confidently misdiagnosing a user's correct
report is the exact failure this project exists to refuse. *Fixed:* removed; the page now does
nothing until asked.

### B20 - "how many types of dog are there" counted members carrying the word "there"
The have|are branch matched before the bare-class branch, so the property became "there" and the
answer was a confident zero. *Fixed:* "are there"/"is there"/"exists" is stripped as the ABSENCE
of a filter.

### B21 - the types index read a source BITMASK as a source COUNT
`row[2]` in a shard row is a bitmask over eight sources, decoded by `factsOf`. The new lane read
it as a number, so a single-source membership (bit 128) was reported as 128 independent sources.
*Fixed:* the same decode as `factsOf`, and membership confidence now comes off the same measured
curve as everything else.

### B22 - "named for it" was being counted as evidence
`syrian brown bear --synonym--> syrian brown bear` was counted as attesting "brown". That is the
member's OWN NAME: evidence about what a thing is CALLED, not about what it IS. The bear count
fell from 11 to **7 attested, 4 named-only**, reported as two separate numbers.

---

## The stress zoo - question SHAPES, not question topics

Every bug above B18 was found by RJ typing one question and me fixing that question. That is not
testing, it is inching. `stress_zoo.py` generates ~104 questions across **32 shapes** - lookup,
who/where/when/why/how, yes-no, path, compare, count, superlative, negation, possessive,
nonsense, absent-relation - with the NOUNS sampled at random from the shipped shards, so the
topics cannot be curated to flatter the engine. Fourteen more are degenerate or hostile inputs:
empty, whitespace, one character, 250 words, HTML, SQL-ish, unicode, emoji, two questions at once.

The bar is deliberately NOT "answers everything" - a fact graph honestly cannot answer "why is X
important". The bar is: **never throw, never render nothing, never route to the wrong lane, and
say out loud when it has no answer.**

### B23 - entity linking was quadratic in question length (890 seconds on one input)
`bestSpan` enumerates every contiguous span of the question - O(N^2) of them - and each span can
trigger a shard fetch. A 250-word question therefore spent **890 seconds** in the parser: a
self-inflicted denial of service that any visitor could trigger with a paste, and that no
topic-based zoo could ever have found.
*Fixed* with a MEASURED bound, not an invented one: across 165,800 sampled subjects, 98.26% of
subject names are 8 words or fewer and 99.83% are 12 or fewer, so spans longer than 12 words
cannot match a subject 99.83% of the time. O(N^2) becomes O(N x 12). A question over 60 words is
read to the bound and SAYS SO. **890s -> 46s**, and it now answers instead of hanging.

### B24 - three completely different questions produced BYTE-IDENTICAL output
The zoo put these in a row:
```
"why is France important"        -> a generic France fact dump
"what is the qzzxwv of France"   -> the same dump, byte for byte
"France zzzqx frobnitz"          -> the same dump, byte for byte
```
No crash, and every fact in the dump is TRUE - which is precisely what makes this the most
misleading state the page could reach. The engine found a noun, failed to read the ask, and
presented what it holds as though it were the answer, in silence. A reader cannot distinguish
"I answered you" from "I ignored you".
*Fixed:* every one-hop result now opens with a **read-back** - the subject it resolved, whether
the asked-for relation was recognised AND recorded, and any words of the question it could not
place. When the relation is unmatched the panel is headed **ON FILE** rather than DIRECTLY
RECORDED and states plainly that what follows is not an answer to that question.

### B25 - the harness's own capture made a whole stress run meaningless
The memoised element stubs appended to a buffer that `innerHTML = ""` did not clear, so every
question after the first was scored against the FIRST question's output. The run reported
103/104 clean; it had in truth observed one question 104 times. Recorded because a green bar
from a test that never looked at the thing is worse than no bar at all - it is the same class of
error as B3, and it was caught only by reading the actual rendered text.

### B26 - a THREE load hiccup silently killed the ENTIRE page, Ask button included
RJ reported "I can't hit ask it does nothing" - and it reproduced exactly. `const
camPos=new T.Vector3(0,0,900)...` ran at the TOP LEVEL of the script, two lines after
`const T=window.THREE`. If `three.min.js` fails to load for ANY reason - a flaky connection, a
blocked request, a CDN hiccup, none of them rare on the open internet - `T` is undefined, that
line throws, and **every line after it never runs**. That includes the crash trap (installed
later, so it could never catch this), the whole search/count/debugger wiring, and the Ask
button's own `addEventListener` call thousands of lines below. Confirmed live: three.min.js was
serving correctly at the time (200, correct bytes) - this was never a permanent break, it was a
**landmine**: works until one request hiccups, then the entire page goes dark with nothing on
screen to explain why, and even my own earlier crash trap (B15) could not save it, because that
trap's registration line is itself downstream of the throw.
*Fixed*, two layers:
1. The two risky top-level lines are guarded. On failure the page runs with `THREE_OK=false`,
   harmless stand-ins take the place of the 3D objects, and **every other lane keeps working** -
   Ask, search, counting, the debugger. Only the 3D view degrades, with a plain on-page notice
   instead of staying dark forever.
2. A zero-dependency crash trap is now the literal FIRST code in the script, before anything
   that could throw, using nothing but `document.getElementById`/`window.onerror` so it cannot
   itself be the thing that fails - a safety net for whatever this did not anticipate.
Reproduced and re-verified headless: with THREE deliberately broken, `tgo click handler
wired: true` (was `false`), script completes (was: threw, halted).

### The stress zoo is now a PERMANENT gate
`stress_zoo.py` + harness STRESS mode (question SHAPES, not topics - see below) is wired into
`suite.mjs` as bar 3 of 5, floor `stressHard: 0`. This is what found B23-B26; it stays in the
gate so this class of bug - the ones no topic-curated test could ever see - cannot ship silently
again.

### B27 - index-load failure never touched the reasoning tab's own button
The `.catch` on `fetch("index.json")` updated only the FACTS tab's button. The REASONING tab's
button - the one in front by default - was never touched on failure, so an index-fetch failure
left it `disabled` with "loading..." forever, with nothing on screen to explain why. *Fixed:*
both buttons report failure now, plus a stall detector for a fetch that hangs instead of rejecting.

### B28 - Ask on an empty box was a silent, permanent no-op (the ACTUAL bug)
RJ reported "ask button still not working" a second time, AFTER B26 (the THREE.js load
landmine) had already shipped and been confirmed live. Rather than theorize again, I opened the
live deployed page myself, read its state directly (`THREE_OK:true`, index loaded, button text
"Ask", zero console errors) and then did the one thing nobody - including me - had actually
tried: click Ask **without typing anything**, exactly what a visitor does on landing, since the
box shows a full, real question as placeholder text and reasonably looks pre-filled.
```
$("tgo").addEventListener("click",()=>{
  const v=$("tq").value.trim();
  ...
  if(v){ runningQ=v; reason(v); }
});
```
No `else`. An empty box means `v` is falsy, and the handler does **nothing** - not silently
in the sense of a swallowed error, but literally: no code path exists for this input at all. No
console error (there is no exception to report), no message, not even a shake. Same pattern,
same fix needed, on the facts tab's button; Enter inherited it via `.click()`.
*Fixed:* the placeholder now does what it visibly promises. An empty click visibly fills the
field with the placeholder text FIRST - never a hidden default, the same disclosure rule as
everywhere else on this page - then runs it. If a placeholder is ever missing too, an inline
message appears instead of silence. There is no longer an input state where pressing Ask can do
nothing.

**Root-cause lesson:** two real, separately-shippable bugs (B26, B27) were found and fixed
first, and each one was a genuine hardening the page needed - but neither was the thing actually
in front of a visitor on a normal page load. The bug that mattered was found only by driving the
real, live, deployed page as a stranger would: open it, and click the button without reading the
code first.

### B29 - "how many wheels does a car have" mis-routed into the count lane's dead end
The class-count fallback pattern (`how many X have/are Y`) matched ANY "how many X (verb) Y"
shape, including questions that are not about a class at all. "how many wheels DOES a car have"
extracted the garbage class name "wheels does a car", found no members, and answered "I cannot
count that" - a dead end for a perfectly good question, live-reported by RJ.
*Fixed:* `do`/`does` between the noun and "have" is a reliable signal this is a question about
ONE named entity's own parts, not an enumeration of a class - "how many types of bear have brown
hair" never has do/does in that position. Detected and routed to the ordinary relation-lookup
lane instead, where a real fact can surface honestly. Measured first: this graph stores no
numeric cardinality anywhere (no "4" for wheels-on-a-car) - it records RELATIONS, not counts, so
inventing a number would have been dishonest regardless of routing.

### B30 - "many" got entity-linked as the subject, returning trivia about the WORD "many"
"many" carries 59 real ConceptNet facts (`many -antonym-> one`, etc.) - it IS a graph node - so
it survived every existing framing filter and got linked as if it were the question's subject,
answering about the WORD "many" instead of anything in the actual question.
*Fixed:* quantifiers (many/much/few/several/...) are now excluded from ever being read as a
subject, the same pattern as QVERBS. Verified: "how many wheels does a car have" now correctly
resolves subject=wheel, target=car, and the multi-hop search finds the real edge
`wheel -part of-> car` (44.9%, disclosed as association not assertion) - a genuinely informative
answer, not merely a non-crash. Added to the permanent stress set as the "cardinality" shape.

### B31 - the step debugger never loaded for counting questions
RJ reported "the debugger fails to load." REPRODUCED LIVE immediately: `countAnswer()` never
called `dbgLoad`, so the default placeholder question ("how many types of bear have brown
hair") AND the B28 empty-click fallback both route to the count lane, which left the debugger
on an eternal "Searching. The moment the first chain completes, its program appears here"
spinner - a promise counting questions can never keep, since they never produce a chain.
Verified: the count itself completed correctly ("count complete: 7", `toutHasVerdict:true`)
while `DBG` stayed `null` the entire time.
*Fixed:* built a real count-mode program for the debugger, reusing its existing UI (execution
pointer, step forward/back, variables pane): LOAD the class, CHECK each member in the exact
order it was actually read (PASS/FAIL/NAMED-ONLY with the qualifying fact), RET the count.
Nothing invented - every step is a value `countAnswer` already computed. The confidence-geometry
rack is chain-specific and now stays honestly hidden for a counting run rather than being forced
into a shape that does not fit it.

### Feature - "Write a function" gets an English front end, human-confirm loop
RJ's spec: type it in English; give expected output IF you know it (verified by execution, as
before); if you do not, the engine runs its best guess for real, on a real input, and ASKS
whether it is right - never a silent guess.

Built: a hand-written, disclosed ENGLISH_UNARY/ENGLISH_BINARY phrase table (same discipline as
ASK_ALIASES - explicit rules, never fuzzy-matched) that only RANKS which primitive to try first;
correctness is still decided by real execution. A "What I understood" read-back (B24 pattern)
states what matched before any result shows. Example lines without `-> expected` are now legal
PROBES: run for real, shown, not silently assumed correct.

When no expected value exists anywhere (English only, or a bare-args probe), a human-confirm
loop takes over: run the top candidate on a real input (yours if given, a disclosed demo value
if not - never invented in silence), show `f(args) = result`, and ask Yes/No. No cycles to the
next candidate in the same disclosed order; exhausting the vocabulary is reported honestly, the
same as "No program found". Yes is labelled **confirmed by your judgement, not by execution
against hidden tests** - a different kind of evidence, kept honestly apart from the examples
path - with a one-click upgrade to add the confirmed pair as a real example and re-verify by
execution.

Live-verified end to end: default-load confirm flow, Yes-confirm, add-to-examples upgrade to
execution-verified, No-cycling, no-phrase-matched honesty, and the pre-existing arity-1/arity-2/
"impossible on purpose" hint buttons all still pass unchanged. Zero console errors.

### B32 - O7 reopened: the original guard caught only the bare two-word inverse
A parallel verification pass (`anchor-verifier` session, see `VERIFICATION_2026-08-21.md`)
measured `relMatches` against the REAL 3,357-relation vocabulary rather than the 8-question
contrast set B14 was checked against, and found B14's fix incomplete: Barcelona and Munich still
resolved the INVERSE relation `[city] is the capital of [country]` as satisfying goal `capital` -
it only lost the rank-1 slot to the correct chain by source-count luck (82.7% vs 89.7%), not
because the matcher rejected it. Confirmed independently before fixing: `relMatches("[city] is
the capital of [country]", "capital")` returned `true`.

The same permissive line had two MORE false-accept classes, also confirmed directly: **negation**
read as affirmation (`"does not have part"` satisfied goal `part`) and **raw substring** collision
with no word boundary (`"uses capitalization for"` satisfied `capital`; `"member of political
party"` satisfied `part`, matching inside the word "party").

*Fixed:* `relMatches` now rejects in order: (1) any label containing a negation token: **not**/
**n't**/**never**/**without**/**excluding**/**lack(s)**; (2) the goal must occur as a WORD
(regex-bounded), not merely as characters inside a longer one; (3) INVERSE shape - the goal word
near the front of the label followed within 0-3 filler words by "of" (covers `"capital of"`,
`"capital town of"`, `"part of"`, `"member of ... party"` alike) is rejected as naming the
subject an INSTANCE of the goal, the reverse of what "the GOAL of X" asks for.

Verified: all 7 known false-accepts now correctly rejected; 10 of 11 legitimate goal/relation
pairs unaffected (the one flip, `"part of speech"` vs goal `part`, is an unrelated linguistics
relation, not a regression). Golden traces confirm the EXACT predicted, and only the predicted,
churn: `c-barcelona` and `c-munich`'s one-hop read-back correctly flips to "not recorded"
(forcing the honest multi-hop path), while the multi-hop chain contrast holds Madrid/Berlin at
89.7% - contrast stays 7/8, zoo stays 39/40. Re-recorded deliberately, not silently.

### B33 - verylong (B23) tightened: probe COUNT, not span length, was still unbounded
Same parallel verification pass measured, read-only, that B23's `SPAN_MAX` (word-length-per-span
cap) reduced the degenerate repeated-clause case from 890s to the tens-of-seconds range but did
not fix its root cause: `bestSpan` still ran 3,618 `factsOf` name-resolution probes for ONE
question (96% of its own runtime, 376 shard-cache misses, ~1.5GB gunzipped), because SPAN_MAX
bounds each span's WORD count but not how many spans+variants get tried across a long question.
Measured: worst LEGITIMATE question in the golden set spends 46 probes; median 6.
*Fixed:* `R.SPAN_PROBE_MAX:120` (2.6x the worst legitimate case) - a per-question counter shared
across both entity-resolution calls, checked before every `factsOf` probe; exhausting it aborts
name resolution with a disclosed BUDGET trace line rather than continuing to grind. A counter,
not a clock, so golden traces stay deterministic and comparable.
Verified: `h-verylong` golden trace: **34,249ms -> 1,216ms**, verdict ANSWERED -> ABSTAINED (the
one and only predicted flip - a nonsense repeated-clause paste correctly gets no answer instead
of grinding for 34 seconds to reach one at 44.9% composed confidence). All other 19 goldens
unchanged.

### New infrastructure - golden-trace regression harness
Same parallel pass built `golden_trace.mjs`: freezes `window.anchorDump()` for 20 canonical
questions (chain/hostile/lookup/nonsense/count shapes), diffs on every run, reports the FIRST
divergence only (question, hop, old value -> new value - not forty downstream consequences of
one upstream cause). Its own diff logic is fault-injection tested (`--selftest` injects three
known differences and requires exactly one reported finding, the earliest) rather than merely
assumed to work. Byte-stable across 20 questions, confirmed on 5+ independent runs spanning two
other sessions' edits to `index.html`. Wired into `suite.mjs` as a sixth permanent bar - this is
what makes the still-open module-split refactor (`DESIGN_REVIEW.md`) safe to attempt: B9 and B10
both shipped because a large slice of behavior moved with nothing watching.

Also live-verified in the same pass (promoted 🟡 -> ✅ in `WISHLIST.md`, see
`WATCHED_SESSION_2026-08-21_1719.md`): the geometry debugger's divergence-point click-select
(`.dbg-alt` rows toggle correctly, including a near-miss where two rows shared a text prefix) and
the step debugger's forward/back stepping (composed confidence arithmetically correct live,
clamps at the last hop instead of erroring) - both via `anchorDump()` + DOM/event inspection
since the Browser pane was not compositing that session either, working around the same
limitation noted elsewhere in this file.

### B34 - "what is my name" answered a Sweden-released SONG's genre to a personal question
RJ reported it live. Reproduced immediately, and it was worse than one bad answer - FOUR
confidently-wrong outcomes from one root cause: "my"/"I"/"your"/"me" name conversation
participants this graph has no representation of, but happen to collide with real, unrelated
graph entities under their literal spelling.
```
"what is my name"    -> "My Name", a real Wikidata SONG (Sweden, 2009) - genre answered as fact
"how old am I"        -> subject "old", target the bare letter "i" (a real company) - path search
"where do I live"     -> "i" resolved to a real org; ask-back UI presented London/Kensington as
                         if it were answering the personal question, with full composed confidence
"what is your name"   -> "Your Name", the real Makoto Shinkai FILM - director answered as fact
```
*Fixed:* a PRONOUN BLOCK routed before entity linking ever runs. Reuses, unchanged, the exact
signal RELSET arbitration already trusts elsewhere on this page ("a bare relation word is not a
subject, unless it is capitalised in the question") - lowercase my/mine/myself/i/me and
your/yours/yourself/you trigger the block; genuinely capitalised titles ("Your Name" the film)
do not, verified directly against a control case ("who directed Your Name" still answers Makoto
Shinkai correctly).

Made INTERACTIVE per RJ's explicit ask, not just a static refusal: the literal words are tried
as a real TITLE (never assumed - only offered if `factsOf` actually finds it), and if real facts
exist, a single click re-runs the search on that title. Caught and fixed one more real bug
building this: `properNouns()` always exempts word 1 (ordinary sentence-initial capitalisation),
so the 2-word re-ask "My Name" - where the pronoun word IS word 1 - could never satisfy the caps
check and clicking the button just re-triggered the same block forever. Fixed with an explicit
`{asEntity:true}` flag on the re-ask call: the click already KNOWS its own text is a literal
title, so that certainty is passed directly instead of re-guessed from capitalisation. Caught
live, by actually clicking the button rather than trusting the rendered text - the "verify the
click, not just the function" lesson, again.

Also fixed a smaller honesty gap building this: when the stripped phrase is too short to search
meaningfully (e.g. "who am I" -> bare "I"), the fallback copy originally claimed "is not
recorded here either" for a check that was never run. Now distinguishes "checked, found
nothing" from "too short to check" - never claims a test that did not happen.

Added to the permanent stress set as the "pronoun" shape (5 rows). Suite: zoo 39/40, contrast
7/8, stress 111/111, count 3/3, gate 21/0, golden traces 20/20 byte-stable (the shared
`finally`-block change this touched runs on every question, not just pronoun ones).

### B35 - the count lane accepted k=0 (zero-source) facts as real evidence
RJ read the step debugger closely and said it "looks fake and is fake" - a fair reaction to what
he had found: row 07 of "how many types of bear have brown hair" showed **"Brown Bear attests
brown - e.g. main food source -> Brown Hare, k=0"**, counted as a PASS. k=0 means ZERO
independent anchor sources - the held-out/ground-truth marker alone, the exact thing the
confidence curve everywhere else on this page treats as an unmeasured base rate, not evidence.
The "attestation" was a coincidence: a bear's prey happens to be an animal literally named
"Brown Hare", so the word "brown" matched inside an unrelated object's NAME, on a fact with no
real source behind it at all.
*Fixed:* the count lane's evidence test now requires `x.k` truthy (at least one real anchor
source) before a fact can attest anything - one line, the same discipline the rest of the page
already applies everywhere else. Verified: "Brown Bear" now correctly falls through to
NAMED-ONLY (it IS named "Brown Bear", but no measured fact backs it) instead of PASS; the count
for "how many types of bear have brown hair" drops from 7 (one of them fake) to 6 (all k>=1,
all real). The debugger was never fabricating anything - it was accurately reporting a real
upstream bug in what the count lane accepted as evidence. Suite: zoo 39/40, contrast 7/8,
stress 111/111, count 3/3, gate 21/0, golden traces 20/20 byte-stable (fix is scoped entirely to
the count lane, confirmed by zero unexpected golden drift).

### B36 - a stale, already-superseded question could silently win a race and overwrite a newer one
Found by changing HOW this page gets tested, directly on RJ's instruction: isolated, single-
question, fresh-reload tests were "SUPER sketchy... I notice when you test this you tend to ask
odd testcases." The replacement was an 18-question sustained session, no reloads, questions asked
back-to-back the way a real curious visitor actually clicks, sourced from a real book (*Sapiens*)
instead of hand-picked edge cases. "how many types of empire are there" rendered Egypt's capital
lookup instead of its own answer - a real count question, confirmed to route correctly via
`readCount()` in isolation, that had simply never run. No isolated single-question test, and
nothing in the automated suite (none of it simulates a DOM click, all of it calls `reason()`
directly), could ever have found this - it only exists in the timing between clicks.

Root cause: superseding a running search does not cancel it outright - it sets `stopped=true` and
schedules the new question via `setTimeout(...,180)` so the old search's own loop notices `stopped`
and exits cleanly first. Nothing tracked whether a scheduled call was still the LATEST one. Ask
three questions in quick succession and either (a) two independent 180ms timers end up live at
once, or (b) the old search's own exit flips `thinking` back to `false` before its supersede timer
fires, so a third click takes the immediate path while the earlier timer is still pending. Either
way the OLDER, already-abandoned call could fire *after* the newer one and overwrite it - the newer
question never actually ran, and nothing on screen said so.

*Fixed:* every path that can start a search - the main click handler, the pronoun-block "read as a
title" button, the debugger's "resume from this hop," the "did you mean" reask chips - now goes
through two small helpers, `askNow`/`askSoon`, sharing one monotonic `clickSeq` counter. A delayed
call captures its own number when scheduled and checks it is still current right before ever
calling `reason()`; an immediate call bumps the counter first, so any older pending delayed call
recognizes itself as stale and silently no-ops instead of firing. Verified at the exact mechanism
level (`repro_clickseq.mjs`, stubbing `reason` and driving both interleavings above directly - in
both, the stale call never reaches `reason()` and the newest question always wins), and live
in-browser with the real 3-question rapid sequence via `window.anchorDump()`: `stopped` correctly
flips true on the interrupted Egypt search, and the page settles on Empire's genuine count answer
("66 recorded types of empire... 40 best-attested", badge "count complete · 40") - not Egypt's
stale content. Suite: zoo 39/40, contrast 7/8, stress 111/111, count 3/3, gate 21/0, golden traces
20/20 byte-stable.

### B37 - the examples box's format hint was mistakable for a real, ignored example
RJ looked at the "Write a function" panel and said it "looks broken": English said "reverse a
string", the examples box showed `[3, 1, 2] -> [1, 2, 3]` / `[9, 4, 7] -> [4, 7, 9]` (sorted, not
reversed), and the result was `list(reversed(x))` - a program that satisfies neither line shown. It
looked like real, given ground truth was being silently ignored, exactly the kind of thing this
page exists to never do.

It wasn't. Those two lines are the `<textarea>`'s **placeholder** - a format example, not typed
content (`ex.value` was confirmed empty). `renderCode()` correctly saw zero real examples and fell
back to CASE B (English-only, human-confirm), which is the intended, honest behavior for an empty
box. The bug was real anyway: `input,textarea{color:var(--fg)}` had no `::placeholder` rule, so the
ghost hint inherited close to full text color and read as real content on sight - on the dark
palette, computed placeholder color (`rgb(236,234,222)`, i.e. `--fg`) was nearly indistinguishable
from real typed text at a glance. A hint that reads as data is a disclosure bug on a page whose
entire claim is that it never lets something look like more than it is.

*Fixed:* one rule, `input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}` -
reusing the page's own existing secondary-text token (already used for tab labels and hints)
instead of inventing a new one. Verified by computed style, not eyeballing: placeholder now
resolves to `--muted` (`rgb(107,107,102)` light / `rgb(156,154,142)` dark) against real text's
`--fg` (`rgb(26,26,25)` light / `rgb(236,234,222)` dark) in both palettes - a real, measured
separation, not an assumed one. Suite unaffected (CSS-only change): zoo 39/40, contrast 7/8, stress
111/111, count 3/3, gate 21/0, golden traces 20/20 byte-stable.

### B38 - five early-return lanes left the step debugger on an eternal fake spinner (same shape as B31, never generalised)

RJ: "the debugger never quite works. ask any question, it shows many clear errors." Reproduced live,
three independent ways: an isolated, seeded-stale-DBG test on all five of B34's own pronoun questions
("what is my name", "how old am I", "where do I live", "what is your name", "who am I"); a real,
click-driven Node/vm harness against the actual page script; and a real, isolated headless-Chromium
browser via CDP (screenshot: a correctly-rendered pronoun-block answer sitting directly above a step
debugger frozen on "Searching. The moment the first chain completes..." forever).

Root cause: `reason()` unconditionally repaints `#dbgbox` to that spinner at the top of every call,
and FIVE separate early-return lanes exit before ever reaching the one place that used to replace it
(`dbgLoad(q,done)`, near the end of `reason()`):
1. the pronoun block (`pronounBlock()`) - the originally-reported case
2. `countAnswer()`'s "no members recorded for this class" dead end
3. `reason()`'s "no subject in this question resolved to anything" (coverage-checked absence)
4. `reason()`'s "no relation or second entity named" (nothing to search for)
5. `reason()`'s "no chain reached the goal" (the search ran, opened real shards, and abstained) -
   the highest-traffic of the five: any everyday question that never resolves to a recorded
   relation hits it, and a fresh, non-adversarial 100-question sample (50 "how does a rainbow
   form"-register basics + 50 structural, see the new debugger gate below) hits this constantly.

B31 already fixed this exact SHAPE once, for the count lane's success path only (`countAnswer` ->
`dbgLoadCount`); it was never generalised, and lane 1 (written in B34, after B31 shipped) carried the
identical gap forward untouched.

*Fixed:* a shared, small, honest, disclosed program - `dbgLoadNote(q,op,txt,det)` / `dbgRenderNote()`
- reusing the existing dbg-code visual grammar instead of a blank clear or a stale leftover. Nothing
invented: every field is a value the calling lane already computed for its own #tout answer (the
abstain lane reports the real `fetches`/`scanned`/`depth`/furthest-node-reached it already had).
Wired into all 5 lanes. Verified: full suite unaffected (zoo 39/40, contrast 7/8, stress 111/111,
count 3/3, gate 21/0, golden traces 20/20 byte-stable) - unaffected BY CONSTRUCTION, which is itself
a finding: `window.anchorDump()` never captured `DBG`/`#dbgbox` at all, so this whole class of bug is
invisible to every existing automated gate (see the new debugger gate, built specifically to close
that hole).

### B39 - the debugger's own vars pane and WALK rows claimed "measured curve" for an unmeasured (k=0) base rate

Independent, multi-method finding (real click-driven harness + a real isolated headless-Chromium
screenshot via CDP): for any hop with k=0 (zero independent anchor sources - only the held-out
truth-bit marker), the step debugger's WALK row and vars pane both showed the number `pFor(0)`
returns - the UNMEASURED base rate, 51.2% - labelled "p_hop (measured curve)", identical treatment to
a genuinely measured k>=1 hop, even though `pFor(k)` itself already flags `measured:false` for k=0
(`CURVE={1:...,2:...,3:...}` has no entry for 0; it falls through to `BASE`). Worse: **51.2%
(unmeasured) is numerically higher than 44.9% (a real, measured, single-source hop)** - a
zero-evidence hop outranks real evidence on the raw number while looking equally confident, and reads
exactly as "fake" as the k=0 coincidence RJ already flagged once in B35 - just in the lane B35 never
touched (the general chain/lookup search, not counting). Measured on a fresh, independently-generated
(seed 20260822, not hand-picked) 120-question sample: **8 of 134 displayed hops (6.0%)** were k=0, all
8 independently confirmed present in the raw shards with the exact k shown (`debugger_audit.mjs`) -
the debugger was not fabricating data, it was mislabelling real data's confidence, the same
conclusion B35 reached for the count lane.

The main answer panel (`hopHTML()`, `#tout`) already disclosed this correctly ("0 independent sources
- base rate 51.2%") for the identical number; the debugger never reused that disclosure and desynced
from the panel showing the very same fact.

*Fixed:* every debugger display path now reuses `pFor(k).measured` and `hopHTML`'s own exact
vocabulary ("measured" / "base rate") - the chain debugger's WALK row detail string, the chain vars
pane's `p_hop` label, and the identical latent mislabelling in the count lane's vars pane (fixed on
the same principle even though no live k=0 PASS row was observed in testing - same bug shape,
same fix). Verified: suite unaffected (zoo 39/40, contrast 7/8, stress 111/111, count 3/3, gate 21/0,
golden traces 20/20 byte-stable).

### B40 - fail-fast: the evidence check now runs, and is shown, at the hop - not only in a separate audit run afterward

RJ, live: "each step should catch the error at the first occurrence rather than untangle a mess at
the end." B39's own k=0 mislabelling - like the still-open type-constraint bug
(`FINDING_type_constraint_dropped.md`) - was only ever caught by a SEPARATE audit script
(`debugger_audit.mjs`) re-reading the shards after the fact; the live engine itself never ran that
check on itself, and the step debugger played back a finished answer's arithmetic, never a decision
being made.

*Built:* `hopEvidenceCheck(h)` runs the same k>0 evidence test B35 already applies in the count lane,
but now at the moment a hop is actually accepted into a candidate chain - attached to the hop object
itself inside the completion loop (not just recomputed lazily for display), `trace()`d live with its
own PASS/FAIL verdict the instant it is decided. `dbgProgram()` now renders a CHECK row immediately
before every WALK row it gates, mirroring the count lane's own existing CHECK/PASS/FAIL vocabulary -
the step-through literally shows the verdict at the point it was decided, not a conclusion inferred
afterward from the final percentage.

*Ranking decision - measured, not guessed.* A chain that only completes through a FAILED check is not
deleted (that would hide the exact failure the CHECK row exists to surface) - it is **demoted** below
any chain whose every hop passed, regardless of raw composed probability (`chainAllPass`/`byRank`,
wired into all three places chains get ranked: the live-updating debugger, the self-check repair
re-rank, and the final answer). This is the same "rank by constraint satisfaction, not just source
count" principle already recommended - and, until now, unimplemented anywhere - for the
type-constraint class of bug.

Measured before shipping, on the SAME captured chain set (never re-run, to keep the comparison
apples-to-apples): re-derived what `done[0]` would be under the OLD sort (pure probability) vs the
NEW `byRank` sort for all 9 golden questions whose trace shape changed. **The final answer is
identical in all 9** (e.g. c-kyoto: "Japan -> Tokyo" 89.7% either way; the one k=0 chain present,
"Nakagyō-ku" at 51.2%, was never top-ranked by raw probability either, since 51.2% < 89.7%). The
ranking change is a real behaviour change with zero observed impact on the current
golden/contrast/stress/zoo sets, and starts mattering the moment a question's best available evidence
really is unmeasured. Golden traces re-recorded deliberately (not silently) for the new, predicted,
and ONLY the predicted, CHECK-line narration; re-verified byte-stable across 2 independent `--check`
runs before moving on. Suite: zoo 39/40, contrast 7/8, stress 111/111, count 3/3, gate 21/0, golden
traces 20/20 byte-stable (new baseline).

### B41 - stopping a still-current search (not superseding it) also left the debugger untouched

Found auditing B38's own fix for completeness, not live-reported. `reason()`'s frontier loop (and
`countAnswer()`'s member loop) guard every internal checkpoint with `if(my!==gen||stopped)return;` -
one condition standing in for two different situations. `my!==gen` (a NEWER question truly
superseded this one) is correctly silent - the newer question owns the debugger now. But `stopped`
alone (the person clicked Stop, or a harness's own timeout did, on the SAME still-current question)
hit the identical hard return with no cleanup, leaving `#dbgbox` on whatever it last showed - the
eternal spinner, on a fresh page load. This is not an edge case: a fresh, non-adversarial
120-question sample measured **44.2% of realistic questions never completing within an 8s budget**
without being stopped, and a live diagnostic on a genuinely hard path question ("is there a
connection between chess and mathematics") showed it still honestly searching - zero completed
chains - past 500 shard fetches and 70 seconds; a person is the one who stops a run like that.

*Fixed:* the compound condition is split at all 4 internal checkpoints - a true supersede
(`my!==gen`) still returns in silence; a plain stop on the current question now calls
`dbgLoadNoteIfIdle()` first, an idempotent, non-destructive variant of B38's `dbgLoadNote` that only
fills the gap if nothing has been shown for this exact question yet, so it never overwrites real,
live chain data `dbgLive()` already published. Verified: suite unaffected (zoo 39/40, contrast 7/8,
stress 111/111, count 3/3, gate 21/0, golden traces 20/20 byte-stable); re-screened the same
realistic questions that surfaced the gap and confirmed `DBG` is no longer left `null` after a stop
on a previously-idle debugger - the still-genuinely-searching case (nobody stopped it) correctly
keeps showing "please wait", which is honest, not a bug.

### B42 - O-crash CLOSED: two real defects on the wide-search path, one of them the actual cause
RJ: "it seems to crash." Patient, per-second CDP polling against a real, isolated headless browser
(never a shared session) reproduced it for the first time with timestamped evidence: "why do we
dream" and "is there a connection between chess and mathematics" - both wide, poorly-anchored
questions with no clear target - ran for 60-130+ seconds and then stopped responding to any input,
confirmed NOT a regression (reproduced on a byte-verified pre-session backup too).

**Defect 1 (real, but NOT the cause of this symptom - measured, not assumed).** `gNode()` caps
drawn nodes at `R.MAX_NODES` with an O(1) `G.byId` Map lookup; its neighbour `gEdge()` had no cap
at all and deduped with `G.edges.some(e=>...)` - an O(E) scan on every insert, O(E²) total. Fixed:
`R.MAX_EDGES:1200` plus an O(1) `G.edgeKeys` Set, same shape as `gNode()`. Genuine and worth
keeping - but measured in isolation (profiling instrumented `gNode`/`gEdge` call counts over time)
this fix ALONE left "why do we dream" still running past 61s with zero sign of terminating. It was
not the explanation.

**Defect 2 (the actual cause - found by profiling, not guessing).** Once `R.MAX_NODES` (190) is
reached, `gNode()` correctly starts returning `null` for any brand-new candidate - but the frontier
loop kept calling `nx.facts=await factsOf(nx._pending)` for every queued candidate regardless,
fetching real shards for entries that `frontier=next.filter(n=>n.node&&...)` was going to throw
away immediately afterward, since a `null`-node entry can never pass that filter. Proven with a
stack-sampling probe on a live run: `factsOf` was still firing hundreds of calls deep into a search
whose `G.nodes`/`G.edges` counts had been frozen for 50+ seconds. Fixed: skip the fetch entirely
when `!nx.node`, with `continue` (not `break` - other queued entries may still be valid, already-
tracked nodes worth revisiting). Does not touch chain correctness: `done.push()` (where an answer
is recorded) fires while scanning `cur.facts`, which only requires `cur` itself to already be a
valid, previously-opened node - it never depended on the NEXT hop's node succeeding.

**Verified, not asserted:**
- "why do we dream": did not terminate within 61s pre-fix (profiling run) -> 21.8s post-fix.
- "is there a connection between chess and mathematics" (O-crash's other named repro): 34.6s.
- Both stay well inside a realistic patience budget, down from "no recovery inside a 130+ second
  observation window."

**What this does NOT claim to have fixed.** The debugger gate's own real-browser HANG_SUSPECTED
count (a strict, single 6s no-response probe, different from "the search took a while") still
shows ~15/100 on unrelated questions. Not investigated as a new mystery - almost certainly the
same cost identified while chasing headless test speed (B44's writeup): a single large shard's
`JSON.parse()` genuinely blocks the JS thread for up to ~230ms, synchronously, and a burst of
several in a row without an intervening `await sleep()` yield point can exceed a strict 6s probe
window. That is a different, narrower thing than this bug (a search that runs forever and never
terminates, which IS fixed and verified above) - a brief, bounded block during otherwise-normal,
terminating computation. A real fix would mean smaller shards or incremental parsing, the same
data-pipeline project already deferred in WISHLIST item 13, not a search-loop change.
- Suite: zoo 39/40, contrast 7/8, stress 111/111, count 3/3, gate 21/0, golden traces 20/20
  byte-stable - a search-loop change this central changing NOTHING on the golden/zoo surfaces,
  which exercise `reason()` the same way real usage does, is real evidence it is safe, not the
  reasoning alone. The debugger gate's 100-question run separately surfaced an UNRELATED finding
  (`DBG.q` drifting from the asked question on a growing number of "why/how" questions) - this
  touches none of the code this fix changed (gNode/gEdge/the frontier loop, not DBG/dbgLoad/
  dbgLoadNote), so it is not attributed to this fix; see B43 below for what is actually known
  about it so far.

### B43 - debugger gate's NO_STALE_BLEED finding is a bug in the GATE, not the page
The 100-question real-browser debugger gate (built this session) reported 31 questions where
`DBG.q` did not match the question just asked - on first read this looked like B36's stale-click
class recurring in the debugger specifically. It is not.

**The evidence that closes this, not a guess.** Every mismatch's "stale" text was NOT the previous
question - it was a question from FURTHER ALONG the same fixed 100-question list, and the gap grew
in a clean step function: offset 6 for questions 7-28, jumps to 7, holds, jumps to 8, holds, jumps
to 9. That is not the shape of a browser-timing race (which would be noisy/random); it is the
signature of a measurement or request/response correlation bug that occasionally falls one step
further behind. Confirmed directly: `_scratch_bleed_sustained.mjs` replayed the exact same
questions 1-20, in the exact same order, one continuous session, real clicks dispatched through
`minidom.mjs` (the same real-DOM harness `ui_session.mjs` uses) - headlessly, no real browser, no
CDP. Zero mismatches, including at positions 7, 9, and 18, which the real-browser gate had flagged.
The product's own `DBG.q` assignment is correct every single time it was tested directly.

The remaining suspect is `debugger_gate_runner.mjs`'s CDP WebSocket layer (`Session.send`/
`evalJS`, `Runtime.evaluate` with `returnByValue:true`) or the `recoverFreshSession()` reconnect
path after a hang - something in that real-browser round-trip occasionally hands back a result
that lags the actual page state by a growing amount. Not yet root-caused to a specific line - that
needs its own pass with the CDP traffic itself instrumented, not more guessing at the product code
that has now been directly cleared.

*Not fixed this pass* (the gate is new infrastructure, not the shipped page - a guess-fix on
unfamiliar CDP plumbing is exactly what the "no guessing" rule exists to prevent). `suite.mjs` and
`debugger_gate_runner.mjs` now exclude `NO_STALE_BLEED` from the gate's pass/fail floor, the same
way `HANG_SUSPECTED` already was, with the reasoning and this bug number in the comment - reported
every run, never hidden, but no longer blocking a ship on a bug the harness has, not the product.

**Update, found by a second, concurrent session working this same file:** `CDP_PORT` (9555) and
`PROFILE_DIR` were process-wide constants, not unique per run. This repo is worked by multiple
Claude sessions on one machine at once (documented project convention, see CLAUDE.md's shared-
workspace notes) - two independent gate invocations on the same machine would launch onto the SAME
port/profile, and each one's hang-recovery path kills "the" browser on that port before relaunching
its own, so one run's recovery could yank the browser out from under a completely different run.
That would produce exactly the observed signature: a "stale" question that is actually real content
from a DIFFERENT run further along (or behind) in the same shared, reused `debugger_test_100.json`
list - not proof the headless repro was wrong (it still correctly shows zero mismatches for one
isolated run), but a more concrete candidate for WHY the real-browser gate specifically drifted.
Fixed there: `CDP_PORT`/`PROFILE_DIR` are now derived from `process.pid`, unique per invocation.
Not independently re-verified by this session before shipping alongside B44 - noted here rather
than claimed as confirmed, per the same rule that opened this bug in the first place.

**Second update, same collaborating session:** a genuine second contributing mechanism, this one
directly verified (the self-test proves it). `checkNoStaleBleed` compared `DBG.q` regardless of
whether the question had actually SETTLED - a question still genuinely searching when the gate's
per-question time budget ran out has never reached its own `dbgLoad`/`dbgLoadNote` checkpoint, so
it correctly, honestly still shows the PRIOR question's record. That is not staleness, it is the
debugger truthfully reporting "nothing for this one yet" - and the old checker flagged it as a
finding anyway. Fixed: the check now runs only when `thinking===false`. Their edit updated the
function and its real call site but not `debugger_gate.mjs --selftest`'s own two direct calls to
the old two-argument signature, which silently broke the self-test itself (11/12, failing on
exactly this assertion) - completed here: both calls pass `thinking:false` explicitly, plus one
new control asserting a still-searching question is never checked at all. 13/13 self-test
assertions pass again.

### B44 - "how many fingers do people have" got a confident, nonsense answer
RJ: "I asked it how many fingers do people have. it should ask back with what it knows? it fails
to answer correctly." Reproduced directly, not guessed: `readCount()` correctly detects the
do/does-cardinality shape (B29) and returns `null` on purpose, routing it to the ordinary
two-entity chain search - but that search answers "are these two things connected", not "how
many", and nothing downstream disclosed the mismatch. For "wheels does a car have" the search
happens to land on a real, direct, correct edge (`wheel -part of-> car`) so the old flat "verdict"
card read as passable, purely by coincidence. For "fingers do people have" there is no such direct
edge, so it landed on a weak two-hop association (`finger -part of-> hand -related to-> people`,
20.2%) and presented it with the exact same confident styling - a big percentage, no disclosure
that a count was asked for and none exists. Same lane, same honesty, wildly different-looking
output, because the FRAMING never said what kind of question this actually was.

RJ's correction, direct quote: "the facts are in the reasoning and asking back when lost. the
debugger. it's never going to be just a lookup." Read plainly: don't gate or special-case the
search itself, and don't invent a second, static "honest fallback" text block either - that would
just be a different lookup. Extend the reasoning's OWN existing ask-back mechanism (the one
already used for "Melbourne has more than one country reading, which did you mean") to also cover
"I found a connection, not a count" - so the disclosure comes from what the search actually found,
not from a canned message layered on top.

*Fixed:* `isDoesCardinality(q)` (B29's regex, now named and reusable) gates a NEW branch that fires
right after the chain search completes, for ANY do/does-cardinality question that found at least
one chain - deliberately independent of hop count or confidence, because the graph never has a
number for ANY of these regardless of how clean the found relation looks; hop-count-based
special-casing would have been exactly the kind of threshold-tuned patch RJ's correction rules
out. Replaces the flat "verdict" card with an ask-back card: states plainly that a count was
asked for and none is stored, shows up to 4 of the chains reasoning actually found (ranked, same
as before), and invites stepping through the top one in the debugger - which still gets the exact
same `dbgLoad(q,done)` call as every other completed search, so the step debugger, CHECK rows, and
`dbgVerify` self-check all work identically for this class of question; nothing about the
REASONING or the DEBUGGER changed, only how the top-level answer disclosed what it found.
Verified: "fingers/people" now badges "12 connections found · not a count" (was "chain complete ·
20.2%"); "wheels/car" now badges "30 connections found · not a count" and still surfaces the real
`wheel -part of-> car` fact first, honestly labelled as a connection instead of disguised as an
answer. None of the 20 golden-trace questions are do/does-shaped, so this is untouched there by
construction; confirmed byte-stable anyway. Suite: zoo 39/40, contrast 7/8, stress 111/111, count
3/3, confident-wrong 1/1, audit_demo 22/0, audit_ui 2/0, golden traces 20/20 byte-stable.

**Separately observed while building the 100-question cardinality zoo this fix was verified
against**: many natural "how many X does Y have" questions on richly-connected generic nouns
("basketball team", "Jupiter", "crab") take 20-30+ real seconds. First read was wrong and later
corrected (see the `let sleep=...` comment in index.html and WISHLIST item 13): `time` on Git
Bash/Windows showed `user 0.1s / sys 0.1s` against `real 29s` and looked like idle waiting; direct
instrumentation found the true cost is real `JSON.parse()` on the decompressed shards (up to ~4MB
of JSON each, ~250-270 shards for one wide question) - genuine, necessary computation the live
page pays too, not something a test harness can skip. `sleep` was still made overridable
(`const`->`let`), a real if modest ~17% saving, kept for that reason alone.

### B50 - a missing `</div>` hid the step debugger for every question but one

*(Renumbered from B49: a parallel session landed its own B49 for the Star Fighter
negative-width fix while this was in flight. Same collision as the earlier B46 one -
two sessions picking the next number independently.)*

Found by a text/structure audit, then confirmed two ways: a manual tag trace and parsing the
shipped file with Python's `html.parser` using browser-style recovery, which reported
`dbgbox.parent = div#vswrap`.

Wrapping the Copilot comparison in `<div id="vswrap" style="display:none">` (so it only shows for
the question it documents) exposed a pre-existing imbalance: the `.vs` grid was never closed. The
`</div>` meant for `#vswrap` therefore closed `.vs` instead, and `#vswrap` stayed open across the
**step debugger** and the **"What just happened"** panel, swallowing both into a block that
`vsToggle()` sets to `display:none` for anything that is not the bear question.

So the page's flagship feature - the one WISHLIST calls RJ's priority-one - was invisible for
**3 of the page's own 4 clickable Try examples**. The JS kept computing and writing real content
into both boxes the whole time; only the rendering was gone, which is why nothing threw and no
harness caught it. It was masked further because both the first-load autorun and the empty-input
fallback ask the bear question, which happens to satisfy the toggle.

*Fixed:* closed `.vs` where it belongs. Verified live: with the bear question the comparison and
the debugger are both visible; with "who was Julius Caesar", "capital of the country Melbourne is
in" and "how many types of empire are there" the comparison hides and the debugger stays visible.

### O9 - abstract connectives can be linked as SUBJECTS (open, and the obvious fix is wrong)

`findEntities`/`bestSpan` takes the leftmost span that resolves at a given length. Measured against
real shard data: `"is there a connection between chess and mathematics"` links `connection`(58) and
`between`(69), and never probes `chess`(79) or `mathematics`(167) - the subject of the question is
discarded before the search starts. This is a plausible root cause of the 60-130s wide searches in
B41/B42 that was never identified there.

An audit proposed arbitrating same-length spans by fact count. **That was tried and reverted.**
Against the goldens it flipped `p-caliper` to start from `car`(401) instead of `caliper`(12),
because fact count is not a proxy for which word is the SUBJECT. Leftmost is quietly encoding a
real regularity - the first entity named in an English question is usually its subject - and
evidence count does not know that. B1 is not the reason (that was a shorter fragment beating a
longer span; length still wins outright), but the outcome would have been the same class of harm.

The real defect is upstream: `connection` and `between` should not be candidate SUBJECTS at all.
That is a `junkSpan`/stop-list problem. Left open rather than guessed at.

### B48 - the golden-trace gate had been running against a two-day-stale copy, and was hiding a real regression

**The gate itself was broken, which is why this is one entry and not four.** `golden_trace.mjs`
(and five sibling harnesses) bootstrap the engine by pulling the LAST `<script>` block out of
`index.html`. That held until 2026-08-26, when the audience-mode filter, the Views tab and the chat
box appended their own scripts after the engine. Every harness then silently bootstrapped the wrong
block and bailed on its banner check. Worse, the harnesses read `site/index.html` - a *copy* under
`.opus-tools/agi_proto/starfighter/` - which was 44KB and two days behind the repo. So the gate that
WISHLIST.md calls "what makes the still-open module-split refactor safe" had been guarding nothing.
Fixed by selecting the block that CONTAINS the engine marker instead of the one at the end, in all
six harnesses. Selection by content cannot drift that way. `--selftest` passes: all 20 report
exactly one finding and it is the earliest injected difference.

With the gate working again, `--check` found two divergences. One was an improvement (`p-caliper`
now links `car`, 401 facts, instead of `used`, 19 facts - the B45 entity-linking work). The other
was real:

**`h-verylong` went ABSTAINED -> ANSWERED.** The input is 733 characters of `what is the thing that
is the thing that ... that is a car`. Golden behaviour was 6 steps, 0 nodes, 0 chains, refuse. New
behaviour was 203 steps, 36 nodes, 12 shard fetches, 3 chains completed, and a confident answer.

Three separate defects stacked up to produce it, each found by reading the run rather than guessing:

1. **A path from a thing to itself.** Entity linking returned `"thing"` TWICE (correctly - the word
   really does appear twice), and `const target = ents.length>1 ? ents[1] : null` took the second
   one blindly. The engine was asked for a path from `thing` to `thing`, which is degenerate and
   trivially satisfiable, and it duly "completed" 3 chains. Target now skips any candidate equal to
   the start; if nothing else was named it falls through to the single-subject lane. **203 steps ->
   6, chains 3 -> 0, shard fetches 12 -> 0.**

2. **Facts presented as an answer to a question that was only sampled.** The `WORD_MAX` bound
   truncated 164 words down to 60 and said so. A subject survived that truncation, so the one-hop
   lane listed what is on file about `thing`. Truncated input *plus* no recognised relation means
   the question was not understood, and answering it anyway is the confident-wrong class this page
   exists to avoid. Both conditions were already disclosed in the trace; they are now acted on.

3. **An abstention card wearing an evidence class.** The card that says *"Nothing to search **for**.
   ... there is no target"* was tagged `class="card k1"`. `k1`/`k2` mean "1 source" / "2+ sources",
   and the suite's verdict classifier reads `class="card k[12]"` as ANSWERED - so a card whose own
   text is a refusal scored as a confident reply. Found only by dumping the rendered HTML the
   verdict was classified from (`DUMP_TOUT=<path>`, kept, documented); the trace log cannot show
   this, because the disagreement is between a card's class and its own words.
   - ⚠ **The obvious fix was wrong and the goldens caught it.** Retagging it `k0` flipped
     `l-apple`, `l-cows`, `l-cars` and `h-absent` from ANSWERED to ABSTAINED. For "what is an
     apple", drawing apple's real sourced facts genuinely IS an answer, so `k1` is correct there.
     The card is only wrong when nothing was understood, and it is now suppressed in exactly that
     case - where the refusal card from (2) has already spoken, so the page shows one refusal
     instead of two cards contradicting each other.

**Verified:** 20/20 golden traces byte-stable after re-recording the two understood divergences.
`h-verylong` abstains again, and for a better reason than before - it now abstains because it
understood that it had not understood, where the golden abstained because it ran out of name-probe
budget.

### B47 - "is there a favorite color" answers "black and white" via three association hops

Found by predicting the outcome in writing first, then running it, so the surprises are recorded
rather than rationalised. Predictions and results: `FAVORITE_COLOR_TEST.md`. I predicted a clean
abstention in under 60 nodes. What actually happened:

    00 LOAD   subject := "favorite"                          shard 461
    01 CHECK  favorite --related to--> "website"    k=1 PASS (1 independent source - real evidence)
    02 WALK   favorite --related to--> "website"    p_hop=44.9%  p_chain=44.9%
    03 CHECK  website --part of--> "The Web"        k=1 PASS
    04 WALK   website --part of--> "The Web"        p_hop=44.9%  p_chain=20.2%
    05 CHECK  The Web --color--> "black and white"  k=1 PASS

It hit the 190-node cap, ran past 5,000 trace steps and 30 seconds, and answered **"black and
white"**.

**This is B44's sibling, not a new mechanism.** B44 was `finger -part of-> hand -related to->
people` at 20.2%; this chain passes through the identical 20.2% at hop 2. Both are association
walks presented as answers. The difference is that B44 was a count question and this is an
existence/preference question, so the ask-back branch added for B44 does not catch it.

**Two things are true and should not be collapsed.** The confidence maths is honest: `p_hop=44.9%`
is the measured one-source figure from our own anchor law, and `p_chain` decays 44.9 -> 20.2 -> ~9%.
The engine is openly saying this chain is about nine percent likely. The defect is upstream of the
maths - `related to` (ConceptNet RelatedTo) is an *association*, not a fact. "favorite" is related
to "website" because of bookmarks. Once RelatedTo is chainable, the search can walk from any word
to any other word, and the gate still prints "PASS (1 independent source - real evidence)" three
times in a row while doing it.

Also worth separating: taking `p_hop = 44.9%` for a RelatedTo edge is a category error. The 44.9%
was measured over provenance-bearing factual triples, not over word associations, so the number is
being applied to a kind of object it was never measured on.

*Not fixed.* Per RJ on B44 - "the facts are in the reasoning and asking back when lost. the
debugger. it's never going to be just a lookup" - the fix should extend the existing ask-back
rather than hard-blocking RelatedTo or bolting on a canned message. The shape that follows from
B44's precedent: when every hop in a completed chain is k=1 *and* the chain leans on association
edges, the reasoning should say what it actually found ("I found an association, not a fact about
favourite colours") instead of presenting it as an answer.

*Status of the question as the default:* added to the Try list as requested, currently first. It is
a genuinely good debugger demo and a good bug report. It is a poor shop window while it still
grinds to the node cap and answers "black and white".

### B45 - "how many moons does Jupiter have" answered about a children's book instead
Found running the full 100-question cardinality zoo B44 was verified against, not by hand: "how
many moons does Jupiter/Saturn/Neptune have" and "how many moons does the Earth have" all resolved
their subject as **"Many Moons"** - a real graph entity (a James Thurber picture book, also a
Janelle Monáe song, 23 unrelated facts) - not the astronomical concept "moon". "how many rings does
Saturn have" had the identical failure onto "Many Rings". Reproduced directly: `findEntities("how
many moons does Jupiter have")` returned `['Many Moons(23 facts)', 'Jupiter(212 facts)']`.

Root cause, read in the code, not guessed: B30 added `QUANT` (a quantifier set including "many") so
a quantifier could never be linked as an ENTIRE span (`junkSpan`) - but the LEADING/TRAILING TRIM
loop that decides where the question's "core" begins never checked `QUANT` at all, only `isFrame`'s
narrower `LEAD`/`FUNC`/`asked()` checks. For "how many moons does Jupiter have", the trim stopped
after "how" (`LEAD` has "how", not "many"), leaving "many" as the first word of the core span -
where it happened to complete a real, longer entity name via the same "longest contiguous span
wins" rule B1 established. Exact same shape as B2 ("Country Is") and B29 itself ("wheels does a car
have" needed its OWN, separate fix from the count lane's): a filter closed for one position left
the identical word free to poison a different one - closing it in `junkSpan` did not close it in
the trim loop, because they are two different checks over the same text.

*Fixed:* `isFrame` (the trim loop's own gate) now also checks `QUANT`, so a leading or trailing
quantifier is stripped the same way "what"/"how"/"does" already are, before spans are ever formed -
one line, same shape as the existing fix, no new special case. Verified: `findEntities` now returns
`['moon(269 facts)', 'Jupiter(212 facts)']`; re-ran every previously-affected question (Jupiter,
Saturn, Neptune, Earth, Saturn's rings) - all five now resolve the real astronomical concept, and
still correctly get B44's ask-back framing afterward (this graph has no count for moons either,
honestly disclosed, showing real moon-Jupiter connections instead of "Many Moons" trivia). `QUANT`
covers "much/few/several/a lot/lots/plenty" too, not just "many" - fixed for the whole set at the
shared check, not the one repro case. Suite: zoo 39/40, contrast 7/8, stress 111/111, count 3/3,
confident-wrong 1/1, audit_demo 22/0, audit_ui 2/0, golden traces 20/20 byte-stable - `findEntities`
is shared by every lane, so the unchanged goldens are the real evidence this did not shift anything
it should not have.

### B49 - Star Fighter's flight view went negative-width on any narrow screen

RJ, live: "I want the full space game to run in anchor demo right now it seems broken.. screen
size is an issue." Reproduced on the deployed site: the "or embed it here" button under the Star
Fighter panel puts the game in an iframe whose measured width on a phone-sized viewport is 329px.
`resize()` computed the right-hand HUD column as `clamp(W*0.4, RIGHT_MIN=340, RIGHT_MAX=600)` and
gave everything left over to the flight view: `mw = W - rw`. RIGHT_MIN was a fixed floor tuned by
eye on desktop and never checked against how much width was actually left - at W=329 that's
`329 - 340 = -11`, handed straight to `renderer.setViewport`/`setScissor`. The primary chase-cam
view (the one thing the player is actually there to see) silently broke while a fixed 340px sidebar
still claimed its share. Exact same formula breaks "Play fullscreen" on any phone held in portrait,
no iframe involved - not an embed-specific bug, a `resize()` bug.

*Fixed:* below the width where `W - RIGHT_MIN` can no longer guarantee a usable flight view
(`RIGHT_MIN + MAIN_MIN` = 640px, derived not guessed - MAIN_MIN=300 is the same floor the desktop
branch was implicitly relying on and never stated), `resize()` now stacks the HUD strip under the
flight view instead of beside it: main view keeps the majority of the screen at full width, the
top-down and reasoning panes split the remaining strip side by side. Above 640px, the arithmetic
is untouched - verified byte-identical `VIEW` rects at the desktop embed width (745px) before and
after. Verified at 329/375/620px (all now stack, all `VIEW.main` positive, `chaseCam.aspect`
finite) and 745/1280px (side-by-side unchanged) via direct WebGL-viewport introspection - both by
navigating straight to `games/starfighter.html` and through the real tab-click → embed-click →
iframe path, on a local static server serving this same `site/` tree, then re-confirmed against
the deployed page after push. Pixel screenshots were not available this session (the Browser pane
did not composite), so this is verified numerically - every `VIEW`/`chaseCam` value read directly
out of the live page's own script scope - not visually; worth a human eyeball pass on a real phone.
(Commit message says B47 - BUGS.md numbering had already moved on to B48 by the time this landed;
noted here so the mismatch doesn't read as a second bug.)

## OPEN



### O8 - the vision loop is counted, not benchmarked
The engine reads its own settled layout to order frontier ties (landmark-heuristic style;
order-only, so it cannot change an answer). Every re-rank is traced and counted in
window.__visionFlips - but nobody has yet measured whether it SAVES anything. Benchmark
headless (physics in the harness, A/B on the chain set) - prove it or demote it.



### O1 — `learn-on-abstain` has never fired *(shipping unproven)*
Built and wired: when a chain cannot reach its target, look the term up externally and re-walk.
Every test question has found its answer without it. Under rule 7 of the no-toys law this is either
demonstrated or removed. **Do not describe it as working.**

### O2 — Live UI unverified in motion
The three.js scene is verified by driving it from code (380 node objects from 190 nodes, 192 edges,
8 legend entries, no errors) but the browser pane kept disposing its render frame, so animation,
WASD flight, the supersede fix and click-to-inspect have not been watched running.

### O3 — Repo is ~1.2GB to clone
Multiple full 600MB shard revisions in history. `git clone --depth 1` is ~600MB and needs no
history rewrite; squashing halves it but is a force-push over published history. Needs a decision.

### O4 — `car` and `automobile` are separate nodes
No synonym layer, so surface-form mismatches fail. This is why the caliper question reaches
`automobile` but not `car`. Data-layer problem, not a parser one.

### O5 — Cold-cache latency
A wide search is tens of seconds because every hop is a ~1.2MB HTTP fetch. Shard-over-HTTP is the
wrong transport for search this wide; a server-side index or a one-time IndexedDB load removes it.

### O6 — Harness prints a `startLoop is not defined` tail
Cosmetic: the harness strips the renderer, and the page's autorun then calls into it. Results above
the trace are unaffected, but it should be silenced so a real failure is not mistaken for noise.

### O9 - the audience notes say what is hidden, not what the view is for  [FIXED 2026-09-06]
Fixed with more than the note. RJ 2026-09-06: *"make the game tab cold for games and make it a
separate link so I can share just that - right now the people didn't click the game tab button so
never saw the demo"*. The games view is now games ONLY (Ask anything, Inventions and White papers
are AI-view content), it has its own address `?view=games` with `games/` redirecting to it and its
own og: title and description, and it opens straight on Résumé Breakout instead of on a tab the
visitor has to find. The view is read in <head> before the body parses, so a games link never
flashes the AI panel first. Both notes rewritten to say what the view IS. Original entry:

RJ 2026-09-05, reading the line under the view buttons: *"Review the text.. how is this helpful?
'the knowledge engine and the research record only - no games here. Speculative physics hidden.'"*
Both notes (AI / ML roles, Game studios) are written from the author's side - what was filtered
out - when a visitor needs the other direction: what this view is and what to click first.
Proposed replacement, not yet applied (RJ to approve or rewrite):
- AI / ML roles: "A knowledge engine with no neural weights: ask it a question and watch every
  reasoning step, then the research record behind it."
- Game studios: "Playable demos - Résumé Breakout and Star Fighter - plus the engine work that
  runs them, all in this page."
The "All" view was removed the same day (it put the résumé in front of every visitor of the
anchor demo); the page now opens on the AI view.
