Skip to content

feat(workspace): destroy safety — is-dirty check, auto-export, --discard#38

Closed
escherize wants to merge 1 commit into
bcm/ghy-4054-stale-credential-sweepfrom
bcm/ghy-4051-destroy-safety
Closed

feat(workspace): destroy safety — is-dirty check, auto-export, --discard#38
escherize wants to merge 1 commit into
bcm/ghy-4054-stale-credential-sweepfrom
bcm/ghy-4051-destroy-safety

Conversation

@escherize

Copy link
Copy Markdown
Contributor

Refs GHY-4051 (Linear). Stacked on the sweep PR.

Destroy is the only irreversible moment, so it closes the work-loss window there: when a ws-<id> profile exists locally, the child is checked for unsynced work and a dirty workspace is auto-exported to its target branch before teardown (--discard skips both).

  • No local profile → warn and proceed: destroy is the billing-stop lever; ops cleanup must work from machines that never connected.
  • Profile present but child unreachable → hard refusal naming --discard; unknown state doesn't silently reopen the window.
  • The matching profile is dropped after a successful destroy.
  • Live e2e: no-profile, clean-check (real is-dirty round-trip), unreachable+--discard override, profile-drop verification. The dirty→auto-export path needs a configured git remote and is exercised in the local workspace testbed.

Destroy is the only irreversible moment, so it closes the work-loss
window there: when a ws-<name> profile exists locally, the child is
checked for unsynced work and a dirty workspace is auto-exported to its
target branch before teardown. --discard skips both. No local profile
warns and proceeds (destroy is the billing-stop lever; ops cleanup must
work from any machine); an unreachable child refuses without --discard
rather than silently reopening the window. The matching profile is
dropped after a successful destroy.

Refs GHY-4051
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9e52cdaa-e198-4647-b2cc-fef4abdb1401

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bcm/ghy-4051-destroy-safety

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@escherize

Copy link
Copy Markdown
Contributor Author

Consolidated into #39.

@escherize escherize closed this Jul 8, 2026
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