Repository navigation
Conversation
… closes the tab A launch names its herdr tab `repo@branch`, and the name stays after the session closes. `dl rmt`, typed in that tab, reads the name with `herdr tab get $HERDR_TAB_ID`, turns it into the one workspace id devpod still lists (the id itself, or the records' label), prints the id, and runs the same guarded delete as `rm`. After a removal that worked it hangs up the shell, as `rme` does, so the tab closes. No workspace name and no selector. Claude-Session: https://claude.ai/code/session_018kqBWJQXnHEACr4nBxAMKF
…grammar refuses The guard's way past is now the command as it was typed, so rmt is told dl rmt --force and rm, rme and kill print the line they did before. Claude-Session: https://claude.ai/code/session_018kqBWJQXnHEACr4nBxAMKF
…ided, so a refusal opened with a removal that never happened Claude-Session: https://claude.ai/code/session_018kqBWJQXnHEACr4nBxAMKF
The hangup's own lines (SIGHUP already ignored, no parent to hang up, kill refused) hard-coded 'rme:'. after_the_command now takes the word the line used: verb.word() for rm/rme, cli::REMOVE_THIS_TAB for rmt. Claude-Session: https://claude.ai/code/session_018kqBWJQXnHEACr4nBxAMKF
Also pins the stale-record refusal against a record the listing really rejects (the orphan fixture), the unanswered tab, the unreadable listing, the delete the id-named tab ends in, and rmt --claude-profile. Claude-Session: https://claude.ai/code/session_018kqBWJQXnHEACr4nBxAMKF
# Conflicts: # CHANGELOG.md # rust/devlaunch-core/public-api.rest.txt # rust/devlaunch-core/src/clients/herdr.rs
Reviewer's GuideAdds Sequence diagram for dl rmt workspace removalsequenceDiagram
participant User
participant DL as dl
participant Herdr
participant Devpod
participant Metadata
participant Workspace
participant Shell
User->>DL: dl rmt [--force]
DL->>Herdr: tab get HERDR_TAB_ID
Herdr-->>DL: result.tab.label
DL->>Devpod: list workspaces
alt label is listed workspace id
DL->>DL: select label
else label matches recorded workspace
DL->>Metadata: recorded_ids_labelled(label)
Metadata-->>DL: listed matching ids
end
alt exactly one workspace
DL->>Workspace: remove_addressed(id, force)
alt guarded removal succeeds
Workspace-->>DL: removed
DL->>Shell: hang up parent shell
else removal refused
Workspace-->>DL: refusal
DL-->>User: show refusal and keep tab open
end
else zero or multiple matches
DL-->>User: show refusal and keep tab open
end
Flow diagram for dl rmt workspace resolutionflowchart TD
A[dl rmt] --> B{HERDR_TAB_ID set?}
B -- No --> C[Refuse: outside herdr]
B -- Yes --> D[herdr tab get HERDR_TAB_ID]
D --> E{Tab label returned?}
E -- No --> F[Refuse: tab unanswered]
E -- Yes --> G[devpod list workspaces]
G --> H{Label is listed workspace id?}
H -- Yes --> I[Select that workspace]
H -- No --> J[Match label against listed recorded workspaces]
J --> K{Exactly one match?}
K -- No --> L[Refuse: zero or multiple matches]
K -- Yes --> I
I --> M[Run guarded removal]
M --> N{Removal succeeds?}
N -- No --> O[Show refusal; keep tab open]
N -- Yes --> P[Hang up parent shell]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report❌ Patch coverage is
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Merged
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
Adds
dl rmt: run it inside a herdr tab and it removes the workspace that tab is named after, then hangs up the tab the wayrmedoes.HERDR_TAB_ID, asksherdr tab get <id>for the tab's label, and maps the label to exactly one workspace devpod lists (a listed id as is, else the metadata records whose label matches). Zero or two matches refuse, naming why.rm's guarded delete, so unpushed work refuses unless--force. Only a removal that completes hangs up the parent shell; a refusal leaves the tab open.stop,rm,rmeand the selector are unchanged.The
herdr tab getreply shape comes from herdr's published schema, not from a run against a real herdr (the dev container has none).herdr tab get "$HERDR_TAB_ID"on the host should showresult.tab.label.Review
Self-reviewed: fixes for the refusal hint (
dl rmt --force, notdl <id> rmt --force), the "removing" wording printed before the guard decided,nohupsayingrme:, stale comments, and tests for the two-match refusal, stale records, unanswered herdr and refused listings.Test plan
cargo fmt --check,cargo clippy --locked --all-targets -D warnings: cleancargo test --workspace: 3134 passedpytest test/: 857 passedprek run --from-ref origin/main --to-ref HEAD: passed🤖 Generated with Claude Code
Summary by Sourcery
Add
dl rmtfor safely deleting the workspace associated with the current herdr tab and closing the tab only after the deletion succeeds.New Features:
dl rmtto identify the workspace named by the current herdr tab, remove it, and close the tab after a successful deletion.Bug Fixes:
Enhancements:
rm,rme,stop, and selector behavior unchanged.Documentation:
dl rmt, its workspace resolution rules, safety guard, force option, and herdr requirements in the README, CLI guide, and changelog.Tests: