Why this case study matters
cpython is the canonical Python+C hybrid mega-repo. Unlike
rust-lang/rust (which packages structural validation as one Rust
binary, tidy), or kubernetes (which uses ~50 hack/verify-*.sh
scripts), cpython’s structural validation is scattered across 12
distinct surfaces: a 122-target Makefile.pre.in, a 35-hook
.pre-commit-config.yaml, 7 Tools/build/*.py check scripts,
Tools/c-analyzer/check-c-globals.py, Tools/check-c-api-docs/main.py,
Tools/patchcheck/patchcheck.py, a 4747-byte .gitattributes (with
~50 generated-file markers), .editorconfig, Misc/stable_abi.toml,
the per-tree .ruff.toml files, the .azure-pipelines/prebuild-checks.yml
embedded shell, and 25 GitHub Actions workflows.
A new contributor staring at this surface today has to read 122
Make targets, 35 pre-commit hooks, 7+ Tools/build/* scripts, the
Azure Pipelines YAML, the .gitattributes file, two LOCAL pre-commit
shell hooks, and 9 separate .ruff.toml configs to understand what
rules apply where.
Headline catch
The most alint-shaped surface in cpython is
Misc/NEWS.d/next/<Section>/. 12 category subdirectories
holding ~10-200 entries each (108 in Library/ at clone time).
Every entry MUST be named:
YYYY-MM-DD-HH-MM-SS.gh-issue-NUMBER.NONCE.rstThe full filename grammar is generated exclusively by the blurb
tool. cpython’s existing structural validation encodes only the
WEAKER “no spaces in path” invariant on TWO specific subdirs (via
two LOCAL pre-commit hooks). The full grammar applies to ALL
subdirs and is enforced nowhere statically today — blurb
generates it correctly, but a hand-edited filename slips silently
through until Sphinx parsing fails at release-build time.
The alint rule (cpython-news-entry-filename) is 6 lines of
YAML and covers ALL 12 subdirs. This is the canonical
“convention-without-checks” data point: a discipline the entire
release pipeline depends on, enforced only by tool-write-time grace.
Where alint earns its keep here
cpython sits at the intersection of all three positioning narratives, which is what makes it uniquely valuable:
- “Replaces hand-rolled validation scripts” — scattered validation across smelly, stable_abi, check-c-globals, patchcheck, ensure-no-files-changed, and friends. Where the check is structural-orchestration (not AST-aware, not codegen, not binary symbol-table), alint consolidates it.
- “Catches conventions your pipeline assumes but doesn’t verify”
— NEWS.d filename grammar enforced nowhere statically; the
discipline rests entirely on
blurbalways generating the right shape. - “Adds a structural floor on top of mature tooling” — cpython has 9 ruff configs + black + actionlint + zizmor + sphinx-lint + check-jsonschema. alint sits BENEATH them as orchestrator, consolidating the orchestration layer so contributors can read the structural contract in one file.
The pitch lands as: “we sit beneath your existing linters as the structural-orchestration layer, we collapse the hand-rolled scripts you’ve outgrown, and we surface the conventions your tooling assumes but never checks.”
Future story angles
- Triple-narrative launch tile — cpython is the canonical example of all three positioning narratives at once. Strongest candidate for a single-tile launch post that covers the full pitch surface.
- v0.10 ship-target reinforcement post — cpython contributes
to four out of four v0.10 candidates:
registry_paths_resolve(.gitattributes generated markers + check-c-api-docs symbol ↔ docs),generated_file_fresh(cases_generator),ordered_block(Modules/Setup sortedness),balanced_delimiters+file_pair_block_match(Argument Clinic block markers + body ↔ generated header). Reinforces the inventory’s saturation argument. - NEW
column_alignmentcandidate — surfaced uniquely by cpython’s CODEOWNERS column-31 alignment. Niche but generalises to indent-aligned tables in TOML, requirements.txt comments. - Inventory-legibility launch post — pair cpython (12 surfaces) with kubernetes (50 hack/verify-*.sh) and apache/airflow (109-hook pre-commit) for the “one-file-readable contract” pitch.