Skip to content

Remove CLAUDE.md in favor of AGENTS.md - #14474

Merged
williammartin merged 1 commit into
cli:trunkfrom
jarrensj:remove-claude-md
Oct 12, 2026
Merged

williammartin merged 1 commit into
cli:trunkfrom
jarrensj:remove-claude-md

Conversation

@jarrensj

@jarrensj jarrensj commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Description

The repo has a root CLAUDE.md whose only content is @AGENTS.md, an import that makes Claude Code load the real instructions from AGENTS.md. As of Claude Code v2.1.277, Claude Code reads AGENTS.md directly in a project with no CLAUDE.md, so the shim no longer does anything. This removes it so there is a single instruction file that cannot drift from a second copy.

AGENTS.md is unchanged.

How did you test this change?

Not tested at runtime. The change deletes a one-line markdown file that no code reads. I ran git grep CLAUDE.md and saw no other references in the repo.

Claude Code now reads AGENTS.md directly when a project has no
CLAUDE.md, so the CLAUDE.md that only imports it via @AGENTS.md is
redundant. Keeping a single instruction file avoids the two drifting
apart.
@jarrensj
jarrensj requested a review from a team as a code owner September 18, 2026 22:53
@jarrensj
jarrensj requested a review from niik September 18, 2026 22:53
@github-actions github-actions Bot added external pull request originating outside of the CLI core team needs-triage needs to be reviewed ready-for-review and removed needs-triage needs to be reviewed labels Sep 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your pull request! While it doesn't meet all of our standard requirements, it appears to be a small, focused contribution and has been routed to the team for review.

Note: We still encourage linking to an issue with the help wanted label when possible, as it helps us prioritize and track contributions.

@williammartin

Copy link
Copy Markdown
Member

Makes sense to me but I think we should wait a bit to merge this for the release to roll out.

