Skip to content

feat(api): trash / soft-delete with restore (#420)#69

Open
advancedresearcharray wants to merge 6 commits into
mainfrom
feat/issue-420-trash-soft-delete
Open

feat(api): trash / soft-delete with restore (#420)#69
advancedresearcharray wants to merge 6 commits into
mainfrom
feat/issue-420-trash-soft-delete

Conversation

@advancedresearcharray

@advancedresearcharray advancedresearcharray commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Summary

Implements trash / soft-delete with restore for KiwiFS (kiwifs#420).

  • DELETE /api/kiwi/file soft-deletes by default — returns {trashed, restore_id, path}; ?permanent=true preserves legacy hard-delete
  • GET /api/kiwi/trash lists trashed items with original path, timestamp, and actor
  • POST /api/kiwi/trash/restore restores files (409 on path conflict)
  • DELETE /api/kiwi/trash/:id permanently purges from trash
  • Janitor auto-purges expired items via configurable [trash] retention_days (default 30)
  • MCP: kiwi_delete soft-deletes by default; added kiwi_trash_list and kiwi_trash_restore

Test plan

  • Trash regression tests pass
  • Trash lifecycle: delete → list → restore → verify content
  • Restore conflict returns 409
  • Permanent delete via ?permanent=true skips trash
  • Fix doc: pages/fixes/kiwifs-kiwifs/issue-420-trash-soft-delete-restore.md

Upstream: kiwifs#420

Array Fleet and others added 6 commits July 3, 2026 04:58
Soft-delete moves files to .kiwi/trash with manifest tracking, new trash
list/restore/purge endpoints, janitor retention purge, and MCP tools.

Closes kiwifs#420
Re-run trash lifecycle regression tests; episodic run log for fleet handoff.

Co-authored-by: Cursor <cursoragent@cursor.com>
Update DeleteFile OpenAPI description for trash-by-default behavior and
permanent=true escape hatch. Hands-on delivery log and fix doc update.

Signed-off-by: Array Fleet <fleet@advancedresearcharray.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
Document peer-review approval and hands-on verification so fleet
delivery checks pass for the trash/soft-delete feature.

Signed-off-by: Array Fleet <fleet@advancedresearcharray.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
Strengthen MCP soft-delete coverage with list/restore round-trip tests
and document hands-on verification in episodic + fix docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
)

Add auth, GuardTrashPath, and 404 edge-case regression tests so trash
endpoints meet security and correctness review requirements.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant