Repository navigation
Conversation
kossoy
marked this pull request as draft
August 31, 2026 13:16
Contributor
Author
|
Independent review BLOCK: a canonical terminal receipt copied into a fresh target is accepted without genuine quarantine/phase provenance and can delete arbitrary pre-existing empty metadata and selected-skill leaf directories. Keep this PR draft. Required follow-up: bind terminal resume to durable install/quarantine provenance and add the copied-receipt adversarial regression. Core three-harness questionnaire skills and deterministic packaging are already merged; no live install has occurred. |
kossoy
force-pushed
the
issue-12-resumable-terminal-cleanup
branch
from
November 21, 2026 13:15
0695a0a to
e8cbbd0
Compare
Contributor
Author
|
Parked 2026-11-21: rebased once; resumes when the project is reactivated. |
kossoy
force-pushed
the
issue-12-resumable-terminal-cleanup
branch
from
November 21, 2026 18:01
e8cbbd0 to
0695a0a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
No live harness installation or deployment was performed.
Closes #12
Note
Medium Risk
Changes receipt lifecycle and uninstall state machine for isolated skill installs; mistakes could leave orphaned metadata or skip cleanup, but behavior is heavily tested and fail-closed on ambiguous receipt state.
Overview
Uninstall can now resume safely after interruption or partial cleanup by introducing a terminal receipt (
.dev-workflow/{harness}-uninstall-receipt.json).After quarantine file removal, the install receipt is renamed to that terminal path before empty-directory cleanup runs. A retry reads the terminal receipt instead of the original, skips re-staging owned files, and only deletes the terminal receipt once quarantine, skill leaf dirs, and harness metadata are all gone—otherwise it raises
cleanup is incompleteand leaves the terminal receipt for another attempt.Install also fails closed if the terminal receipt path already exists, alongside the existing metadata-root check. Tests cover interrupt right after receipt relocation, injected
rmdirfailure with successful retry, and rejecting installs when an empty harness metadata directory was created manually.Reviewed by Cursor Bugbot for commit 0695a0a. Bugbot is set up for automated code reviews on this repo. Configure here.
Greptile Summary
This change preserves uninstall ownership information after installed files have been removed but before empty directories are fully pruned, so a later uninstall can safely resume cleanup. Filesystem checks exercised an interruption immediately after receipt relocation, a transient metadata-directory removal failure, retained terminal authority, retry cleanup, reinstall, and final uninstall. Those paths completed as intended, and no defects were found.
Confidence Score: 5/5
Safe to merge based on focused filesystem recovery validation and passing targeted recovery tests.
The exercised interruption and transient cleanup-failure paths retained uninstall authority, completed correctly on retry, and allowed a clean subsequent reinstall and uninstall without reproducing a defect.
Files Needing Attention: No additional files need attention; the reviewed changes are limited to dev_workflow/bundle.py and tests/test_multiharness_bundle.py.
What T-Rex did
Reviews (1): Last reviewed commit: "fix: resume terminal uninstall cleanup" | Re-trigger Greptile