Skip to content

policy: owner-approved-foreign only for new foreign files and the gate itself, not for every edit #10197

Closed

Description

@gHashTag

Boundary

  • specs/policy/own_language.t27 (the rule) and its t27c gen-c output gen/c/policy/own_language.c
  • .github/workflows/own-language.yml: header comment only, net zero lines
  • AGENTS.md, sections "Only t27" and "t27b is written in t27": prose only

Out of scope: check_budget() limits (40 per file, 80 per PR, shrink-only) stay exactly as they are; the workflow's label conditions stay as they are.

User Scenarios

  • A bee edits an existing cli/t27b/src/lower.rs and deletes more lines than it adds. Today the PR is red until the owner adds owner-approved-foreign. After this change it passes without the label, still held by the budget.
  • A bee adds a new tools/new_tool.rs, or renames a.t27 to b.py. It is still denied without the label.
  • A PR touches the gate itself (the spec, its generated C, lefthook.yml, .github/workflows/own-language.yml, tools/policy/foreign-exceptions.txt). It still needs the label.

Requirements

Owner rule, 2026-10-18 (translated): the label must not be needed on every pull request, only for the most important files.

  • An existing hand-written foreign file that is modified (git status M) gets the new ALLOW reason R_MODIFIED (8).
  • Additions, renames, copies and type changes to a foreign path keep their DENY reasons.
  • The gate's own files and the exception list stay PROTECTED.
  • counts_against_budget() keeps counting modified foreign files.
  • The spec's own tests cover each scenario above, plus a negative control.

Success Criteria

  • t27c test-report specs/policy/own_language.t27: all tests pass, 0 vacuous, invariants proved
  • A mutated assert makes the report fail
  • gen/c/policy/own_language.c is byte-identical to t27c gen-c of the spec, and regenerating master's spec gives master's C
  • The own-language check is green on the PR, which carries the owner's label because it changes the gate

Activity

  1. added a commit that references this issue on Oct 18, 2026
    5b70c4f
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions