Skip to content

audit(fable): full performance/quality deep dive — 14 probe-verified fixes (v10.10.0)#45

Merged
tcconnally merged 1 commit into
mainfrom
audit/fable-deep-dive
Jul 14, 2026
Merged

audit(fable): full performance/quality deep dive — 14 probe-verified fixes (v10.10.0)#45
tcconnally merged 1 commit into
mainfrom
audit/fable-deep-dive

Conversation

@tcconnally

Copy link
Copy Markdown
Owner

What this is

A full-codebase audit against the bug-class catalog built up over this campaign — four parallel audit lanes (mpv API misuse, ctypes/Win32/frozen-env, Qt lifecycle/threading, silent-failure/state-drift), every finding probe-verified or refuted before any code changed.

Headline finding

The wall has never run at HIGH priority. SetPriorityClass used the truncated-pseudo-handle ctypes pattern (probe: returns 0, priority unchanged) while unconditionally logging "Priority set to HIGH" — since v9. Same class as the soak sampler's zeros. Now typed, applied, verified by reading the priority back, and honest on failure.

Fixed (14)

Misreported success: priority (above) · NVIDIA profile sentinel written when NPI merely launched — a failed import was cached as success until the next driver update (now ShellExecuteExW + wait + exit-code, sentinel only on 0) · tag/favorite/delete writes logged success on any HTTP status (now REJECTED on non-2xx) · false "flask not installed" (flask is bundled; real gate is HYPERWALL_WEB).

Silent truncation: fetch_items now paginates — a fixed Limit=10000 silently dropped items in larger libraries behind a success-looking log.

State drift: controls_visible init made the first C-press a no-op and /api/controls lie · one cell's autohide cleared the global controls flag · seek release always resumed (now restores pre-drag pause) · paused cells escaped a global pause by auto-advancing at EOF (resume path re-arms them) · a manual advance on a parked cell left _parked latched, swallowing the next error (now unparks; parked card is sticky instead of fading 3s into a 120s cooldown).

Qt/threading: _flush_stats detach-swaps observer-fed dicts (mpv thread writes them concurrently) · all programmatic control-state changes route through a full-pill repaint (the opacity-effect class confirmed on the volume slider) · no-items placeholder raised above the native HWND + endless LOADING pulse stopped · one wedged cell no longer turns global-PAUSE into global-RESUME.

Frozen/distribution: bundled .nip now reachable (distributed exe silently skipped G-Sync isolation) · frozen exes skip the doomed git-banner subprocess · audio-arm failure on unmute warns instead of whispering at debug level.

Probe-refuted (no change)

m["pause"] options-reads track core-initiated keep-open pause and raise on dead handles (liveness check valid) · playlist-next from an EOF-held track does fire end-file reason=stop (no _switching latch).

Anti-recurrence layer

  • CLAUDE.md: the full gotcha catalog (mpv API, mpv semantics, ctypes, Qt effects, silent-failure/state rules, process rules) — loaded by future agent sessions automatically.
  • tests/test_audit_regressions.py: pins the certain findings (seek pause restore, autohide scope, EOF-under-pause, park latch, pagination).

Suite green; version 10.10.0; exe rebuilt.

🤖 Generated with Claude Code

…bug classes

Four parallel audit lanes swept every file against the bug-class catalog
from this session's campaign; every finding was probe-verified or
refuted before fixing. Confirmed + fixed:

MISREPORTED SUCCESS
- app.py: SetPriorityClass NEVER worked (truncated pseudo-handle, probe:
  returns 0) while logging 'Priority set to HIGH' since v9. Now typed,
  verified via GetPriorityClass read-back, honest WARNING on failure.
- nvidia.py: profile import sentinel was written when NPI merely
  LAUNCHED — a failed -silentImport was cached as success until the next
  driver update. Now ShellExecuteExW + wait + exit-code check; sentinel
  only on exit 0. Fully typed ctypes throughout.
- wall.py: tag/favorite writes and emby.py cleanup deletes logged
  success on ANY http status; non-2xx now logged as REJECTED.
- app.py: 'flask not installed' message was false (flask is bundled;
  the real gate is HYPERWALL_WEB) — message now says so.

SILENT TRUNCATION
- emby.py: fetch_items paginates (StartIndex/TotalRecordCount) — a fixed
  Limit=10000 silently dropped items beyond it behind a success log.

STATE DRIFT
- wall.py: controller.controls_visible init True while all bars start
  hidden — first C-press was a no-op and /api/controls lied. Now False.
- cell.py: one cell's autohide cleared the GLOBAL controls flag.
- cell.py: seek release always resumed — now restores pre-drag pause.
- cell.py: paused cells no longer auto-advance at EOF (escaped global
  pause); the resume path re-arms EOF-held cells.
- cell.py: manual/web advance on a parked cell now unparks it (a stale
  _parked swallowed the next error and left the cell dead); the parked
  card is sticky instead of fading after 3s of a 120s cooldown.

QT / THREADING
- cell.py: _flush_stats detach-swaps observer-fed dicts (mpv thread
  writes them concurrently; iteration could raise mid-advance).
- cell.py: every programmatic control-state change routes through
  _nudge_pill() (full-pill repaint under the opacity effect — the class
  confirmed on the volume slider).
- wall.py: no-items placeholder now raise_()d above the native video
  HWND and the endless LOADING pulse is stopped in that branch.
- wall.py: one wedged cell no longer turns global-PAUSE into global-
  RESUME (per-cell read guard, unreadable counts as paused).

FROZEN/DISTRIBUTION
- constants.py: NIP_FILE falls back to the PyInstaller payload copy —
  a distributed exe silently skipped G-Sync isolation.
- __init__.py: frozen exes skip the doomed git-banner subprocess.
- cell.py: audio-arm failure on unmute now WARNS (an 'audible' glowing
  cell with no sound was a debug-level whisper).

Probe-REFUTED (no change, documented): m['pause'] options-reads track
core-initiated keep-open pause and raise on dead handles (liveness OK);
playlist-next from an EOF-held track does fire end-file reason=stop
(no _switching latch).

New: CLAUDE.md (repo gotcha catalog: mpv API, ctypes, Qt effects,
silent-failure rules — the anti-recurrence layer this audit exists
for) + tests/test_audit_regressions.py pinning the certain findings.

Version 10.10.0.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@tcconnally
tcconnally merged commit 6f55629 into main Jul 14, 2026
2 checks passed
@tcconnally
tcconnally deleted the audit/fable-deep-dive branch July 14, 2026 02:35
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