tensorflow/tensorflow

1,185 textproto API goldens. Two discipline layers stacked. Zero existing tools that see the cross-language conventions. tensorflow demand-validates the v0.11+ `cross_language_implementation_complete` flagship at TWO topologies in one repo.

Narrative
Polyglot wins
Rules
83
Last revalidated
Engineering reference
README on GitHub · .alint.yml

Why this matters

tensorflow/tensorflow is the canonical multi-language ML monorepo on GitHub (~190k stars). Every modern deep-learning library — TFX, TensorFlow.js, TensorFlow Lite, TF Hub, JAX-via-XLA — is substrated on this tree. It is the canonical “core + per-language bindings” topology: one Python frontend over a C++/CUDA runtime plus 5 per-language bindings (C, C++ via cc/, Java legacy, Go, JS codegen scaffolding) that mirror parts of the core API, PLUS a separate TFLite per-device frontend that itself has 4 per-language bindings (Python, Java, Swift, ObjC) sharing the same core C runtime.

No per-language linter sees the cross-language API parity surface. pylint only sees Python. buildifier only sees Bazel. clang-format only sees C++. The invariants this case study enforces — TFLite Swift Sources/<X>.swiftTests/<X>Tests.swift parity, Python TFLite <x>.py<x>_test.py parity, ObjC API headers ↔ tests parity, the 1,185 textproto goldens existing AND having the canonical marker, the 5 per-Python-version requirements locks all present and non-empty — are exactly the layer alint owns and nothing else does.

Headline catch

tensorflow has TWO discipline layers stacked: file-shape parity (every source has a paired test, by language convention) AND API-shape parity (every public Python symbol has v1+v2 textproto goldens; every binding mirrors the core API). alint covers Layer 1 cleanly today via pair/for_each_* primitives. Layer 2 — the cross-language API mirroring — is exactly the v0.11+ cross_language_implementation_complete rule kind, and tensorflow is the cleanest single-repo demonstration of the pattern.

The pitch lands harder when paired with the TFLite Swift finding. A pure file-shape parity pass, expressible today, surfaces:

No Swift tool catches the parity drift because no Swift tool sees the parity convention from above.

Where alint earns its keep here

Future story angles

The factual engineering writeup (tooling inventory, mapping table, gap catalogue, validation status footer) lives in the public alint repo at github.com/asamarts/alint/tree/main/examples/tensorflow-tensorflow/README.md.