Install the agents template on curl and warn when missing - #46
Conversation
Curl installs previously left TREES_AGENTS_TEMPLATE pointing at a nonexistent file, so init silently skipped seeding AGENTS.md. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning Review limit reached
Next review available in: 53 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe change makes missing agents templates explicit no-op warnings, verifies exact template seeding across CLI paths, adds install-time template coverage, and updates curl installation and configuration documentation to describe the default template location. ChangesAgents template flow
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Around line 125-129: Update the README installation commands for git-trees and
AGENTS.md to use curl -fsSL, guard existing paths with both -e and -L, and
download into temporary files before moving them into place only after a
successful transfer. Preserve occupied paths, including broken symlinks, and
avoid writing outside the intended home-directory destinations.
In `@tests/smoke.sh`:
- Around line 472-475: Update the second install invocation in the smoke test to
capture its exit status and assert that it is zero before validating the
existing AGENTS.md content remains CUSTOM. Keep the preservation assertion and
exact install command contract unchanged.
- Around line 198-206: Update the missing-template smoke tests around the init
and root --agents cases to capture stdout and stderr separately, record each
command’s exit status immediately, and assert the expected success status.
Verify init’s success message on stdout, its missing-template warning on stderr,
and no AGENTS.md output; for root --agents, ensure stdout remains path-only and
warnings are confined to stderr.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: c58fe465-efb1-4cbb-a5c6-ddd1824b24b1
📒 Files selected for processing (4)
AGENTS.mdREADME.mdgit-treestests/smoke.sh
Fail-closed curl install (fsSL + temp then mv, occupied-path guards), and assert exit status with stdout/stderr captured separately in the new tests. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
AGENTS.md.templateinto~/.config/git-trees/AGENTS.md(non-clobbering), soinitcan seed the container._seed_agentswarns on stderr when the template file is missing instead of silently skipping.install.sh, missing-template warnings, and init seed content.Closes #45.
Test plan
tests/smoke.shshellcheck -s bash git-trees install.sh tests/smoke.sh~/.config/git-trees/AGENTS.mdappearsgit trees init …writes containerAGENTS.mdafter that installMade with Cursor
Summary by CodeRabbit
New Features
Bug Fixes
Documentation