Skip to content

ci: add the lane-line check — every PR body opens with its lane (Amendment 1, Rule 8) - #631

Merged
brettheap merged 1 commit into
mainfrom
ci/lane-line-check
Sep 4, 2026
Merged

brettheap merged 1 commit into
mainfrom
ci/lane-line-check

Conversation

@brettheap

Copy link
Copy Markdown
Contributor

Lane: openxfactory-f2

What this is

Adds .github/workflows/lane-line.yml — a small GitHub Actions status check
named lane-line that fails a human-authored PR whose body does not open
with 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 amendment
1."
Rule 8's motivating finding: of eleven openxFactory PRs authored on
2026-09-03, four opened without the Lane: line — including #610 (which
also broke main's pytest suite) and #621 (its fix). The two PRs that made
the 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-line workflow PR, openxFactory first.

What the check does

  • Reads the PR body's first non-empty line via github.event.pull_request.body,
    passed through env: (never inlined into run: — a PR body is untrusted
    input).
  • Passes if that line matches ^Lane: [a-z0-9-]+( \(.*\))?$ (a bare
    Lane: <name>, optionally with a parenthetical annotation such as
    (second window)).
  • Fails otherwise, with an ::error:: annotation naming the offending first
    line (or <empty>).
  • Triggers on pull_request: [opened, edited, synchronize, reopened] — the
    edited type means a PR that adds the line after opening re-runs the
    check without needing an empty push.
  • Runs on pull_request, never pull_request_target: no secrets, no
    network, permissions: contents: read only.

What the check does NOT do

  • Bots are exempt by ACTOR, never by body. The job is gated on
    github.event.pull_request.user.type != 'Bot' — dependabot and the
    app/openxfactory intents bot skip the job entirely. A human PR never
    reaches that branch, and nothing lets a human PR claim bot exemption by
    spoofing the body.
  • It validates the lane line only. Rule 5's second line, 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.
  • Commit trailers (Lane:, Co-Authored-By:) stay unenforced. Squash
    merges 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.

Local test results (the five cases from the ratified appendix's logic)

Extracted the run: script verbatim into a standalone file and exercised it
with BODY set via the environment, matching exactly how the workflow
invokes it:

Case BODY Expected Actual
(a) Lane: openxfactory-f2\n\n## x exit 0 exit 0 — lane-line OK: Lane: openxfactory-f2
(b) \nLane: repo-shape (second window) exit 0 exit 0 — lane-line OK: Lane: repo-shape (second window)
(c) ## What is proposed exit 1 exit 1 — error, first line ## What is proposed
(d) (empty) exit 1 exit 1 — error, first line <empty>
(e) Lane: Openxfactory_F2 exit 1 exit 1 — error, first line Lane: Openxfactory_F2 (case + underscore both reject)

All five match. python3 -c "import yaml,sys; yaml.safe_load(open('.github/workflows/lane-line.yml'))"
also passed. actionlint was not available in this environment and was not
run.

Adoption note

This PR does not make lane-line a 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-line to 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

…e 8)

Adds a required-status-check candidate, .github/workflows/lane-line.yml,
that fails a human-authored PR whose body does not open with
`Lane: <name>` (Rule 5). Bots are exempt by actor type, never by body.
The check validates the lane line only — the `Claim: <url>` second line
stays convention, and commit trailers stay unenforced per Rule 8's
rationale (squash rewrites them at merge time).

Copied verbatim from the ratified appendix in
lane-collision-protocol-amendment-1.md (Amendment 1, Rule 8), adoption
step 4. This PR does not make the check required — that is Brett's
ruleset act once it has run green on a few PRs.

Lane: openxfactory-f2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KeBPLWRL4rhgRbmjP8Li41
Copilot AI lite review requested due to automatic review settings September 4, 2026 01:21

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @brettheap! 👋

Your private repo does not have access to Sourcery.

