Context
From the post-merge review of #248 (FASTA prep backend). Already noted as a known limitation in services/protspace-prep/README.md; filing to track.
JobRegistry state (_jobs, _subscribers, _tasks) is in-memory. On a container restart, job directories survive on the volume but _jobs is empty, so /api/prepare/{job_id}/bundle returns 404 for any pre-restart job until the sweeper reclaims the directory — and any in-flight job is silently lost (the client SSE just drops).
Impact
Low for the current MVP traffic, but a deploy/restart during active jobs gives users a confusing failure with no recovery path.
Options (roadmap)
- Rehydrate
_jobs from job_root on startup (at least mark completed bundles downloadable).
- Or persist minimal job metadata (status, bundle path, ready_at) alongside each job dir.
- Or accept and document, and drain before redeploy.
Refs
services/protspace-prep/src/protspace_prep/jobs.py
services/protspace-prep/README.md (Known limitations)
Context
From the post-merge review of #248 (FASTA prep backend). Already noted as a known limitation in
services/protspace-prep/README.md; filing to track.JobRegistrystate (_jobs,_subscribers,_tasks) is in-memory. On a container restart, job directories survive on the volume but_jobsis empty, so/api/prepare/{job_id}/bundlereturns 404 for any pre-restart job until the sweeper reclaims the directory — and any in-flight job is silently lost (the client SSE just drops).Impact
Low for the current MVP traffic, but a deploy/restart during active jobs gives users a confusing failure with no recovery path.
Options (roadmap)
_jobsfromjob_rooton startup (at least mark completed bundles downloadable).Refs
services/protspace-prep/src/protspace_prep/jobs.pyservices/protspace-prep/README.md(Known limitations)