Skip to content

tri pr preflight: land the parked glue net-zero, paid by dead-code deletions (the command does not run today) #11126

Closed

Description

@gHashTag

Goal

Land the parked glue of tri pr preflight so the command runs: the preflight fn in cli/tri/src/prcheck.rs (about 38 lines, as docs/now/2026-10-18-pr-preflight.md describes it), paid for by an equal or larger deletion of dead hand-written Rust in cli/tri/src, so the own-language budget nets to zero or less. The Queen's publisher side (tools/queen/publish.py, about 30 Python lines) stays out of this change.

Why

The spec specs/tri/pr/preflight.t27 (#10190) holds every rule and verdict, and two more rules are open in #11125 (own-language budget, developer-home paths). Today tri pr --help lists only landed and ready: the command that runs the spec does not exist, so nobody can run any of the rules before opening a pull request, and this loop replays them by hand. The note records why the glue is parked: check_budget refuses any net growth of hand-written foreign lines and the glue is not in tools/policy/foreign-exceptions.txt. The net-zero route needs no exception: PR #10538 landed 6 glue lines against a 7-line deletion of dead code, and the skill t27o records the recipe (cargo check -p tri lists never-used items; most have test callers, the truly dead ones are rare).

Boundary

  • cli/tri/src/prcheck.rs
  • cli/tri/src/main.rs
  • specs/tri/pr/preflight.t27
  • gen/rust/tri/pr/preflight.rs

User Scenarios

  • Given a branch with a duplicated body, when tri pr preflight runs, then it prints the dupes rule as FAIL with the evidence and exits 1.
  • Given a clean branch, when tri pr preflight --quick runs, then every rule prints PASS and the exit code is 0.
  • Given output that is not the shape the spec reads, when it runs, then that rule is UNREAD and the exit code is 2.

Requirements

Success Criteria

  • tri pr preflight --quick ends with exit 0 on a clean branch and exit 1 on a branch with a copied body.
  • The own-language check reports net <= 0 for the PR.
  • cargo check -p tri prints 0 new warnings for the glue.

Activity

  1. added a commit that references this issue on Oct 20, 2026
    0543510
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions