Repository navigation
ci: add the lane-line check — every PR body opens with its lane (Amendment 1, Rule 8) - #15
Conversation
…e 8) Lane: openxfactory-f2 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01KeBPLWRL4rhgRbmjP8Li41
There was a problem hiding this comment.
Hi @brettheap! 👋
Your private repo does not have access to Sourcery.
Please upgrade to continue using Sourcery ✨
|
Lane: openxfactory-f2 @codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
🟡 Changes recommended
The workflow currently embeds untrusted PR-body content into a GitHub Actions ::error command without escaping, which is a security-hardening issue for workflow-command parsing.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a lightweight GitHub Actions check to enforce the Lane Collision Protocol requirement that human-authored PR bodies begin with a Lane: <name> line, improving attribution and reducing lane-collision risk across contributions.
Changes:
- Introduces a new
lane-lineworkflow that runs on PR open/edit/sync/reopen events. - Extracts the first non-empty PR body line and validates it against the expected
Lane:format. - Emits a GitHub Actions error annotation when the lane line is missing or malformed.
File summaries
| File | Description |
|---|---|
| .github/workflows/lane-line.yml | Adds the lane-line CI check to enforce PR body lane-line formatting for human PRs. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Copilot review finding on this PR: the ::error annotation interpolated the untrusted PR-body first line ($first) directly into the workflow command message, which GitHub Actions percent-decodes — a crafted body line could inject additional workflow commands into the runner log. The annotation is now fully static; the offending line is still surfaced, via a plain echo before the annotation instead of inside it. Also fixes the exemption comment: it said "bots are exempt by ACTOR" but the condition keys on github.event.pull_request.user.type, the PR AUTHOR, not the actor. Reworded to say PR AUTHOR type explicitly. Lane: openxfactory-f2 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01KeBPLWRL4rhgRbmjP8Li41
|
There was a problem hiding this comment.
🟢 Approval recommended
The workflow matches the stated enforcement behavior and prior feedback has been addressed, with only a minor reliability nit suggested.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
.github/workflows/lane-line.yml:17
- Consider adding
timeout-minutesto this job for consistency with other required checks in this repo and to avoid a stuck runner blocking the check indefinitely (even though this script is small).
- Files reviewed: 1/1 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
Lane: openxfactory-f2 Provenance for the admin merge. RULING for lane openxfactory-f2's PR #15 (head |



Lane: openxfactory-f2
What this is
Adds
.github/workflows/lane-line.yml— a small GitHub Actions status checknamed
lane-linethat fails a human-authored PR whose body does not openwith
Lane: <name>. This is Lane Collision Protocol Amendment 1, Rule 8:THE LANE LINE IS ENFORCED, NOT ASSUMED.
Ratification
Amendment 1 (
~/.agents/protocols/lane-collision-protocol-amendment-1.md)was ratified by Brett Heap 2026-09-04, in session, lane
openxfactory-f2(session
session_01KeBPLWRL4rhgRbmjP8Li41), verbatim: "ratify amendment1." Rule 8's motivating finding: of eleven openxFactory PRs authored on
2026-09-03, four opened without the
Lane:line — including #610 (whichalso broke
main's pytest suite) and #621 (its fix). The two PRs that madethe day's most expensive mess could not be attributed from their own
bodies. This PR is adoption step 4 of Amendment 1's adoption path — the
lane-lineworkflow PR, last of the three sibling repos (after openxFactory,PR #631
b1d492a3, and codexFactory/xFactory).What the check does
github.event.pull_request.body,passed through
env:(never inlined intorun:— a PR body is untrustedinput).
^Lane: [a-z0-9-]+( \(.*\))?$(a bareLane: <name>, optionally with a parenthetical annotation such as(second window)).::error::annotation naming the offending firstline (or
<empty>).pull_request: [opened, edited, synchronize, reopened]— theeditedtype means a PR that adds the line after opening re-runs thecheck without needing an empty push.
pull_request, neverpull_request_target: no secrets, nonetwork,
permissions: contents: readonly.What the check does NOT do
github.event.pull_request.user.type != 'Bot'— dependabot and theapp/openxfactoryintents bot skip the job entirely. A human PR neverreaches that branch, and nothing lets a human PR claim bot exemption by
spoofing the body.
Claim: <url>,is deliberately not resolved — doing so needs a token and a comment
lookup, and a check that can fail for network reasons is a check lanes
learn to ignore. The claim URL stays convention until it has its own
change.
Lane:,Co-Authored-By:) stay unenforced. Squashmerges rewrite commit bodies at merge time, so a pre-merge trailer check
would gate on text GitHub is about to discard, and a post-merge check
gates nothing. The PR body is the durable carrier.
Byte identity
.github/workflows/lane-line.ymlin this PR is byte-identical to theappendix in
lane-collision-protocol-amendment-1.mdand to the file alreadylanded in openxFactory (
b1d492a3, PR #631) — verified withdiffbeforecommitting.
Adoption note
This PR does not make
lane-linea required status check. Per Rule 8:"Making it REQUIRED is Brett's act, in the console, and no agent's." The
adoption sequence is: land this workflow, let it run advisory (non-blocking)
on a few PRs, then Brett adds
lane-lineto the branch ruleset as required.No agent edits a ruleset.
This PR is itself subject to Rule 5 — its body opens with the lane line
above, which is the cheapest possible first test of the check it adds.
🤖 Generated with Claude Code
https://claude.ai/code/session_01KeBPLWRL4rhgRbmjP8Li41