← back to Scarlet Riverboat Masquerade

5x/REPORT.md

40 lines

# /5x REPORT — dead.agentabrams.com/room/ (Scarlet Riverboat music room)

Target: https://dead.agentabrams.com/room/ · verify-and-fix, 5 sweeps · stopped early on 2 consecutive clean sweeps.

## Sweep ledger
| sweep | verify | caught | fixed | commit |
|---|---|---|---|---|
| 1 | 3x six-way + clickthrough (headless) | 2 (both false positives — see below) | 0 (verify-before-acting: not real defects) | — |
| 2 | real-Chrome interaction | 1 REAL: no fetch timeout → tiles pulse "…" forever when archive.org hangs | abort-timeout wrapper (`fetchT`, 9s) on all archive.org fetches + honest error copy | SRM `5x sweep 2` / dead room |
| 3 | live deployed site, archive.org DOWN | 0 real defects | — | — |
| 4 | live deployed site (repeat) | 0 real defects | — | DONE (clean twice) |

## Sweep 1 — the 2 catches were NOT code defects
1. **M3 `#mrSrc` "hidden" timeout** — panels collapse on load *by design* (Steve: "collapse all panels onload"). Element exists, hidden until ☰ tapped. Un-collapsing to satisfy the assertion would break the intended UX → rejected (never weaken the app to pass a mismatched assertion).
2. **☰ Controls → `ERR_CONNECTION_REFUSED`** — archive.org's count queries refused from the *headless/datacenter IP* (archive.org blocks datacenter IPs; CTA saw the same). Not our code.

## Sweep 2 — the one REAL defect found + fixed
Under real-Chrome conditions, archive.org was **down** (`000`, connection refused — it's a flaky nonprofit). Exposed that the archive fetches had **no timeout**: a hung archive.org left the year tiles pulsing "…" indefinitely, and the graceful error state (which only shows when fetches *settle* as failed) never appeared.

**Fix:** `fetchT(url, ms=9000)` — an `AbortController`-based timeout wrapper applied to both archive.org call sites (per-year counts in `buildMap`, and `searchArchive`). A hung/down archive now aborts at 9s and falls into the error state. Also corrected the misleading `searchArchive` error copy ("open over http, not file://" → "archive.org may be down. Try again in a bit.").

**Verified:** with archive.org down, the map resolves to the error line in **7.6–7.7s** (was: infinite "…"), 0 page errors.

## Final six-way state (live, during an active archive.org outage)
- HTTP 200, renders, real Chrome/Safari/Firefox all load.
- Panel opens in one tap; **2 source tabs, play, search, All-years all usable** even with archive.org down.
- Source switch (GD ↔ Dead & Company) survives the outage without crashing.
- **0 real JS/page errors** across sweeps 3 & 4.
- Deployed bundle confirmed to contain the timeout wrapper + honest copy.

## Contrarian gate (Cody, /5x final step) → FIX FIRST → fixes applied
Cody the Contrarian red-teamed this report + code and voted **FIX FIRST** (3 FIX-FIRST / 2 REVISE). Legit findings, addressed:
1. **"Clean twice" both ran while archive.org was DOWN** → only the degradation path was proven; calling it DONE was premature. Corrected: final sign-off is **BLOCKED pending a live happy-path re-verify** (delegated to a spawned iTerm window that polls archive.org and runs the happy-path check on recovery). Not "DONE".
2. **Batch of 31 year-fetches not cancelled on source-switch** (real) → added a per-build `AbortController` (`buildCtl`) that `.abort()`s the prior batch at the top of every `buildMap()`, with its signal threaded into `fetchT(url, ms, extSignal)`. Verified: rapid GD→DC→GD→DC switching settles to the correct source, no half-render, **0 JS errors** (aborted fetches caught, no unhandled rejection).
3. **Dead ternary** `sort = (q||yr) ? 'downloads+desc' : 'downloads+desc'` (real) → removed.
4. 9s timeout — Cody's own panel resolved it's fine (refused = fast-fail; the 9s only bounds *hung* connections). No change.

## Open / BLOCKED (honest)
- **Happy-path (counts + shows actually load) not yet re-verified LIVE** — **archive.org is externally down** (`000`, connection refused). Proven earlier on localhost when it was up (GD 1994 = 460, Dead & Company = 874, tiles heat-colored, 0 errors), but the timeout + abort changes must be re-confirmed on the live path. A dedicated iTerm window is polling archive.org every 4 min and will run the live happy-path check the moment it recovers. Final DONE is gated on that PASS.