Skip to content

fix(acp): bound git attribution branch lookup - #107

Merged
KonghaYao merged 1 commit into
mainfrom
codex/fix-windows-acp-git-attribution-hang
Aug 28, 2026
Merged

fix(acp): bound git attribution branch lookup#107
KonghaYao merged 1 commit into
mainfrom
codex/fix-windows-acp-git-attribution-hang

Conversation

@KonghaYao

@KonghaYao KonghaYao commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Bug Fixes

    • Prevented prompts from silently hanging when Git branch detection is slow or unresponsive.
    • Added a one-second limit for branch detection, allowing the agent to continue if it times out.
    • Ensured stalled branch-detection processes are terminated safely.
  • Documentation

    • Updated middleware documentation with the revised attribution and branch-detection behavior.
    • Added a Windows-specific issue record and verification details.

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3083470c-b990-4d0e-87b2-f42f49e4619c

📥 Commits

Reviewing files that changed from the base of the PR and between dea290e and cdc6ded.

📒 Files selected for processing (4)
  • docs/code-index/peri-middlewares.md
  • peri-middlewares/src/attribution/mod.rs
  • peri-middlewares/src/attribution/mod_test.rs
  • spec/issues/2026-08-29-windows-acp-prompt-silently-hangs.md

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change adds a one-second asynchronous timeout to Git branch detection. It configures subprocess cleanup on timeout, adds cross-platform lifecycle tests, and updates the middleware index and issue specification.

Changes

Git branch timeout

Layer / File(s) Summary
Bounded branch probe
peri-middlewares/src/attribution/mod.rs
The Git branch probe uses null stdin, piped output and error streams, kill_on_drop(true), and a one-second timeout.
Branch probe regression coverage
peri-middlewares/src/attribution/mod_test.rs, docs/code-index/peri-middlewares.md, spec/issues/2026-08-29-windows-acp-prompt-silently-hangs.md
Tests verify trimmed output and termination of a timed-out subprocess. The code index and issue specification describe the updated behavior.

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

Merge Risk: ⚪ Minimal · up to cdc6d

The PR bounds Git branch detection so a hanging lookup no longer blocks attribution indefinitely, while preserving the existing fallback behavior. No actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 2 files. (2 skipped: … 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 and concisely describes the main change: adding a time bound to the Git attribution branch lookup to prevent hangs.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 2 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-windows-acp-git-attribution-hang

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.

@KonghaYao
KonghaYao merged commit 3218c38 into main Aug 28, 2026
4 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