feat(ops): add cleanup commands [H-24, CONC3] #117

Merged
hamza.khyari merged 4 commits from feature/m4-concurrency-cleanup into develop-hamza-1 2026-02-19 14:22:23 +00:00

4 Commits

Author SHA1 Message Date
khyari hamza cea3bad758 refactor(ops): address re-review findings for cleanup commands
- Use model_copy(update=...) in test helpers so Pydantic ge=
  validators are enforced during tests, not just env vars (NEW-1)
- Promote _extract_plan_id_from_sandbox to public staticmethod
  and reuse in CLI active-plan detection to eliminate duplicate
  plan-ID parsing logic (NEW-2)
- Cache _get_sandbox_dirs result for service instance lifetime
  and have CLI active-plan detection use the cached listing so
  /tmp is iterated only once per invocation (NEW-3)
2026-02-19 14:20:16 +00:00
khyari hamza f4c088bae8 fix(ops): address review findings for cleanup commands
- Add best-effort active plan detection from sandbox mtimes to
  protect running plans from cleanup (B1)
- Add ge= validators on all retention settings to prevent unsafe
  negative/zero values; checkpoint max requires ge=2 (B3, NB6)
- Handle CoW sandbox plan_id extraction (ca-cow-sandbox- prefix)
  so copy-on-write sandboxes are also protected (NB4)
- Add OSError guards in sandbox dir iteration for race safety (NB7)
- Add TODO markers and CLI notice for unimplemented session cleanup (NB1)
- Rebase onto develop-hamza-1 to incorporate SEC5 changes (B2)
2026-02-19 13:58:39 +00:00
khyari hamza bab4560dde feat(ops): add cleanup commands 2026-02-19 13:46:48 +00:00
khyari hamza bd38a00cf0 chore: WIP branch for feat(ops): add cleanup commands
Refs: H-24, CONC3.gc
Planned: Day 13
2026-02-19 13:46:48 +00:00