Skip to content
23 changes: 23 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Pre-commit hooks. Install once per clone: prek install (Python pre-commit works too).
default_install_hook_types: [pre-commit, commit-msg]

repos:
# Keeps internal references (ticket ids, secret-store paths, internal hosts and process
# names) out of user-facing docs and commit messages. The patterns are generic on purpose:
# a list of specific internal names would itself disclose them.
# Scope rule: https://docs.cachekit.io/contributing/#what-belongs-in-these-docs
- repo: local
hooks:
- id: no-internal-references
name: No internal references in docs
language: pygrep
entry: 'LAB-[0-9]+|op://|\.ts\.net|(?i:k3s cluster)|dev\.cachekit\.io|\bStage [0-9]|\bAC-[0-9]|github\.com/cachekit(?![\w-])'
Comment thread
kodus-27b[bot] marked this conversation as resolved.
Outdated
files: ^((packages|crates)/[^/]+/)?README[^/]*$|^docs/
types: [text]
stages: [pre-commit]
Comment thread
27Bslash6 marked this conversation as resolved.
- id: no-internal-references-commit-msg
name: No internal references in commit message
language: pygrep
# Same patterns, skipping git's "#" comment lines and "Merge" subjects, which quote branch names.
entry: '^(?!#|Merge ).*?(?:LAB-[0-9]+|op://|\.ts\.net|(?i:k3s cluster)|dev\.cachekit\.io|\bStage [0-9]|\bAC-[0-9]|github\.com/cachekit(?![\w-]))'
stages: [commit-msg]
Comment thread
kodus-27b[bot] marked this conversation as resolved.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ ByteStorage envelope vectors from
both sets must decode to the exact payload bytes, while re-encode
byte-identity is asserted against the set matching this crate's current
writer encoding — msgpack `bin`, since the protocol 1.1 `serde_bytes`
writer flip (LAB-866; `checksum` deliberately stays array-of-ints per the
writer flip (`checksum` deliberately stays array-of-ints per the
protocol's normative scope exclusion). Legacy envelopes remain readable
forever.
`tests/dual_decode.rs` proves both reader shapes accept both encodings,
Expand Down Expand Up @@ -416,6 +416,13 @@ This crate requires **Rust 1.85** or later (Edition 2024).

---

## Contributing

User-facing docs in this repository follow CacheKit's shared rule on what belongs in them:
[What belongs in these docs](https://docs.cachekit.io/contributing/#what-belongs-in-these-docs).
`prek install` (or `pre-commit install`) sets up hooks that reject internal references in README
files, `docs/` and commit messages.

## License

MIT License — see [LICENSE](LICENSE) for details.
Expand Down
Loading