Skip to content

[codex] Route hook branch tracking by session worktree cwd#230

Merged
ScriptedAlchemy merged 8 commits into
masterfrom
codex/hook-routing-session-cwd
Jul 3, 2026
Merged

[codex] Route hook branch tracking by session worktree cwd#230
ScriptedAlchemy merged 8 commits into
masterfrom
codex/hook-routing-session-cwd

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

  • Route hook shell branch plans through the hook event cwd's linked worktree when it belongs to the same git common dir as the served project.
  • Use the session worktree's current branch for ambiguous git state changes such as git pull --rebase.
  • Add regression coverage for branch switches and ambiguous git changes from linked session worktrees.

Validation

  • CARGO_TARGET_DIR=/tmp/tracedecay-hook-routing-target cargo build
  • CARGO_TARGET_DIR=/tmp/tracedecay-hook-routing-target cargo test -q mcp::hook_events::tests::
  • CARGO_TARGET_DIR=/tmp/tracedecay-hook-routing-target cargo test -q --test hooks_lsp_suite hook_branch_routing_test
  • CARGO_TARGET_DIR=/tmp/tracedecay-hook-routing-target cargo test -q --test hooks_lsp_suite cursor_shell_sync_plan

Note: the default shared target dir had stale/corrupt artifacts, so validation used a fresh target dir.

@changeset-bot

changeset-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: adf9222

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy ScriptedAlchemy changed the base branch from feat/dashboard-ux-improvements to master July 2, 2026 09:09
@ScriptedAlchemy ScriptedAlchemy force-pushed the codex/hook-routing-session-cwd branch from a961602 to 888a270 Compare July 2, 2026 09:13
@ScriptedAlchemy ScriptedAlchemy force-pushed the codex/hook-routing-session-cwd branch from 888a270 to 4a258fb Compare July 2, 2026 09:43
@ScriptedAlchemy ScriptedAlchemy marked this pull request as ready for review July 3, 2026 01:55

@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: bfa60ee5d3

ℹ️ 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 src/mcp/hook_events.rs
@ScriptedAlchemy ScriptedAlchemy force-pushed the codex/hook-routing-session-cwd branch from bfa60ee to 6c76410 Compare July 3, 2026 02:07
@ScriptedAlchemy ScriptedAlchemy merged commit 2e8c73f into master Jul 3, 2026
16 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