Repository navigation
chore(docs): keep internal references out of docs and commit messages (LAB-8003) - #109
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. Summary by CodeRabbit
WalkthroughThe changes add pre-commit hooks that check README and docs text, and commit messages, for configured internal references. The README updates protocol wording and describes the hooks. ChangesReference checks and README updates
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Merge Risk: ⚪ Minimal · up to The documentation and local hook changes are mergeable after normal checks. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
Kody Code Review — 1 suggested fix. 🛠️ Open Agent Prompt |
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
…3s pattern git runs the commit-msg hook on the raw message file. With `git commit -v` (or commit.verbose) that file carries the staged diff below the scissors line, so any ticket id in a changed line rejected the commit. The hook now reads the message as one block and stops at the scissors line. It also skips 'Revert "' subjects, which quote the reverted subject the same way merge subjects quote branch names. Reverting a commit whose subject carries an id, via `revert --no-commit` or a reword, no longer fails. Revert bodies are still checked. The k3s pattern now also catches node and host wording, a hyphen or repeated whitespace before the noun, still without matching bare k3s paths.
|
@kody start-review |
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
…'s own merge and revert subjects
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
1 similar comment
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
… of the cluster pattern
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
What
Adds two local pre-commit hooks that reject common patterns of internal references: ticket ids, secret-store paths, internal hosts and plan labels.
no-internal-referenceschecks the top-level,packages/*andcrates/*READMEs anddocs/.no-internal-references-commit-msgchecks the commit message. It reads only down to git's scissors line, so the diffgit commit -vappends is ignored. It skips git's#comment lines plusMergeandRevert "subjects, which quote branch names and earlier subjects.The patterns are generic on purpose: a list of specific names would itself disclose them.
default_install_hook_typesincludescommit-msg, so a plainprek install(orpre-commit install) sets up both hooks..pre-commit-config.yamlcarrying only this hook.Why
User-facing docs collect worklogs and internal references unless something stops them at commit time. The rule these hooks back is What belongs in these docs.
Verification
Seeded violations, after
prek install, each using a ticket-shaped id (shown here as<id>). Neither commit landed, and the tree was clean afterwards:prek run no-internal-references --all-files: Passed. A default merge commit, whose subject quotes the branch name, passes the commit-message hook.Real commits after
prek install: agit commit -vwhose only id sits in the staged diff passes; a revert, throughgit revert --no-committhengit commit, of a commit whose subject carries an id passes; an id in the subject still fails. A 24-case message matrix covers those plus id-bearing revert bodies, ids above the scissors line, k3s phrasing variants and a 2.3 MB verbose diff.