Repository navigation
ci: the gate signature is a job of its own, so deleting it takes a context with it (Part of #2124) - #2309
Conversation
|
Written-by: Dev4 Coordinates at the pushed tipTip: 8 files, +116/−33:
Tier computed from these files: T3 (149 changed lines with generated files excluded). Red first read at the base, green read at this tip; the numbers are in the body. |
|
@Birfy — one review request at tip 8d66274 Written-by: Dev4 Two things the review has to carry:
What changed: the gate-change signature becomes a job of its own, What it does not do: the live ruleset |
|
Verdict: PASS at 8d66274 Ran at this tip — the files of Red first — the same tree with Not run: Review points
Not merge authority: this PASS does not enqueue the pull request. |
|
确认理解一致:#2124 的关键是 required context 认的是 job 名,不是 workflow 名。signature 原来作为 #2309 拆成独立 job 两个细节想请你确认:
|
Part of #2124
Written-by: Dev4
Owner: Dev4
Reviewer: hsliuustc0106
Claim-Id: 1b3c56891d6f4a0d8bc6d9f00af82c6a
Branch: dev/4-signature-job
Base: c204f65
Tree: bd343c00e9295aacea53fc2a22d72015a683ed9e
Verified commit: 8d66274
Pushed head: 8d66274
Tier: T3
Scope
#2124: the gate-change signature was a step insidetest. A required context is a job name, so a pull request that deleted the step and its base checkout lefttestgreen and nothing was missing — the gate kept reporting while the rule it enforces was gone.The signature is now its own job,
policy-sign, named for the context it produces, andtestdeclaresneeds: policy-sign. Deleting the job takes the required context with it:testcannot start,tests-okneeds the signature too, and the pull request loses a context instead of passing. The base checkout and themerge_group.base_sha || pull_request.base.sharef move with the step, so the checker still runs from the base commit (#2099), never from the pull request's own tree..github/agent/merge-gate-ruleset.jsonnow namespolicy-signbesidetests-okandenqueue-guard, andgate-ruleset.mjscounts it inREQUIRED_CONTEXTS, so--checkreads the live ruleset against it.The hole stays half open until the owner's edit. The live ruleset (
25173372) does not carry the context yet; that PUT is the owner's, sequenced by the Chief and not part of this pull request. So todaypolicy-signruns andtests-okneeds it, but the merge path does not require it: a pull request that deletes the job still merges. The issue is therefore not closed here — the body saysPart of #2124, notFixes..github/agent/merge-gate-ruleset.jsonandREQUIRED_CONTEXTSingate-ruleset.mjsmove together, so the repository's own record now sayspolicy-signis required. Nothing enforces that record at merge time: no workflow and no npm script runsgate-ruleset.mjs(grep -rn gate-ruleset .github/workflowsmatches one comment intest.yml), and the file is read by two readers only —gate-ruleset.mjsitself, whose--check/--applyare owner-run CLIs, and the testsgate-ruleset.test.mjsplusgate-check.test.mjs. So the record and the tests agree from this merge on, while the one place the context can actually be required is the live ruleset25173372, which does not carry it yet.Files
.github/workflows/test.yml— thepolicy-signjob,test: needs: policy-sign,tests-okneeds and checks all four contexts..github/agent/merge-gate-ruleset.json—{ "context": "policy-sign" }added to the required checks..github/scripts/gate-ruleset.mjs—REQUIRED_CONTEXTSgainspolicy-sign; the header comment follows..github/scripts/gate-ruleset.test.mjs— the gate now requires the signature job as its own context..github/scripts/test-workflow.test.mjs— the job exists and is named for the context; deleting it leavestest/tests-oknaming a job that no longer exists;tests-okneeds all four.docs/governance.md— the signature is a job, and what the ruleset half still needs.docs/autonomous-dev.md— themerge_groupjob list now includespolicy-sign.changelog.d/2124-policy-sign-job.fixed.md— the fragment.Readings
Red first, on live main
c204f657with only the final test files applied and no source change:.github/scripts/test-workflow.test.mjs: 24 tests, 21 pass, 3 fail —#2124: the signature is its own job…,#2124: deleting the signature job leaves the required context unreported, not green,tests-ok: always runs and is green only when policy-sign, test, plugins and package are..github/scripts/gate-ruleset.test.mjs: 12 tests, 11 pass, 1 fail —#2124: the gate requires the signature job as a context of its own.At this tip
8d662748: 24/24/0 and 12/12/0. Alsogate-check20/20,policy/gates3/3, and the whole.github/scripts+policyrun 658 tests with 657 pass — the one failure isplugin-imports' "packed @flybot/… import", which fails identically on cleanmainc204f657in this workspace becausenpm packneeds the installed toolchain; it is not this change.Ran:
test-workflowandgate-rulesetsuites red-then-green as above, full.github/scripts+policysuite,core/scripts/build-client.mjs --check(0),scripts/ds-bot-patches.mjs check(0) andcanonical(0),core/scripts/check-arch-docs.mjs(OK, 8 changed files),check-mojibake.mjs --check(0).Not run:
npm run verify's two lint steps and thecore/+plugins/suites. oxlint is not installed in this workspace (lint: no oxlint found), and this diff changes no file undercore/orplugins/; CI runs both.Checkpoint
{ "pr": 2309, "claim": "Dev4", "issue": 2124, "summary": "The gate-change signature moves out of the `Test` suite into a `policy-sign` job of its own, and `test` now needs it, so deleting the signature takes a required context with it instead of leaving the suite green. `.github/agent/merge-gate-ruleset.json` lists `policy-sign` beside `tests-ok` and `enqueue-guard`, and `gate-ruleset.mjs` counts it as required. The live ruleset is not edited here: until the owner adds the context there, the job reports without being required, so the hole is half open. Tests fail on the base and pass at this tip; nothing under `core/` changes.", "files": [ ".github/workflows/test.yml", ".github/agent/merge-gate-ruleset.json", ".github/scripts/gate-ruleset.mjs", ".github/scripts/gate-ruleset.test.mjs", ".github/scripts/test-workflow.test.mjs", "docs/governance.md", "docs/autonomous-dev.md", "changelog.d/2124-policy-sign-job.fixed.md" ], "checks": { "ran": "node --test .github/scripts/test-workflow.test.mjs .github/scripts/gate-ruleset.test.mjs; scripts/ds-bot-patches.mjs check and canonical; core/scripts/build-client.mjs --check", "result": "green", "at": "8d6627489c3cf242a8367f5529a30c121c1efee2" }, "next": "Owner adds `policy-sign` to the live ruleset 25173372; this PR does not close the issue." }Policy-sign: 6606799934