feat: Rust layer — AGENTS.md.rust + rustfmt/clippy/renovate + renri hook + ci.yml.template - #2
Conversation
… + ci.yml.template
Build out the Rust language layer so pj-rust composes cleanly with
the new pj-base layer. Five new templates plus one rename:
- ci.yml -> ci.yml.template (rename). The `.template` suffix
keeps GitHub Actions from auto-running this repo's source as a
workflow (it has no Cargo.toml, so every job would fail).
template.toml carries an explicit
`dst = ".github/workflows/ci.yml"` so consuming PJs still
receive the workflow at the canonical path.
- AGENTS.md.rust (merge-section, marker `kata:agents:rust:*`).
Rust-specific guidance: cargo make targets, toolchain pin,
fmt/clippy policy, and the kata-managed bytes warning for
rustfmt.toml / clippy.toml / ci.yml.
- rustfmt.toml (overwrite always). Single setting today —
`edition = "2024"` — but centralised so the policy is uniform.
- clippy.toml (overwrite always). Pins `msrv = "1.85"` to match
the Rust crate side; bumped together with `package.rust-version`.
- renovate.json (overwrite always). Two halves wrapped in one
file so the same json works in both directions:
- `customManagers` (regex) picks up `uses: …@…` references
inside `.github/workflows/*.template` so this repo's own
Renovate keeps the source action versions current.
- `packageRules` opts every consuming PJ out of touching
`.github/workflows/{ci,release}.yml` directly — bumps happen
centrally here and propagate via `kata apply`.
- renri.toml.rust -> renri.toml (overwrite always). Replaces
pj-base's apm-install-only hook with `cargo make on-add`, the
yukimemi/* Rust convention chain (apm-install + vcs-fetch).
Bumped template version to 0.2.0.
Smoke-tested locally: composing pj-base + this branch via
`kata init` lands all 13 files cleanly (apart from a known
non-issue: `renri.toml` reports `wrote` on every apply because
both layers target it with `overwrite always` — final bytes are
idempotent under pj-rust's `cargo make on-add`).
Co-Authored-By: Claude <noreply@anthropic.com>
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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 the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
✨ Finishing Touches🧪 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.
Code Review
This pull request updates the pj-rust template to version 0.2.0, introducing centralized configuration for clippy, rustfmt, and renovate, and adding AGENTS.md.rust for Rust-specific workflow guidance. The template.toml is updated to manage these new files, including a transition to a .template suffix for the CI workflow, and includes a new post_create hook in renri.toml. Feedback indicates that the on-add task referenced in the hook is missing from the Makefile.toml, and the documentation for cargo make check should be updated to include the lock-check task for better clarity.
|
|
||
| [[hooks.post_create]] | ||
| type = "command" | ||
| run = "cargo make on-add" |
There was a problem hiding this comment.
The post_create hook is configured to run cargo make on-add, but the on-add task is not defined in the Makefile.toml provided in this template. Based on the PR description, this task is intended to be a chain of apm-install and vcs-fetch. You should add the missing task definition to Makefile.toml to ensure the hook functions correctly.
| ### Build / lint / test | ||
|
|
||
| ```sh | ||
| cargo make check # fmt --check + clippy + test (the pre-push gate) |
There was a problem hiding this comment.
- Makefile.toml — add `[tasks.on-add]` and `[tasks.vcs-fetch]`. The renri.toml.rust hook calls `cargo make on-add`, but the `on-add` task wasn't actually defined in pj-rust's Makefile.toml (rvpm had it, kata had it, pj-rust didn't). Without these, every fresh worktree's post_create hook would fail with "no such task". The definitions mirror rvpm's: `on-add` chains `apm-install-update` + `vcs-fetch`, and `vcs-fetch` prefers `jj git fetch` (works in both pure-jj and colocated repos) and falls back to `git fetch` in pure-git worktrees. `ignore_errors = true` keeps a transient network failure from breaking `renri add`. - AGENTS.md.rust — add `lock-check` to the `cargo make check` one-line summary so it matches the actual `[tasks.check]` dependency list. Co-Authored-By: Claude <noreply@anthropic.com>
|
@gemini-code-assist both points addressed in
|
|
Thanks for the update, @yukimemi. The addition of the |
Summary
Build out the Rust language layer so pj-rust composes cleanly with the new pj-base layer. Five new templates plus one rename.
What's in this PR
Bumped template version to `0.2.0`.
Test plan
Follow-ups (this branch is the second of four)
🤖 Generated with Claude Code