Skip to content

tri pr preflight: add the own-language budget and the developer-home-path rules the t27o loop runs by hand #11070

Closed

Description

@gHashTag

Goal

Give tri pr preflight (specs/tri/pr/preflight.t27, #10190) the two checks the t27o loop still runs by hand before every push: the own-language foreign-line budget compiled from the merge base, and the developer-home-path scan. A lane then learns about both from one command, before CI, instead of from a red check.

Why

Both gaps cost CI runs on 2026-10-18/19: #10538 failed the required own-language check at +9/-0 hand lines; #10646 turned scan red for every later PR with nine /Users/... test literals; #11023 repeated it with one line of prose in a skill. The preflight already covers the seal, vacuity, duplicate-bodies, types-ratchet and ledger-row rules, but none of these two. The loop replayed the budget gate by hand on eight PRs tonight (compile gen/c/policy/own_language.c from the base, pipe git diff --numstat --no-renames BASE...HEAD), which is exactly a step-and-rule for this spec.

Boundary

  • specs/tri/pr/preflight.t27
  • gen/rust/tri/pr/preflight.rs
  • .trinity/seals/pr_TriPrPreflight.json
  • cli/tri/src/prcheck.rs

User Scenarios

  • Given a branch whose diff adds 9 hand-written Rust lines and deletes none, when tri pr preflight runs, then it fails the budget rule and prints the gate's own output as evidence.
  • Given a branch that adds a line naming a developer home directory, when tri pr preflight runs, then it fails the home-path rule and prints the offending file and line.
  • Given a branch that changes neither, when it runs, then both rules pass and the exit code is unchanged.

Requirements

  • FR-001: The preflight MUST run the budget gate compiled from the merge base's gen/c/policy/own_language.c, not from the branch.
  • FR-002: The preflight MUST run tools/check_devhome_paths.py and fail a branch that it fails.
  • FR-003: Both rules MUST fail closed: output that is not the shape the spec expects reads UNREAD, never a pass.
  • FR-004: The rule MUST live in the spec; hand Rust in cli/tri/src/prcheck.rs MUST NOT grow (own-language net <= 0).

Success Criteria

Activity

  1. gHashTag commented on Oct 19, 2026

    @gHashTag
    OwnerAuthor

    Correction to this issue's premise: the spec specs/tri/pr/preflight.t27 exists (#10190) but the command that runs it does not: its glue is parked (see docs/now/2026-10-18-pr-preflight.md), and tri pr --help lists only landed and ready. Lane P1 added the two rules in the spec only (PR #11125) and changed no glue, which is the right scope; running them needs the glue, now filed as #11126 (net-zero, paid by dead-code deletions, no exception file). Until then the loop keeps replaying the budget and home-path checks by hand.

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