Repository navigation
Allow assigned-worktree local git merge - #197
Conversation
Remove the blanket peer-branch merge ban and the one-shot GitHub merge ritual from AGENTS.md and dependent guidance. Admit git merge on feature branches while still blocking mergetool, default-branch integration, dirty-WIP merges, and gh pr merge. Adds a two-worktree local-integration regression and a negative WIP-loss case. GitHub remains the remote-merge authority; this does not enable unattended PR merges. Refs RM-145, RM-116, #39, #1 Co-authored-by: Raul Cardenas Montoya <montoyaraul34@gmail.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 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. Comment |
Co-authored-by: Raul Cardenas Montoya <montoyaraul34@gmail.com>
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Complexity | 1 medium |
🟢 Metrics 10 complexity · 8 duplication
Metric Results Complexity 10 Duplication 8
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
RM-145 same-host consume of #198 ( Grok. |
Set core.autocrlf=false in temp test repos so merged blob contents stay LF on Windows runners. Extract shared repo-setup and dispatch helpers in the hook merge tests and a MERGE_BLOCKED assertion helper in git_safe tests to clear the CodeScene duplication / large-assertion findings. Co-Authored-By: Raul Cardenas Montoya <montoyaraul34@gmail.com>
🤖 CodeAnt AI — Review Status
|
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
Tick the box to add this pull request to the merge queue (same as
|
CodeAnt Nitpicks1 code suggestion1. The dirty-tree check and merge are separate processes, so another process can add uncommitted changes after the check and the merge can then overwrite that WIP.Race condition · |
- git pull on a dirty feature branch now hits the same WIP guard as merge - the hook resolves merge/pull against an explicit -C target (chained operands folded) instead of the event cwd, and fails closed on --git-dir/--work-tree/--namespace overrides - merge/pull with neither an event cwd nor a -C target is refused rather than skipping the guards Co-Authored-By: Raul Cardenas Montoya <montoyaraul34@gmail.com>
|
Fixed in |
|
Fixed in |
|
Accurate observation, but out of scope for this tranche: the hook/runtime has no assignment registry to check against — worktree↔job assignment lives in the lease store, which RM-825 owns. |
Extract admit_git_invocation (hook) and record_location_global (bash_argv) to clear the nested-complexity findings on the previous head. Co-Authored-By: Raul Cardenas Montoya <montoyaraul34@gmail.com>
|
Addressed in |
|
Fair caveat — |
|
Acknowledged — the check→merge window is inherent to any pre-command admission. The dirty-tree guard covers the realistic collaborators (peers that commit between admission and merge); a writer racing inside that window surfaces as a merge conflict or a git-ref update failure rather than silent loss, since git refuses to clobber a moved ref without --force (which remains a hard block). |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 15 |
| Duplication | 8 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
…ion-collaboration-65ca Co-Authored-By: Raul Cardenas Montoya <montoyaraul34@gmail.com> # Conflicts: # README.md # crates/writ-core/src/hook.rs # docs/workflows/safe-issue-verified-commit.md
There was a problem hiding this comment.
Gates Passed
6 Quality Gates Passed
See analysis details in CodeScene
Quality Gate Profile: Pay Down Tech Debt
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
…gistry Integrate #197/#199 (local feature-branch merge admission and harness-owned checkouts) while preserving `writ ci classify` and the `gh run` allowlist. No remote merge, no settings change, no empty retrigger commit. Agent: Cursor Grok 4.6 Co-authored-by: Raul Cardenas Montoya <montoyaraul34@gmail.com>
… admission Integrate live origin/main (88ac231: status/watchlist, attribution, hang recovery) while preserving `writ ci classify` and the `gh run` allowlist. Keep assigned-worktree local merge admission from #197. No remote merge, no settings change, no empty retrigger commit. Agent: Cursor Grok 4.6 # Conflicts: # README.md # crates/writ/src/main.rs # docs/status-schema.md Co-authored-by: Raul Cardenas Montoya <montoyaraul34@gmail.com>
User description
Simplification tranche for RM-145 / RM-116. GitHub twins: #1, #39.
Head:
e12c2cc3934076766323bda9b1c2071f76db8580oncursor/local-integration-collaboration-65ca.Summary
Enable routine local integration and conflict recovery in an assigned feature-branch worktree. Remove the blanket peer-branch merge ban and the bespoke one-shot / never-merge ritual. Do not add a replacement merge-permission engine.
git mergeon an assigned feature branch is allowlisted (--abort/--continue/--quitremain recovery).git mergetool, merge/pull onmain/master, dirty-WIP merge,gh pr merge, auto-merge, merge queue.AGENTS.md,SKILL.md,REVIEW.md,CLAUDE.md, README, workflows, ADR, hook-boundary) now describes collaboration-first local integration. GitHub owns remote PR merges.Tests
two_worktree_local_merge_integrates_peer_branch)merge_refuses_to_lose_uncommitted_wipand hook cwd equivalent)MERGE_BLOCKEDNative gates on this head:
cargo fmt --all -- --check,cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspace— all passed.Operator gap (reported, not changed)
Live reads found
main.protected=falseand no rulesets onrmems/writ. GitHub is still the intended remote-merge authority. This PR does not change repository settings, enable unattended remote merging, or merge a pull request.Coordination
git_safe; their independent work continues.Linear Issue: RM-145
Summary by cubic
Allows
git mergein assigned feature-branch worktrees so workers can integrate peer work locally and recover from conflicts; GitHub remains the only place a PR merge can happen. Removes the blanket peer-branch merge ban and the one-shot PR merge protocol. Covers RM-145's local-integration and conflict-recovery goals.Behavior
git mergetool, merge or pull onmain/master, dirty-WIP merges,gh pr merge, auto-merge, and merge queues;git pullnow hits the same WIP guard asgit merge.-Ctarget, folding chained operands, and fails closed for unknown repos, missing event cwd, or--git-dir/--work-tree/--namespaceoverrides.--abort,--continue, and--quitstay allowed for conflict recovery.writgains no merge-permission engine and no unattended PR merge path; docs, workflows, the ADR, and hook-boundary docs were updated to match.Tests and notes
main.protected=falsewith no rulesets; the PR reports this gap without changing repository settings.Written for commit 4373182. Summary will update on new commits.
CodeAnt-AI Description
Allow safe local integration of peer branches in assigned feature worktrees
What Changed
mainormaster, merges with uncommitted work, interactive merge tools, and GitHub pull-request merges remain blockedImpact
✅ Faster peer-branch integration✅ Uncommitted WIP protected from merge loss✅ GitHub PR merges remain blocked💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.