Skip to content

feat(watch): WSL watch policy and git hook auto-sync#127

Merged
SutuSebastian merged 2 commits into
mainfrom
feat/wsl-watch-git-hooks
May 25, 2026
Merged

feat(watch): WSL watch policy and git hook auto-sync#127
SutuSebastian merged 2 commits into
mainfrom
feat/wsl-watch-git-hooks

Conversation

@SutuSebastian
Copy link
Copy Markdown
Contributor

Summary

  • Disable the file watcher on WSL2 /mnt/* mounts by default (unless CODEMAP_FORCE_WATCH=1), with stderr guidance toward git-hook fallback
  • Add codemap agents init --git-hooks / --no-git-hooks to install marker-based post-commit, post-merge, and post-checkout hooks that run a non-blocking background incremental index
  • Wire watch policy into codemap watch, codemap serve, and MCP server startup

Implements P0 items from docs/plans/wsl-watch-policy.md and docs/plans/git-hook-auto-sync.md (stacked PR 2 after MCP surface work).

Test plan

  • bun test src/application/watch-policy.test.ts
  • bun test src/application/git-hooks.test.ts
  • lint-staged (format, lint, typecheck) on commit
  • Manual: on WSL with repo under /mnt/c/..., confirm watcher disabled + stderr message
  • Manual: codemap agents init --git-hooks installs hooks; commit triggers background index

Disable the file watcher on WSL2 /mnt/* mounts unless CODEMAP_FORCE_WATCH=1,
with stderr pointing at git-hook fallback. Add codemap agents init --git-hooks
for non-blocking background incremental index on post-commit/merge/checkout.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 25, 2026

🦋 Changeset detected

Latest commit: 9636eac

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@stainless-code/codemap Patch

Not sure what this means? Click here to learn what changesets are.

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

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 25, 2026

Warning

Review limit reached

@SutuSebastian, we couldn't start this review because you've used your available PR reviews for now.

Your plan includes 1 review of capacity. Refill in 37 minutes and 21 seconds.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more review capacity refills, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 625f8cdf-12f1-4eda-9062-40fc342cd2d1

📥 Commits

Reviewing files that changed from the base of the PR and between ed4ca6b and 9636eac.

📒 Files selected for processing (15)
  • .changeset/wsl-watch-git-hooks.md
  • README.md
  • docs/agents.md
  • docs/architecture.md
  • src/agents-init-interactive.ts
  • src/agents-init.ts
  • src/application/git-hooks.test.ts
  • src/application/git-hooks.ts
  • src/application/watch-policy.test.ts
  • src/application/watch-policy.ts
  • src/cli/cmd-agents.ts
  • src/cli/cmd-mcp.ts
  • src/cli/cmd-serve.ts
  • src/cli/cmd-watch.ts
  • src/cli/main.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/wsl-watch-git-hooks

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Combine WSL watch / git-hooks docs with CODEMAP_MCP_TOOLS allowlist.
@SutuSebastian SutuSebastian merged commit 4318cc4 into main May 25, 2026
12 checks passed
@SutuSebastian SutuSebastian deleted the feat/wsl-watch-git-hooks branch May 25, 2026 08:38
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