Book Ingest CronJob Implemented

Summary

Implemented the book-ingest Node ESM container and Flux CronJob for the gandazgul cluster. The job submits inbox torrents to Transmission, discovers completed /data/books downloads, copy-only imports supported book/media files into Audiobookshelf’s Books library, preserves import state for idempotent reruns, routes uncertain matches to _needs-review, and logs skip/collision decisions. Unit tests, Kustomize rendering, Kubernetes client dry-run, and local mock Transmission dry-run verification passed.

Deferred Work

Publishing the built image and moving the CronJob to a published pinned tag remain blocked by non-interactive Docker Hub login credentials; the multi-arch podman build/tag steps completed before the login failure.

Future Planning Notes

Book-ingest now has stable documented vocabulary and paths in CONTEXT.md: torrent inbox/archive/state under YASR, Transmission source under /data/books, Audiobookshelf destination under public/Books, copy-only imports, and _needs-review for conservative classification.

Execution Report

  • Implemented containers/book-ingest Node ESM CronJob container with Transmission RPC session-id retry, torrent inbox/archive handling, completed /data/books discovery, metadata/heuristic classification, _needs-review fallback, per-file JSONL import state, archive/temporary skip logging, collision-safe copy behavior, and dry-run support.
  • Added focused unit tests for extension handling, sanitization, metadata confidence/grouping, _needs-review, state idempotence, Transmission completion filtering, and collision suffix planning.
  • Added clusters/gandazgul/apps/BookIngestCronJob.yaml, included it in clusters/gandazgul/apps/kustomization.yaml, and documented stable book-ingest vocabulary/paths in CONTEXT.md.
  • Verification passed: cd containers/book-ingest && npm test (10 passed); kustomize build --load-restrictor LoadRestrictionsNone clusters/gandazgul/apps; kubectl apply --dry-run=client -f /tmp/book-ingest-kustomize.yaml (warnings only about existing live resources missing last-applied annotations); local dry-run execution against a mock Transmission RPC copied/planned correctly and exited 0.
  • Repository pre-commit command was attempted: node scripts/pre-commit.js --all returned pre-commit: no staged files to check.
  • Image build verification partially failed: node containers/container-build.js --i=book-ingest --force completed the multi-arch podman build/tag steps, then failed at non-interactive podman login --username=gandazgul docker.io; pushing the image and moving to a published pinned tag remain blocked by Docker Hub credentials.

This site uses Just the Docs, a documentation theme for Jekyll.