Category: bug Severity: major
Location: crates/arcp-runtime/src/runtime/job.rs:135-139
What
The registry has a terminal-job sweep helper, but production runtime code never calls it. Completed, failed, and cancelled jobs remain in the shared DashMap indefinitely, causing unbounded memory growth on long-running runtimes.
Evidence
/// Drop terminal jobs from the registry. Should be called periodically
/// (Phase 5+) to cap memory.
pub fn sweep_terminals(&self) {
self.inner.retain(|_, r| !r.entry.state.is_terminal());
}
Proposed fix
Call terminal sweeping from a bounded retention policy, background maintenance task, or registry insertion/transition path, preserving recent list-jobs visibility without unbounded retention.
Acceptance criteria
Category: bug Severity: major
Location:
crates/arcp-runtime/src/runtime/job.rs:135-139What
The registry has a terminal-job sweep helper, but production runtime code never calls it. Completed, failed, and cancelled jobs remain in the shared
DashMapindefinitely, causing unbounded memory growth on long-running runtimes.Evidence
Proposed fix
Call terminal sweeping from a bounded retention policy, background maintenance task, or registry insertion/transition path, preserving recent list-jobs visibility without unbounded retention.
Acceptance criteria
JobRegistryandJobRegistry::len()does not grow with historical terminal jobs.