Please upgrade to continue using Sourcery ✨

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Bot exemption is implemented via a job-level if: which can yield a skipped check and later block bot PRs if lane-line is made a required status check.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds a new GitHub Actions workflow to enforce the Lane Collision Protocol requirement that human-authored PR descriptions begin with a Lane: <name> line, providing an explicit, automatable signal for attribution and coordination.

Changes:

  • Introduces a lane-line workflow that reads the PR body’s first non-empty line and validates it against the expected Lane: format.
  • Exempts bot-authored PRs from enforcement via workflow-level gating.
File summaries
File Description
.github/workflows/lane-line.yml Adds the lane-line status check workflow to validate that PR bodies open with a properly formatted Lane: line.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +10 to +21
jobs:
lane-line:
# Bots are exempt by ACTOR, never by body. `gh pr list --json author`
# renders these as `app/dependabot`, `app/openxfactory`.
if: github.event.pull_request.user.type != 'Bot'
runs-on: ubuntu-latest
steps:
- name: The first non-empty body line names the lane
env:
# Via env, never inlined into `run:` — a PR body is untrusted input.
BODY: ${{ github.event.pull_request.body }}
run: |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lane: openxfactory-f2

DECLINED — this file is copied VERBATIM from the ratified appendix in lane-collision-protocol-amendment-1.md (Amendment 1, Rule 8), which the task deliberately does not let this PR "improve"; changing the gating shape needs its own amendment, not an agent edit inside this PR.

On the substance, for the record ahead of Brett's ruleset act (adoption step 5): GitHub's required-status-check handling treats a skipped conclusion as satisfying the requirement for merge purposes — a job-level if: that skips for bot actors does not block a bot PR from merging even once lane-line is added to the ruleset as required. If that behavior ever changes, or Brett wants step-level gating instead, that's a follow-up PR against the ratified text, not a quiet edit here.

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-f2

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-f2

Provenance for the admin merge. RULING for lane openxfactory-f2's PR #631 (head 2992c5ca): Brett Heap, 2026-09-04 ~01:5xZ, in-session, verbatim: "merge 631" — following his ratification of Lane Collision Protocol Amendment 1 ("ratify amendment 1", 2026-09-04), whose Rule 8 this workflow realizes (adoption step 4). Merge basis: every check SUCCESS on 2992c5ca — lane-line (passed on this PR's own body), pytest-suite, wallet-validation, signed-execution-chain-gate, merge-master-approval, openreposhape-pin; the workflow file is byte-identical to the ratified appendix; five local logic cases recorded in the PR body. One Copilot thread DECLINED with reason (bot PRs yield skipped, which GitHub counts as satisfying a required check) and left open for Brett's awareness ahead of the ruleset act. Codex rate-limited (provider non-review). Making lane-line REQUIRED remains Brett's ruleset act after it has run green on a few PRs. --admin satisfies only the review-count rule. Squash merge at 2026-09-04T01:53Z. Session: https://claude.ai/code/session_01KeBPLWRL4rhgRbmjP8Li41

@brettheap
brettheap merged commit b1d492a into main Sep 4, 2026
7 checks passed
brettheap added a commit that referenced this pull request Sep 4, 2026
#637)

