Task
Advance §23 W2 (Scale) foundations: make analysis incremental and operable — worker/service separation, a job queue, content cache with invalidation, and repository-class budgets with failure recovery. This is the GATE B precondition for W3 evolution.
Rationale
Roadmap §23 W2 mission: "Make analysis incremental, distributed and operable." §24 GATE B ("Reliability before history"): "Full and incremental outputs converge; entity identity evaluation passes" — a hard prerequisite for W3 graph evolution (#172, #173). Today analysis is a single in-process worker (roadmap §01 baseline confirms this). Without W2, drift/impact (the actual moat) becomes noise. Filing now to queue behind GATE A + foundation work; do not start until those pass.
References
Implementation Notes
- Separate control plane from workers (leases, queue, resource budgets).
- Content cache + invalidation keyed by canonical graph hash.
- Repository-class budgets; deterministic recovery on worker death.
- No new product surface; operability only.
- Keep the existing cancellable DB-backed lifecycle (analysis_worker CANCELLED_CODE) as the contract.
Acceptance Criteria
Task
Advance §23 W2 (Scale) foundations: make analysis incremental and operable — worker/service separation, a job queue, content cache with invalidation, and repository-class budgets with failure recovery. This is the GATE B precondition for W3 evolution.
Rationale
Roadmap §23 W2 mission: "Make analysis incremental, distributed and operable." §24 GATE B ("Reliability before history"): "Full and incremental outputs converge; entity identity evaluation passes" — a hard prerequisite for W3 graph evolution (#172, #173). Today analysis is a single in-process worker (roadmap §01 baseline confirms this). Without W2, drift/impact (the actual moat) becomes noise. Filing now to queue behind GATE A + foundation work; do not start until those pass.
References
apps/backend/app/workers/analysis_worker.py(cancellable, single-worker).Implementation Notes
Acceptance Criteria