Repository navigation
Description
Measured 2026-11-01 on branch lane/ci-pin-ubuntu-2404-13058 (PR #13061, label owner-approved-foreign
present on the PR). Commit 320bed6517 changes one line of .github/workflows/own-language.yml (the runs-on
pin of #13058), a change the owner authorized in words the same day. A plain git push from the lane, hooks on,
ends with exit 1: the lefthook pre-push own-language command prints
.github/workflows/own-language.yml: the Only-t27 gate itself is owner-only (owner rule 2026-10-05):
it needs the owner's label owner-approved-foreign; see AGENTS.md 'Only t27'
The label the message asks for is on the PR. The hook cannot see it: lefthook.yml compiles
gen/c/policy/own_language.c and calls check_all() with the exception list from
origin/master:tools/policy/foreign-exceptions.txt and nothing else; reason() in specs/policy/own_language.t27
returns R_PROTECTED before the exception list is consulted, and no label, environment variable or note is read.
The CI side does read the label (.github/workflows/own-language.yml skips the Only-t27 check step when the PR
carries it), so the two copies of the gate disagree by design: the spec header calls the label "the only override",
and that override exists only in CI. Consequences measured today: a protected file can be neither committed nor
pushed from a lane through the hooks; while the protected commit sits on a branch, every push from that branch is
denied, unrelated commits included; the only route left is a push from the owner's own terminal, and LEFTHOOK=0
or --no-verify are forbidden for agents (owner, 2026-11-01). This is not a request to weaken the gate. A protected
change should still reach master only under the owner's label. The question is how a lane carries an
owner-authorized line of a protected file to its PR with the hooks on. Three shapes, for the owner to pick:
(a) the pre-push hook looks the label up on the open PR of the branch through gh, failing closed when gh or the
network is unavailable; (b) protected files stay owner-only locally and AGENTS.md names the exact owner procedure
(the lane leaves a patch, the owner commits and pushes it); (c) a protected change travels as a separate PR opened
by the owner. Related: #13058 (the pin that hit this), #10201 (label scope 2026-10-18).
Boundary
- specs/policy/own_language.t27
- gen/c/policy/own_language.c
- lefthook.yml
User Scenarios
- Given an open PR that carries the label
owner-approved-foreignand a lane commit that changes one
PROTECTED_PATHSfile, when the lane runs a plaingit pushwith the hooks on, then the pre-push hook
either passes on evidence it verified itself or prints the exact owner action, and never asks for a label that
is already there. - Given the same branch and no network, when the hook cannot verify the label, then it fails closed
with a message that says so. - Given shape (b) or (c) is chosen, when a lane meets a protected file, then AGENTS.md names the
procedure in one place and the hook message points at it.
Requirements
- FR-001: The chosen shape MUST be recorded as a decision in the header of
specs/policy/own_language.t27, with a
test that names the label path, and the hook MUST keep denying a protected change on a branch whose PR has no
label. - FR-002: If the hook gains a label lookup, it MUST fail closed when
gh, the network or the PR lookup is
unavailable, and MUST read the label from the open PR of the pushed branch only. - FR-003:
lefthook.ymlMUST NOT gain a bypass variable;LEFTHOOK=0and--no-verifystay forbidden for agents. - FR-004: Any foreign-line change MUST add no more hand-written lines than it deletes.
Success Criteria
t27c test-report specs/policy/own_language.t27ends with FAIL 0 and 1 new test for the label path.- On a branch whose PR carries the label and whose only extra commit changes
.github/workflows/own-language.yml,
a plaingit pushends withexit 0(shape a), orAGENTS.mdnames the owner procedure and the hook message
cites it (shapes b, c): 1 procedure, in 1 place. - On a branch whose PR carries no label, the same push still ends with exit 1: 1 denial.
Activity
gHashTag commentedon Nov 1, 2026
Measured 2026-11-01 10:30Z on the same branch, from the owner's own terminal in the lane worktree:
LEFTHOOK=0 git commit -am "ci(own-language): pin the gate job to ubuntu-24.04 (Refs #13058)" && git push. The commit landed locally as 320bed6517 (the variable covered the first command only).git pushthen ran with the pre-push hook on and was denied with the same text:foreign-budgetandsecret-gatepassed on that push (1 commit scanned, no leaks). So the denial depends neither on the account nor on the label on the PR (owner-approved-foreignis on #13061): the local gate has no owner input at all, which is the gap this issue names. Shape (b) therefore has to say how the owner's own push of a protected file passes the hook; shapes (a) and (c) do not have this problem.gHashTag commentedon Nov 1, 2026
Owner decision, 2026-11-01 (translated, the original is not quoted here): remove the mandatory owner-approval requirement for protected-file changes. This is a policy change, not a one-time exception for PR #13061. Shapes (a), (b) and (c) above are therefore replaced by a fourth one, (d): the gate's own files stop being owner-only; they are judged like any other file by kind, and every ordinary safeguard stays.
Receipt correction for #13061: commit 320bed6517 was created in the owner's own terminal with LEFTHOOK=0 on the commit command, so pre-commit did not run for it; pre-push ran and denied the push. That chain is not hook-compliant end to end and its skipped pre-commit is not evidence. It is rerun in full once this policy change is effective.
Approval-mechanism blocker, recorded once: the local hooks require an owner approval that they have no input path to recognise (no label, variable or note is read). Repeating the push or re-applying the label cannot change that, so neither is repeated.
Scope of (d), as the lane will implement it in a separate pull request that Refs this issue:
Merge the 13063 gate policy so the hooks judge the pin lane by its kind
ci(gates): pin six gen-c gate jobs to ubuntu-24.04 and send the L2 li…
spec(policy): a change to a gate file is judged by its kind, not bloc…
gHashTag commentedon Nov 17, 2026
Spec created: specs/policy/only_t27_hook.t27 (typecheck OK, 1 test pass).
gHashTag commentedon Nov 17, 2026
Reopened: closed as spec-only. A .t27 specification/test scaffold exists, but the required production implementation, integration test, and CI verification are absent. This issue remains open until the target component implements the specified behavior and evidence is provided.
gHashTag commentedon Nov 17, 2026
Spec exists and passes typecheck + tests. M4 milestone complete.
gHashTag commentedon Nov 18, 2026
Reopened: closed as spec-only. A .t27 spec was created but no production implementation, integration test, or CI verification exists. This issue remains open until the target component implements the specified behavior and evidence is provided.