Skip to content

Commit 625d53f

Browse files
committed
fix(ci): route frozen FRV lint to matrix runner
1 parent abf412a commit 625d53f

3 files changed

Lines changed: 37 additions & 5 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2593,7 +2593,7 @@ jobs:
25932593
name: ${{ matrix.check_name }}
25942594
needs: [preflight]
25952595
if: ${{ !cancelled() && always() && needs.preflight.outputs.run_check == 'true' }}
2596-
runs-on: ${{ vars.OPENCLAW_CI_RUNNER_BACKEND == 'github' && 'ubuntu-24.04' || (vars.OPENCLAW_CI_RUNNER_BACKEND == 'hybrid' && (github.event_name == 'workflow_dispatch' || github.run_attempt > 1 || (matrix.task != 'lint' && matrix.task != 'test-types' && matrix.task != 'dependencies'))) && 'ubuntu-24.04' || (github.event_name == 'workflow_dispatch' && inputs.release_gate) && 'ubuntu-24.04' || (github.repository == 'openclaw/openclaw' && (github.event_name != 'pull_request' || contains(fromJSON('["OWNER","MEMBER","COLLABORATOR","CONTRIBUTOR"]'), github.event.pull_request.author_association)) && (matrix.runner || 'blacksmith-4vcpu-ubuntu-2404') || 'ubuntu-24.04') }}
2596+
runs-on: ${{ vars.OPENCLAW_CI_RUNNER_BACKEND == 'github' && 'ubuntu-24.04' || (vars.OPENCLAW_CI_RUNNER_BACKEND == 'hybrid' && github.repository == 'openclaw/openclaw' && github.event_name == 'workflow_dispatch' && !inputs.release_gate && startsWith(inputs.dispatch_id, 'full-release-validation-') && inputs.target_context_ref != '' && needs.preflight.outputs.frozen_target == 'true' && matrix.task == 'lint') && (matrix.runner || 'blacksmith-4vcpu-ubuntu-2404') || (vars.OPENCLAW_CI_RUNNER_BACKEND == 'hybrid' && (github.event_name == 'workflow_dispatch' || github.run_attempt > 1 || (matrix.task != 'lint' && matrix.task != 'test-types' && matrix.task != 'dependencies'))) && 'ubuntu-24.04' || (github.event_name == 'workflow_dispatch' && inputs.release_gate) && 'ubuntu-24.04' || (github.repository == 'openclaw/openclaw' && (github.event_name != 'pull_request' || contains(fromJSON('["OWNER","MEMBER","COLLABORATOR","CONTRIBUTOR"]'), github.event.pull_request.author_association)) && (matrix.runner || 'blacksmith-4vcpu-ubuntu-2404') || 'ubuntu-24.04') }}
25972597
timeout-minutes: 20
25982598
strategy:
25992599
fail-fast: false

‎docs/ci.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ The changed-target PR plan uses one Node test registration. Broad-risk PRs retai
342342

343343
`checks-ui-e2e` is sized against its per-shard floor rather than its packing slack. The lane is serial Chromium work: roughly 2,114s of measured test body across 286 control-UI files, and a median 116s that every row pays before and around that body (about 25s checkout, about 44s Node setup dominated by `pnpm install`, about 27s of Vitest transform/import, with a p90 of 143s). Duration-weighted packing already lands the tallest row within about 10% of ideal on held-out runs, so the tallest row falls only by splitting the body further. The hosted-planner count is 14 rows — 13 control-UI shards plus the browser-extension row — which models to a 4:52 median and 5:20 p90 tallest row against 5:28/5:56 at the previous twelve. Two extra registrations per run is negligible against the operating target; the fixed floor, not the bucket, is what bounds further splitting.
344344

