Allow a documented shared-node performance exception for a named RC
ci/woodpecker/push/main Pipeline was successful
ci/woodpecker/pr/main Pipeline was successful
ci/woodpecker/manual/performance Pipeline was successful

This commit was merged in pull request #6.
This commit is contained in:
cflmy committed 2026-11-22 22:19:08 +08:00
1 parent 22b7757420
commit f7a5a7b016
5 files changed
+69 -16

No files matched your search

+24 -4
View File
@@ -8,8 +8,9 @@ does not query CI and cannot turn an UNVERIFIED gate into a release.
The `rc` profile requires every gate on the target SHA. For a Linux-only RC,
Windows and macOS must be explicitly UNSUPPORTED; the stable profile requires
both to PASS. Strict VM, extension, clean install, version compatibility and
performance all require PASS in both profiles. The historical beta profile
retains its scoped exceptions, including a documented performance WARN.
performance require PASS. RC can record a shared-node performance WARN only
with an explicit maintainer approval reference. The historical beta profile
retains its own scoped exceptions.
Gate spec: `name=STATE:tested_sha:run_url` (url may contain colons).
@@ -100,13 +101,23 @@ def parse_gate(text: str) -> tuple[str, dict]:
return name, {"state": state, "tested_sha": tested_sha, "run_url": run_url}
def build_manifest(target_sha: str, gates: list[str], profile: str = "stable") -> dict:
def build_manifest(
target_sha: str,
gates: list[str],
profile: str = "stable",
rc_shared_performance_approval: str = "",
) -> dict:
if not SHA_RE.fullmatch(target_sha):
raise ValueError(f"target SHA must be 40 lowercase hex characters: {target_sha!r}")
try:
release_decision, accepted_states, optional = PROFILES[profile]
except KeyError:
raise ValueError(f"unknown profile {profile!r}; expected {sorted(PROFILES)}") from None
approval = rc_shared_performance_approval.strip()
if approval and profile != "rc":
raise ValueError("shared-node approval is supported only by the rc profile")
if approval:
accepted_states = {**accepted_states, "performance": {"PASS", "WARN"}}
parsed = {}
for spec in gates:
name, gate = parse_gate(spec)
@@ -137,6 +148,8 @@ def build_manifest(target_sha: str, gates: list[str], profile: str = "stable") -
decision = release_decision if not reasons else "DO_NOT_RELEASE"
recorded = utc_now()
if approval and parsed["performance"]["state"] == "WARN":
parsed["performance"]["rc_shared_node_approval"] = approval
return {
"schema": SCHEMA,
"profile": profile,
@@ -160,6 +173,11 @@ def main(argv: list[str]) -> int:
parser.add_argument("--profile", choices=sorted(PROFILES), default="stable")
parser.add_argument("--gate", action="append", default=[])
parser.add_argument("--out", default="")
parser.add_argument(
"--rc-shared-performance-approval",
default="",
help="maintainer approval reference for the measured shared-node RC performance WARN",
)
parser.add_argument(
"--require-release",
action="store_true",
@@ -167,7 +185,9 @@ def main(argv: list[str]) -> int:
)
args = parser.parse_args(argv)
try:
manifest = build_manifest(args.target_sha, args.gate, args.profile)
manifest = build_manifest(
args.target_sha, args.gate, args.profile, args.rc_shared_performance_approval
)
except ValueError as error:
print(f"error: {error}", file=sys.stderr)
return 2
+22
View File
@@ -73,6 +73,28 @@ class ReleaseEvidenceTests(unittest.TestCase):
self.assertEqual(manifest["release_decision"], "DO_NOT_RELEASE")
self.assertTrue(manifest["reasons"][0].startswith(f"{name}:"))
def test_rc_shared_performance_requires_explicit_approval_and_evidence(self) -> None:
approval = "release notes: maintainer approved the shared node for this RC"
inputs = [spec for spec in self.rc_gates() if not spec.startswith("performance=")]
inputs.append(gate("performance", "WARN"))
manifest = release_evidence.build_manifest(SHA, inputs, "rc", approval)
self.assertEqual(manifest["release_decision"], "RC_RELEASE_CANDIDATE")
self.assertEqual(manifest["gates"]["performance"]["rc_shared_node_approval"], approval)
manifest = release_evidence.build_manifest(
SHA, inputs[:-1] + [gate("performance", "WARN", OTHER)], "rc", approval
)
self.assertEqual(manifest["release_decision"], "DO_NOT_RELEASE")
manifest = release_evidence.build_manifest(
SHA, inputs[:-1] + [gate("performance", "WARN", url="")], "rc", approval
)
self.assertEqual(manifest["release_decision"], "DO_NOT_RELEASE")
manifest = release_evidence.build_manifest(
SHA, inputs[:-1] + [gate("performance", "FAIL")], "rc", approval
)
self.assertEqual(manifest["release_decision"], "DO_NOT_RELEASE")
with self.assertRaises(ValueError):
release_evidence.build_manifest(SHA, inputs, "stable", approval)
def test_stable_requires_extension_install_version_and_performance(self) -> None:
names = ("extension", "clean_install", "version_compat", "performance")
for name in names:
+8 -6
View File
@@ -10,9 +10,11 @@ workload whose wire output did not match the committed expected digest.
`Cargo.lock` digest, `rustc -vV`, source SHA and profile.
* Correctness comes first: every warmup run is parsed and hashed. A mismatch
is `CORRECTNESS_FAIL`; its faster wall time is never reported.
* Release evidence needs at least 5 warmups and 20 samples per workload with
`--approved-node` on a dedicated, stable performance node. Shorter runs are
`SMOKE` and must not be cited as a release gate.
* Approved-node release evidence needs at least 5 warmups and 20 samples per
workload on a dedicated, stable node. A maintainer-approved shared-node
RC comparison needs the same sample counts in at least three paired runs.
Shared-node reports stay `SMOKE` and are eligible only for the RC
`WARN` exception described in [releasing.md](../../docs/releasing.md).
* `--baseline` checks platform ID, build profile, CPU model, kernel,
governor, CPU affinity and toolchain. For an approved-node comparison
it also requires an approved, correctness-verified MEASURED baseline.
@@ -47,11 +49,11 @@ it only when the output change is the intended one.
## RC comparison
On the approved dedicated node, run the beta benchmark from a checkout
On the designated node, run the beta benchmark from a checkout
pinned to `v3.0.0-beta.1` and the candidate benchmark from the frozen
candidate checkout. Use the same toolchain, CPU list and platform ID in both
commands. Pass the extracted, verified candidate CLI via `--no-build --binary`
and add `--baseline /path/to/beta.json` to the candidate command. Keep both
reports and confirm all nine comparisons are present and correctness-verified.
The shared Woodpecker manual workflow runs the same comparison as a diagnostic
and produces SMOKE reports.
The shared Woodpecker manual workflow can reproduce the comparison and
produces SMOKE reports.