Repository navigation
fix: the release lane tests the pull-request path at v7, not v7-next - #749
Conversation
The draft pull request opens before any code: the Spec as its checklist.
|
The pull request's board
🤖 AI-generated · Claude Opus 5.5 (Anthropic) |
workflow-templates/test-pull-request.yml is the required workflow's on: and jobs, job for job, plus a pipeline job that is the whole run's result as one check. The engine-test pack lists it, so the release lane's point_callers moves its review, auto-merge and fix-round calls to @v7-next with the other callers of the test repository and back after. A template a pack lists that every-repository does not belongs to that kind alone: the sync compares it with the file of its own name in a repository of that kind, and nowhere else. Assisted-by: Claude Opus 5.5 (Anthropic)
sync-repos.py rulesets moves the workflows rule of "org: main" into a ruleset of its own, "org: required workflow", created first with the same org-pull-request.yml at v7, target, bypass actors and ref_name, and only then takes the rule out of "org: main", which keeps its other rules on every repository, the test repository included. The new ruleset covers the repositories with dx-adopted=true and excludes those with org.yml test-property (dx-engine-test), which the sync creates and sets to true on org.yml test-repo alone, once that repository has its own pull-request caller on its default branch. A ruleset body whose conditions lack ref_name or repository_property is never written, and the daily drift check names a workflows rule left in "org: main", the required workflow covering the test repository, a ruleset with no ref_name and a required workflow at another ref than the current major. Assisted-by: Claude Opus 5.5 (Anthropic)
new_callers also writes the callers a kind's pack lists that every repository does not have, so sync-repos.py callers writes test-pull-request.yml to the engine-test repository alone and holds it there job for job; no other template takes that file for its caller. Once the test repository has the caller on its default branch, sync-repos.py rulesets writes there a ruleset of its own, "required pipeline", that requires the caller's pipeline check on the default branch, before the required workflow leaves it: the gate the required workflow gives everywhere else. The template's tests hold its on: and jobs to org-pull-request.yml's plus pipeline, and the release lane's self-test moves it to @v7-next and puts it back. Assisted-by: Claude Opus 5.5 (Anthropic)
org.yml test-property, which C2 adds, is a setting: policy/settings-schema.yml lists it, and docs/configuration.md is written again from it, so settings.py check passes. Assisted-by: Claude Opus 5.5 (Anthropic)
release-scenarios.py reads the test repository's callers from its pack alone, test-pull-request.yml among them, in place of org-pull-request.yml; the pairs are the same, so the scenarios are unchanged. coverage refuses a pack with no caller that wires the pull-request pipeline on pull_request and merge_group, org-pull-request.yml among its callers, and an engine call the lane cannot move, each named. move, once the callers moved, refuses as failing callers rows the test repository's default branch still requiring org-pull-request.yml and any workflow there still calling the engine off the ref, naming the rule or the file and line; no group plays, and what moved is put back. Assisted-by: Claude Opus 5.5 (Anthropic)
docs/versioning.md (the Scenarios step) and docs/workflows.md (the org-pull-request.yml and release-lane.yml rows) say that the test repository runs its pull-request pipeline from test-pull-request.yml at @v7-next, and why: the required workflow is read at v7 with its calls hard-wired to @v7, so it could never try a candidate there. docs/adopting.md lists the new ruleset, kinds/README.md says the sync now writes the pack's callers, and the pack's comments and the header comments of org-pull-request.yml and release-lane.yml say the same. A test holds the two docs to it. Assisted-by: Claude Opus 5.5 (Anthropic)
install.py writes the engine-test pack's callers to a new test repository, and the pack now lists test-pull-request.yml as well: its self-test counts the pack's callers instead of a fixed two, and checks that the pull-request pipeline is among them. Assisted-by: Claude Opus 5.5 (Anthropic)
…ane-tests-the # Conflicts: # docs/workflows.md
main's #746 changed org-pull-request.yml's autopilot-fix (needs the conventions too, fires on a failed gate or a review without a verdict, never on a draft) after test-pull-request.yml copied it, so the template no longer matched the required workflow job for job and tests/workflows/test_test_repo_pipeline.py failed the scripts job. The template's autopilot-fix now matches the required workflow's again. Assisted-by: Claude Opus 5.5 (Anthropic)
The Scripts job failed at #749's head: org_drift now calls current_major(), which lists the tags through gh, and the C4 (#739) self-test stood in for every other call to GitHub but that one, so on a runner with no token the self-test reached the API and failed. org_drift reads the rulesets once and asks for the major only when there is a ruleset to hold against it; the self-test refuses gh outright, so a call it does not stand in for fails locally too, and a new case checks that the org's rulesets are held against the current major. Refs #748 Assisted-by: Claude Opus 5.5 (Anthropic)
Claude review · risk high · complexity high · type fixNothing that must be fixed · 5 minor First review, so there are no earlier commits to credit. I read the diff only and did not run the tests: the sandbox refused the The design holds up on a close read:
I found no blocker or major problem, only the minor points below. The description matches the diff. It says plainly that nothing was tested live and that a maintainer must run
Policy floor: high (touches high-risk paths: .github/workflows/org-pull-request.yml, .github/workflows/release-lane.yml, kinds/README.md, kinds/engine-test/pack.yml, org.yml …). Reviewed 74c6b77 (whole pull request; review 1 of 5 automatic). Author trusted for auto-merge: false. 🤖 AI review · claude-sonnet-5-5 (Anthropic) · $0.71, 21 turns |
📝 What changes
Today the required workflow is the
workflowsrule of the organisation ruleset "org: main". That rule runsorg-pull-request.ymlatv7in every adopted repository, the test repository too, and its inner calls are hard-wired to@v7. So in the test repository a scenario pull request's review, auto-merge decision and fix rounds always runv7, whatever the lane moves. The fix has three parts. First, the test repository stops getting the required workflow. Second, it runs the same pipeline from a caller of its own, which the lane'spoint_callersalready moves to@v7-nextand back like any other caller there. Third, the lane refuses to play when a pipeline there would still runv7.Ruleset (C2),
scripts/sync-repos.py rulesets. GitHub takes only one repository condition per org ruleset (name, id or property), so the test repository cannot be dropped by name from a ruleset that targets by property. Recommended: option A.workflowsrule out of "org: main" into a new ruleset, "org: required workflow". It is created first and copies "org: main"'sworkflowsrule unchanged (the sameorg-pull-request.yml, at the samev7ref), its bypass actors, its target and itsref_name(~DEFAULT_BRANCH). Only then is the rule removed from "org: main", so no repository is ever left without the required workflow. Itsrepository_propertycondition includesdx-adopted=trueand excludes a second custom property of the organisation:test-propertyin org.yml,dx-engine-testby default, a true_false property the sync creates and sets to true on org.ymltest-repoalone. "org: main" keeps its other rules on the test repository: pull request, deletion and signed commits. The PUT body always carries bothref_nameandrepository_property("complete conditions":with_property_conditionand the new builder are tested for it).v7.ORG_RULESET_NAMES,by_propertyandcoverslearn the new ruleset and its exclusion.sync-repos.py check(the daily drift check) flags four things: aworkflowsrule still in "org: main", the required-workflow ruleset covering the test repository, a ruleset with noref_name, and a required-workflow ref other thanv7.repository_name: it includes every repository repos.yml adopts and excludestest-repo. It needs no new property, but it brings back the list of names that feat: adopting a repository is data and one command #562 removed, and every adoption has to extend it.superseded()would have to stop deleting them.Caller (C3). A new template,
workflow-templates/test-pull-request.yml(plus its.properties.json). Itson:and its jobs areorg-pull-request.yml's, job for job: the same ids anduses:, so the same check names. It adds one job,pipeline, which needs every other job, runsif: always()on bothpull_requestandmerge_group, and fails when any of them failed or was cancelled.pipeline: a required workflow has no named checks; it requires the whole run to succeed.pipelineis that run's result as one check, and it reports in the merge queue too. Requiring each job's check instead would block the queue for good, because the jobs skip onmerge_groupunder another name.kinds/engine-test/pack.ymlcallers) lists the new template.new_callersalso writes a kind's packcallers, sosync-repos.py callerswrites it to the test repository and holds it job for job.pipelinecheck on the default branch. That gives the test repository the same gate the required workflow gives everywhere else.point_callersrewrites every engine call under.github/workflows/, so the new caller moves to@v7-nextand back with the others (shown by a test).workflow-templates/with the other shipped callers, so the organisation's template picker also offers it to other repositories. Its description says it belongs to the test repository alone.The check (C4),
scripts/release-scenarios.py.test_callers()reads the pack'scallers(now includingtest-pull-request.yml) in place oforg-pull-request.yml. The pairs are unchanged, so the scenarios' expectations are untouched. Two new checks, each naming the file or rule it refuses:problems(static,coverage) refuses three things: a pack with no caller that wires the pipeline'spull_requestandmerge_groupjobs,org-pull-request.ymlamong the test repository's callers, and an engine call in a test caller thatat_refwould not move (one that does not matchUSES).move(run time, before any group plays) refuses two things, each as a failingcallersrow: the test repository's default-branch rules (repos/{repo}/rules/branches/{default}, readable with its token) still carrying aworkflowsrule fororg-pull-request.yml, and any.github/workflows/*.ymlthere still calling the engine off the ref after the move.Docs (C5). docs/versioning.md (Scenarios step) and docs/workflows.md (the
org-pull-request.ymland release-lane rows) say that the test repository runs the candidate's pipeline fromtest-pull-request.ymlat@v7-next, and why: the required workflow is read atv7with its calls hard-wired. To stay in step, the same goes into docs/adopting.md (the ruleset list),kinds/README.md(packcallersare now written), the pack's comments, and the header comments oforg-pull-request.ymlandrelease-lane.yml.💡 Why
Closes #748. The autopilot works it here in the open: one commit per criterion, each box ticked once its commit is pushed.
🎯 Acceptance criteria
v7-next), notv7.Test: scripts/release-scenarios.py (
--test: afterpoint_callers, every engine call oftest-pull-request.yml's review, auto-merge and autopilot-fix jobs is at@v7-next), tests/workflows/test_test_repo_pipeline.pytest-repo, itsconditionsare complete (ref and repository conditions), and every other repository keeps the required workflow atv7.Test: scripts/sync-repos.py (
--test: the split ruleset's PUT/POST bodies carryref_nameandrepository_propertywith the test property excluded, the samev7workflows rule, "org: main" kept for the test repository, created before the rule is removed, the drift check's four findings)@v7-nextand back with the others.Test: tests/workflows/test_test_repo_pipeline.py (the template's jobs and
on:equalorg-pull-request.yml's pluspipeline), scripts/sync-repos.py (--test:new_callerswrites it to the engine-test repository only, and "required pipeline" requirespipeline), scripts/release-scenarios.py (--test: moved to@v7-nextand put back)Test: scripts/release-scenarios.py (
--test:problemsnames a missing pull-request caller,org-pull-request.ymlamong the callers, an unmovable call;movenames a remainingworkflowsrule and a caller off the ref)Test: tests/workflows/test_test_repo_pipeline.py (docs/versioning.md and docs/workflows.md name
test-pull-request.ymlat@v7-nextand say that the required workflow runs atv7)🧭 Decisions
🙌 Credits
🧪 How I tested it
python3 scripts/sync-repos.py --test: the split against a stand-in for gh ("org: required workflow" created first with "org: main"'sworkflowsrule atv7, itsref_nameandrepository_propertywithdx-engine-test=trueexcluded, then the rule taken out of "org: main"; the test repository left covered until it hastest-pull-request.yml, then excluded on a later run; "required pipeline" requiringpipelinewritten before the exclusion; a ruleset with noref_namenever written; the drift check's four findings),new_callerswritingtest-pull-request.ymlto the engine-test repository only, and the template compared nowhere else.python3 scripts/release-scenarios.py --test: the shipped template moved bypoint_callers(review, auto-merge and autopilot-fix at@v7-next) and put back;pipeline_problemsnaming a pack with no pull-request caller,org-pull-request.ymlamong the callers and an unmovable call;moverefusing a remainingworkflowsrule and a caller off the ref, playing nothing and putting the callers back.coveragepasses on the repository (24 scenarios).python3 scripts/org.py --test,python3 scripts/install.py --test,python3 scripts/caller-contract.py check,python3 scripts/settings.py check.tests/(273 passed, 1 skipped), with the newtests/workflows/test_test_repo_pipeline.py: the template isorg-pull-request.yml'son:and jobs pluspipeline, whose step fails only on a failed or cancelled job (run in bash), and the docs say what runs at@v7-nextand why.run:step ofpull-request.yml's scripts jobs, run locally: all pass butplugin-i18n.sh(no gettext here),review-brief.sh(no pull request number) andrunner-vm/dx-runner-slot.sh(the runner VM's paths), which fail the same way on the base commit.Not tested live: nothing here touched GitHub. Before the next release lane run, a maintainer runs
sync-repos.py callers --repo diluxone-test(merge its pull request) and thensync-repos.py rulesets; until thenmoverefuses to play, because the test repository still requiresorg-pull-request.yml.🤖 AI-generated · Claude Opus 5.5 (Anthropic)