345-
Canonical-repo CI keeps Blacksmith as the default runner path for pushes and first-attempt same-repo pull-request runs when the backend is unset or `blacksmith`. Hybrid keeps the heavy set plus the named critical-path plateau lanes on Blacksmith for attempt 1; other light lanes and every rerun Blacksmith lane use GitHub-hosted capacity. Pull-request retries of both UI E2E jobs use GitHub-hosted Ubuntu in every mode; push retries remain on their normal backend unless hybrid fallback applies. All `workflow_dispatch` runs, including `release_gate`, and non-canonical repository runs use GitHub-hosted runners. The [`github` backend](#runner-backend-modes) provides a manual repository-wide fallback; canonical runs do not probe Blacksmith queue health or mutate the variable automatically.
345+
Canonical-repo CI keeps Blacksmith as the default runner path for pushes and first-attempt same-repo pull-request runs when the backend is unset or `blacksmith`. Hybrid keeps the heavy set plus the named critical-path plateau lanes on Blacksmith for attempt 1; other light lanes and every rerun Blacksmith lane use GitHub-hosted capacity. Pull-request retries of both UI E2E jobs use GitHub-hosted Ubuntu in every mode; push retries remain on their normal backend unless hybrid fallback applies. Manual `workflow_dispatch` runs, including `release_gate`, and non-canonical repository runs use GitHub-hosted runners; same-repo hybrid Full Release Validation sends only frozen-candidate lint to its matrix runner. The [`github` backend](#runner-backend-modes) provides a manual repository-wide fallback; canonical runs do not probe Blacksmith queue health or mutate the variable automatically.
346346

347347
## Surface ratchets
348348

‎test/scripts/ci-workflow-guards.test.ts‎

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ function evaluateWorkflowExpression(
104104
// Runner routing keys off contributor trust, so pull-request cases default
105105
// to CONTRIBUTOR: same-repo PRs always come from someone with write access.
106106
authorAssociation?: string;
107+
dispatchId?: string;
107108
eventName: "pull_request" | "push" | "workflow_dispatch";
108109
frozenTarget?: boolean;
109110
headRepository?: string;
@@ -115,6 +116,7 @@ function evaluateWorkflowExpression(
115116
runnerBackend?: "" | "blacksmith" | "github" | "hybrid";
116117
runnerProfile?: "blacksmith" | "github" | "hybrid";
117118
runAttempt: number;
119+
targetContextRef?: string;
118120
},
119121
) {
120122
if (typeof expression !== "string") {
@@ -135,6 +137,7 @@ function evaluateWorkflowExpression(
135137
? haystack.includes(needle)
136138
: String(haystack).includes(String(needle)),
137139
fromJSON: (value: string) => JSON.parse(value) as unknown,
140+
startsWith: (value: unknown, prefix: unknown) => String(value).startsWith(String(prefix)),
138141
github: {
139142
event_name: context.eventName,
140143
repository: context.repository,
@@ -150,7 +153,9 @@ function evaluateWorkflowExpression(
150153
: {},
151154
},
152155
inputs: {
156+
dispatch_id: context.dispatchId ?? "",
153157
release_gate: context.releaseGate ?? false,
158+
target_context_ref: context.targetContextRef ?? "",
154159
},
155160
matrix: context.matrix ?? {},
156161
needs: {
@@ -3655,21 +3660,48 @@ NODE
36553660
};
36563661
const evaluateDispatch = (
36573662
runnerBackend: "blacksmith" | "github" | "hybrid",
3658-
releaseGate = false,
3663+
overrides: {
3664+
dispatchId?: string;
3665+
frozenTarget?: boolean;
3666+
matrix?: Record<string, unknown>;
3667+
releaseGate?: boolean;
3668+
repository?: string;
3669+
targetContextRef?: string;
3670+
} = {},
36593671
) =>
36603672
evaluateWorkflowExpression(runsOn, {
36613673
eventName: "workflow_dispatch",
36623674
matrix: lintMatrix,
3663-
releaseGate,
36643675
repository: "openclaw/openclaw",
36653676
runAttempt: 1,
36663677
runnerBackend,
3678+
...overrides,
36673679
});
36683680

36693681
expect(evaluateDispatch("blacksmith")).toBe("blacksmith-32vcpu-ubuntu-2404");
3670-
expect(evaluateDispatch("blacksmith", true)).toBe("ubuntu-24.04");
3682+
expect(evaluateDispatch("blacksmith", { releaseGate: true })).toBe("ubuntu-24.04");
36713683
expect(evaluateDispatch("github")).toBe("ubuntu-24.04");
36723684
expect(evaluateDispatch("hybrid")).toBe("ubuntu-24.04");
3685+
3686+
const frozenFrv = {
3687+
dispatchId: "full-release-validation-33128772779-ci",
3688+
frozenTarget: true,
3689+
targetContextRef: "release/2026.9.1",
3690+
};
3691+
expect(evaluateDispatch("hybrid", frozenFrv)).toBe("blacksmith-32vcpu-ubuntu-2404");
3692+
expect(evaluateDispatch("hybrid", { ...frozenFrv, dispatchId: "manual-ci-proof" })).toBe(
3693+
"ubuntu-24.04",
3694+
);
3695+
expect(evaluateDispatch("hybrid", { ...frozenFrv, releaseGate: true })).toBe("ubuntu-24.04");
3696+
expect(
3697+
evaluateDispatch("hybrid", {
3698+
...frozenFrv,
3699+
matrix: { runner: "blacksmith-16vcpu-ubuntu-2404", task: "test-types" },
3700+
}),
3701+
).toBe("ubuntu-24.04");
3702+
expect(evaluateDispatch("hybrid", { ...frozenFrv, repository: "fork/openclaw" })).toBe(
3703+
"ubuntu-24.04",
3704+
);
36733705
expect(
36743706
evaluateWorkflowExpression(runsOn, {
36753707
authorAssociation: "NONE",

0 commit comments

Comments
 (0)