Two KB build fixes on telep-mainframe. (1) build_content.py auto-discovered every dir under manuals-src/docs — including *.bak* backup dirs — and served ~1646 stale pages live. (2) FSM diagram images restored to 20 kick-fix/tsb legend pages by rendering the source PDFs, because the crops were never captured on ingest. Content root ~/knowledgebase/manuals-src/docs.
1. Backup dirs leaked into the site
Content-tree backup dirs must be excluded from discovery
build_content.pydiscovered ALL directories undermanuals-src/docs, including backups likekick-fix.bak-linkrewriteand other*.bak*dirs. Result: ~1646 stale pages (of 4566 total) were served on the LIVE site — duplicate/outdated content polluting nav and search.
Fix
Add a list_manuals() helper to build_content.py that excludes any directory name containing .bak, and route discovery through it instead of a raw glob of manuals-src/docs.
Lesson
When you keep backup copies inside the content tree (the session’s own convention:
*.bak-orphanfix,kick-fix.bak-linkrewrite, etc.), the site builder’s directory auto-discovery will happily serve them. Any content-tree walker must filter.bak(or backups must live outside the content root).
2. TSB diagram images restored
For Agents
20
kick-fix/tsblegend pages were missing their FSM diagram images — the image crops were never captured during ingest. Restored by rendering the source PDFs withpdftoppmto regenerate the diagram images for those pages.
This complements the wiring-gallery native-res crop work in 2026-08-06-kb-wiring-gallery-native-res-fix-and-astro-caching — both are cases where an ingest step dropped image data that had to be re-derived from source.
Related
- 6. 2026-08-06 UPDATE — KB fixkick expansion LIVE, search-index PARKED, brownout root-cause upgraded — the fixkick expansion +
build_content.pyas the canonical builder; thekick-fix.bak-linkrewritebackup is one of the dirs that leaked - 2026-08-06-kb-wiring-gallery-native-res-fix-and-astro-caching — the sibling image-restore case; also notes
build_content.pydoes NOT touch the wiring-gallery dirs - 2026-08-06-kb-tools-ui-and-job-queue —
rebuild(viabuild_content.py) is a registered job type - 2026-07-24-knowledgebase — the KB app + the earlier “re-ingest must rmtree first or you get ghost pages” gotcha (same class of stale-content bug)
- telep-mainframe — the host
- SESSION-HANDOVER
- homelab
- LOG
- TOPICS