land: bash-task-storage-hygiene

Merged
AF
13h ago
+1289-129

Accepted agent delivery; branch-keyed search descriptor included.


Summary by cubic

Tightens bash task storage hygiene so empty session folders are reclaimed only when safe, damaged records cannot stall retention, and routine cleanup no longer floods INFO logs.

  • Preflights bash task writes against protected storage so a refused creation leaves the storage root untouched; session creation and removal are guarded by a directory lock, with parallel session creation gates keyed by path.
  • Session directories are removed only when no live or replaying task owns them; quarantine GC honors the same fence.
  • Treats task layouts missing their required directories as not found and removes the leftover empty task directory so cleanup completes without retrying.
  • Isolates unreadable root binding records: pruning continues past them, each is warned about once, and truncated records move to a per-scope bounded quarantine.
  • Downgrades no-op detach signals, idle retention sweeps, and routine bash task row deletion from INFO/WARN to DEBUG; INFO is reserved for actual changes.
  • Module and plugin logs now roll at 32 MiB into one backup, removing dead-process logs after 24 hours and keeping the log folder under 200 MiB.

RetriggerView in GreptileConfidence Score: 5/5

The follow-up changes appear safe to merge.

Summary

This PR reclaims empty bash-task folders, isolates damaged retention records, and reduces routine log noise.

  • Bash-task cleanup removes empty folders when no task still needs them.
  • Retention cleanup skips damaged bindings and quarantines truncated records.
  • No-op detach and idle cleanup messages move out of the main logs.
  • Storage docs now describe the cleanup notes and log-file limits.

Reviews (2) · Last reviewed commit: "mason: protect pinned task session folde..." · Reviewed by Greptile