Skip to content

feat(execution): add the resumable cleanup of trash entries, not yet used - #834

Draft
harenome wants to merge 8 commits into
ThinkFlowLab:mainfrom
harenome:feat/trash-collectors
Draft

harenome wants to merge 8 commits into
ThinkFlowLab:mainfrom
harenome:feat/trash-collectors

Conversation

@harenome

@harenome harenome commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #827
Depends on #826 (PR #831)

What

  • trash.collect: one loop under the per-kind collector lock. A step is recorded once read back.
  • Run entries: detach from workspaces, bytes. A host copy only stays pending.
  • Workspace entries: archive older judgements and failure analyses whole, marker, bytes.
  • Untrusted entries stay whole, reported.

Out of scope: removing judgements. Both handlers report "Judgements kept: removing them is not supported yet".

Nothing calls it yet.

Touches

trash.py, execution.py, workspace.py, two test modules.

Verified

  • Each handler killed (os._exit) around every intent write, then resumed.
  • A verdict saved mid-archive; a malformed index; two processes on one collector.
  • Backend and route suites, docs check.

Risk

Low: inert. forget gains an optional held flag, job_index an optional strict.
Release prerequisite (step 3): writers refuse a trashed workspace, else a verdict saved during byte removal is lost.

Agents

Claude Code, Fable 5.2

… on verified facts

Cleanup never removes judgements nor copies older ones to their jobs: both handlers keep them and report it. The copy scan, the runs registry and the handover are removed.
The archive is copied from files set aside under a short profile hold, its identity checked on reuse; a verdict written since holds the bytes.
Detach checks each job against its intent, reads the index strictly and holds on a record gone from its folder.
…annot be told

A workspace with nothing set aside ends. Its archive is read again before the bytes go.
Detach requires each job folder, reads its identity and source once, rejects malformed index rows and versions, and waits for a workspaces folder that is not there.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Delete redesign, step 2: resumable cleanup of trash entries, not yet used

1 participant