Skip to content

Arm the re-pin lane's auto-merge, inert and saying so (amend-mirror-floor-regeneration-merge-authority § 3) - #844

Merged
brettheap merged 8 commits into
mainfrom
realize/amend-mirror-floor-regeneration-merge-authority
Sep 9, 2026
Merged

brettheap merged 8 commits into
mainfrom
realize/amend-mirror-floor-regeneration-merge-authority

Conversation

@brettheap

@brettheap brettheap commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Lane: openxfactory-2 (openXfactory-2)

Refs #745

THE § 3 REALIZATION of amend-mirror-floor-regeneration-merge-authority (ratified 2026-09-08, landed as #807 → 6cc06288). The re-pin lane now ARMS the platform's auto-merge on its own pull request, on both delivery paths, and it lands INERT and says so in its own witness line — which is the ruling this pull request realizes.

The ruling being realized

Brett Heap, in session, 2026-09-09T11:48:21Z, verbatim:

"rule land inert, this lane realizes it"

#745 (comment)

Box 1.3 is ruled: the realization lands NOW, with the inertness (no candidate class admits this lane; the armed pull request waits for a human merge word until admit-review-lane-repin-to-merge-approval-envelope lands) DECLARED in the workflow's witness line and reported in the run summary. Box 4.3 — filing that successor — stays OPEN, is not filed here and is not ticked.

A second ruling lands in the same edit. Brett Heap, 2026-09-09, verbatim:

"none vetoed, merge it when green, then report the next sweep"

#745 (comment)

Box 1.2 is ruled: M-A through M-G all STAND as recommended, none vetoed. The merge and the next-sweep report named in that word are the LANDING lane's acts; this pull request claims neither and merges nothing.

What each box became

box what landed where
3.1 arm on both paths the byte-identical line on the gh pr edit path and the gh pr create path, inside the existing delivery step, on the step's existing App token .github/workflows/review-lane-repin.yml:782 and :798
3.2 flip the sweep to equality test_the_lane_opens_a_pull_request_arms_and_stops_there — renamed, disclosed tests/review_lane_pin/test_repin_lane.py:300
3.3 three controls that MEASURE never-approves sweep; third-arming counter; the driver's FIRST-EVER disposal sweep :489, :536, :560
3.4 mapping re-read AMENDED_DELTA added; 24 / 10 / 31 distinct / 3 carried :2037
3.5 witness lines + corrected prose armed / already-enabled / refused lines on both surfaces; four superseded sentences corrected; the following-firing step workflow :338 (following firing), :734 (the tail), :741 (the witness)
3.6 nothing else moves four files in the diff, listed below —
3.7 measured on both sides counts below —

3.1 — the arming, verbatim

if ARM_OUTPUT="$(gh pr merge --auto --squash "${BOT_BRANCH}" 2>&1)"; then ARM_RC=0; else ARM_RC=$?; fi
report_the_arming "${ARM_RC}" "${ARM_OUTPUT}"

Twice, byte-identical, once per delivery path, under the step's existing GH_TOKEN: ${{ steps.app-token.outputs.token }}. No --repo was added to the ratified command — the packet's literal spelling is followed so 3.2's EQUALITY assertion pins what was ratified; the repository resolves from this job's own checkout.

A refused arm is a REPORTED, NON-FATAL outcome, and the packet decides that rather than this author. M-A left the choice open (continue-on-error with a witness, or a hard failure) pending M-D's precondition measurement. M-D and the requirement settle it the other way: an arming that cannot complete "is a CONFORMING state of this requirement and SHALL be reported as such rather than treated as a failure or as progress". Community discussion #190610's HTTP 422 is not the edge case here but the EXPECTED case for as long as the arming is inert, so failing the run would redden every honest advance. The guard is therefore in the shell, not continue-on-error — which test_a_failing_automated_advance_is_repaired_not_waived forbids to every step of this lane.

3.5 — the exact witness strings

auto-merge ARMED on #${number} at ${head_oid} — the platform merges when the merge-master envelope approval for that head stands and every required check has succeeded; this lane neither merges nor approves. NO CANDIDATE CLASS ADMITS THIS LANE TODAY, so the arming is inert: the pull request waits for the same human merge word a hand-authored advance needs, until admit-review-lane-repin-to-merge-approval-envelope lands.

auto-merge ARMED on #${number} at ${head_oid} (already enabled) — <same tail>

auto-merge NOT armed on #${number} at ${head_oid}: platform refused (${reason}) — the advance is delivered and correct; the lane will re-arm on its next firing. <same tail>

Emitted as ::notice title=review-lane-repin:: AND appended to $GITHUB_STEP_SUMMARY. number and head_oid are read from gh pr view … --json number,headRefOid, so the sha in the witness is the one an approval would have to name; an unreadable read is SAID (an UNREADABLE number / an UNREADABLE head) rather than left blank. ${reason} is the platform's own message, flattened and capped at 300 characters.

DEPARTURE, DISCLOSED: the tail carries one clause more than M-E wrote (M-E ends "…so the arming is inert."), because box 1.3's ruling asks for the successor to be named in it. The clause is dropped by the enrolment successor and not before, which the workflow says of itself at the line that defines it.

The four sentences the narrowing made untrue are CORRECTED, and the superseded one is QUOTED rather than deleted: the header's "PROPOSED and never disposed" → "…BY ITS OWN ACT" plus a dated amendment block; the header's "never enables auto-merge" clause; the step-6 comment's "There is no gh pr merge, no --auto … anywhere in this file", superseded in place behind a dated marker; and the commit message the lane writes, which no longer says "a human word merges it" full stop. The DRY-RUN summary gains "and NO AUTO-MERGE WAS ARMED".

The following firing's line is a new READ-ONLY step, Report what became of the last automated advance: MERGED at a named commit / still OPEN (with whether auto-merge is armed) / CLOSED unmerged. It never fails the run, and is swept by a test for all ten disposal terms so a step that only reads cannot quietly start acting.

NOT moved, deliberately: scripts/review_lane_repin.py's body line "AUTOMATED PIN ADVANCE — proposal only. This lane never merges and never approves." It is still true after the narrowing (arming is not merging; the lane still never approves), and the driver is not this packet's surface.

3.3 — the three controls, and what each MEASURES

control the input it varies
test_the_lane_never_posts_an_approval_under_any_identity the workflow's own executable shell AND scripts/review_lane_repin.py's source — the same two texts the shipped sweep reads — over seven approval/dismissal spellings, one anti-vacuity provocation PER spelling
test_a_third_arming_occurrence_reds_this_control the workflow's own executable shell: counts gh pr merge, asserts 2, then runs the IDENTICAL counter over that same text with one more arming spliced in
test_the_driver_names_no_disposal_act_at_all scripts/review_lane_repin.py's source, all TEN terms plus the raw-API regex — the first time this repository has ever swept its driver, because _shell_text() reads only the workflow's run: blocks. This is the narrowing's blast-radius bound, created rather than assumed

PROVEN CAPABLE OF FAILING, by mutation, before this pull request was opened (mutation applied to the shipped file, suite run, file restored): a third arming reds 2 cases; an arming that loses --auto reds 4; a gh pr review added to the driver reds 2; dropping the update path's re-arming reds 4; removing the inertness clause reds 2; removing the UNREADABLE fallbacks reds 1; reversing the escaper's substitution order reds 1.

Four further cases EXECUTE the delivery step's own shell functions — cut out of the shipped workflow at test time by _shell_function, so the harness cannot drift from the lane — against a stand-in gh: the armed line by equality, the refusal as a recorded outcome, the idempotent already-enabled branch, the UNREADABLE fallbacks, the %-first escape order, and a payload carrying %0A::error::forged proving a platform message cannot forge a second workflow command.

3.7 — measured on BOTH sides

measurement main control clone (9fa79cfd) this branch (base 56e69a11)
pytest tests/review_lane_pin -q -p no:randomly 173 passed, 2 skipped, 48 subtests 188 passed, 2 skipped, 48 subtests
pytest tests/ -q -m "not postgres" (what pytest-suite.yml runs) 95 failed, 10252 passed, 110 skipped, 338 deselected, 50 errors 95 failed, 10265 passed, 110 skipped, 338 deselected, 50 errors
FAILED sets — byte-identical (diff over the sorted FAILED lines is empty)
validate-openspec-cli-pin.py --all (pinned @fission-ai/[email protected]) 102 passed, 2 failed (104) — both DISPOSITIONED, 0 undispositioned identical
--change amend-mirror-floor-regeneration-merge-authority 1 passed, 0 failed 1 passed, 0 failed
validate-sequenced-after.py . and --ledger-diff clean (43 active, 10 declaring; ledger 189 rows) clean, identical

+15 in tests/review_lane_pin, every one this change's, and NO failure on either side. The two directory skips did not move, so EXPECT_SKIPPED is untouched. The 95 pre-existing failures and 50 errors are environmental in a bare local clone (no openXwallet submodule, no pinned-core sibling on disk) and are shown unchanged rather than claimed.

The single-change run emits ONE INFO line on BOTH sides — "Archive would refuse this delta … 'An automated pin advance only ever proposes' - not found" — which is the consequence M-F predicted in writing of amending a still-active parent; sequenced_after: and § 5 fix the archive order it implies.

THE +13 ON THE FULL SUITE IS ACCOUNTED FOR EXACTLY, BY COLLECTION. The control clone resolved main a few minutes after the branch was cut, so it sits at 9fa79cfd — three commits past this branch's base 56e69a11 — and two totals over two different bases cannot be compared on the total alone. pytest tests/ -m "not postgres" --collect-only, sorted and diffed: 16 ids only on this branch (the 15 new cases plus the renamed one) and 3 ids only on the control (test_the_lane_opens_a_pull_request_and_stops_there, the name 3.2 renamed away, plus two tests/ideation-dashboard/test_serve_column_split.py cases that landed in 9fa79cfd after this branch was cut). 16 − 3 = 13, and no other id differs in either direction. The directory figures are unaffected by that drift and are the exact +15.

3.6 — the whole diff

 .github/workflows/review-lane-repin.yml                        | 232 +++++-
 openspec/changes/amend-mirror-floor-regeneration-merge-authority/review/ratification-2026-09-08.md |  50 ++
 openspec/changes/amend-mirror-floor-regeneration-merge-authority/tasks.md                          | 262 +++++++-
 tests/review_lane_pin/test_repin_lane.py                       | 687 +++++++++++++++++++-
 4 files changed

Four files. Nothing else.

scripts/review_lane_repin.py is byte-unchanged (it gained a measuring control, not an edit), and so are .github/merge-approval-envelope.yml, .github/workflows/merge-master-approval.yml, .github/workflows/pytest-suite.yml (so EXPECT_SKIPPED did not move), contracts/review-lane-pin.yaml, contracts/review-lane-floor-snapshot.yaml, every snapshot witness, every ruleset, every credential template and every schema.

Why no pull request will auto-merge yet — the inertness, stated

Four refusals stand between an armed re-pin pull request and a completed merge, measured in proposal.md § The realization gate: (1) .github/merge-approval-envelope.yml enrols only intent-rolling-custody, so no candidate class admits bot/review-lane-repin; (2) the floor is composed OVER the envelope at merge-master-approval.yml:1504 and contracts/review-lane-pin.yaml is a never-clearable floor member; (3) code-owner review is required on main by ORGANIZATION ruleset 18834180 and a GitHub App cannot be named in CODEOWNERS — and no bypass actor is proposed anywhere, here or in the org; (4) codexFactory's promoted Bounded autonomous surface forbids the approval outright for this lane.

So the arming is recorded, reported, and never fires. That is a CONFORMING state the ratified requirement names by itself ("An arming that can never complete under the machinery in force is a CONFORMING state … and SHALL be reported as such rather than treated as a failure or as progress"), and this realization declares it in the run rather than leaving a reader to mistake an armed proposal for progress.

Overlap check: PR #801

#801 (lane provenance-autonomous-merge, realize/codexfactory-identity-b1) touches both of this pull request's code files, in DISJOINT regions. Checked, not acted on, and no rebase onto it was taken:

Whichever lands second should need only a merge-from-main, with no conflict expected.

What this pull request does NOT do

It merges nothing, files no successor, ticks no box in § 4 or § 5, enrols no candidate, edits no ruleset or repository setting, and authors no codexFactory byte.

🤖 Generated with Claude Code

Realizes § 3 of `amend-mirror-floor-regeneration-merge-authority` (ratified
2026-09-08, landed as #807 -> 6cc0628) on Brett Heap's word of 2026-09-09,
verbatim "rule land inert, this lane realizes it" (#745 comment 5601338925),
with "none vetoed, merge it when green, then report the next sweep" (#745
comment 5601413264) settling box 1.2.

WHAT: `.github/workflows/review-lane-repin.yml` arms the PLATFORM'S auto-merge
on its own pull request as `gh pr merge --auto --squash "${BOT_BRANCH}"`,
byte-identically on the `gh pr edit` and `gh pr create` paths, on the step's
existing App token (M-A, M-B). Arming is not merging: `--auto` records an
intent the platform executes only when the merge-master envelope approval for
that exact head stands and every required check has succeeded.

WHY IT LANDS INERT, AND WHY THAT IS SAID RATHER THAN DISCOVERED: no candidate
class admits `bot/review-lane-repin` today, so no approval can ever stand for
it and the armed auto-merge cannot complete. The requirement names that state
as CONFORMING, and box 1.3's ruling asks for it to be DECLARED — so the witness
line carries it, naming the enrolment successor that will make the clause
false. Box 4.3, filing that successor, stays open and is not ticked.

The ten-term disposal sweep is narrowed by EQUALITY rather than loosened: the
arming appears exactly twice in exactly one spelling, no `gh pr merge`
occurrence lacks `--auto`, the other eight terms and the raw-API merge endpoint
stay refused, and three new controls MEASURE — including the first sweep this
repository has ever run over `scripts/review_lane_repin.py`, which is the
narrowing's blast-radius bound. Six further cases EXECUTE the delivery step's
own shell functions against a stand-in `gh`. Every control was proven capable
of failing by mutation before this commit.

`EveryRatifiedScenarioHasATest` is re-read, not re-pinned: 24 scenarios in the
parent delta, 10 in this packet's block, 31 distinct, 3 carried forward.

Nothing else moves. `scripts/review_lane_repin.py` is byte-unchanged.

Lane: openxfactory-2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI lite review requested due to automatic review settings September 9, 2026 12:42

@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 ✨

@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

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

Two small but concrete issues were found (a stale workflow comment pointing at a renamed test, and a test helper raising unhelpful raw ValueErrors) that should be corrected before merging.

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

Pull request overview

This PR realizes the §3 ruling for amend-mirror-floor-regeneration-merge-authority by updating the review-lane-repin GitHub Actions lane to arm GitHub auto-merge on its own PR (on both delivery paths), while explicitly declaring (and reporting) that the arming is currently inert under the existing merge-approval envelope machinery.

Changes:

  • Arm auto-merge (gh pr merge --auto --squash "${BOT_BRANCH}") on both the update and open paths, and emit/record a witness line (plus a new “following firing” read-only outcome step).
  • Expand and tighten the lane’s test suite to measure the exact arming spellings/counts and to execute the workflow’s own shell witness functions against a stand-in gh.
  • Update the OpenSpec packet’s tasks.md and ratification record with the 2026-09-09 rulings (box 1.2 and 1.3) and §3 realization narrative.
File summaries
File Description
.github/workflows/review-lane-repin.yml Adds auto-merge arming + witness/reporting (including a new read-only “what became of the last advance” step) and updates requirement prose/comments accordingly.
tests/review_lane_pin/test_repin_lane.py Updates scenario mapping, asserts arming by equality/count, adds negative controls, and executes extracted workflow shell functions to validate witness behavior.
openspec/changes/amend-mirror-floor-regeneration-merge-authority/tasks.md Records the 2026-09-09 rulings and marks §3 realization boxes as completed (without claiming §4/§5 work).
openspec/changes/amend-mirror-floor-regeneration-merge-authority/review/ratification-2026-09-08.md Appends a dated addendum capturing the later rulings without rewriting the 2026-09-08 record.
Review details
  • Files reviewed: 4/4 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.

Comment thread .github/workflows/review-lane-repin.yml Resolved
…cites it

Copilot round 1 on PR #844, both findings valid and both fixed at the site.

`_shell_function` raised a bare `ValueError` from `str.index` when the marker
or the closing brace was missing, so a workflow edit that removed a function
this harness EXECUTES would surface as an undecodable substring error. It now
raises `AssertionError` naming which function it could not find, or that the
closing `}` is not at the definition's own indent — exercised in both
directions before this commit.

The step-6 comment still cited the pre-flip test name. The case was renamed
with the flip (3.2, disclosed), so the workflow's self-documentation was
already stale on the day it landed; it now names
`test_the_lane_opens_a_pull_request_arms_and_stops_there`.

Also in this commit: § 3.7's measurement corrects the control clone's base.
It resolved `main` a few minutes after this branch was cut and sits at
`9fa79cfd`, not `56e69a11`, so the full-suite totals are over two different
bases. The +13 is now accounted for by a sorted `--collect-only` diff rather
than by arithmetic: 16 ids only here (15 new plus the renamed one), 3 only on
the control (the renamed-away name, plus two `test_serve_column_split.py`
cases that landed in `9fa79cfd`), and no other id differing either way.

Lane: openxfactory-2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI review requested due to automatic review settings September 9, 2026 12:48

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 474421b990

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/review-lane-repin.yml Resolved

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

There are a couple of concrete correctness/readability issues in the changed regions (workflow witness punctuation and a test-harness PATH KeyError hazard) that should be addressed before merge.

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

Review details

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

tests/review_lane_pin/test_repin_lane.py:787

  • The test harness assumes PATH exists in the environment (env['PATH']). In more hermetic/unit test environments this can raise KeyError and fail the suite for reasons unrelated to the behavior being tested. Use env.get('PATH', '') and only add the ':' when there is an existing PATH value.
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread .github/workflows/review-lane-repin.yml Resolved
Two review findings on #844, one wording and one substance, and they meet
in the same sentence.

COPILOT: `ARMED_TAIL` opens lowercase ("the platform merges..."), and the
refusal branch appended it after a full stop, so the rendered witness
started a sentence in lower case. All three variants — armed, already
enabled, refused — now reach the tail through one ` — ` join. Measured,
not promised: `_assert_the_tail_is_joined_cleanly` reads ARMED_TAIL's
value out of the shipped workflow and runs from all three cases, and it
reds if the tail ever stops opening lowercase rather than passing on a
stale assumption.

CODEX P1, IN PART. The head-churn half is refuted: the delivery step is
gated `steps.repin.outputs.action == 'advance'`, so a no-op firing does
not run it, pushes no head and invalidates no checks; the open-PR path
pushes a new head only when a further advance is owed, which is the
ratified "further advance owed while armed" scenario. The residual it
found is real and is CONCEDED: a refused arming is re-attempted only on
the next firing that delivers an advance. The line claimed more than
that — "the lane will re-arm on its next firing" — and now says the
condition exactly.

DISCLOSED, NOT CLOSED. Re-arming from the no-op path would be a THIRD
occurrence of the arming command, which decision M-C admits by EQUALITY
at two and a named control reds at three; admitting one needs an
amendment, which is the packet owner's call. So the fact is stated where
the run is read instead: the no-op firing's report of an OPEN advance
splits ARMED from NOT armed, and the NOT-armed branch says the lane
re-attempts the arming only on its next firing that delivers an advance,
that the firing moves the head first, and which #745 boxes settle it.
That step reads and never acts, and the disposal sweep over it is
unchanged.

Both new assertions were proven capable of failing before this commit:
restoring the old join reds the refusal case, and collapsing the two
OPEN branches reds the reporting case.

Lane: openxfactory-2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI review requested due to automatic review settings September 9, 2026 13:15

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

The new “Report what became of the last automated advance” step contains a jq string quoting error that will prevent the MERGED outcome branch from parsing/executing correctly.

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

Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread .github/workflows/review-lane-repin.yml Resolved
Copilot's second finding on #844 says the MERGED branch's
`\(... // "an unreadable commit")` is an unescaped nested string that
stops jq parsing, so the step always falls back to "could not be read".
IT IS FALSE: a jq interpolation opens an expression context in which a
string literal is ordinary, and every branch renders correctly under
jq 1.7 — the absent-oid fallback included, which is the only way that
`//` fires at all.

THE REFUTATION IS LANDED AS A CONTROL RATHER THAN LEFT IN A REVIEW REPLY.
The finding was wrong, but the place it pointed at had nothing measuring
it. That step ends `2>/dev/null || true` on purpose — a report may never
fail an advance — so a program that really did stop parsing would
degrade in TOTAL SILENCE: every firing emits the fallback and nothing
ever says why. `TheOutcomeReportIsExecutedNotJustRead` cuts the jq
program out of the shipped step, renders all six branches against the
shape `gh pr list --json number,state,mergeCommit,autoMergeRequest`
really returns, asserts the NOT-armed line carries the retry condition
as RENDERED, and sweeps the rendered line for all ten disposal terms.

PROVEN CAPABLE OF FAILING, which is the whole point of adding it: the
harness mutates the shipped program by removing its final `end` and
requires jq to refuse that, so the parse assertions cannot pass
vacuously. No skips are added — the pinned skipped count does not move.

Lane: openxfactory-2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI review requested due to automatic review settings September 9, 2026 13:31

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

The new “Report what became…” step currently conflates an unreadable gh pr list with “no previous advance” by forcing failures to [], which can misreport state during transient/auth failures.

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

Review details

Suppressed comments (2)

Previously missed (2) — in code that hasn't changed since the last review.

tests/review_lane_pin/test_repin_lane.py:785

  • The harness that executes the workflow’s own shell functions uses set -uo pipefail, but the workflow step itself runs under set -euo pipefail. Adding -e here makes the executed harness closer to the runner’s real strict-mode behavior and helps catch unexpected non-zero exits during future workflow edits.
    tests/review_lane_pin/test_repin_lane.py:990
  • This subprocess harness also uses set -uo pipefail while the workflow’s delivery step uses set -euo pipefail. Using the same strict-mode flags in the harness reduces the chance that a future non-zero exit is masked in tests but would abort the real workflow run.
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread .github/workflows/review-lane-repin.yml Resolved
brettheap and others added 2 commits September 9, 2026 10:11
A `gh pr list` that FAILED was coerced to `[]`, and an empty listing
renders "no previous automated pin advance has ever been opened on this
branch" — a positive claim ABOUT the platform, emitted by a firing that
could not read the platform. An expired token or a transient API error
therefore reported the one thing it could not know, and it contradicted
the step's own header, which promises that an unavailable listing is
reported as unknown (Copilot on openxFactory #844).

THE READ'S EXIT STATUS IS NOW KEPT SEPARATE FROM ITS OUTPUT. Only a
listing `gh` actually returned reaches jq; a non-zero exit leaves the
outcome empty and falls through to the fallback the step already carried
for the jq half of the same problem — "the last automated pin advance
could not be read from the platform on this firing". No new text was
invented and no branch was added. The step still never fails the run,
still carries no disposal act, and the jq program is byte-identical
apart from its indent.

IT IS THE MASKING THIS REPOSITORY ALREADY REFUSES IN TERMS.
`merge-master-approval.yml`'s gather says it twice — "a `|| echo '[]'`
fallback would convert a failed or rate-limited query into a clean,
empty, apparently-complete fact set" — and
`test_the_changed_path_gather_masks_no_failure` holds the caller to it.
The reporting step was the one place the doctrine had not reached.

MEASURED, BY RUNNING THE STEP'S OWN SHELL.
`TheOutcomeReportIsExecutedNotJustRead` already cut the jq program out of
the workflow; it now also executes the WHOLE shipped step against a
stubbed `gh`, so the guard is exercised rather than read:

  * `test_a_listing_the_platform_refused_is_reported_unreadable` — `gh`
    exits non-zero: the notice AND the step summary carry the unreadable
    fallback, the claim is absent from both, the run still exits 0, and
    the rendered line names no disposal act.
  * `test_a_listing_that_really_is_empty_still_says_so` — the same runner,
    one input flipped: a genuine `[]` from a SUCCESSFUL read still says
    so, so the fix distinguishes the two cases instead of collapsing them.
  * `test_a_listing_that_reads_is_rendered_end_to_end` — a real MERGED
    listing renders through the shipped shell, not just the cut program.
  * `test_this_control_can_actually_see_the_masking_come_back` —
    ANTI-VACUITY by mutation, the `ca9fafe6` lesson: the shipped script is
    mutated back into the coerced shape and the false claim is REQUIRED to
    reappear, so the refusal case is proven capable of firing.

Proven before the commit: with `|| echo '[]'` restored in the workflow,
the refusal case reds with "'…could not be read…' not found in
'::notice title=review-lane-repin::no previous automated pin advance has
ever been opened on this branch'". 195 passed / 2 skipped / 54 subtests
in tests/review_lane_pin — four new cases, no new skip, so the pinned
skipped count does not move.

Lane: openxfactory-2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Brett Heap, in session, 2026-09-09T13:57:49Z, verbatim "accept the
residual, record it" — openxFactory #745 comment 5603082637.

THE RESIDUAL, STATED EXACTLY. The arming lives inside the delivery step
"Open or update the single automated advance", gated
`steps.repin.outputs.action == 'advance'`, so a firing on which the
pinned core has not moved never reaches it: a refused arming is
re-attempted only on the next firing that DELIVERS an advance, and that
firing moves the head first.

IT IS ACCEPTED AS THE CONFORMING SHAPE. No third `gh pr merge --auto`
occurrence is added, so decision M-C's ratified exactly-twice equality
stands untouched and its negative control still reds at three; no
amendment is opened; and the residual is disclosed where the run is read
rather than closed — the delivery step's refusal witness and the no-op
firing's outcome report, both in `d368b07b`, measured by
`test_a_refused_arming_is_a_recorded_outcome_not_a_failed_advance` and
`test_the_not_armed_branch_states_the_retry_condition_when_rendered`.

WHERE IT IS RECORDED. One dated entry in the packet's ratification
record, appended to the 2026-09-09 addendum beside the box 1.3 and box
1.2 rulings and in the same style, and a sentence in tasks.md box 3.5,
whose evidence text carried "recorded on #745 for Brett Heap rather than
taken here" — true when it was written, and now answered. THE WORD TICKS
NO BOX: it rules a finding raised on the realizing pull request, not on
the packet's text, and box 4.3's unfiled enrolment successor remains the
act that would let an armed state complete anything.

Box 3.5 also gains the third finding on the same step and its fix — the
coerced `gh pr list` failure, the guard that replaced it, and the four
executed controls — so the box's account of what the witnesses say stays
true of the shipped bytes. NOTHING ELSE MOVES: no workflow, no test, no
spec delta, no envelope byte. `openspec validate
amend-mirror-floor-regeneration-merge-authority --strict` passes.

Lane: openxfactory-2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI review requested due to automatic review settings September 9, 2026 14:11
@brettheap

Copy link
Copy Markdown
Contributor Author

@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.

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.

🔵 Needs a closer look

It changes a critical automation workflow’s merge-related behavior and governance reporting, so it merits final human review despite extensive accompanying tests.

Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@brettheap

Copy link
Copy Markdown
Contributor Author

@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.

…oor-regeneration-merge-authority

Lane: openxfactory-2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI review requested due to automatic review settings September 9, 2026 15:43

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

The test harness that “executes the workflow’s own bytes” currently runs under different shell strictness than the real workflow step, which can mask real failures.

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

Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

The delivery-step harness cut `command_safe` and `report_the_arming` out
of the shipped workflow and then ran them under a hard-coded
`set -uo pipefail`, while the step itself declares `set -euo pipefail`.
ERREXIT WAS THE ONE CONDITION THE HARNESS DID NOT REPRODUCE, and it is
the option that decides whether an unexpected non-zero TERMINATES the
step: every case in `TheArmingIsExecutedNotJustRead` could have passed on
a witness that aborts the real workflow half-way through and emits
nothing (Copilot on openxFactory #844).

IT IS THE `ca9fafe6` LESSON ONE LAYER OUT. `mirror-floor-addition-grace`
recorded that "controls must MEASURE the same inputs as the shipped
assertion"; the bytes are only the shipped bytes if the CONDITIONS are
too.

THE OPTIONS ARE READ, NOT RESTATED. `_shell_options` takes the run
block's first active line, insists it really is a `set` declaration, and
returns it verbatim, so the day the step's own options change the harness
changes with them instead of keeping a stale copy that passes. Both
assembled harnesses use it. The outcome-report harness executes the WHOLE
run block, so its options are the shipped ones by construction --
including the deliberate ABSENCE of errexit that is how that step keeps
its promise never to fail a run -- and that is now asserted rather than
assumed, so a future edit cannot quietly start assembling a script with
options of its own.

NO TEST NEEDED A GUARD AND THE WORKFLOW IS UNTOUCHED. All 198 cases pass
under the step's real options: the two failing commands the harness
drives are the ones the shipped code already guards, `gh pr view` with
`|| true` and the arming with `if ...; then`. No `gh pr merge` occurrence
moves, so decision M-C's ratified exactly-twice equality stands.

PROVEN CAPABLE OF FAILING.
`test_the_harness_aborts_where_the_real_step_would` cuts the `|| true`
off the extracted `gh pr view` by name -- one guard, so the abort has one
cause -- and requires the harness to DIE there against the same refusing
`gh` the case above uses: non-zero status, no witness on either surface,
and the gh call log holding exactly the one `pr view` that killed it, so
the abort is that command and not the scaffolding. Measured: under
`set -euo pipefail` rc=1 with an empty summary and no notice; under the
old hard-coded `set -uo pipefail` the same mutation sails past, rc=0,
and emits the UNREADABLE line -- which is precisely the blindness the
finding named. The paired positive (task 4.5) runs it unmutated and
requires the clean zero.

No skips are added; the pinned skipped count does not move.

Lane: openxfactory-2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI review requested due to automatic review settings September 9, 2026 16:32

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.

🔵 Needs a closer look

It changes critical merge/auto-merge automation behavior in a governance-sensitive workflow and should receive final human validation despite strong test coverage.

Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@brettheap
brettheap marked this pull request as ready for review September 9, 2026 16:59

@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 ✨

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-2 (openXfactory-2)
LANDING — lane openxfactory-2 (openXfactory-2), session f7585620, 2026-09-09T17:20:18Z, PR #844 into openxFactory main
Pre-flight PASS at head 1c5b81a: six required checks success, 0 unresolved threads (7 resolved), closingIssuesReferences 0, MERGEABLE; Brett Heap's standing word 2026-09-09 "none vetoed, merge it when green, then report the next sweep" + "hold 844 until 801 lands" (#801 → e86eca3 15:40Z). Disclosed: Codex quota-exhausted since 14:40Z — heads after c2e76e1 carry Copilot review only (approval recommended, 0 open threads).

@brettheap
brettheap merged commit 587f21a into main Sep 9, 2026
10 checks passed
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-2 (openXfactory-2)
LANDED — lane openxfactory-2 (openXfactory-2), 2026-09-09T17:20:29Z, PR #844 → 587f21a (window closed)

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