Two operator-facing additions to the KB Flask app (app.py, 127.0.0.1:8092) on telep-mainframe: a floating “Tools” button injected on every page (with orphan-review + page-flow endpoints), and a persistent JSONL job queue that survives restarts/power-blips so no curation work is lost across the box’s frequent outages.
For Agents — endpoints & files
- Per-page Tools button —
app.pyinjects a floating “Tools” button on every rendered page./orphans+/api/orphans— orphan-review dashboard + JSON (overorphans.json, see 2026-08-06-kb-orphan-heading-recovery-subsystem)./api/page-flow— drives the per-page Inspect / Fix-heading / Re-OCR / Apply / Rebuild flow (pageflow.py).- Job queue —
jobstore.py= a persistent JSONL atkb-vectors/jobs.jsonl;GET /api/jobs+ a/jobsauto-refresh dashboard.
Why JSONL (not in-memory)
The queue survives restarts and power-blips
telep-mainframe power-cuts under load and on marginal mains (2026-08-06-power-root-cause-gpu-12v-connector-stress-test-pass, 2026-08-05-power-root-cause-nvme-damage-ups-kb-handover). An in-memory queue would lose every pending curation job on each blip.
jobstore.pyappends to a JSONL file (kb-vectors/jobs.jsonl), so the job history + state survive an app restart or a hard power loss — you can see what was mid-flight and resume.
What registers a job
Every mutating curation operation registers a typed job:
- apply (orphan heading re-attach + re-embed/re-tag)
- re-OCR (targeted micro-re-OCR of a destroyed spec-table / code page)
- fix (heading correction)
- rebuild (site rebuild via
build_content.py)
The /jobs dashboard auto-refreshes and GET /api/jobs exposes the same data for agents.
Related
- 2026-08-06-kb-orphan-heading-recovery-subsystem — the orphan-fix backend the
/orphans+/api/page-flowUI drives - 2026-08-06-kb-marker-chunker-bug-and-ocr-bakeoff — the diagnosis behind the Re-OCR job type (only for destroyed spec-table/code pages)
- 2026-07-24-knowledgebase — the KB app (
app.py, Flask @127.0.0.1:8092) this extends; note its earlier in-memory single-worker ingest queue - 2026-08-06-kb-wiring-gallery-native-res-fix-and-astro-caching — a sibling
app.pychange (cache-control) in the same session - 2026-08-06-power-root-cause-gpu-12v-connector-stress-test-pass — why persistence matters (the box cuts under load)
- telep-mainframe — the host
- SESSION-HANDOVER
- homelab
- LOG
- TOPICS