From e7e9a2494dd7c78f15460a6de53fc88a4fb9c36d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20LIARD?= Date: Sun, 26 Apr 2026 19:31:43 +0200 Subject: [PATCH] fix(ci): docs-lint regex matches IP addresses; dedupe Iterate heading MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two unrelated false positives that block release-plz PRs (which touch **.md and trigger the docs-lint workflow): 1. The `no-hardcoded-version` regex `v?0\.[0-9]+\.[0-9]+` was too greedy: the `?` on `v` plus the `0\.` anchor matched the first three octets of legitimate IP addresses like `0.0.0.0` and `127.0.0.1` in network-deployment docs (oauth-setup.md, troubleshooting.md, deploy.md, security.md). Tightened to `\bv[0-9]+\.[0-9]+\.[0-9]+\b` — the literal `v` prefix is mandatory, word boundaries prevent partial matches. The exclusion list also picked up four ADRs (0012, 0015, 0016) and reference/benchmarks.md that legitimately quote historical version numbers when explaining when a feature landed. 2. `docs/how-to/auto-tune-routing.md` had two empty `## Iterate` headings in a row (MD024 no-duplicate-heading). Removed the duplicate that had no content underneath. Both were pre-existing on main — they only surfaced now because the release-plz auto-PR (#291) edits CHANGELOG.md, which the workflow's `paths: ["**.md"]` trigger picks up, running the full doc-lint suite on every release cut. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/docs-lint.yml | 9 ++++++--- docs/how-to/auto-tune-routing.md | 2 -- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docs-lint.yml b/.github/workflows/docs-lint.yml index 6177e0b..2a1638a 100644 --- a/.github/workflows/docs-lint.yml +++ b/.github/workflows/docs-lint.yml @@ -68,11 +68,14 @@ jobs: set -euo pipefail # Allow specific historical references (CHANGELOG, ADRs that # legitimately quote a version, dci-report archive). Reject - # anything else under docs/ that matches the v0.X.Y pattern. - if grep -REn 'v?0\.[0-9]+\.[0-9]+' docs/ \ + # anything else under docs/ that matches the vX.Y.Z pattern. + # The literal `v` prefix is required so IP addresses like + # `0.0.0.0` and `127.0.0.1` (legitimate in network docs) are + # not flagged as version drift. + if grep -REn '\bv[0-9]+\.[0-9]+\.[0-9]+\b' docs/ \ --include='*.md' \ --exclude-dir=archive \ - | grep -vE '(CHANGELOG|examples/|reference/dci-report|decisions/0007|decisions/0011|decisions/0014|decisions/0017|decisions/0018|decisions/0006|decisions/0010|decisions/0009)'; then + | grep -vE '(CHANGELOG|examples/|reference/dci-report|reference/benchmarks|decisions/0007|decisions/0011|decisions/0014|decisions/0017|decisions/0018|decisions/0006|decisions/0010|decisions/0009|decisions/0012|decisions/0015|decisions/0016)'; then echo echo "::error::Hardcoded version string detected in docs/." echo "Single source of truth is Cargo.toml. Reference Cargo.toml or the CHANGELOG instead." diff --git a/docs/how-to/auto-tune-routing.md b/docs/how-to/auto-tune-routing.md index 4057949..639bb2b 100644 --- a/docs/how-to/auto-tune-routing.md +++ b/docs/how-to/auto-tune-routing.md @@ -164,8 +164,6 @@ tool). The hint is consumed for one request only. ## Iterate -## Iterate - 1. Collect traces for a representative period (a few hours to a day). 2. Run the `jq` analysis to find misrouted or slow requests. 3. Adjust one parameter at a time via `grob_configure`.