Stu Mason · Folkestone, Kent
One entryMerged PR· crunch.stumason.dev· PHP

PR #33 merged: SuperDuperMegaCrunch: roll pack pipeline, editorial signals + hardening

additions
+1414
deletions
-88
files changed
26

Consolidates a sprint of work into main. Everything is green (121 tests, phpstan L7, Pint) and already validated live on the Netcup box.

Roll pack pipeline (the "Cruncher")

  • POST /pack → async crunch.json: the join of transcript × on-screen-text × events on one shared clock, plus scored moments and a segments outline. Controller → Job → Action; hardened archive unpack (path-traversal + symlink guards).

OCR quality (root-caused + proven on real frames)

  • PNG frames, not JPEG — JPEG ringing was turning "x402" into "x42". 0 such artifacts after.
  • Line-level OCR (join tesseract line words = image_to_string quality) with per-line boxes for click hit-testing, replacing the conf-50 word path that garbled dense UI text.
  • Fuzzy span-merge + menu-bar chrome filter. Menu-bar noise spans 75 → 0; clicks resolved 21 → 53.

Editorial signals (CPU-only, no GPU, no generative LLM)

  • moments now scored + source-tagged: telemetry (click/app-switch), transcript (spoken cues), audio (vocal emphasis + pauses via ffmpeg EBU R128).
  • segments — beat-by-beat outline (extractive title/keywords/summary), cut at app switches + pauses.

New composable endpoints

  • POST /summarize — abstractive summary (distilbart-cnn, CPU, rough-but-fun).
  • POST /ocr/lines — the pack's line-level OCR, surfaced standalone (text + box + conf).

Reliability + hygiene

  • Queue retry_after 90 → 2100 — long pack jobs were being deemed stale after 90s and failed as "attempted too many times". Root cause of the recent pack failures.
  • Telescope off by default — was recording ~20k entries in prod and flooding Bugsink under Octane.
  • Docs: /pack OpenAPI description refreshed (segments, richer moments, ocr_at_click). README covers the pack pipeline. CI now gates feature/**.

Validated on the notrobo pack (before/after measured) and processing at ~1.5× recording length on CPU.