lint: nothing may cite a repository path that is not here (+ 11 that did) - #22
Conversation
…did) lint-public.sh catches the private repository by NAME. This is the other half of the same failure: a path that is simply not in this repository. Neither rule would have caught the other's cases. WHAT WAS FOUND. `docs/proposals/rows-export.md` was cited SIX times — in include/chtypes.h and in the Go, Python, Rust and TypeScript sources, five of which ship inside the crate, the sdist, the module and the npm tarball (confirmed by unzipping the Go module from proxy.golang.org and building the sdist). The file is not here; it went to the core repository with the rest of the SDK-authoring material. Four more of the same shape: docs/defaults-matrix.md go/chtypes/transform.go, chtypes.go ships docs/type-coverage.md include/chtypes.h, chtypes.go ships docs/fetch.md 4 files + both parity JSONs (38x) moved under guides/ scripts/check-parity-doc.sh both parity JSONs never existed The last one is worth naming: the manifest said that script "asserts the two agree on the object-model table". The check is real and has been running all along — it lives in python/tests/test_parity.py — but anyone looking for it by the name given would have concluded there was no check. Where the surrounding prose already stated the rule, the dead citation is simply dropped rather than pointed somewhere a reader cannot go. docs/fetch.md became docs/guides/fetch.md, which exists and still has the cited §6. Also swept, same family: three `ci/steps/*` paths and one `tests/acceptance` /`tests/arbiter` pair that exist only in the private repository, and four citations of a `certify` workflow renamed to sdk-suites on 2026-09-11 — a stale name for another repository's workflow, now described instead of named. THE GUARD. scripts/lint-paths.sh resolves every cited repository path and fails on the ones that are not there, blocking in the existing `public` job (no new job, so no required-check rename). A path may resolve against the repository root or any of the four binding roots, because this repository is four sibling packages and a doc-comment inside rust/ naming tests/x.rs is correct. Skips are four, each for a reason and not to make the check pass: generated fixtures, .gitignore (patterns), Cargo.toml (crate-relative), and CHANGELOG.md (deliberately names removed things). `--selftest` proves it fires on a dead path AND stays silent on a live one and a crate-relative one — a rule that matches nothing passes silently, which is the failure this exists to prevent. It was also run against the real tree with two of the real dead citations planted back, and caught both. On its first run it caught 38 occurrences of docs/fetch.md that my own regex had missed, having fixed exactly one spelling of it. Unrelated, found by the docs read: docs/guides/batches.md gave the doc-flag constants as DOC_VALUES/DOC_TRANSFORMS/DOC_DEFAULTS, which is correct only for Python and TypeScript. Go spells them DocValues and Rust DocFlags::VALUES (per tests/parity/manifest.json, the machine-readable contract). A Go or Rust reader following that line would not compile. Now given per language. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ckJDLjWhAAttQVrYnQEJD
|
Blocked on a token scope, not on anything in this PR. All twelve required checks are green on the head commit; The signed-in token carries then
Why this is not split into "content now, CI wiring later". It could be — the eleven dead-reference fixes and #23 was rebased onto |
A REQUIRED check has been passing vacuously. The `python` job's lint step was
cd python && uv sync … && uv run ruff check src tests && uv run ruff format --check src tests
uv run python -c 'import chtypes; …'
and `bash -e` does not exit when a command inside an `&&` list fails — only
the command following the final `&&` is subject to it. So `ruff check` failed,
`ruff format` never ran, the list returned non-zero, the next line ran anyway,
and the step's status became that of the LAST command, which passes.
Measured, not reasoned: the job logs for a0a236c, f92e68e, 92c3360 and 2ff98c1
all report `python` = success while containing `E501 Line too long` lines —
eleven of them, then fifteen once ruff 0.16.7 added four F541 findings. The
gate printed its failures into its own log on every run and reported green.
Proved both directions before and after:
bash -e 'true && false && echo unreached\necho last' -> exit 0 (swallowed)
bash -e 'true\nfalse\necho unreached\necho last' -> exit 1 (fails)
The fix is one command per line. Fixing the gate alone would turn the required
check red, so the fifteen findings it should have caught are fixed in the same
commit: four F541 auto-fixed, eleven E501 wrapped by splitting string literals
at word boundaries with the concatenated text unchanged, then `ruff format`.
The python suite still passes, 168 tests.
None of the fifteen were introduced by my earlier commits — checked: the four
files involved were last touched by #15, #19 and the release, and the two
lines citing docs/guides/fetch.md already read that path before #22.
Also audited every other multi-line `run:` block across all five workflows for
the same shape. Two matched the pattern and are safe: release-python.yml's and
release-rust.yml's version-agreement steps put the `&&` inside a `$( )`
substitution, and the following line compares the result and exits 1, so an
empty value still fails.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
scripts/lint-public.shcatches the private repository by name. This is the other half of the same failure: a path that is simply not in this repository. Neither rule would have caught the other's cases.What was found
docs/proposals/rows-export.mdwas cited six times — ininclude/chtypes.hand in the Go, Python, Rust and TypeScript sources. Five of those ship inside published packages, confirmed by unzipping the Go module fromproxy.golang.organd building the sdist:The file went to the core repository with the rest of the SDK-authoring material. Four more of the same shape:
docs/defaults-matrix.mdgo/chtypes/transform.go,chtypes.godocs/type-coverage.mdinclude/chtypes.h,chtypes.godocs/fetch.mdguides/scripts/check-parity-doc.shThe last one is worth naming. The manifest said that script "asserts the two agree on the object-model table." The check is real and has been running all along — it lives in
python/tests/test_parity.py:394. But anyone looking for it by the name given would have concluded there was no check.Where the surrounding prose already states the rule, the dead citation is dropped rather than pointed somewhere a reader cannot go.
docs/fetch.mdbecamedocs/guides/fetch.md, which exists and still has the cited §6.Also swept, same family: three
ci/steps/*paths and atests/acceptance/tests/arbiterpair that exist only in the private repository, and four citations of acertifyworkflow renamed tosdk-suiteson 2026-09-11 — a stale name for another repository's workflow, now described instead of named.The guard
scripts/lint-paths.sh, blocking in the existingpublicjob — no new job, so no required-check rename.A path may resolve against the repository root or any of the four binding roots, because this repository is four sibling packages and a doc-comment inside
rust/namingtests/integration.rsis correct. Four skips, each for a reason rather than to make the check pass: generated fixtures,.gitignore(patterns, not paths),Cargo.toml(crate-relative by definition),CHANGELOG.md(deliberately names removed things).It was proved rather than trusted, three ways:
--selftestfires on a dead path and stays silent on a live one and a crate-relative one.docs/fetch.mdthat my own regex had missed, having fixed exactly one spelling of it. That is the repo's recorded trap — a path built from segments survives a regex that fixes the literal — landing on the person who wrote the sweep, and being caught by the guard in the same commit.It also immediately flagged my own CI comment for quoting the dead path literally, which is why that comment now describes it instead.
Unrelated, found by the docs read
docs/guides/batches.mdgave the document flags asDOC_VALUES/DOC_TRANSFORMS/DOC_DEFAULTS— correct only for Python and TypeScript. Go spells themDocValues, RustDocFlags::VALUES, pertests/parity/manifest.json, the machine-readable contract. A Go or Rust reader following that line would not compile. Now given per language.Verification
gofmtclean ·go build/vet/testpass ·cargo build --lockedpasses ·pnpm typecheckexits 0 ·lint-public,lint-paths,lint-prose,markdownlint,dprint check,lint-actions(actionlint + shellcheck over the new script) all clean. Both parity JSONs are byte-identical before and after, as they must be.🤖 Generated with Claude Code
https://claude.ai/code/session_018ckJDLjWhAAttQVrYnQEJD