You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d1a5085
Browse filesBrowse the repository at this point in the historyBrowse files
fix(gate-manifest): only PR and scheduled lanes own a suite; fail closed on dynamic rules
Addresses the two findings from the re-review at f91453c.
P1 — suite ownership accepted any lane. #1429 accepts "a PR workflow job, a
scheduled workflow, or an explicit local-only declaration", but unownedTerminals
credited every lane, so a test:*/check:* script reachable only from a release,
push-to-main, or manually-dispatched workflow read as owned while gating nothing
on the way in. OWNING_LANE_KINDS now restricts owners to pull-request and
scheduled lanes, and the filter lives inside unownedTerminals so a caller cannot
re-introduce the hole by passing every lane it happens to hold.
laneKind needed fixing for that to mean anything: it mapped workflow_dispatch to
'scheduled', and nearly every release workflow carries dispatch as a manual
escape hatch, so the release lanes would have been promoted straight back into
owners. Dispatch is now its own 'manual' kind, checked last.
No suite in the tree was relying on a non-qualifying lane, so this tightens the
rule without changing today's verdict. Planted red: moving check:mcp-metadata to
a release-only lane now reports exec:scripts/sync-mcp-metadata.mjs unowned.
P2 — selectorRuleIds silently skipped anything it could not read, so a future
`reason(..., someExpression, ...)` or computed BUILD_OWNERSHIP.rule would have
slipped past the derived universe and therefore past both the representative-
sample and reachability checks. Unreadable shapes now throw, naming the line.
Two forwarding shapes are exempt because they provably cannot hide a category:
the `reason` factory's own `{ check, path: file, rule, detail }` (a shorthand
property forwarding a parameter, whose literal is at the call site), and
`reason(entry.check, file, entry.rule, entry.detail)` in the build-ownership
loop (whose literal is in the table this reader already collects). Anything else
— a template string, a variable, a call — fails. Planted red: making one live
`reason(...)` rule dynamic fails with its line number.
Tests 33 → 40, including the push/release-only ownership case and five
selector-rules cases, in a new selector-rules.test.ts mirroring its source.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SkS4S8XXrfkJ8TD1VBKkvJ
0 commit comments