Repository navigation
openxFactory's own Merge Master review lane, advisory: the repository gate floor finally gets a reader - #439
Conversation
… a reader Realizes the WORKFLOW-INSTANCE half of add-substantive-review-lane task 5.1. codexFactory has shipped openxFactory's repository gate floor (scripts/merge_master/openxfactory-review-authority-floor.yaml) since the 015-widen-review-authority-floor work and nothing in openxFactory read it. Now one `pull_request_target` job named exactly `merge-master-approval` checks out the decision core at a recorded pin, gathers the candidate's changed paths provably complete, and reports which never-clearable paths the pull request touches. ADVISORY, structurally. No approver token is minted, no review is submitted, no merge is called, no auto-merge is enabled, no ruleset is touched, and no candidate class is enrolled — the envelope schema requires a non-empty `candidates` list and task 3.2 still owes the gate_rules_council record that would define one. The absence is the mechanism, not a condition, and the test asserts it over the file text. Two things this deliberately does NOT claim: no wallet-bound exercise record (S3 of add-wallet-carried-review-authority) and no revocation check (S5). The `act`-tier authority in governance/review-authority/register.yaml is not exercised here. The pin is recorded rather than trusted. openxFactory has no codexFactory gitlink, so contracts/review-lane-pin.yaml (kind: pinned_workflow) is the referent and tests/review_lane_pin/ is the tie; the pin is code-owner-routed and declared as a CROSS_REPOSITORY derivation-pin-class member. It diverges from xFactory's 3c35ca8b by force, not by preference: that commit carries neither repository_floor.py nor the openxFactory floor, so it cannot evaluate the only thing this caller evaluates. The convergence obligation is recorded in the pin. Co-Authored-By: Claude Fable 5 <[email protected]>
There was a problem hiding this comment.
Hi @brettheap! 👋
Your private repo does not have access to Sourcery.
Please upgrade to continue using Sourcery ✨
There was a problem hiding this comment.
Pull request overview
This PR introduces openxFactory’s own merge-master-approval GitHub Actions workflow instance (advisory-only) that pins and checks out opensoft/codexFactory’s Merge Master decision core, gathers PR changed paths provably-complete, evaluates the openxFactory repository-floor from the pinned core, and renders an advisory verdict to the job summary. It also adds a committed pin artifact and a static pytest module to prevent silent pin drift and to assert the workflow’s “cannot approve” constraints.
Changes:
- Add
.github/workflows/merge-master-approval.ymladvisorypull_request_targetworkflow that checks out the pinned codexFactory core and evaluates the openxFactory floor. - Add
contracts/review-lane-pin.yamland extendscripts/doc_health/pin_class.pyso the cross-repo pin is a declared derivation-pin-class member. - Add
tests/review_lane_pin/test_review_lane_caller.pyto statically assert pin agreement, trigger/permissions invariants, and the structural absence of approval/merge behavior; route the pin file via CODEOWNERS.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/merge-master-approval.yml |
New advisory Merge Master lane workflow; pins codexFactory core, gathers complete changed paths, evaluates openxFactory floor, renders summary. |
contracts/review-lane-pin.yaml |
Records the pinned codexFactory commit and the governed caller plus pinned members and scope constraints. |
scripts/doc_health/pin_class.py |
Declares contracts/review-lane-pin.yaml as a CROSS_REPOSITORY pin-class member keyed by core_commit. |
tests/review_lane_pin/test_review_lane_caller.py |
Static drift/invariant test suite tying workflow ref: to the committed pin and asserting non-approval constraints. |
.github/CODEOWNERS |
Routes the new pin file to a human code owner. |
specs/025-openxfactory-review-lane-caller/{spec.md,plan.md,tasks.md,checklists/requirements.md} |
Feature spec/plan/tasks/checklist documenting goals, constraints, and validation expectations. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| floor_path = None | ||
| for name in sorted(os.listdir(governance_dir)): | ||
| if not name.endswith((".yaml", ".yml")): | ||
| continue | ||
| candidate = os.path.join(governance_dir, name) | ||
| with open(candidate, encoding="utf-8") as handle: | ||
| document = yaml.safe_load(handle) | ||
| if not isinstance(document, dict): | ||
| continue | ||
| if document.get("kind") != "repository_gate_floor": | ||
| continue | ||
| if (document.get("floor") or {}).get("repository") != target: | ||
| continue | ||
| floor_path = candidate | ||
| try: | ||
| floor = parse_repository_floor(document, tree_paths=tree) | ||
| except GovernanceDocumentError as exc: | ||
| print(json.dumps({"ok": False, "stage": "floor_unreachable", | ||
| "document": candidate, "reason": str(exc)})) | ||
| raise SystemExit(0) | ||
| break | ||
|
|
||
| matched = list(floor.matching_paths(changed)) |
Pre-merge evidence: the floor evaluator was run verbatim against the pinned coreSince Case A — this pull request's own 9 changed paths: {"ok": true,
"floor_id": "openxfactory-review-authority-register",
"repository": "opensoft/openxFactory",
"never_clearable_paths": ["governance/review-authority/register.yaml",
"contracts/openxwallet-pin.yaml", "openXwallet"],
"changed_path_count": 9,
"matched_paths": [],
"rule_documents": ["codexfactory-routine-code-clearance.yaml",
"nightly-sweep-council-clearance.yaml"]}Case B — a candidate touching all three floored paths plus one unfloored path: {"ok": true,
"changed_path_count": 4,
"matched_paths": ["governance/review-authority/register.yaml",
"contracts/openxwallet-pin.yaml", "openXwallet"]}So all four of the moving parts are proven together: the pinned core imports, its What did and did not report on this pull request
🤖 Generated with Claude Code |
Sections 1-5 are ticked against measured evidence, not against intent: the forced pin divergence (3c35ca8b carries neither pinned member), the secret reality (no secret created), the verbatim end-to-end run of the workflow's own floor evaluator against the pinned core in both directions, and every gate's result including actionlint fetched because it was not on PATH. 5.6 records the gap rather than hiding it: `merge-master-approval` did NOT report on #439, because `pull_request_target` evaluates the base-branch definition and this file is not on main yet. That was predicted in the header and in plan.md D4, and it is why the floor evaluator was proven by hand instead. Section 6's five follow-ups stay OPEN on purpose — the secret grant, the codexFactory-side floor entry for this pin, task 3.2's gate_rules_council record, task 5.1's ruleset half behind S3+S5, and the pin convergence ceremony. Co-Authored-By: Claude Fable 5 <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.
Suppressed comments (2)
Previously missed (1) — in code that hasn't changed since the last review.
.github/workflows/merge-master-approval.yml:226
- The token-mint step is gated on
steps.preflight.outputs.identity, so if both the repo App secrets and org App secrets are present, only the repo token is minted. That makes the workflow fail even when the org App would have worked (e.g., if option 2 is granted but the repo App is not installed onopensoft/codexFactory). Gate this step directly onenv.HAS_REPO_APP_KEYso both tokens can be minted when available and the checkout can fall back to the org token.
This issue also appears on line 233 of the same file.
- name: Mint content-App token (this repository's App)
id: repo-token
if: steps.preflight.outputs.identity == 'repo'
continue-on-error: true
uses: actions/create-github-app-token@v2
.github/workflows/merge-master-approval.yml:237
- The org App token mint is currently gated on
steps.preflight.outputs.identity == 'org', which prevents minting it when the repo App secrets are also present. To enable a true repo-first / org-fallback behavior, mint the org token wheneverenv.HAS_ORG_APP_KEYis true and let the core checkout pick the first non-empty token.
- name: Mint content-App token (the org App)
id: org-token
if: steps.preflight.outputs.identity == 'org'
continue-on-error: true
uses: actions/create-github-app-token@v2
… three places the hold was, mismatches named LIFT posted on cxF #279 (5661634651), PR #439 (5661635340) and LANES.md (837c9e9) after § 13.1 (EMPTY) and § 13.2 (ahead). § 9 carries a dated pointer; § 13.6 row closed; § 13.2 gains its 'posted in full at' line (#279 5661631470). Releases the gate_rules_council hold only; the two 2026-09-11 C2 words stay owed at 6.25–6.26. Lane: codexfactory-2 (codeXfactory-2) Co-Authored-By: Claude Fable 5.1 <[email protected]>
What this is
openxFactory's own Merge Master review lane — the workflow-instance half of
add-substantive-review-lanetask 5.1 ("opensoft/openxFactorygets its own workflowinstance ... since
pull_request_targetfires in the repo the PR targets").One
pull_request_targetjob, named exactlymerge-master-approval, checks outopensoft/codexFactoryat a recorded pin, gathers the candidate's changed paths provablycomplete, and reports which of this repository's never-clearable paths the pull request
touches — evaluated by the pinned core's own
repository_floor.pyagainstscripts/merge_master/openxfactory-review-authority-floor.yaml.That floor has been committed in codexFactory since the
015-widen-review-authority-floorwork and nothing in openxFactory read it. Now something does.
A correction to the framing this was requested under
The brief named xFactory's
.github/workflows/review-lane.ymland itsuses: …/review-lane-reusable.yml@<sha>line as the precedent to mirror. That is the wrongprecedent for the stated goal, and the reason is recorded in the workflow header and
plan.mdD1 so nobody re-derives it:review-lane-reusable.ymlreports no check namedmerge-master-approval, and itsxFactory caller is
workflow_dispatchonly — it never runs on a pull request.merge-master-approvalcheck name comes from a job id. GitHub names a calledworkflow's check-runs
<caller job>/<called job>, so a caller thatuses:a reusable canonly ever produce
merge-master-approval / prepare— never the literal token a futureruleset would require.
The workflow that actually produces that check is a single non-reusable
pull_request_targetjob: codexFactory's own
merge-master-approval.ymland xFactory's aggregation caller of thesame name. That is the shape mirrored here.
What it does NOT do
Itemized, because each is a thing a reader would otherwise assume landed.
auto-merge. The absence is structural — the steps are gone, not disabled by a condition
— and the test asserts the absence over the file text (
MERGE_MASTER_APP_*,gh pr review,gh pr merge,/reviews,--auto,enablePullRequestAutoMerge,event=APPROVE).Permissions are
contents: read+pull-requests: readand nothing else.requires
candidateswithminItems: 1(andenvelope.pymirrors it at runtime), so thereis no legal empty envelope — and
add-substantive-review-lanetask 3.2 still owes thegate_rules_councilrecord that would define openxFactory's classes. A placeholdercandidate would be inventing the enrollment task 3.2 exists to grant. No tier-1 decision is
computed at all.
governance/review-authority/register.yamlrowrow-mrc-0001recordsact-tier authority for the merge-readiness council overopensoft/openxFactory. This lane claims no exercise of it. A wallet-signed exerciseverified at
check_verdictis S3 ofadd-wallet-carried-review-authorityand isunlanded; until it does, such an act records as
event_class: unauthenticated_request/unattributed, whichopenxwallet/spec.mdrules "is not assigned to a holder".unreadable-register-refuses rule are not implemented.
ruleset change.
The pinned sha
opensoft/codexFactory@58bd3cf79b91da26aced95c2000576981d9445c8(origin/main HEAD as observed2026-08-27), recorded in
contracts/review-lane-pin.yaml(kind: pinned_workflow),code-owner-routed in
.github/CODEOWNERS, declared as aCROSS_REPOSITORYderivation-pin-classmember in
scripts/doc_health/pin_class.py, and tied bytests/review_lane_pin/test_review_lane_caller.py.It diverges from xFactory's
3c35ca8bby force, not by preference. xFactory pins thatcommit in lockstep across both its merge-master surfaces, and at
3c35ca8bscripts/merge_master/contains neitherrepository_floor.pynoropenxfactory-review-authority-floor.yaml. Since the floor evaluation is the only thing thiscaller does, the older pin cannot run it. The pin file records the divergence, names both
xFactory surfaces it is out of step with, and states the convergence obligation for a future
re-point ceremony.
Why a pin file at all: xFactory vendors codexFactory as a submodule, so its working rule
#2 can say the pin must equal the gitlink and
tests/test_review_lane_workflow.pyasserts it.openxFactory has no such gitlink, so the file is the referent and the test is the tie.
Secrets status — one is missing, and nothing was created
OPENXFACTORY_APP_ID/OPENXFACTORY_APP_PRIVATE_KEYXFACTORY_APP_ID/XFACTORY_APP_PRIVATE_KEYselectedopensoft/Omnigent-Install,opensoft/xFactoryMERGE_MASTER_APP_KEY/vars.MERGE_MASTER_APP_IDselectedSo the lane needs exactly one grant, whichever is easier:
OPENXFACTORY_APP_*onopensoft/codexFactory(Contents: read), oropensoft/openxFactoryto theselectedlist forXFACTORY_APP_ID/XFACTORY_APP_PRIVATE_KEY.Until then the check fails red, by name, listing exactly the above. That is deliberate:
codexFactory's own caller goes green on absent App config because there the check is a required
gate and red would wedge every PR. Here it gates nothing, so a green run that read no core would
manufacture the appearance of a review that did not happen. A red advisory check blocks nobody.
The one thing this PR cannot prove about itself
pull_request_targetruns the workflow definition from the base branch, so this workflowdoes not run on the pull request that introduces it, and
workflow_dispatchdoes not rescuethat (the platform resolves dispatchable workflows from the default branch). The first live
merge-master-approvalreport is the next openxFactory pull request after this lands.The alternative — a plain
pull_requesttrigger — would run this file from the PR head with thecredential that reads a private repository in scope, i.e. the exfiltration shape the base-branch
rule exists to prevent. Refused;
pull_requestis absent and the test asserts its absence.What stands in pre-merge: the static test pins the trigger set, the single-job invariant, the
exact job id, three-way pin agreement (workflow
ref:/ job env / pin file), and the absence ofevery approval-shaped step — with negative controls so each positive is one mutation from failing.
Validation run
pytest tests/review_lane_pin— 33 passed, 18 subtests, 0 skippedpytest tests/doc-health/test_pin_reachability.py tests/review_lane_pin— 86 passed, 0 failed, 0 skippedopenspec validate --all --strict— 75 passed, 0 failedactionlint v1.7.7on the new workflow — clean, exit 0openXwallet/scripts/wallet-yaml-syntax-gate.py .(pinned gate) — exit 0EXPECT_SKIPPED: "20"is unchangedNamed follow-ups, not performed here
contracts/review-lane-pin.yamltoopenxfactory-review-authority-floor.yaml'snever_clearable_paths— it determines whichcore judges this repository, the same argument the wallet pin's entry already makes.
add-substantive-review-lanetask 3.2 remains the gate on any envelope instance here.🤖 Generated with Claude Code