brettheap added a commit to opensoft/openXfactory that referenced this pull request Sep 23, 2026
…ggregation, not declared alone (#1145)

Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

**The remedy the pin file recorded for itself.** Copilot raised a HIGH finding on #1136 — the lockstep flip at the fourth re-point ceremony, merge `7c49825e` — at [`r4067694104`](#1136 (comment)), review [`5273295522`](#1136 (review)). The lane **verified the premise** and **declined the remedy** as outside that pull request's mandate ([`r4067703286`](#1136 (comment))), and the flip's own appended `reason:` paragraph recorded the remedy's shape as option **(b)**:

> *"make the CROSS-REPOSITORY fact assertable at all — nothing today reads xFactory's three surfaces and compares them to this value, which is why a false `status` survives in EITHER direction until a human notices … **(b) is the better fix, because (a) still leaves this file's truth depending on a lane remembering to write it.** Both are OpenSpec-class acts on a realized capability, which is exactly why neither rides here."*

**This packet is that act.** `Status: draft` — not ratified by the authoring lane.

---

## The hazard, measured on `main` `2e222d98`

| fact | measurement |
| --- | --- |
| the declaring field | `contracts/review-lane-pin.yaml`:714 `status: converged` |
| the value it is about | `core_commit`:60 `b21f0100…` |
| the aggregation's three surfaces | `opensoft/xFactory` `main`: `merge-master-approval.yml`:152, `council-convening-lane.yml`:308, `tests/test_merge_master_workflows.py`'s `MIGRATION_PIN`:72 — all three `b21f0100…` |
| what the repin lane may write | `WRITABLE_PATHS` = four files; within the pin, only regex-anchored `core_commit`, `floor_snapshot.sha256`, `floor_snapshot.entry_count` |
| can it write the field? | **`grep -c lockstep scripts/review_lane_repin.py` → `0`** |
| does anything read the aggregation? | **`grep -nE "opensoft/xFactory\|MIGRATION_PIN\|council-convening" scripts/review_lane_repin.py .github/workflows/review-lane-repin.yml` → no output.** `MIGRATION_PIN` appears in no file under `scripts/` or `.github/workflows/`. |
| the guarding test | `test_the_pin_records_its_lockstep_state_with_the_aggregation_pin` asserts the field against a **literal in the test file** — this repository's value against this repository's own constant |

> **Beware the substring.** A bare `grep -c xFactory` on those two files answers **13** and **32**, and every hit is `openxFactory`. The measurement above is the one that means anything.

So the declaration is **true today and nothing keeps it true.**

## It is not hypothetical, and it is live right now

It last went false on **2026-09-18**, when the hourly lane's advance (#1122 → `38f826c2`, 20:53:37-04:00) moved `core_commit` and left `converged` standing. The hand repair (#1123 → `8184d74a`, 21:27:43-04:00) followed **34 minutes 6 seconds** later, both first-parent on `main`. Thirty-four minutes because a human was watching that evening. **Nothing bounds it.**

**And #1138 is OPEN as this is written** — not a draft, platform auto-merge **armed**, proposing `core_commit` `b21f0100…` → `491fc54d…`:

```
$ git diff main...origin/bot/review-lane-repin --stat
 .github/workflows/merge-master-approval.yml | 4 ++--
 .github/workflows/pytest-suite.yml          | 2 +-
 contracts/review-lane-floor-snapshot.yaml   | 9 ++++++---
 contracts/review-lane-pin.yaml              | 6 +++---
$ git diff main...origin/bot/review-lane-repin | grep -cE "^[-+].*(lockstep|converged|diverged)"
0
```

`tests/review_lane_pin/test_review_lane_caller.py` is not in that diff at all. **The hour it merges, `lockstep.status` becomes false, the test still passes, and nothing reports it.**

## Why shape (b) and not shape (a) — decided by measurement

**The lane cannot write the field honestly, because it has no reading of the aggregation to write from.** Zero hits, in both files. Under (a) it would have exactly one thing it could write — `diverged`, on every advance — by **inference** from *"`MIGRATION_PIN` does not move on a routine advance."*

**That inference is already falsified by this estate's own history.** At the fourth ceremony (`opensoft/xFactory` #475 → `c88d1fdd`, 2026-09-21) the aggregation converged **onto** a commit this file had been pinned to since 2026-09-18 — three days apart, not a pairing at all, which the pin file records as the first time that happened. An advance landing where the aggregation already is leaves the pair **converged**. **So (a) does not remove the false declaration; it changes which direction it is false in.**

**And the capability has already ruled on assertion-versus-measurement, one requirement over.** *An automated pin advance moves every pinned site in one commit or opens nothing* closes: *"what is added here is that an UNATTENDED author must prove the lockstep by measurement rather than assert it."* Shape (a) would install inside that same capability precisely what that sentence forbids. Shape (b) extends its principle to the one lockstep it does not yet reach.

**The capability is also already built for (b).** Its realization's declared split — *"the workflow reads the two repositories with `gh` … and hands this module PURE INPUTS … Every requirement's refusal is then a unit test with a fixture, not a workflow that has to be fired to be believed"* — is exactly what the assertion needs: one more repository read where reads already happen, one more pure comparison where judgments already happen. **No new architecture.**

**(a) is not forbidden by this requirement.** If a later act teaches the lane to read the aggregation, it may then write the field — and it would be writing a measurement, which makes (a) a special case of (b) rather than an alternative to it.

## The requirement

ONE `## ADDED`, **eight scenarios** — an absent or foreign declaration, a stale `converged`, a stale `diverged`, surfaces disagreeing with each other, the check's own access failing, an unreadable aggregation, a candidate unread or its head moved, and the pure-function reproduction. The state is **measured**, not declared; the check runs **at least at every proposed advance and its pull request, whoever opened it** — in practice on every pull request that changes the pin, a fork's included — so the contradiction is reported on the same pull request that creates it rather than whenever a human next reads the field; it observes **this repository's side of the pair**, so a `MIGRATION_PIN` re-point in the aggregation is reported at the next pull request here that changes the pin (`tasks.md` § 6.7); the **read** lives in the workflow and the **comparison** is a pure function; it is **symmetric** (a false `converged` and a false `diverged` alike); and the declaration is **not removed** — it becomes the subject of the measurement rather than its only evidence.

**The aggregation's surfaces are read AS A SET** (`r4075976905`) **at ONE resolved commit of it** — never independently from a moving branch, because a re-point landing between two API calls returns a mixed set the check would report as INCONSISTENT, *a state that never existed in the repository it was reading*. They must agree with each other before either state is concluded; disagreement is its own outcome, INCONSISTENT, with each surface named by a digest and the commit they were read at named with the verdict. **The outcomes are ORDERED and exactly one holds for any input a run judges** (`r4076152698`, `r4076557241`, `r4084891099`, `r4085195340`) — **the candidate unread FIRST** (a read of this repository failing, for any reason but the pin's absence), then **the declaration outside its vocabulary** (a foreign state, a non-commit `core_commit`, an unparseable candidate, the pin absent, or a `converged_with:` other than the read plan's workflow members), before the aggregation is read at all, then the check's own **access failing**, then unreadable (a surface whose value is not a commit counts as unreadable, `r4076989950`), then disagreeing, then the comparison — because giving each outcome a conclusion is exactly the moment overlapping cases become a contradiction, and two of mine did. **One partition classifies every failure to read, of either repository**: a transient failure is UNDETERMINED, a 404 for a branch, a commit or a file is an absence, and every other failure is the check's own access failing, a 404 from the head's lookup (a read of the pull request) among them. **A run that finds its head moved publishes no verdict**. It is the one run that publishes none, because the push that moved the head starts a run of its own.

**Each outcome carries a CONCLUSION and three fail:**

| outcome | conclusion | why |
| --- | --- | --- |
| declaration **absent or outside its vocabulary** — a foreign state, a non-commit `core_commit`, an unparseable candidate, the pin absent at the verified head, a `converged_with:` other than the read plan's workflow members | **FAIL**, naming the value found or the pin's absence | this repository's own file, checked once the candidate is in hand and before the aggregation is read — a defect that makes every later question moot |
| the check's own **access fails** — binding unresolved, mint refused, either repository refusing its request, or any failure to read that is neither transient nor an absence | **FAIL**, naming the failure | this repository's own configuration or code; an UNDETERMINED here would stand on every run |
| declared state **CONTRADICTED** | **FAIL**, naming `core_commit` and the agreed commit's digest | this repository's own file states something false; the remedy is one edit |
| surfaces **disagree** (INCONSISTENT) | **NEUTRAL**, visible | another repository's defect |
| aggregation **unreadable**, or a read of the candidate failing transiently (UNDETERMINED) | **NEUTRAL**, visible | another repository's availability, or the host's |
| declared state agrees | pass | |

That does not contradict the decision not to block a lawful divergence: **what fails is not the divergence but the false declaration about it.** And **UNDETERMINED is forbidden as a STANDING state**: the check's own access failing is its own FAIL, so it cannot stand as a permanent NEUTRAL. **No aggregation value is published as it is**: this repository and its checks are public and the aggregation is private, so a surface is published only by its classification, its relation to `core_commit` and a digest (`design.md` D20).

`## ADDED` and no `## MODIFIED` is a decision (`design.md` D3): three active changes carry deltas on this capability and none names this requirement or is named by it, and the hazard lives in the **gap** between the advance this capability automates and a field no requirement obliges anyone to measure — not in any promoted requirement's text.

## Boundaries this packet holds

- **The disposition mechanism is untouched** — `validate-openspec-cli-pin.py`, `reconcile()` and `contracts/openspec-cli-pin.yaml` are not this packet's subject in any respect.
- **The pin file is not hand-patched.** `lockstep.status`, `converged_with:` and the append-only `reason:` narrative do not move. A packet that edited the value it proposes to start checking would assert the very fact it exists to stop asserting.
- **`WRITABLE_PATHS` and `PINNED_SITES` gain no member.**
- **No act in `opensoft/xFactory` is proposed.** The aggregation is READ. `MIGRATION_PIN` advances only at a recorded ceremony and this packet neither performs nor requires one.
- **The `obligation:` "only at a ceremony" clause is NOT narrowed here** — still the ratifier's act, registered at `tasks.md` § 6.1. This packet makes the state measurable, which is what lets that clause be narrowed on evidence rather than on argument.
- **#1138 is not this packet's to land, hold or amend.** It is cited as the live reproduction.

## Gate

- `OPENSPEC_TELEMETRY=0 openspec validate assert-review-lane-lockstep-against-aggregation --strict` → **valid** — a narrowed claim, about this change alone.
- `validate-code-surface.py` / `validate-target-release.py` / `validate-sequenced-after.py` → **exit 0** each.
- **Corpus-wide, through the adjudicated entrypoint the gate itself runs** — `python3 scripts/validate-openspec-cli-pin.py --all --no-cache` (`.github/workflows/openspec-cli-pin-gate.yml`:101) → **exit 0**: `@fission-ai/[email protected]` verified against its content address, `111 passed, 1 failed (112 items)`, **0 undispositioned**. The one failure is `add-chain-attestation` / `signed-execution-chain/spec.md`, INHERITED from `main` and not this packet's, applied as the disposition `contracts/openspec-cli-pin.yaml` carries for it (Brett Heap, 2026-09-05, *"take exit 2"*). The raw `openspec validate --all --strict` reports that same finding as a blocking error because it cannot read the disposition — which is why, under the now-ratified `require-adjudicated-validation-entrypoint` (landed on `main` as `2e222d98`), a corpus-wide claim names the entrypoint and not the raw tool.
- `code_surface: openxFactory` is **not empty**, so under `release-realization` this archives on merged **plus** green realization evidence — the check landed, **all eight** of its scenarios exercised by fixtures plus the positive cases, the negative control (`review-lane-repin.yml` carries no `pull_request` trigger) and the gate's own trigger test, and one real observation of it **concluding** — `converged`, `diverged` or a named contradiction, and not UNDETERMINED, because an observation of UNDETERMINED proves the access is missing rather than that the check works. Stated here rather than discovered at the archive gate.

## Sequencing with the lane's other open packet

This and #1143 both added a row to the README "OpenSpec Records" block and to `tests/sequenced_after/corpus-ledger.yaml`. **#1143 has landed, as `a151e462`, and this branch still merges cleanly with `main`**: `git merge-tree --write-tree origin/main HEAD` exits 0. The collision was measured and removed before that landing. With both rows at the head of the list, #1145 conflicted in `README.md` once #1143 had landed, so #1145's row was moved after the lane's other 2026-09-22 row; both orders then merged cleanly to the SAME tree, the ledger auto-merging throughout. On that fully merged tree, all of these passed: the three front-matter validators, both packets' strict validation, #1143's carriage proof, and the adjudicated entrypoint (`112 passed, 1 failed (113 items)`, the one failure the dispositioned `add-chain-attestation`). `main`'s required-check rules are not strict (`strict_required_status_checks_policy: false`), so this branch needs no merge from `main`.

## Review record — 35 Copilot reviews at 31 heads; 87 findings (73 as threads, 14 only in *Previously missed* blocks), plus eight summary-line themes; 0 unresolved threads

**82 taken as fixes, 4 answered by measurement, 1 measured and registered. Of the eight summary-line themes, six were taken, one was answered by measurement and one is registered.** The last review, `5294384086` at `d05ce453`, reports **Findings: None**.

- **Answered:** `r4076254100`, raised against a README count that a `gh pr edit --body` had already corrected. The edit and the review carry the SAME timestamp, `20:39:17Z`.
- **Answered:** `r4078998769`, which held that a base-repository check run cannot attach to a fork's head commit. Measured, it can: every pull request's head is published in the base repository as `refs/pull/<n>/head`. On the public fork pull request `cli/cli#14474`, the base repository resolves the fork's head commit and carries 20 check runs on it.
- **Answered:** `r4085195422`, which held that a 404 from the head's lookup had no outcome. The partition already made it the check's own access (*"a 404 for the repository or the pull request itself"*); what it did not say was that the head is looked up by reading the pull request, and `d05ce453` says so and lists the fixture.
- **Answered:** `r4085195461`, a stale count of seven scenarios in this description. The review's run began at `17:08:42Z`, and the description had been corrected to eight by `17:10:30Z`.
- **Registered:** `r4078145216`, the approver race. It needs an approver that admits a pin-changing pull request, and none does today, so `tasks.md` § 6.5 registers the obligation for the two active changes that would admit one.

Every thread carries a reply and is resolved. Every review's **`Previously missed`** block was read rather than trusting a zero-unresolved count: fourteen findings came only from there, and two more appeared there before they appeared as threads.

**The three that changed the packet most, each a defect in my own text:**

1. **`r4076152594` — the check had no way to read the repository it measures.** Measured: `opensoft/xFactory` is **PRIVATE** (`gh api repos/opensoft/xFactory --jq .visibility` → `private`; an unauthenticated raw read of a surface → **404**), and `contracts/review-lane-repin-binding.template.yaml` grants `contents:read` on `codeXfactory/codexFactory` and nothing on the aggregation. **On today's credentials the check could never conclude**: it would have answered UNDETERMINED on every run then, and would end every run in its ACCESS FAIL now — and a check that never concludes looks exactly like one that works. Three consequences are now written down: a declared read-only binding in the same shape as the existing grant (with the same `never_grants:` set, so the family's rule that neither lane reaches into the other's repository holds); the standing-UNDETERMINED prohibition above; and § 5.4's evidence becoming *one observation of the check **concluding***, not merely running.
2. **`r4076152698` — two outcomes overlapped**, so one set of inputs demanded both FAIL and NEUTRAL. A requirement no implementation could satisfy, introduced by my own previous-round fix. Answered by ordering the outcomes rather than by patching one `WHEN`.
3. **`r4076152473` / `r4076152544` — the contract had no workflow representation.** A step exits 0 or non-zero — a green pass or a red failure and nothing else — so *"NEUTRAL, visible, not a pass"* needs the check-run API and a test that asserts the **published conclusion** rather than the exit code, or it degrades silently to green. And a read failure has to be an **input**, never a fatal step, or the UNDETERMINED path is unreachable by the only route that reaches it.

**Rounds 4 and 5 found four more, every one a consequence of an earlier fix of mine rather than of the original text** — which is the honest way to describe them:

- **`r4076254027`** — the binding covered one run of two. The PR-side gate is a separate workflow run: it cannot reuse a minted App token any more than it can reuse step outputs, and `GITHUB_TOKEN` cannot read a private repository. It mints its own from the same App, under a binding of its own (next item).
- **`r4076368784`** — and the binding is *structurally* single-consumer (`consumer.holder_ref` `:100`, `resolution.resolved_by` `:167`, *"never passed to a second workflow"* `:190`), so "names both consumers" needed a representation. It was first answered with a **second consumer entry**, and `r4076990082` found that wrong one level down: the template's `privileges:` and `resolution.scoped_to` are binding-wide and its `floored_repository` grants write, so a seated consumer would mint with the advance lane's write authority. The gate now gets **a binding of its own** — `contents:read` on `xFactory` only, one down-scoped mint — and the never-passed statement is **carried unchanged on both, because nothing is passed.**
- **`r4076368722` then `r4076474882` — and the second REVERSED my answer to the first, on a test this repository already runs.** A fork pull request receives no secrets, so the gate would answer UNDETERMINED on every fork event; my fix was a plain `pull_request` gate scoped by `head.repo.full_name`. `test_the_head_executing_trigger_is_absent` refuses exactly that on the secret-bearing caller — *"a plain `pull_request` trigger would run the head's copy of this file with the App credential that reads a private repository in scope — the exfiltration shape the base-branch rule prevents"* — and a same-repository condition cannot fix it, because under `pull_request` **the head's copy of the workflow runs and can delete the condition**. The gate now takes the estate's worked shape: **`pull_request_target`** (the base's copy runs), **no checkout of the PR head** (costing nothing — this check reads two repositories over the API and needs no candidate code). It first carried an allowlist as well, as defence in depth, and the review at `eb01c3d1` showed that this capability forbids exactly that (below).
- **the neutral publication had no write path** — no workflow here grants `checks: write` (`merge-master-approval.yml`:453 grants `checks: read`), so the publish would 403 and the contract would degrade to the silent green pass by a second route. The gate's own job declares exactly `contents: read`, `pull-requests: read` and `checks: write` — `r4077837498` found that `checks: write` alone would have left it unable to read the candidate pin — and **the aggregation token stays read-only.**

**The three reviews at `918e30e3` found nine, all taken in `c82c8f76`, and a search-based sweep found the same defects standing in places no thread named:**

- **the gate was still called `pull_request`-triggered** after D14 reversed it (`r4076845460`, `r4076990021`, and D7) — now `pull_request_target` throughout, with the reason the two existing pin gates may run on `pull_request`: neither holds a secret;
- **the trigger test binds `merge-master-approval.yml` only** (`r4076845535`) — § 5.1b now asserts the gate's own triggers;
- **D9 still held the superseded order** (`r4076845591`);
- **a published check run does not change the job's own, and a `pull_request_target` job check lands on the PR head** — measured on this very pull request (`r4076902144`, `r4077054569`) — so the verdict run's name matches no job id, and it hangs on the verified candidate `head.sha`, never `github.sha`;
- **agreeing surfaces could carry a non-commit into the comparison** (`r4076989950`) — a surface is now read only as a 40-hex commit, or it is UNREADABLE;
- **the second consumer inherited the advance lane's write grant** (`r4076990082`) — the gate gets a binding of its own;
- **two outcomes fail, not one** (`r4077054636`, and D8, which undercounted one paragraph below its own table).

**The reviews at `c82c8f76` and `4570063f` found four more, all taken in `16fdd730`:**

- **the candidate could have chosen what the gate reads** (`r4077898334`). Its `converged_with:` is head-controlled, and my own D16 rule of naming a non-commit surface by its value would then have printed any private xFactory file into the verdict. The requirement now takes only `core_commit` and the declared state from the candidate, and every aggregation path from the base; head data is judged, never followed.
- **`checks: write` alone would have starved the gate** (`r4077837498`): a declared `permissions:` block sets undeclared scopes to `none`, so the job declares `contents: read`, `pull-requests: read` and `checks: write`.
- **the advance side had no publication path** (`r4077837539`). It now records its verdict in the pull-request body the lane already composes, and the gate carries the conclusion on the same head. A lane push starts the gate, measured on `#1138`.
- **the advance lane's grant had no mint** (`r4077898366`): it gains a third, `xFactory` `contents: read`.

**And the review at `16fdd730` found one, taken in `cb97b7ae`:** the requirement resolved "the aggregation's branch" without saying WHICH (`r4078009970`). It now resolves the aggregation's DEFAULT BRANCH at run time, never a caller-supplied ref. That is the capability's own rule for the source repository, which `review-lane-repin.yml`:433-459 already realizes.

**The reviews at `cb97b7ae`, `62a0945c` and `eb01c3d1` found eight more**, six as threads and two only in *Previously missed* blocks:

- **every outcome needed a published conclusion, not only NEUTRAL** (`r4078058050`, taken in `62a0945c`). `failure`, `neutral` and `success` are now each mapped, and the test asserts each one.
- **the aggregation's constant needed a selector** (review `5285753827`'s *previously missed* item, taken in `eb01c3d1`). Each value is now read at its selector, and a decoy-literal fixture proves it.
- **the third mint needed the tests that fix the binding at two mints to move with it** (`r4078098133`, taken in `eb01c3d1`).
- **the triple named its base but not its author or head ref** (`r4078098160`, taken in `eb01c3d1`, since superseded).
- **the head re-read needed a test that drives it** (`r4078098168`, taken in `eb01c3d1`).
- **the allowlist itself was the defect** (`r4078145229`, and review `5285808064`'s *previously missed* item, taken in `16dc4416`). This capability's promoted *An automated pin advance is judged by the freshness checks that already exist, with no exemption* forbids any check that judges a pin advance to branch on the pull request's author, branch or origin. The gate now judges every pull request that changes the pin, a fork's included. Its safety rests on base code, inert candidate data and a read plan now fixed in its code (`design.md` D17, D19). That is the second defence of mine on this packet that turned out to be the defect.
- **the approver race** (`r4078145216`) is measured absent today and registered at `tasks.md` § 6.5.

**The reviews at `16dc4416` through `d36cb68f` found thirty-one more**, over ten rounds. Each was taken in the round it was raised, and every reply names its fixing commit. By theme:

- **the trigger and the token:** the `paths:` filter is exactly the pin (`r4078252960`). A skip for edits that move no judged value was added (`r4078308120`) and later withdrawn as a bypass of the ordered outcomes (`r4078883755`). The declaration is validated first (`r4078425707`).
- **what is read:** the read plan is fixed in the gate's code, never taken from the pin file (`r4078365046`). It has two workflow members and one additional `MIGRATION_PIN` read (`r4078528181`, `r4078528208`, `r4078528244`).
- **what is published:** no aggregation value is published as it is. A classification, a relation to `core_commit` and a digest are published instead (`r4078468841`, `r4078835190`).
- **untrusted input:** the candidate is parsed strictly under a byte ceiling (`r4078835237`), and nothing derived from it reaches a script except through `env:` (`r4078835258`). A non-commit `core_commit` and an unparseable candidate each FAIL first (`r4078528147`, `r4078425733`).
- **outcomes:** the check's own access failure is its own FAIL (review `5286349291`). Every outcome is data to one always-run publisher (`r4078594297`). The comparison scenarios' WHENs are disjoint on their own text (reviews `5286144492`, `5286193943`).
- **the runs:**
  - overlapping runs are serialized, with the guarantee bounded to what holds without atomicity (`r4078468867`, `r4078883704`);
  - the lane's body record is historical (`r4078594266`);
  - the gate's identity is named once (review `5285930613`);
  - an approver approves only on `success` (`r4078528254`).
- **scope and records:**
  - the check says it observes this repository's side of the pair (`r4078648320`);
  - the live literal test is retired (`r4078883732`);
  - the pure function takes structured read results (review `5286688301`);
  - three inventories I left behind were each found by review: D17's two-value comparison, `target_release`'s six scenarios, and this description's counts (`r4078425764`, `r4078648354`, review `5286688301`).
- **the last round** (`d36cb68f`):
  - the App installation grant on `opensoft` is named as the realization's first prerequisite, since a binding and a mint declare the read without provisioning it (`r4078926291`);
  - the requirement now states the host's 3,000-file path-filter exception itself rather than only registering it (`r4078926263`);
  - seven statements that still said a missing grant would leave the check UNDETERMINED now say it fails on its own access.
- **the reviews at `1c037be6`:**
  - one thread was answered by measurement (`r4078998769`, above);
  - review `5286923179` reported **Findings: None**, but its summary named three themes, and each held on measurement. All three were taken in `d6787530`:
    - the conclusion paragraph now names all six outcomes' conclusions, the one PASS included;
    - D5's rationale is brought onto the fixed plan;
    - the reproduction scenario is given the pure function's whole input.
- **the review at `d6787530`** found one, `r4084891099`, and its summary named three themes. The finding and all three themes were taken in `b0f02bd9` (`design.md` D21):
  - the candidate's own reads had no outcome, so *"exactly one holds for any input"* was false. The order now begins at the candidate unread;
  - one partition now classifies every failure to read, of either repository, with the check's own access as the residual class;
  - a verified head is now defined, a moved head publishes no verdict, and *"is a commit"* means the grammar;
  - an eighth scenario was added and the five inventories moved with it. D8's stale count of two failing outcomes is corrected.
- **the review at `b0f02bd9`** found three. One was taken in `d05ce453`: the one-outcome claim is scoped to the inputs a run judges, since a moved head judges nothing (`r4085195340`). The other two were answered, above (`r4085195422`, `r4085195461`).
- **the review at `d05ce453`** (`5294384086`) reported **Findings: None**. Its summary named two themes. Both classes had already had their two head-moving rounds, so each was answered by measurement in one comment, and the head stays:
  - **access classification** — no defect found. The partition is total and disjoint, and every statement of the class agrees with it;
  - **branch-resolution inputs** — the reproduction scenario's input list names the resolved commit but not the branch that the verdict also names. `tasks.md` § 5.2 already takes both. **Registered for the next act on `spec.md`.**


Lane: openxfactory-4
Co-Authored-By: Claude Fable 5.1 <[email protected]>
mremond added a commit to mremond/firstmate that referenced this pull request Sep 24, 2026
fm-pr-merge.sh built its GitHub refusals only from checks present in
statusCheckRollup, so a required check that never ran was simply absent and
the merge proceeded on the subset that reported, contradicting its own
"every required check green" claim.

The GitHub verify now reads the base branch's required contexts from the
forge itself - the classic branch protection summary on
GET repos/{o}/{r}/branches/{b} and the active ruleset rules on
GET repos/{o}/{r}/rules/branches/{b} - and refuses when a required context
has no entry in the same rollup, at the same head, that the merge is bound
to. Absence reads as unknown, never green. The required-set read joins the
existing refusal list, so a draft, a red check, and an unreported required
check are all reported together.

Could not read vs nothing required: both endpoints need only repository
read access. The admin-only GET .../branches/{b}/protection endpoint is
deliberately not used: it answers a non-admin token with the same 404 an
unprotected branch gets (observed live on kunchenguid/firstmate main with
this token), which would read a missing permission as "nothing required".
Any failed or malformed read of either source (auth, missing fine-grained
permission, rate limit, network, 404, unexpected shape) refuses the merge
with a line naming the unreadable source. The one exception is GitHub's
plan-gated 403 on the rules endpoint ("Upgrade to GitHub Pro or make this
repository public"), which already means "this repository has no branch
rules" for the merge-queue reader; that check moves into one shared helper
and the classic summary still decides for such a repository.

Attended waiver: --allow-missing <check-name> is the twin of --allow-red and
follows the same design and recording path: once, separate name argument,
waives only that exact unreported required check, still requires every
other required check reported and every check green, never waives an
unreadable required set, refused while the away-posture record exists, and
refused on GitLab. Merge-state BLOCKED policy is unchanged.

How this differs from the withdrawn kunchenguid#5353 (read from its diff):
- kunchenguid#5353 read the admin-only branches/{b}/protection endpoint and treated
  its 404 as "no required checks", so for any non-admin token the required
  set silently read as empty; this change reads the read-access branch
  summary and treats every failure as unreadable.
- kunchenguid#5353 ignored rulesets; this change also reads required_status_checks
  rules from the effective branch rules.
- kunchenguid#5353 made separate per-head REST reads of statuses and check-runs capped
  at per_page=100 with no pagination; this change checks presence in the
  same statusCheckRollup view the red-check gate already reads at the
  verified head.
- kunchenguid#5353 stopped at the first unreadable read; this change reports it as one
  refusal among all the others.
- kunchenguid#5353 also claimed kunchenguid#5345 (lock stealing) and changed 39 files, most
  unrelated; this change is kunchenguid#5344 only.

Live proof, read-only (a gh wrapper refused every merge and mutating call):
- cli/cli#14474 (trunk requires 3 classic build contexts, none ran):
  refused, naming build (macos-latest), build (ubuntu-latest),
  build (windows-latest); with --allow-missing "build (macos-latest)" it
  still refused, naming the other two.
- cli/cli#13665 (ran build (ubuntu-24.04-firewall) instead): refused,
  naming build (ubuntu-latest).
- hashicorp/terraform#39262 (ruleset-required checks absent): refused,
  naming Code Consistency Checks, End-to-end Tests, Race Tests, Unit Tests.
- cli/cli#14485 (all required reported and green): verified; the wrapper
  blocked the merge call and the pull request read back open.

Fixes kunchenguid#5344
kunchenguid pushed a commit to kunchenguid/firstmate that referenced this pull request Sep 25, 2026
* fix(bin): refuse a merge when a required check never reported

fm-pr-merge.sh built its GitHub refusals only from checks present in
statusCheckRollup, so a required check that never ran was simply absent and
the merge proceeded on the subset that reported, contradicting its own
"every required check green" claim.

The GitHub verify now reads the base branch's required contexts from the
forge itself - the classic branch protection summary on
GET repos/{o}/{r}/branches/{b} and the active ruleset rules on
GET repos/{o}/{r}/rules/branches/{b} - and refuses when a required context
has no entry in the same rollup, at the same head, that the merge is bound
to. Absence reads as unknown, never green. The required-set read joins the
existing refusal list, so a draft, a red check, and an unreported required
check are all reported together.

Could not read vs nothing required: both endpoints need only repository
read access. The admin-only GET .../branches/{b}/protection endpoint is
deliberately not used: it answers a non-admin token with the same 404 an
unprotected branch gets (observed live on kunchenguid/firstmate main with
this token), which would read a missing permission as "nothing required".
Any failed or malformed read of either source (auth, missing fine-grained
permission, rate limit, network, 404, unexpected shape) refuses the merge
with a line naming the unreadable source. The one exception is GitHub's
plan-gated 403 on the rules endpoint ("Upgrade to GitHub Pro or make this
repository public"), which already means "this repository has no branch
rules" for the merge-queue reader; that check moves into one shared helper
and the classic summary still decides for such a repository.

Attended waiver: --allow-missing <check-name> is the twin of --allow-red and
follows the same design and recording path: once, separate name argument,
waives only that exact unreported required check, still requires every
other required check reported and every check green, never waives an
unreadable required set, refused while the away-posture record exists, and
refused on GitLab. Merge-state BLOCKED policy is unchanged.

How this differs from the withdrawn #5353 (read from its diff):
- #5353 read the admin-only branches/{b}/protection endpoint and treated
  its 404 as "no required checks", so for any non-admin token the required
  set silently read as empty; this change reads the read-access branch
  summary and treats every failure as unreadable.
- #5353 ignored rulesets; this change also reads required_status_checks
  rules from the effective branch rules.
- #5353 made separate per-head REST reads of statuses and check-runs capped
  at per_page=100 with no pagination; this change checks presence in the
  same statusCheckRollup view the red-check gate already reads at the
  verified head.
- #5353 stopped at the first unreadable read; this change reports it as one
  refusal among all the others.
- #5353 also claimed #5345 (lock stealing) and changed 39 files, most
  unrelated; this change is #5344 only.

Live proof, read-only (a gh wrapper refused every merge and mutating call):
- cli/cli#14474 (trunk requires 3 classic build contexts, none ran):
  refused, naming build (macos-latest), build (ubuntu-latest),
  build (windows-latest); with --allow-missing "build (macos-latest)" it
  still refused, naming the other two.
- cli/cli#13665 (ran build (ubuntu-24.04-firewall) instead): refused,
  naming build (ubuntu-latest).
- hashicorp/terraform#39262 (ruleset-required checks absent): refused,
  naming Code Consistency Checks, End-to-end Tests, Race Tests, Unit Tests.
- cli/cli#14485 (all required reported and green): verified; the wrapper
  blocked the merge call and the pull request read back open.

Fixes #5344

* fix(review): Preserve required-check producers and aggregate independent read failures

* fix(document): Clarify required-check verification and waiver documentation

* fix(bin): match an app-bound required commit status by name

The producer-identity check resolved an app-bound required context only
against check runs, so a required context that the required app reports as
a commit status could never match and always read as "has not reported".
A commit status carries no app id to compare, so an app-bound requirement
that arrives as a status now matches by name, as before producer binding;
check runs keep requiring the configured producer app.

Live, read-only: hashicorp/terraform#39262 requires license/cla from
integration 865473, reported green as a commit status by the CLA app. The
previous head refused it as unreported; this head no longer does, while
still naming the four required check runs that never ran there.

Refs #5344

* fix(document): Clarify accepted commit-status producer verification limitation

---------

Co-authored-by: firstmate-oss <[email protected]>
mehulbhagwani pushed a commit to mehulbhagwani/firstmate that referenced this pull request Sep 26, 2026
…5534)

* fix(bin): refuse a merge when a required check never reported

fm-pr-merge.sh built its GitHub refusals only from checks present in
statusCheckRollup, so a required check that never ran was simply absent and
the merge proceeded on the subset that reported, contradicting its own
"every required check green" claim.

The GitHub verify now reads the base branch's required contexts from the
forge itself - the classic branch protection summary on
GET repos/{o}/{r}/branches/{b} and the active ruleset rules on
GET repos/{o}/{r}/rules/branches/{b} - and refuses when a required context
has no entry in the same rollup, at the same head, that the merge is bound
to. Absence reads as unknown, never green. The required-set read joins the
existing refusal list, so a draft, a red check, and an unreported required
check are all reported together.

Could not read vs nothing required: both endpoints need only repository
read access. The admin-only GET .../branches/{b}/protection endpoint is
deliberately not used: it answers a non-admin token with the same 404 an
unprotected branch gets (observed live on kunchenguid/firstmate main with
this token), which would read a missing permission as "nothing required".
Any failed or malformed read of either source (auth, missing fine-grained
permission, rate limit, network, 404, unexpected shape) refuses the merge
with a line naming the unreadable source. The one exception is GitHub's
plan-gated 403 on the rules endpoint ("Upgrade to GitHub Pro or make this
repository public"), which already means "this repository has no branch
rules" for the merge-queue reader; that check moves into one shared helper
and the classic summary still decides for such a repository.

Attended waiver: --allow-missing <check-name> is the twin of --allow-red and
follows the same design and recording path: once, separate name argument,
waives only that exact unreported required check, still requires every
other required check reported and every check green, never waives an
unreadable required set, refused while the away-posture record exists, and
refused on GitLab. Merge-state BLOCKED policy is unchanged.

How this differs from the withdrawn kunchenguid#5353 (read from its diff):
- kunchenguid#5353 read the admin-only branches/{b}/protection endpoint and treated
  its 404 as "no required checks", so for any non-admin token the required
  set silently read as empty; this change reads the read-access branch
  summary and treats every failure as unreadable.
- kunchenguid#5353 ignored rulesets; this change also reads required_status_checks
  rules from the effective branch rules.
- kunchenguid#5353 made separate per-head REST reads of statuses and check-runs capped
  at per_page=100 with no pagination; this change checks presence in the
  same statusCheckRollup view the red-check gate already reads at the
  verified head.
- kunchenguid#5353 stopped at the first unreadable read; this change reports it as one
  refusal among all the others.
- kunchenguid#5353 also claimed kunchenguid#5345 (lock stealing) and changed 39 files, most
  unrelated; this change is kunchenguid#5344 only.

Live proof, read-only (a gh wrapper refused every merge and mutating call):
- cli/cli#14474 (trunk requires 3 classic build contexts, none ran):
  refused, naming build (macos-latest), build (ubuntu-latest),
  build (windows-latest); with --allow-missing "build (macos-latest)" it
  still refused, naming the other two.
- cli/cli#13665 (ran build (ubuntu-24.04-firewall) instead): refused,
  naming build (ubuntu-latest).
- hashicorp/terraform#39262 (ruleset-required checks absent): refused,
  naming Code Consistency Checks, End-to-end Tests, Race Tests, Unit Tests.
- cli/cli#14485 (all required reported and green): verified; the wrapper
  blocked the merge call and the pull request read back open.

Fixes kunchenguid#5344

* fix(review): Preserve required-check producers and aggregate independent read failures

* fix(document): Clarify required-check verification and waiver documentation

* fix(bin): match an app-bound required commit status by name

The producer-identity check resolved an app-bound required context only
against check runs, so a required context that the required app reports as
a commit status could never match and always read as "has not reported".
A commit status carries no app id to compare, so an app-bound requirement
that arrives as a status now matches by name, as before producer binding;
check runs keep requiring the configured producer app.

Live, read-only: hashicorp/terraform#39262 requires license/cla from
integration 865473, reported green as a commit status by the CLA app. The
previous head refused it as unreported; this head no longer does, while
still naming the four required check runs that never ran there.

Refs kunchenguid#5344

* fix(document): Clarify accepted commit-status producer verification limitation

---------

Co-authored-by: firstmate-oss <[email protected]>
mehulbhagwani pushed a commit to mehulbhagwani/firstmate that referenced this pull request Sep 26, 2026
…5534)

* fix(bin): refuse a merge when a required check never reported

fm-pr-merge.sh built its GitHub refusals only from checks present in
statusCheckRollup, so a required check that never ran was simply absent and
the merge proceeded on the subset that reported, contradicting its own
"every required check green" claim.

The GitHub verify now reads the base branch's required contexts from the
forge itself - the classic branch protection summary on
GET repos/{o}/{r}/branches/{b} and the active ruleset rules on
GET repos/{o}/{r}/rules/branches/{b} - and refuses when a required context
has no entry in the same rollup, at the same head, that the merge is bound
to. Absence reads as unknown, never green. The required-set read joins the
existing refusal list, so a draft, a red check, and an unreported required
check are all reported together.

Could not read vs nothing required: both endpoints need only repository
read access. The admin-only GET .../branches/{b}/protection endpoint is
deliberately not used: it answers a non-admin token with the same 404 an
unprotected branch gets (observed live on kunchenguid/firstmate main with
this token), which would read a missing permission as "nothing required".
Any failed or malformed read of either source (auth, missing fine-grained
permission, rate limit, network, 404, unexpected shape) refuses the merge
with a line naming the unreadable source. The one exception is GitHub's
plan-gated 403 on the rules endpoint ("Upgrade to GitHub Pro or make this
repository public"), which already means "this repository has no branch
rules" for the merge-queue reader; that check moves into one shared helper
and the classic summary still decides for such a repository.

Attended waiver: --allow-missing <check-name> is the twin of --allow-red and
follows the same design and recording path: once, separate name argument,
waives only that exact unreported required check, still requires every
other required check reported and every check green, never waives an
unreadable required set, refused while the away-posture record exists, and
refused on GitLab. Merge-state BLOCKED policy is unchanged.

How this differs from the withdrawn kunchenguid#5353 (read from its diff):
- kunchenguid#5353 read the admin-only branches/{b}/protection endpoint and treated
  its 404 as "no required checks", so for any non-admin token the required
  set silently read as empty; this change reads the read-access branch
  summary and treats every failure as unreadable.
- kunchenguid#5353 ignored rulesets; this change also reads required_status_checks
  rules from the effective branch rules.
- kunchenguid#5353 made separate per-head REST reads of statuses and check-runs capped
  at per_page=100 with no pagination; this change checks presence in the
  same statusCheckRollup view the red-check gate already reads at the
  verified head.
- kunchenguid#5353 stopped at the first unreadable read; this change reports it as one
  refusal among all the others.
- kunchenguid#5353 also claimed kunchenguid#5345 (lock stealing) and changed 39 files, most
  unrelated; this change is kunchenguid#5344 only.

Live proof, read-only (a gh wrapper refused every merge and mutating call):
- cli/cli#14474 (trunk requires 3 classic build contexts, none ran):
  refused, naming build (macos-latest), build (ubuntu-latest),
  build (windows-latest); with --allow-missing "build (macos-latest)" it
  still refused, naming the other two.
- cli/cli#13665 (ran build (ubuntu-24.04-firewall) instead): refused,
  naming build (ubuntu-latest).
- hashicorp/terraform#39262 (ruleset-required checks absent): refused,
  naming Code Consistency Checks, End-to-end Tests, Race Tests, Unit Tests.
- cli/cli#14485 (all required reported and green): verified; the wrapper
  blocked the merge call and the pull request read back open.

Fixes kunchenguid#5344

* fix(review): Preserve required-check producers and aggregate independent read failures

* fix(document): Clarify required-check verification and waiver documentation

* fix(bin): match an app-bound required commit status by name

The producer-identity check resolved an app-bound required context only
against check runs, so a required context that the required app reports as
a commit status could never match and always read as "has not reported".
A commit status carries no app id to compare, so an app-bound requirement
that arrives as a status now matches by name, as before producer binding;
check runs keep requiring the configured producer app.

Live, read-only: hashicorp/terraform#39262 requires license/cla from
integration 865473, reported green as a commit status by the CLA app. The
previous head refused it as unreported; this head no longer does, while
still naming the four required check runs that never ran there.

Refs kunchenguid#5344

* fix(document): Clarify accepted commit-status producer verification limitation

---------

Co-authored-by: firstmate-oss <[email protected]>
ashkonmousavi added a commit to ashkonmousavi/firstmate that referenced this pull request Sep 26, 2026