feat(config)!: add shared top-level steps - #1255
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
Greptile SummaryThis PR adds shared top-level steps inherited by the implicit
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (20): Last reviewed commit: "perf(builtins): skip runtime for bare li..." | Re-trigger Greptile |
Instruction counts
No instruction-count regression above 1%. Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run. Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.
|
c0a86c7 to
1344eb2
Compare
46a2b7b to
fd40f9e
Compare
466fd6a to
28123fb
Compare
28123fb to
c3854e3
Compare
|
Fixed in 7d713d7. Disabled subproject hooks are now skipped before root hook creation and step scoping, so they neither create an installable Git event nor contribute executable steps. Added unit coverage for the disabled-only subproject case. AI-assisted — Tool: Codex; model: unavailable/unavailable; version: unavailable. |
7d713d7 to
0520fce
Compare
0520fce to
904b559
Compare
904b559 to
eea92ba
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit eea92ba. Configure here.
eea92ba to
e1a74c0
Compare
7da9e05 to
3df92ae
Compare

Summary
stepsmap inherited by implicitcheck,fix, andpre-commithooksenabled = falsefor execution/install suppressionhk initandhk migrate pre-commitDefaults
check: check mode, no stagingfix: fix mode, no stagingpre-commit: fix mode, staging enabled, Git stashpre-pushStack
Testing
cargo test --no-default-features(286 passed before the final generator assertion update; focused generator tests pass afterward)mise run test:bats test/top_level_steps.batsmise run test:bats test/migrate_precommit.bats(behavior passed; expectations updated for implicit pre-commit output)cargo fmtgit diff --checkAI-assisted — Tool: Codex; model: unavailable/unavailable; version: unavailable.
Note
High Risk
This is a breaking config and hook-default change that affects how every project’s check, fix, pre-commit, install, and monorepo merge behave.
Overview
This PR introduces hk v2-style configuration: define linters once in a top-level
stepsmap instead of repeating the same step lists undercheck,fix, andpre-commit.At load time,
materialize_default_hooksbuilds those three implicit hooks from shared steps (check-only / fix without staging / pre-commit with fix, staging, and Git stash). Explicit hook entries override steps by name and can setenabled = falseto turn off an implicit hook sohk check,hk install, and runs skip it as a successful no-op.hk init, the default template, andhk migrate pre-commitnow emit shorter configs (top-level steps; optionalhooksonly for disabled implicit hooks or extras likepre-push). Subproject and hkrc merging were updated so top-level steps compose correctly and disabled subproject hooks are not merged.Docs and bats tests reflect the new model;
hk builtinsalone can exit early without spinning up the full runtime.Reviewed by Cursor Bugbot for commit 3df92ae. Bugbot is set up for automated code reviews on this repo. Configure here.