Skip to content

feat: add machine-readable worktree creation for agents - #192

Merged
helizaga merged 2 commits into
mainfrom
tommy/issue-67-agent-output
Aug 12, 2026
Merged

helizaga merged 2 commits into
mainfrom
tommy/issue-67-agent-output

Conversation

@helizaga

@helizaga helizaga commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add git gtr new --porcelain with stable path, branch, and hook_status records
  • keep progress, warnings, and arbitrary hook output on stderr, and suppress success records on hook failure
  • document a shell-native agent workflow and safety boundaries instead of adding a first-party MCP server
  • update help, changelog, testing guidance, and generated Bash/Zsh/Fish completions

Why

This addresses the integration need raised in #67 without adding a long-running protocol server to the Bash CLI. Shell-capable agents can call git gtr directly and reliably parse the created worktree path.

Validation

  • shellcheck bin/gtr bin/git-gtr lib/*.sh lib/commands/*.sh adapters/editor/*.sh adapters/ai/*.sh
  • ./scripts/generate-completions.sh --check
  • bats tests/hooks.bats — 36/36 passed
  • bats tests/cmd_create_integration.bats — 18/18 passed
  • bats tests/ — 552/553 passed; the remaining cmd_clean --merged uses nested registered worktree path failure reproduces unchanged on exact origin/main
  • real git gtr disposable-repository smoke test verified strict stdout records, noisy-hook stderr isolation, returned path, and cleanup

Summary by CodeRabbit

  • New Features

    • Added --porcelain output for git gtr new, providing stable machine-readable worktree, branch, and hook-status records.
    • Progress, hook messages, and incidental output are separated from structured results.
    • Interactive options are rejected in porcelain mode, and failed hooks prevent success records.
  • Documentation

    • Documented porcelain usage, output behavior, hook statuses, safety guidance, and automation workflows.
  • Chores

    • Updated Bash, Zsh, and Fish completions.
  • Tests

    • Added coverage for output stability, escaping, hook handling, failures, and interactive-option validation.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: e738e59b-373e-4a7e-959d-bb3f051e317e

📥 Commits

Reviewing files that changed from the base of the PR and between 1a88124 and 91533fc.

📒 Files selected for processing (1)
  • README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • README.md

Walkthrough

The PR adds --porcelain support to git gtr new. It emits escaped path, branch, and hook-status records, separates incidental output, reports hook outcomes, rejects interactive options, and documents and tests the interface.

Changes

Porcelain worktree creation

Layer / File(s) Summary
Porcelain command contract
lib/commands/create.sh, lib/commands/help.sh
git gtr new accepts --porcelain, emits escaped records through a dedicated descriptor, implies noninteractive confirmation, and rejects --editor and --ai.
Hook status and execution
lib/hooks.sh, lib/commands/create.sh, tests/hooks.bats
Hook phases report none, ran, skipped-untrusted, or partial. Post-create hook output goes to stderr, and failures stop creation without success records.
Validation and adoption
tests/cmd_create_integration.bats, README.md, docs/agent-usage.md, CHANGELOG.md, .github/instructions/testing.instructions.md, completions/*, scripts/generate-completions.sh
Tests cover output records, escaping, hook behavior, restrictions, and failures. Documentation and shell completions describe --porcelain.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Mergeability Score: 🔵 Low · up to 91533

The documented agent workflow still shows a command form that conflicts with the required public interface, which could mislead users or automation; the PR is otherwise mergeable with explicit owner follow-up to correct the example.

Sequence Diagram(s)

sequenceDiagram
  participant Agent
  participant git_gtr_new
  participant WorktreeCreation
  participant Hooks
  Agent->>git_gtr_new: run new --porcelain
  git_gtr_new->>WorktreeCreation: create worktree noninteractively
  WorktreeCreation->>Hooks: inspect and run post-create hooks
  Hooks-->>WorktreeCreation: return hook status
  WorktreeCreation-->>Agent: stable records on stdout
  Hooks-->>Agent: progress and hook output on stderr
Loading

Possibly related PRs

Poem

A rabbit reads three records bright,
Path and branch in tabs aligned.
Hooks whisper softly to stderr,
While porcelain keeps stdout clear.
Safe worktrees bloom at dawn.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding machine-readable worktree creation for agents.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch tommy/issue-67-agent-output

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

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/instructions/testing.instructions.md:
- Around line 26-28: Update the machine-readable creation command example to
invoke the documented git gtr interface instead of the repository-relative
./bin/gtr path, preserving all existing arguments and output behavior.

In `@README.md`:
- Around line 193-196: Update the --porcelain documentation to clarify that
path, branch, and hook_status records are emitted only when cmd_create completes
successfully; explicitly state that a failing post-create hook exits before
emitting any success records.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c41681fa-44d7-4bdf-b8a2-86a656bc6cac

📥 Commits

Reviewing files that changed from the base of the PR and between 214e49f and 1a88124.

📒 Files selected for processing (13)
  • .github/instructions/testing.instructions.md
  • CHANGELOG.md
  • README.md
  • completions/_git-gtr
  • completions/git-gtr.fish
  • completions/gtr.bash
  • docs/agent-usage.md
  • lib/commands/create.sh
  • lib/commands/help.sh
  • lib/hooks.sh
  • scripts/generate-completions.sh
  • tests/cmd_create_integration.bats
  • tests/hooks.bats

Comment thread .github/instructions/testing.instructions.md
Comment thread README.md Outdated
@helizaga
helizaga merged commit 30b6899 into main Aug 12, 2026
4 checks passed
@helizaga
helizaga deleted the tommy/issue-67-agent-output branch August 12, 2026 23:31
ddullah added a commit to TigerEye-Enterprise/git-worktree-runner that referenced this pull request Aug 14, 2026
* Detect and recover locked worktree entries with missing directories (coderabbitai#182)

git worktree prune skips locked entries by design, so a locked worktree
whose directory was deleted (e.g. a crashed agent session) lingers in the
registry and keeps its branch checked out. clean now detects this, offers
to unlock and prune (auto-confirmed by --force/--yes, previewed by
--dry-run), and prints the manual recovery command when declined.

* feat(clean): support closed PR cleanup (coderabbitai#183)

* feat(clean): support closed PR cleanup

Assisted-by: pi:gpt-5.5
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

* fix(clean): address closed cleanup review nits

Assisted-by: pi:gpt-5.5
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

* fix(clean): match GitLab head_sha fallback

Assisted-by: pi:gpt-5.5
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

---------

Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

* Release v2.8.0

* Replace Homebrew bump action with direct formula update (coderabbitai#184)

* Replace Homebrew bump action with direct formula update

* Allow manual formula bump via workflow_dispatch

* Return non-zero when git gtr rm fails (coderabbitai#190)

* Fix rm exit status on removal failures

* Test public rm failure status

* chore: prepare v2.8.1 release

* fix(copy): bound includeDirs discovery (coderabbitai#191)

* fix(copy): bound includeDirs discovery

* test(copy): allow filesystem result order

* fix(copy): preserve basename fallback

* chore: prepare v2.8.2 release

* feat: inherit sparse-checkout in new worktrees (coderabbitai#186)

* feat: inherit sparse-checkout in new worktrees

When creating a new worktree from one with sparse-checkout enabled,
the new worktree inherits the cone pattern automatically. Controlled
by gtr.sparse.inherit config (default on) and --sparse/--no-sparse
flags. Adds reusable helpers for sparse-checkout replication.

* fix(sparse): address CodeRabbit review feedback on sparse-checkout inheritance

- Preserve slash-separated branch paths in _worktree_path_for_ref
- Allow fallback to top-level worktree when matching worktree is not sparse
- Add Git 2.25+ guard for sparse-checkout support with full checkout fallback
- Fix non-cone mode to use init --no-cone (git defaults to cone mode)
- Improve error handling: failed sparse inheritance now falls back to full
  checkout and hard-errors if that fails, instead of leaving --no-checkout
  worktree empty
- Add tests for slash refs, non-cone inheritance, and sparse config precedence

* fix: harden sparse-checkout inheritance

* fix: support pre-2.20 config lookup

* fix: align sparse sources with git refs

---------

Co-authored-by: Tom Elizaga <tom.elizaga@gmail.com>

* Add PR worktree checkout command (coderabbitai#187)

* feat: add pull request worktree command

Assisted-by: pi:gpt-5.5
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

* fix: make pr worktrees gh-aware

Assisted-by: pi:gpt-5.5
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

* fix: harden pr worktree checkout

Assisted-by: pi:gpt-5.5
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

* fix: address pr review feedback

Assisted-by: pi:gpt-5.5
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

---------

Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Co-authored-by: Tom Elizaga <tom.elizaga@gmail.com>

* Run CI on fork pull requests (coderabbitai#185)

* Run CI on fork pull requests

* fix(ci): minimize fork pull request permissions

* chore: prepare v2.9.0 release

* feat: add machine-readable worktree creation for agents (coderabbitai#192)

Adds stable porcelain output and hook disposition reporting for shell-native agent integrations, with tests and documentation.

* chore: prepare v2.10.0 release

* perf: avoid per-worktree path resolution in list

* fix: complete v2.10 integration artifacts

---------

Co-authored-by: Tom Elizaga <tom.elizaga@gmail.com>
Co-authored-by: scarf <greenscarf005@gmail.com>
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Co-authored-by: Adam Wettreich <80975389+adamwett@users.noreply.github.com>
ddullah added a commit to TigerEye-Enterprise/git-worktree-runner that referenced this pull request Sep 5, 2026
* Detect and recover locked worktree entries with missing directories (coderabbitai#182)

git worktree prune skips locked entries by design, so a locked worktree
whose directory was deleted (e.g. a crashed agent session) lingers in the
registry and keeps its branch checked out. clean now detects this, offers
to unlock and prune (auto-confirmed by --force/--yes, previewed by
--dry-run), and prints the manual recovery command when declined.

* feat(clean): support closed PR cleanup (coderabbitai#183)

* feat(clean): support closed PR cleanup

Assisted-by: pi:gpt-5.5
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

* fix(clean): address closed cleanup review nits

Assisted-by: pi:gpt-5.5
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

* fix(clean): match GitLab head_sha fallback

Assisted-by: pi:gpt-5.5
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

---------

Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

* Release v2.8.0

* Replace Homebrew bump action with direct formula update (coderabbitai#184)

* Replace Homebrew bump action with direct formula update

* Allow manual formula bump via workflow_dispatch

* Return non-zero when git gtr rm fails (coderabbitai#190)

* Fix rm exit status on removal failures

* Test public rm failure status

* chore: prepare v2.8.1 release

* fix(copy): bound includeDirs discovery (coderabbitai#191)

* fix(copy): bound includeDirs discovery

* test(copy): allow filesystem result order

* fix(copy): preserve basename fallback

* chore: prepare v2.8.2 release

* feat: inherit sparse-checkout in new worktrees (coderabbitai#186)

* feat: inherit sparse-checkout in new worktrees

When creating a new worktree from one with sparse-checkout enabled,
the new worktree inherits the cone pattern automatically. Controlled
by gtr.sparse.inherit config (default on) and --sparse/--no-sparse
flags. Adds reusable helpers for sparse-checkout replication.

* fix(sparse): address CodeRabbit review feedback on sparse-checkout inheritance

- Preserve slash-separated branch paths in _worktree_path_for_ref
- Allow fallback to top-level worktree when matching worktree is not sparse
- Add Git 2.25+ guard for sparse-checkout support with full checkout fallback
- Fix non-cone mode to use init --no-cone (git defaults to cone mode)
- Improve error handling: failed sparse inheritance now falls back to full
  checkout and hard-errors if that fails, instead of leaving --no-checkout
  worktree empty
- Add tests for slash refs, non-cone inheritance, and sparse config precedence

* fix: harden sparse-checkout inheritance

* fix: support pre-2.20 config lookup

* fix: align sparse sources with git refs

---------

Co-authored-by: Tom Elizaga <tom.elizaga@gmail.com>

* Add PR worktree checkout command (coderabbitai#187)

* feat: add pull request worktree command

Assisted-by: pi:gpt-5.5
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

* fix: make pr worktrees gh-aware

Assisted-by: pi:gpt-5.5
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

* fix: harden pr worktree checkout

Assisted-by: pi:gpt-5.5
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

* fix: address pr review feedback

Assisted-by: pi:gpt-5.5
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

---------

Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Co-authored-by: Tom Elizaga <tom.elizaga@gmail.com>

* Run CI on fork pull requests (coderabbitai#185)

* Run CI on fork pull requests

* fix(ci): minimize fork pull request permissions

* chore: prepare v2.9.0 release

* feat: add machine-readable worktree creation for agents (coderabbitai#192)

Adds stable porcelain output and hook disposition reporting for shell-native agent integrations, with tests and documentation.

* chore: prepare v2.10.0 release

* Refresh editor and AI adapter guidance (coderabbitai#193)

* Refresh editor and AI adapter guidance

* Address PR review: mark legacy adapter rows

* chore: prepare v2.11.0 release

* chore: regenerate completions from the adapter registry

The merge resolution hand-edited completions/gtr.bash and lost its 8-space indent, so
`generate-completions.sh --check` failed on CI. The content was already correct -- the
union of upstream's `antigravity` AI adapter and our `kilo` -- and regenerating
reproduced the other two completion files byte-identically, which confirms it.

Completions are GENERATED from the adapter registry in lib/adapters.sh. Hand-resolving
them in a merge was the wrong move; the registry is the single source of truth and the
generator is the only thing that should write these three files.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Tom Elizaga <tom.elizaga@gmail.com>
Co-authored-by: scarf <greenscarf005@gmail.com>
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Co-authored-by: Adam Wettreich <80975389+adamwett@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
ddullah added a commit to TigerEye-Enterprise/git-worktree-runner that referenced this pull request Sep 28, 2026
* Detect and recover locked worktree entries with missing directories (coderabbitai#182)

git worktree prune skips locked entries by design, so a locked worktree
whose directory was deleted (e.g. a crashed agent session) lingers in the
registry and keeps its branch checked out. clean now detects this, offers
to unlock and prune (auto-confirmed by --force/--yes, previewed by
--dry-run), and prints the manual recovery command when declined.

* feat(clean): support closed PR cleanup (coderabbitai#183)

* feat(clean): support closed PR cleanup

Assisted-by: pi:gpt-5.5
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

* fix(clean): address closed cleanup review nits

Assisted-by: pi:gpt-5.5
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

* fix(clean): match GitLab head_sha fallback

Assisted-by: pi:gpt-5.5
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

---------

Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

* Release v2.8.0

* Replace Homebrew bump action with direct formula update (coderabbitai#184)

* Replace Homebrew bump action with direct formula update

* Allow manual formula bump via workflow_dispatch

* Return non-zero when git gtr rm fails (coderabbitai#190)

* Fix rm exit status on removal failures

* Test public rm failure status

* chore: prepare v2.8.1 release

* fix(copy): bound includeDirs discovery (coderabbitai#191)

* fix(copy): bound includeDirs discovery

* test(copy): allow filesystem result order

* fix(copy): preserve basename fallback

* chore: prepare v2.8.2 release

* feat: inherit sparse-checkout in new worktrees (coderabbitai#186)

* feat: inherit sparse-checkout in new worktrees

When creating a new worktree from one with sparse-checkout enabled,
the new worktree inherits the cone pattern automatically. Controlled
by gtr.sparse.inherit config (default on) and --sparse/--no-sparse
flags. Adds reusable helpers for sparse-checkout replication.

* fix(sparse): address CodeRabbit review feedback on sparse-checkout inheritance

- Preserve slash-separated branch paths in _worktree_path_for_ref
- Allow fallback to top-level worktree when matching worktree is not sparse
- Add Git 2.25+ guard for sparse-checkout support with full checkout fallback
- Fix non-cone mode to use init --no-cone (git defaults to cone mode)
- Improve error handling: failed sparse inheritance now falls back to full
  checkout and hard-errors if that fails, instead of leaving --no-checkout
  worktree empty
- Add tests for slash refs, non-cone inheritance, and sparse config precedence

* fix: harden sparse-checkout inheritance

* fix: support pre-2.20 config lookup

* fix: align sparse sources with git refs

---------

Co-authored-by: Tom Elizaga <tom.elizaga@gmail.com>

* Add PR worktree checkout command (coderabbitai#187)

* feat: add pull request worktree command

Assisted-by: pi:gpt-5.5
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

* fix: make pr worktrees gh-aware

Assisted-by: pi:gpt-5.5
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

* fix: harden pr worktree checkout

Assisted-by: pi:gpt-5.5
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

* fix: address pr review feedback

Assisted-by: pi:gpt-5.5
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>

---------

Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Co-authored-by: Tom Elizaga <tom.elizaga@gmail.com>

* Run CI on fork pull requests (coderabbitai#185)

* Run CI on fork pull requests

* fix(ci): minimize fork pull request permissions

* chore: prepare v2.9.0 release

* feat: add machine-readable worktree creation for agents (coderabbitai#192)

Adds stable porcelain output and hook disposition reporting for shell-native agent integrations, with tests and documentation.

* chore: prepare v2.10.0 release

* Refresh editor and AI adapter guidance (coderabbitai#193)

* Refresh editor and AI adapter guidance

* Address PR review: mark legacy adapter rows

* chore: prepare v2.11.0 release

* Use preinstalled ShellCheck in CI (coderabbitai#194)

ci: use preinstalled ShellCheck

* docs: add maintainers section to README (coderabbitai#195)

The repository has a CODEOWNERS entry but nothing in the README identifies
who maintains the project, so anyone landing on it has to check the
contributors graph to find out.

Also links the contributor list, since much of the adapter, platform and
shell-integration surface came from outside contributions.

* fix: make GTR_DEBUG actually report the failing location (coderabbitai#199)

bin/git-gtr installed an ERR trap when GTR_DEBUG was set but ran under 'set -e' alone. An ERR trap is inherited by functions, command substitutions and subshells only under 'set -E', and every command runs inside main() and a cmd_* handler, so the trap never fired.

Switch the option line to 'set -eE'. With no ERR trap installed the option has no effect, so the default path is unchanged.

Adds tests/debug_trap.bats covering the function and subshell contexts, plus silence on success, on a handled error path, and when GTR_DEBUG is unset.

* docs: refresh agent guides, README flags, and troubleshooting for v2.11 (coderabbitai#197)

Brings AGENTS.md, CLAUDE.md, README and the docs/ pages in line with what shipped in v2.9 through v2.11.

Fixes two errors: AGENTS.md pointed at a nonexistent adapters/ai/Codex.sh, and docs/troubleshooting.md told users to run 'bash -x git gtr', which cannot work because git is a binary. The architecture diagram there also had bin/git-gtr and bin/gtr the wrong way round.

Adds --sparse/--no-sparse to the README, the missing GTR_* fallback variables and the direct-read variables to docs/configuration.md, and a side-effect section to docs/agent-usage.md. AGENTS.md and CLAUDE.md now cover pr, trust, clean --closed, sparse inheritance, postCd dispatch and the current test layout.

* docs: rewrite Copilot instructions and align contributor guides with the current layout (coderabbitai#198)

The Copilot instructions predated the lib/ modularization: they described bin/gtr as a 961-line monolith with an 'open' command, cmd_* functions inside bin/gtr, six lib files, and GTR_VERSION on line 8. Rewritten as a condensed guide matching bin/git-gtr, the ten lib modules plus 18 command files, the adapter registry, pr/trust/cd handling, the --porcelain contract and the CI gates.

The per-pattern instruction files and CONTRIBUTING.md told contributors to hand-edit the three completion files, which are generated by scripts/generate-completions.sh and verified by CI. Every such place now says to edit the source and regenerate.

Also corrects four claims an independent verification pass disproved: the GTR_DEBUG behavior, the postCd dispatch paths, what 'git gtr completion zsh' prints, and the cmd_<command> dispatch rule.

* chore: prepare v2.11.1 release

* fix(tests): canonicalize the temp repo path in the integration helper (coderabbitai#200)

setup_integration_repo took its path straight from mktemp -d, which on macOS returns /var/folders/... while /var is a symlink to /private/var. git canonicalizes when it registers a worktree, so the preRemove hook received the /private/var spelling and 'cmd_clean --merged uses nested registered worktree path' compared it against the /var one.

This is the test's expectation being wrong rather than a product bug: passing a /var path to 'git worktree add' makes git itself register the resolved one.

Resolving the path once in the helper fixes it for every integration test. Linux is unaffected, since mktemp -d returns /tmp with no symlink, which is why CI stayed green.

Local suite now passes 561/561, previously 560/561.

* chore: normalize Windows shell execution for TigerEye

(cherry picked from commit 26ceb92)

* fix: make trust hashing portable and fail closed (#3)

Bead: TE-7sebjb
(cherry picked from commit 11a06a8)

---------

Co-authored-by: Tom Elizaga <tom.elizaga@gmail.com>
Co-authored-by: scarf <greenscarf005@gmail.com>
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Co-authored-by: Adam Wettreich <80975389+adamwett@users.noreply.github.com>
Co-authored-by: BashNetCorp <your.email@example.com>
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