Copilot review finding on the sibling adoption PRs (codexFactory #190,
xFactory #231, openXwallet #15): 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.

This is the appendix errata for lane-collision-protocol-amendment-1.md's
Rule 8 appendix, applied to the copy already merged here as #631
(b1d492a).

Lane: openxfactory-f2

Claude-Session: https://claude.ai/code/session_01KeBPLWRL4rhgRbmjP8Li41

Co-authored-by: Claude Fable 5.1 <[email protected]>
brettheap added a commit that referenced this pull request Sep 4, 2026
…e's prescribed entry into the release that already ships its bytes (#622) (#636)

* Cut contract-v3.3: consumer.identity_namespace is declared, and the shared-authority comparison reads the pair

Realizes add-consumer-identity-namespace (merged as #622, 95c2cf6), whose
ratification excluded the cut in terms and whose tasks.md 5.3 prescribed this
changelog entry so the cutting session invents nothing. Cut on the convener's
word, Brett Heap, 2026-09-04, verbatim: "cut v3.3".

MEASURED SURFACE. Intersecting `git diff --name-only contract-v3.2 HEAD` (71
paths) with the 283 registered members of contract-v3.2.digests.yaml leaves
EXACTLY TWO: contracts/manifest.yaml and docs/contract-versioning-policy.md.
`git log contract-v3.2..HEAD` over each names only 95c2cf6 (#622), so both are
that packet's own. Four other landings reached main since the tag — #617
(6a39d2a), #623 (56e1227), #619 (d611666) and #631 (b1d492a) — and moved no
registered member.

CLASS: ADDITIVE (minor), measured against the policy's own definition. The
schema member is DESCRIBED and unconstrained; the shared-authority comparison
reads the pair only where both sides declare a grammatical namespace and the
bare identity everywhere else, so absence and malformedness REPORT rather than
clear; one predicate serves both the named finding and the lift's third
condition; the block's shape codes go from eight to nine with
consumer-identity-namespace-grammar, whose window opens at THIS minor rather
than at contract-v2.4; the one narrowing is baked-secret over the third free
string, under add-binding-consumer-identity 2.6's precedent; nothing else
narrows.

Membership is 283 rows in both inventories, zero added and zero removed. Four
digests move: the two registered members #622 moved, plus this cut's own
changelog and tests/intent-compliance/test_release_boundary.py. That file gains
FEATURE_SUCCESSOR_7 in the enum and both match arms, with the by-hand statement
its tripwire requires: this bundle touches NO intent-compliance member and the
membership it asserts is UNCHANGED.

The inventory is built LAST at the final tree by the repository's own builder.
The annotated tag is NOT pushed here: it is a post-merge act taken only after
verify-commit passes at the squash commit — Bundle Realization Order step 4
before step 5, the step whose omission made contract-v3.1 defective and forced
#624's superseding cut.

Lane: openxfactory-smalls
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_014FBRdVuA6fmSEey9WQNAB7

* Name the cut by its branch rather than by a guessed PR number

PR #632 was taken by another lane's archive landing while this cut was being
measured, so the packet's Executed rows name `chore/cut-contract-v3.3` instead.
The number is added once the pull request exists.

Lane: openxfactory-smalls
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_014FBRdVuA6fmSEey9WQNAB7

* Name the cut PR in the packet's Executed rows now that it exists: #636

Lane: openxfactory-smalls
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_014FBRdVuA6fmSEey9WQNAB7

* Record the fold's measured doc-health delta in the packet's 8.1: zero movement

Baseline origin/main 21190cf and this tip both report 6 critical, 4 error,
40 warning, 16 info — 66 machine rows each, byte-identical finding sets in both
directions, and release-inventory-drift at ZERO on both sides because #628's cut
re-baselined the inventory over #622's already-landed bytes.

Lane: openxfactory-smalls
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Xf699RDAfTs5gnSr7igJ2v

* Copilot round one: the ticked boxes no longer contradict their own prose

Both findings taken, and neither by deletion. Ticking 5.4 and 7.5 left three
present-tense sentences standing — "UNTICKED RATHER THAN TICKED WITH AN EXCUSE",
"EXECUTED AND NOT ZERO AT THE CURRENT BASELINE — UNTICKED DELIBERATELY", and
8.1's "THE BOX STAYS UNTICKED" — each of which read as a claim about the present
state while the checkbox above it said the opposite. A reader had to infer the
timeline from the discharge paragraph below.

Each is now explicitly the record of the state at its own reading, with the
discharge named as what changed it. The sentences are KEPT rather than removed:
they say why the boxes were not ticked with an excuse while the packet was open,
which is the fact worth preserving, and deleting them would erase the reasoning
that made the refusal to hand-fix an inventory legible.

Lane: openxfactory-smalls
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Xf699RDAfTs5gnSr7igJ2v

---------

Co-authored-by: Claude Fable 5.1 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants