Skip to content

Commit 28c4cea

Browse files
authored
Merge branch 'main' into fix/followup-104180
2 parents 4389f84 + 7a70daf commit 28c4cea

2,708 files changed

Lines changed: 224893 additions & 79174 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/openclaw-ci-limits/SKILL.md

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: openclaw-ci-limits
3-
description: Manage OpenClaw GitHub Actions and Blacksmith CI capacity, runner-registration budgets, fanout caps, main-push debounce, shard sizing, hosted-runner offload, queue health, and safe ramp-down/ramp-up changes. Use when tuning `.github/workflows/*`, `docs/ci.md`, CI runner labels, matrix `max-parallel`, ClawSweeper/Blacksmith burst protection, CodeQL runner placement, or investigating slow/queued OpenClaw CI.
3+
description: Manage OpenClaw GitHub Actions and Blacksmith CI capacity, runner-registration budgets, fanout caps, main-push single-flight, shard sizing, hosted-runner offload, queue health, and safe ramp-down/ramp-up changes. Use when tuning `.github/workflows/*`, `docs/ci.md`, CI runner labels, matrix `max-parallel`, ClawSweeper/Blacksmith burst protection, CodeQL runner placement, or investigating slow/queued OpenClaw CI.
44
---
55

66
# OpenClaw CI Limits
@@ -84,12 +84,11 @@ and register more runners before the window resets. Use job duration, retries,
8484
and queue turnover to justify any lower estimate. Add non-matrix Blacksmith jobs
8585
such as `preflight`, `security-fast`, `build-artifacts`, and platform lanes.
8686

87-
For repeated pushes, multiply by the number of runs expected to reach
88-
Blacksmith admission in the same 5-minute window, including runs canceled after
89-
admission. The debounce only suppresses pushes that arrive while
90-
`runner-admission` is still sleeping; once Blacksmith jobs register, those
91-
registrations are spent even if a later push cancels the run. If timing is
92-
uncertain, count every sequential push in the window.
87+
For repeated pull-request pushes, multiply by the number of runs expected to
88+
reach Blacksmith admission in the same 5-minute window, including runs canceled
89+
after admission. Canonical `main` is single-flight: one run completes while
90+
GitHub's default single pending slot is replaced by the newest push. Count one
91+
active main matrix plus its next pending matrix, not every intermediate merge.
9392

9493
Reject a change unless the org-level worst case stays below about 60% of the
9594
live bucket. With the current 10,000-registration bucket, keep planned
@@ -100,10 +99,9 @@ ClawSweeper, ClawHub, Clownfish, OpenClaw RTT, and Clawbench.
10099

101100
Prefer these in order:
102101

103-
1. Add or preserve concurrency groups that cancel superseded PR and canonical
104-
`main` runs before Blacksmith work starts.
105-
2. Keep the `runner-admission` hosted debounce for canonical `main` pushes.
106-
Change `OPENCLAW_MAIN_CI_DEBOUNCE_SECONDS` only with evidence.
102+
1. Preserve cancel-in-progress for superseded pull-request heads.
103+
2. Preserve canonical `main` single-flight without canceling its running
104+
integration cycle; GitHub's default pending slot coalesces to the newest tip.
107105
3. Move high-frequency, short, non-build jobs to `ubuntu-24.04`.
108106
4. Reduce matrix rows by bundling related tests inside one runner job when the
109107
combined job stays under timeout and keeps useful failure names.
@@ -120,18 +118,20 @@ Do not:
120118
- raise all `max-parallel` values at once;
121119
- make manual `workflow_dispatch` runs cancel normal push/PR validation;
122120
- delete coverage just to reduce runner count;
123-
- treat cancelled superseded runs as failures without checking the newest run
124-
for the same ref.
121+
- treat cancelled superseded pull-request runs as failures without checking the
122+
newest run for the same ref.
125123

126124
## Current OpenClaw Knobs
127125

128126
These are intentionally guarded by `test/scripts/ci-workflow-guards.test.ts`:
129127

130-
- `CI` concurrency key version and `cancel-in-progress` for PRs and canonical
131-
`main` pushes.
132-
- `runner-admission` on `ubuntu-24.04` with
133-
`OPENCLAW_MAIN_CI_DEBOUNCE_SECONDS=90`.
134-
- `preflight` and `security-fast` needing `runner-admission`.
128+
- `CI` concurrency key version, PR cancellation, and non-canceling canonical
129+
`main` single-flight with one coalesced pending tip.
130+
- `preflight` and hosted `security-fast` start immediately without a debounce
131+
or standalone admission job. On Node-relevant canonical main pushes,
132+
preflight also owns the sole dependency sticky-disk write and 8 GiB prune
133+
before fanout; replacement visibility is proved only by a later exact-marker
134+
restore because Blacksmith snapshot promotion can lag job completion.
135135
- CI matrix caps: fast/check lanes at 12, Node test shards at 28, Windows and
136136
Android at 2.
137137
- Canonical PR Node tests use one precise changed-target job when possible;
@@ -142,6 +142,9 @@ These are intentionally guarded by `test/scripts/ci-workflow-guards.test.ts`:
142142
- lower-weight Node/check shards on `blacksmith-4vcpu-ubuntu-2404`.
143143
- heavy retained Linux/Android shards on `blacksmith-8vcpu-ubuntu-2404`.
144144
- CodeQL Critical Quality on `ubuntu-24.04` with no `blacksmith-` labels.
145+
- Vitest/test compile caches are restore-only in CI and use immutable Actions
146+
caches; the daily/dispatch warmer is their sole writer. Build compile cache
147+
writes rotate at most once per UTC day. PRs create no runtime-cache archives.
145148

