0326. Dogfood Tenon scripts for repository tooling and drop Python from the contributor gate
- Status: Accepted (2026-11-29)
- Date: 2026-11-29
- Plan: Wave 2 consolidation (complements 0291, 0314, 0319)
Context
Prior to this change, contributing to tenon,
running make check (scripts/check.sh),
checking make next / make status,
packaging .deb installers
(scripts/dist/build-deb.py), generating TUI Unicode
tables (scripts/generate-tui-unicode.py), building
the documentation site (docs/site/build.py), and
running companion-repo tooling in coding-harness-2
and coding-harness-evals all required Python
3.10+.
With canonical UTF-8 source (ADR-0314),
single-file manifestless #! scripts with offline
edition = "2026" plugin dependencies (ADR-0319),
and the 105-plugin catalog (std_formats,
std_regex, std_glob,
std_proc, json, http,
mcp_server, sha256, zlib,
tui_headless, tui_replay), Tenon itself
is capable of expressing every non-bootstrap repository tool
cleanly and deterministically.
Wave 0 canary measurements on a representative #!
script (std_formats + std_regex +
std_proc, target/debug/tenon):
tenon check: ~0.04stenon interp(cold or warm): ~0.05s (no C compilation)tenon run(cold C compile + exec): ~1.69stenon run/ direct#!(warm cached native binary): ~0.01s- FFI plugins (
zlib,sha256) work identically under bothtenon interpandtenon run, andzlib.compress(data, 9)strips cleanly to byte-identical raw deflate streams matching Python'sgzip.compress(..., compresslevel=9).
Decision
Port non-bootstrap contributor, CI, packaging, site, fixture, and workflow tooling to canonical UTF-8 Tenon (
.tn):- Author all migrated scripts in canonical terse UTF-8 Tenon
(
#!/usr/bin/env tenon,//! edition = "2026", explicit//! capabilities, explicit//! deps), formatted withtenon fmt --checkand covered by deterministictenon testsuites. - Remove Python 3.10+ as a prerequisite for building,
contributing, packaging
.debs, or runningmake checkacrosstenon,coding-harness-2,coding-harness-evals, andtenon-dev-mcp.
- Author all migrated scripts in canonical terse UTF-8 Tenon
(
Bootstrap boundary and execution ordering in
scripts/check.sh:- Scripts that must execute before
tenonexists remain minimal POSIXsh/bash(never Python):scripts/install.sh,scripts/install-latest.sh,scripts/ci-macos-toolchain.sh,scripts/check-runtime.sh,scripts/gate.sh, and minimallocate-tenon.shhelpers in companion repos. - In
tenon/scripts/check.sh, pre-build steps (check-runtime.sh,cargo fmt,cargo clippy) run first; oncecargo test --workspace --no-runbuilds$target_dir/debug/tenon, all Tenon gate lints, site tests, script unit tests, andfmt-checkrun using$target_dir/debug/tenonin parallel withcargo test --workspaceso wall-clock gate time stays flat or improves and the gate exercises the freshly built compiler. - Execution mode rule (
interpvs cached nativerun): Short repo-hygiene checks run viatenon interpwhen cold CI latency matters (~50 ms cold vs ~1.7s cold C compile) or viatenon run/ direct#!when warm cache or compute throughput dominates (e.g., site generation, Unicode table generation,.debcompression, parallel runners). Unit tests verify C/interp parity where applicable.
- Scripts that must execute before
Explicit non-goals (preserved as-is):
- Rust core freeze (ADR-0291):
Do not add Rust CLI subcommands or rewrite
crates/tenon*primitives (doctor,new,setup,prime,upgrade, compiler/driver). - Benchmark baselines & ML training: Retain
Python for benchmark reference baselines/oracles
(
bench/baselines/,bench/cli/python/,bench/transfer/*/reference.py, Python task fixtures incoding-harness-2/fixtures/) and ML training scripts (tools/maya/). - Gate budget: Keep
TENON_TEST_BUDGET_SECONDS=120unchanged and preserve test coverage.
- Rust core freeze (ADR-0291):
Do not add Rust CLI subcommands or rewrite
Mechanical proof:
- The zero-Python contributor gate is verified by prepending a
failing
python3/pythonshim (exit 99) toPATHand runningmake check,make next,make status, and a.debdry-run build.
- The zero-Python contributor gate is verified by prepending a
failing
Alternatives considered
- Keep Python 3.10+ for repo scripts and CI
lints: Low effort, but forces every contributor and CI
image to maintain a second runtime and misses the highest-leverage
dogfooding feedback loop for Tenon's
#!scripts and bundled plugins. - Move repo lints into
crates/tenonRust subcommands: Violates ADR-0291 and bloats the compiler binary with repo-specific checks. - Rewrite everything in POSIX
sh/awk: Brittle for Markdown, JSON, TOML, binary ELF/ar/USTAR/gzip, and HTTP/MCP protocol fixtures, and hard to unit-test.
Consequences
- Contributors only need Rust + a C compiler (no Python) to
build, test, lint, package
.debs, and runmake check. - Dogfooding Tenon across ~30 real CLI/protocol/packaging/lint
scripts continuously exercises
#!scripts,std_formats,std_regex,std_glob,zlib,sha256,http,mcp_server, andtenon testin every commit gate. tenon/README.md,tenon/docs/install.md, andtenon/AGENTS.mdnarrow Python to an optional dependency forbench/baselines andtools/maya/ML training only.