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>.swift ↔ Tests/<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_completerule 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:
- **5 of 11 TFLite Swift Sources/.swift files have no matching
Tests/Tests.swift (
CoreMLDelegate,Delegate,InterpreterError,SignatureRunnerError,SignatureRunner) - 4 ObjC API headers have no matching tests/ partners
- The deeper Python ↔ Java ↔ Swift ↔ ObjC ↔ Go ↔ JS API symbol parity is enforced today by tribal knowledge + code review, not static check
No Swift tool catches the parity drift because no Swift tool sees the parity convention from above.
Where alint earns its keep here
- The TWO discipline layers stacked are the v0.11+ flagship
demonstration. apache/arrow gives the all-peers topology; TF
gives the core+bindings topology. The v0.11+
cross_language_implementation_completeprimitive needs to handle BOTH topologies, and TF surfaces both in one repo (per-source ↔ per-test within one language; core ↔ N bindings across languages). Saturated demand: arrow + tensorflow + protobuf + angular + flutter — 5 confirmed sources, the v0.11+ flagship ship-target, with TF’s 1,185 textproto API goldens as the canonical Python-side example. - TFLite per-language file-shape parity is expressible TODAY.
3 declarative rules (
tensorflow-lite-swift-source-has-test,tensorflow-lite-objc-api-has-test,tensorflow-lite-python-source-has-test) catch what no Swift / ObjC / Python tool sees alone — the cross-language convention that every binding follows the same discipline. requirements_lock_3_*.txtmatrix is the 8th confirmation forcross_file_value_equals. Past saturation; v0.10 must-ship.opensource_only.filesis the 6th confirmation forregistry_paths_resolve. Past saturation; v0.10 ship-target.- API goldens regen-and-diff is the 5th confirmation for
generated_file_fresh. Past saturation; v0.10 ship-target. - Apache 2.0 + GHA hardening + OSS-baseline bundles apply cleanly. Only one custom rule extends the Apache header check to BUILD/.bzl files, which the bundled rule’s default file- extension list doesn’t cover.
Future story angles
- Second polyglot tile on alint.org/examples (after apache/arrow). Same framing as arrow — for cross-language monorepos, no per-language linter sees the cross-language conventions; alint is the layer that does — but at the core+bindings topology, generalising to every multi-binding spec (TFLite, TFX, TF Hub, JAX/XLA bindings, gRPC, envoy, protobuf-codegen, angular goldens, flutter embedders).
- v0.11+ flagship launch narrative — pair TF’s 1,185 textproto
goldens with arrow’s per-language schema parity, protobuf’s 10
in-tree language bindings, angular’s 50 API goldens, and
flutter’s 6 native-OS embedders for a “5 saturated sources”
launch-post on
cross_language_implementation_complete. TF is the cleanest demonstration because it shows BOTH topologies in one tree. bazel-monorepo@v1bundled ruleset draft — TF’s BUILD-file presence +*.bzlApache-header +MODULE.bazel/WORKSPACE/BUILDtriad checks recur in any Bazel monorepo (TF + grpc + envoy + many internal Google + Pinterest + Lyft repos). Packaging these as a bundled ruleset would let alint claim the “Bazel-tier polyglot monorepo” niche; TF is the canonical example to author it against.alint suggestdetector breadth narrative — current suggester surfaced onlyoss-baseline+agent-hygiene(medium) against the live TF tree; the bundled-ruleset detector doesn’t yet recognise the Bazel monorepo shape. v0.10+ suggester-improvement candidate alongside the bundled ruleset.