Skip to content

fix(cursor): pin the afterFileEdit capture hook to repowise-augment (#5364) - #5548

Merged
RaghavChamadiya merged 1 commit into
repowise-dev:mainfrom
Aditya-XR:fix/cursor-capture-hook-pinning-5364
Nov 13, 2026
Merged

RaghavChamadiya merged 1 commit into
repowise-dev:mainfrom
Aditya-XR:fix/cursor-capture-hook-pinning-5364

Conversation

@Aditya-XR

Copy link
Copy Markdown
Contributor

Summary

  • Build the Cursor afterFileEdit capture hook entry dynamically via hook_direct_command("repowise-augment", "--client cursor") instead of the hardcoded repowise augment --client cursor constant.
  • Update _is_capture_hook to match both repowise-augment (bare or pinned path) and legacy repowise augment commands so reinstall replaces legacy entries and uninstall removes either.
  • Add _refresh_capture_command so reinstalling repins existing repowise-augment entries and upgrades legacy repowise augment --client cursor entries in place while leaving foreign hooks untouched.

Related Issues

Closes #5364

Test Plan

  • Tests pass (pytest tests/unit/cli/test_hook_command_pinning.py tests/unit/cli/test_attribution_capture_cli.py tests/unit/distill/test_cursor_hook_adapter.py)
  • Lint passes (ruff check .)

Checklist

  • My code follows the project's code style
  • I have added tests for new functionality
  • All existing tests still pass
  • I have updated documentation if needed

Copilot AI balanced review requested due to automatic review settings November 12, 2026 07:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@repowise-bot

repowise-bot Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Worth a look: 1 thing to check below.

  1. This PR introduces 3 new health notes across 1 file: 3× untested complexity (see all)

✅ Health of changed files: 9.2 (unchanged) Average full file score (structure and history) of 3 changed code files, weighted by size before this PR; not the repository score.

👀 Suggested reviewers RaghavChamadiya


View on Repowise
Plain markdown for agents · Reviews (1) · Last reviewed commit: fix(cursor): pin the afterFileEdit capture hook to repowise-augment (#53

Settings and updates

Silence one PR with [skip repowise] in the title · Bot settings
/repowise recheck reviews the current head again
/repowise review deep runs the deep review on it
/repowise remember <text> tells the reviewer what to leave out next time (reply on a finding to scope it to that file)
/repowise help lists the commands
⭐ Star Repowise · 📥 Install on another repo

@RaghavChamadiya
RaghavChamadiya merged commit bdd3a53 into repowise-dev:main Nov 13, 2026
15 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.

[Bug] The Cursor edit-capture hook runs repowise augment from PATH instead of the pinned repowise-augment script

3 participants