Skip to content

Commit acc1bd1

Browse files
SisyphusZhengDevBot
andauthored
fix(release): admit bun-serve-smoke into the required PR CI evidence set (#1335)
The Beta.2 publish dry-run (2026-09-05) failed closed: verifyPrCiProvenance rejected the promotion run because 'dist/server Bun smoke' (job added by #1228 / B2.5, after the Beta.1 publish) was outside REQUIRED_PR_CI_JOBS and jobIdForDisplayName had no mapping for it. The set now matches the pr-full-ci-evidence needs list, with a mechanical lockstep test so the desync fails at development time, not at publish time. Part of #1288. Co-authored-by: DevBot <devbot@openelement.dev>
1 parent 005a971 commit acc1bd1

4 files changed

Lines changed: 34 additions & 0 deletions

File tree

tools/autoflow/__tests__/cli.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ function matchingRun(): GitHubRunInfo {
4646
{ name: 'autoflow-ci', status: 'completed', conclusion: 'success' },
4747
{ name: 'dist/server Node smoke (Node 20)', status: 'completed', conclusion: 'success' },
4848
{ name: 'dist/server Node smoke (Node 24)', status: 'completed', conclusion: 'success' },
49+
{ name: 'dist/server Bun smoke', status: 'completed', conclusion: 'success' },
4950
{ name: 'workspace-qualification', status: 'completed', conclusion: 'success' },
5051
{ name: PR_CI_EVIDENCE_JOB_NAME, status: 'completed', conclusion: 'success' },
5152
],

tools/autoflow/__tests__/pr-ci-provenance.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ function runInfo(overrides: Partial<GitHubRunInfo> = {}): GitHubRunInfo {
5050
{ name: 'autoflow-ci', status: 'completed', conclusion: 'success' },
5151
{ name: 'dist/server Node smoke (Node 20)', status: 'completed', conclusion: 'success' },
5252
{ name: 'dist/server Node smoke (Node 24)', status: 'completed', conclusion: 'success' },
53+
{ name: 'dist/server Bun smoke', status: 'completed', conclusion: 'success' },
5354
{ name: 'workspace-qualification', status: 'completed', conclusion: 'success' },
5455
{ name: PR_CI_EVIDENCE_JOB_NAME, status: 'completed', conclusion: 'success' },
5556
],

tools/autoflow/__tests__/pr-ci-workflow.test.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,3 +187,28 @@ Deno.test('B2.12 (#1187): publication authenticates with npm Trusted Publishing/
187187
// npmjs registry configuration (registry config, not auth).
188188
assertStringIncludes(source, "registry-url: 'https://registry.npmjs.org'");
189189
});
190+
191+
Deno.test(
192+
'release-lane: REQUIRED_PR_CI_JOBS stays in lockstep with the pr-full-ci-evidence needs list',
193+
async () => {
194+
// The Beta.2 dry-run (2026-09-05) failed closed because bun-serve-smoke
195+
// joined the workflow `needs` (B2.5) without joining the evidence
196+
// validator's required set: the independently resolved run then carried a
197+
// job "outside the required set". This guard makes the desync a test
198+
// failure at development time, not a failed publish attempt.
199+
const { REQUIRED_PR_CI_JOBS } = await import('../loop-evidence.ts');
200+
const source = await Deno.readTextFile(CI_WORKFLOW_PATH);
201+
const doc = parse(source);
202+
const job = jobsOf(doc)['pr-full-ci-evidence'];
203+
assert(job, 'autoflow-ci.yml lacks the pr-full-ci-evidence aggregation job');
204+
const needs = job.needs ?? [];
205+
const needsSet = [...needs].sort();
206+
const requiredSet = [...REQUIRED_PR_CI_JOBS].sort();
207+
assertEquals(
208+
needsSet,
209+
requiredSet,
210+
'the pr-full-ci-evidence needs list and REQUIRED_PR_CI_JOBS must be identical sets: ' +
211+
'update loop-evidence.ts (and this test) together with autoflow-ci.yml',
212+
);
213+
},
214+
);

tools/autoflow/loop-evidence.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,17 @@ export const PR_CI_ARTIFACT_PREFIX = 'pr-full-ci-evidence-';
126126
* `workspace-qualification` joined the set with #1276 (B1.3-F1): the definePage
127127
* route SSR tag-mismatch defect shipped because the workspace runtime
128128
* qualification was not CI-gated.
129+
* `bun-serve-smoke` joined the set with #1228 (B2.5): the Bun consumer
130+
* qualification is a required `needs` leg of pr-full-ci-evidence. The set MUST
131+
* stay in lockstep with the `needs` list of the pr-full-ci-evidence job in
132+
* autoflow-ci.yml — pr-ci-workflow.test.ts enforces that equality mechanically
133+
* (the Beta.2 dry-run 2026-09-05 failed because this set lagged the workflow).
129134
*/
130135
export const REQUIRED_PR_CI_JOBS = [
131136
'dependency-review',
132137
'autoflow-ci',
133138
'node-serve-smoke',
139+
'bun-serve-smoke',
134140
'workspace-qualification',
135141
] as const;
136142

@@ -139,6 +145,7 @@ export function jobIdForDisplayName(name: string): string {
139145
if (name === PR_CI_EVIDENCE_JOB_NAME) return PR_CI_EVIDENCE_JOB_NAME;
140146
// Matrix legs expand the display name, e.g. "dist/server Node smoke (Node 24)".
141147
if (name.startsWith('dist/server Node smoke')) return 'node-serve-smoke';
148+
if (name.startsWith('dist/server Bun smoke')) return 'bun-serve-smoke';
142149
return name;
143150
}
144151

0 commit comments

Comments
 (0)