146149
When changing one knob, update `docs/ci.md` and the guard test in the same PR.
147150

.agents/skills/openclaw-live-updater/scripts/update-main.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const DEFAULT_EXPECTED_ORIGIN = "openclaw/openclaw";
3838
const FULL_SHA_RE = /^[0-9a-f]{40}$/u;
3939
const GATEWAY_READINESS_ATTEMPTS = 3;
4040
const GATEWAY_READINESS_RETRY_DELAY_MS = 5_000;
41+
const GATEWAY_CLI_TIMEOUT_MS = 30_000;
4142
const GATEWAY_STOP_PROOF_ATTEMPTS = 100;
4243
const GATEWAY_STOP_PROOF_RETRY_DELAY_MS = 100;
4344
const GATEWAY_SUSPEND_TIMEOUT_MS = 10_000;
@@ -1013,7 +1014,7 @@ export function parseLaunchctlArguments(output) {
10131014
: [];
10141015
}
10151016

1016-
function runBuiltGatewayCli(checkout, args, deployment, options = {}) {
1017+
export function runBuiltGatewayCli(checkout, args, deployment, options = {}) {
10171018
const observedDeployment = deployment ?? readManagedGatewayLaunchAgent(checkout);
10181019
const sourceEntrypoint = path.join(checkout, "dist/index.js");
10191020
let managedDeployment = observedDeployment;
@@ -1105,7 +1106,9 @@ function runBuiltGatewayCli(checkout, args, deployment, options = {}) {
11051106
cwd: workingDirectory ?? path.dirname(path.dirname(entrypoint)),
11061107
encoding: "utf8",
11071108
env,
1109+
killSignal: "SIGKILL",
11081110
stdio: ["ignore", "pipe", options.stderr ?? "inherit"],
1111+
timeout: options.timeoutMs ?? GATEWAY_CLI_TIMEOUT_MS,
11091112
});
11101113
} finally {
11111114
rmSync(overlayPath, { force: true });

.github/actions/create-generated-pr-tokens/action.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@ inputs:
88
contents-private-key:
99
description: GitHub App private key with contents write access.
1010
required: true
11-
pull-request-app-id:
12-
description: GitHub App id with pull-request write access.
11+
pull-request-client-id:
12+
description: GitHub App client id with pull-request write access.
1313
required: true
1414
pull-request-private-key:
1515
description: GitHub App private key with pull-request write access.
1616
required: true
17+
pull-request-contents-permission:
18+
description: Optional contents permission for pull-request operations that require repository write access.
19+
required: false
1720

1821
outputs:
1922
contents-token:
@@ -40,8 +43,9 @@ runs:
4043
id: pull-request-token
4144
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3
4245
with:
43-
app-id: ${{ inputs.pull-request-app-id }}
46+
client-id: ${{ inputs.pull-request-client-id }}
4447
private-key: ${{ inputs.pull-request-private-key }}
4548
owner: ${{ github.repository_owner }}
4649
repositories: ${{ github.event.repository.name }}
50+
permission-contents: ${{ inputs.pull-request-contents-permission }}
4751
permission-pull-requests: write

.github/actions/publish-generated-pr/action.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ inputs:
88
contents-private-key:
99
description: GitHub App private key with contents write access.
1010
required: true
11-
pull-request-app-id:
12-
description: GitHub App id with pull-request write access.
11+
pull-request-client-id:
12+
description: GitHub App client id with pull-request write access.
1313
required: true
1414
pull-request-private-key:
1515
description: GitHub App private key with pull-request write access.
@@ -57,8 +57,9 @@ runs:
5757
with:
5858
contents-client-id: ${{ inputs.contents-client-id }}
5959
contents-private-key: ${{ inputs.contents-private-key }}
60-
pull-request-app-id: ${{ inputs.pull-request-app-id }}
60+
pull-request-client-id: ${{ inputs.pull-request-client-id }}
6161
pull-request-private-key: ${{ inputs.pull-request-private-key }}
62+
pull-request-contents-permission: ${{ inputs.auto-merge == 'true' && 'write' || '' }}
6263

6364
- name: Publish generated pull request
6465
shell: bash

0 commit comments

Comments
 (0)