Skip to content

fix(teardown): allow cleanup after a verified Herdr pane move - #415

Merged
ac8318740 merged 1 commit into
devfrom
fix/teardown-relocation
Nov 6, 2026
Merged

ac8318740 merged 1 commit into
devfrom
fix/teardown-relocation

Conversation

@ac8318740

@ac8318740 ac8318740 commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

Restore approved teardown after a verified Herdr pane move, so missing persistent cwd controls no longer block cleanup.

The same process stays alive. Later tools or exiting the agent can report a deleted-directory error; the plan must disclose that risk before approval.

How it works

flowchart TB
    A[Check data, merge status, and other sessions] --> B[Disclose stale-cwd risk and obtain approval]:::changed
    B --> C[Move the same pane to the main workspace]
    C --> D{Pane identity verified?}:::changed
    D -->|No| E[Keep checkout and branches]
    D -->|Yes| F[Finish other approved cleanup]
    F --> G[Remove own checkout and finish cleanup in one shell rooted at main]:::changed
    classDef changed stroke-width:3px
Loading

A verified Herdr pane move permits approved removal even when the agent's working directory stays behind.

What changed

  • Remove the persistent-cwd requirement after a verified Herdr pane move
  • Warn before approval about deleted-directory errors
  • Run own-checkout removal, branch cleanup, and final verification in one shell invocation
  • Preserve other-session, data-preservation, merge, and Orca checks
  • Bump the three manifests to 0.57.5

Blast radius

  • The teardown skill changes its Herdr path for Pi, Codex, and Claude Code
  • Sessions without a host still require a verified persistent cwd change before deleting their own checkout
  • Orca still retains the attached terminal's checkout
  • A wrong removal decision can destroy files; existing approval, recovery, and live-session checks remain mandatory
  • No CLI logic, dependencies, or generated outputs change
  • Reverting restores the previous relocation gate but cannot recover files removed during teardown

Test plan

  • Review both changed guides with the connected teardown safeguards independently
  • Pass Markdown parity (2 checks), version-gate tests (41 checks), and whitespace checks
  • Review prose lint warnings on both changed guides
  • Pass the configured build, lint, and typecheck; confirm generated outputs stay unchanged
  • Load the local skill in a fresh Pi session and move its pane to the main workspace with unchanged process/session identities
  • Rehearse stale-cwd approval and other-agent, preserved-data, ambiguous-move, and Orca blocking cases without deletion
  • Pass GitHub checks covering the CLI, shell suites, plugin wiring, Pi extension, and full tests
  • Inspect review comments and resolve blocking findings before merge (no comments or reviews)

Verification limits

The live test moves a real pane but deletes nothing. Destructive cleanup and post-deletion tool or exit errors remain untested.

The local test isolates the skill from the ACStack extension. No AI review workflow is configured in this repository.

Keep the same running Herdr session without requiring persistent cwd
relocation. Warn before approval that later tools or exit may report a
deleted directory. Finish own-checkout cleanup in one shell rooted at main.

Retain other-session, data-preservation, merge, and Orca guards.
@ac8318740
ac8318740 merged commit d4f672a into dev Nov 6, 2026
5 checks passed
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