Skip to content

fix(work-issue): create the herdr worktree from --cwd ROOT, not from focus - #323

Merged
kendrick merged 2 commits into
mainfrom
issue-209
Nov 10, 2026
Merged

kendrick merged 2 commits into
mainfrom
issue-209

Conversation

@kendrick

Copy link
Copy Markdown
Owner

Step 1 now creates the herdr worktree with --cwd ROOT and stops when the response's repo_root isn't ROOT. Before this change, a run started while another repo's workspace had focus could branch its worktree off that other repo, and herdr reported success.

#209 proposed --workspace "$HERDR_WORKSPACE_ID". I probed each form with focus on the long-term-memory-kit workspace before choosing:

Call Repo the worktree came from
no source flag long-term-memory-kit (the focused workspace)
--workspace on a workspace whose pane sits in skills deep-field, the repo that workspace opened in
--workspace on a pane in ~ long-term-memory-kit
--cwd ~/code/skills skills

herdr binds a workspace to the repo it opened in and never updates the binding after a cd, so --workspace fails the same way focus does. Every wrong case returned worktree_created, which is why the repo_root check is there. Ledger row 192 records the probe.

Start with the Step 1 paragraph in work-issue/SKILL.md. The other three files are a ledger row, a focus case added to EVALS scenario 11, and two require_text lines in the smoke suite.

On a mismatch the run stops and leaves the stray worktree for the user to remove, because it sits in a repo the run doesn't own. That's the call I'm least sure of. An automatic herdr workspace close plus git -C <repo_root> worktree remove would also work.

Tested: bash tests/work-issue-smoke.sh passes, and both new strings are absent from main's SKILL.md. I didn't run EVALS scenario 11 live.

Closes #209

…focus

Step 1 called `herdr worktree create` with no source flag, so herdr branched off whichever workspace had focus. #209 proposed `--workspace "$HERDR_WORKSPACE_ID"`, but probing showed that picks the wrong repo too. herdr ties a workspace to the repo it opened in, so a pane that later cd'd elsewhere still branches off the old one. Every wrong case succeeded, and nothing told the run its worktree sat in another repo.

Only `--cwd ROOT` picked the right repo. Step 1 now passes it and checks the response's `repo_root` against ROOT, stopping on a mismatch. Ledger row 192 records the probe.

Closes #209
@kendrick

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T19:41:03.144584Z 7e09526 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 59a477f806

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread work-issue/SKILL.md Resolved
…lts on it

Step 1's new `repo_root` check said "stop and name both paths" but printed no fixed message and had no row in Where a Run Stops. drive.py halts only on a quoted message from that table and relaunches anything else, so a driven run that hit the mismatch would start another agent instead of waiting for the user to remove the stray worktree (Codex review on #323).

Step 1 now prints a fixed message, the table carries it as a new row, and the smoke suite's row count goes from 36 to 37.
@kendrick

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 7e09526437

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@kendrick
kendrick merged commit a7d0e8d into main Nov 10, 2026
1 check passed
@kendrick
kendrick deleted the issue-209 branch November 10, 2026 19:44
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.

work-issue: Step 1's herdr worktree call takes its source workspace from focus, so it fails while another repo is focused

1 participant