On this page

0326. Dogfood Tenon scripts for repository tooling and drop Python from the contributor gate

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):

Decision

  1. 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 with tenon fmt --check and covered by deterministic tenon test suites.
    • Remove Python 3.10+ as a prerequisite for building, contributing, packaging .debs, or running make check across tenon, coding-harness-2, coding-harness-evals, and tenon-dev-mcp.
  2. Bootstrap boundary and execution ordering in scripts/check.sh:

    • Scripts that must execute before tenon exists remain minimal POSIX sh / bash (never Python): scripts/install.sh, scripts/install-latest.sh, scripts/ci-macos-toolchain.sh, scripts/check-runtime.sh, scripts/gate.sh, and minimal locate-tenon.sh helpers in companion repos.
    • In tenon/scripts/check.sh, pre-build steps (check-runtime.sh, cargo fmt, cargo clippy) run first; once cargo test --workspace --no-run builds $target_dir/debug/tenon, all Tenon gate lints, site tests, script unit tests, and fmt-check run using $target_dir/debug/tenon in parallel with cargo test --workspace so wall-clock gate time stays flat or improves and the gate exercises the freshly built compiler.
    • Execution mode rule (interp vs cached native run): Short repo-hygiene checks run via tenon interp when cold CI latency matters (~50 ms cold vs ~1.7s cold C compile) or via tenon run / direct #! when warm cache or compute throughput dominates (e.g., site generation, Unicode table generation, .deb compression, parallel runners). Unit tests verify C/interp parity where applicable.
  3. 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 in coding-harness-2/fixtures/) and ML training scripts (tools/maya/).
    • Gate budget: Keep TENON_TEST_BUDGET_SECONDS=120 unchanged and preserve test coverage.
  4. Mechanical proof:

    • The zero-Python contributor gate is verified by prepending a failing python3 / python shim (exit 99) to PATH and running make check, make next, make status, and a .deb dry-run build.

Alternatives considered

Consequences