-
Notifications
You must be signed in to change notification settings - Fork 9
313 lines (306 loc) · 13.6 KB
/
Copy pathcheck.yml
File metadata and controls
313 lines (306 loc) · 13.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
name: Check
on:
# Keep these events path-unfiltered. Plugin submodule gitlink bumps under
# plugins/** must retest on Dependabot PRs and again after merge to main.
pull_request:
push:
branches: [main, crab-beta, crab-development]
workflow_dispatch:
permissions:
contents: read
jobs:
manifest:
name: Static checks (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-15, windows-latest]
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
cache-dependency-path: |
plugins/**/package-lock.json
- name: Resolve OpenClaw track
id: openclaw-track
run: node scripts/resolve-openclaw-track.mjs --github-output
- uses: actions/checkout@v6
with:
repository: openclaw/openclaw
ref: ${{ steps.openclaw-track.outputs.ref }}
path: openclaw
- shell: bash
timeout-minutes: 30
run: |
plugin_track="${{ steps.openclaw-track.outputs.track }}"
extra_args=(--openclaw-track "${{ steps.openclaw-track.outputs.track }}" --plugin-track "${plugin_track}")
if [ "${{ steps.openclaw-track.outputs.track }}" = "development" ]; then
extra_args=(--openclaw-track "${{ steps.openclaw-track.outputs.track }}" --fixture-set openclaw-beta --plugin-track source-pack)
fi
node scripts/run-static-suite.mjs --openclaw ./openclaw --policy dashboard --profile-runs 3 --plugin-inspector-smoke "${extra_args[@]}"
- name: Write CI summary artifacts
if: always()
continue-on-error: true
env:
CRABPOT_FIXTURE_SET: ${{ steps.openclaw-track.outputs.track == 'development' && 'openclaw-beta' || '' }}
CRABPOT_OPENCLAW_TRACK: ${{ steps.openclaw-track.outputs.track }}
CRABPOT_PLUGIN_TRACK: ${{ steps.openclaw-track.outputs.track == 'development' && 'source-pack' || steps.openclaw-track.outputs.track }}
run: |
node scripts/generate-report.mjs --openclaw ./openclaw
node scripts/capture-contracts.mjs --openclaw ./openclaw
node scripts/synthetic-probes.mjs --openclaw ./openclaw
node scripts/cold-import-readiness.mjs --openclaw ./openclaw
node scripts/workspace-plan.mjs --openclaw ./openclaw
node scripts/platform-probes.mjs --openclaw ./openclaw
node scripts/check-generated-surface-fixture.mjs --openclaw ./openclaw
node scripts/import-loop-profile.mjs
node scripts/profile-contract-runtime.mjs --openclaw ./openclaw --runs 3
node scripts/compare-runtime-profile.mjs
node scripts/check-ci-policy.mjs
node scripts/write-ci-summary.mjs --mode check --openclaw-label "${{ steps.openclaw-track.outputs.label }}" --github-step-summary
- name: Upload CI reports
if: always()
uses: actions/upload-artifact@v7
with:
name: crabpot-check-reports-${{ matrix.os }}
path: reports/
if-no-files-found: warn
container-smoke:
name: Container static checks
runs-on: ubuntu-latest
container:
image: node:22-bookworm
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Resolve OpenClaw track
id: openclaw-track
run: node scripts/resolve-openclaw-track.mjs --github-output
- uses: actions/checkout@v6
with:
repository: openclaw/openclaw
ref: ${{ steps.openclaw-track.outputs.ref }}
path: openclaw
- run: node --version
- shell: bash
timeout-minutes: 30
run: |
plugin_track="${{ steps.openclaw-track.outputs.track }}"
extra_args=(--openclaw-track "${{ steps.openclaw-track.outputs.track }}" --plugin-track "${plugin_track}")
if [ "${{ steps.openclaw-track.outputs.track }}" = "development" ]; then
extra_args=(--openclaw-track "${{ steps.openclaw-track.outputs.track }}" --fixture-set openclaw-beta --plugin-track source-pack)
fi
node scripts/run-static-suite.mjs --openclaw ./openclaw --policy dashboard --profile-runs 3 --plugin-inspector-smoke "${extra_args[@]}"
changed-fixture-plan:
name: Resolve changed fixture matrix
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }}
outputs:
matrix: ${{ steps.resolve.outputs.matrix }}
count: ${{ steps.resolve.outputs.count }}
fixtures: ${{ steps.resolve.outputs.fixtures }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1
submodules: recursive
- uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
cache-dependency-path: |
plugins/**/package-lock.json
- name: Resolve OpenClaw track
id: openclaw-track
run: node scripts/resolve-openclaw-track.mjs --github-output
- uses: actions/checkout@v6
with:
repository: openclaw/openclaw
ref: ${{ steps.openclaw-track.outputs.ref }}
path: openclaw
- name: Resolve diff refs
id: refs
shell: bash
run: |
set -euo pipefail
if [ "${{ github.event_name }}" = "pull_request" ]; then
base="${{ github.event.pull_request.base.sha }}"
head="${{ github.event.pull_request.head.sha }}"
else
base="${{ github.event.before }}"
head="${{ github.sha }}"
if [ -z "$base" ] || [[ "$base" =~ ^0+$ ]]; then
base="$(git rev-parse HEAD^ 2>/dev/null || true)"
fi
fi
refs=()
if [ -n "$base" ]; then refs+=("$base"); fi
if [ -n "$head" ]; then refs+=("$head"); fi
if [ "${#refs[@]}" -gt 0 ]; then
git fetch --no-tags --depth=1 origin "${refs[@]}"
fi
echo "base=${base}" >> "$GITHUB_OUTPUT"
echo "head=${head}" >> "$GITHUB_OUTPUT"
- name: Resolve changed fixture matrix
id: resolve
shell: bash
run: |
node scripts/resolve-fixture-set.mjs \
--fixture-set changed-submodules \
--base-ref "${{ steps.refs.outputs.base }}" \
--head-ref "${{ steps.refs.outputs.head }}" \
--openclaw ./openclaw \
--allow-empty \
--github-output >> "$GITHUB_OUTPUT"
- name: Show selected fixtures
run: echo "fixtures=${{ steps.resolve.outputs.fixtures }}"
changed-isolated-fixture:
name: Isolated changed fixture ${{ matrix.id }}
runs-on: ubuntu-latest
needs: changed-fixture-plan
if: ${{ needs.changed-fixture-plan.outputs.count != '0' }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.changed-fixture-plan.outputs.matrix) }}
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
cache-dependency-path: |
plugins/**/package-lock.json
- name: Resolve OpenClaw track
id: openclaw-track
run: node scripts/resolve-openclaw-track.mjs --github-output
- uses: actions/checkout@v6
with:
repository: openclaw/openclaw
ref: ${{ steps.openclaw-track.outputs.ref }}
path: openclaw
- name: Materialize fixture payload
env:
CRABPOT_FIXTURE_SET: ${{ matrix.id }}
CRABPOT_PLUGIN_TRACK: ${{ steps.openclaw-track.outputs.track == 'development' && 'source-pack' || steps.openclaw-track.outputs.track }}
run: node scripts/sync-fixtures.mjs --materialize --openclaw ./openclaw
- name: Validate workspace plan
run: node scripts/workspace-plan.mjs --check --openclaw ./openclaw
- name: Execute fixture lane
id: execute
continue-on-error: true
env:
CRABPOT_EXECUTE_ISOLATED: "1"
run: npm run workspace:execute -- --fixture "${{ matrix.id }}" --allow-empty --openclaw ./openclaw
- name: Summarize execution artifacts
if: always()
continue-on-error: true
run: npm run execution:report
- name: Reconcile compatibility report with runtime evidence
if: always()
continue-on-error: true
run: node scripts/generate-report.mjs --openclaw ./openclaw --execution-results reports/crabpot-execution-results.json --fixture-set "${{ matrix.id }}"
- name: Run execution policy
id: policy
if: always()
continue-on-error: true
run: node scripts/check-ci-policy.mjs
- name: Write isolated summary
if: always()
continue-on-error: true
run: node scripts/write-ci-summary.mjs --mode changed-isolated --openclaw-label "${{ steps.openclaw-track.outputs.label }}" --github-step-summary
- name: Upload isolated execution artifacts
if: always()
uses: actions/upload-artifact@v7
with:
name: crabpot-changed-isolated-${{ matrix.id }}
path: |
.crabpot/results/
reports/crabpot-report.*
reports/crabpot-issues.*
reports/crabpot-execution-results.*
reports/crabpot-ci-policy.*
reports/crabpot-ci-summary.*
if-no-files-found: warn
- name: Fail if isolated policy failed
if: ${{ steps.policy.outcome == 'failure' }}
run: exit 1
dashboard:
runs-on: ubuntu-latest
needs: [manifest, container-smoke, changed-fixture-plan, changed-isolated-fixture]
if: ${{ always() && github.event_name != 'pull_request' && github.actor != 'github-actions[bot]' && needs.manifest.result == 'success' && needs.container-smoke.result == 'success' && (needs.changed-isolated-fixture.result == 'success' || needs.changed-isolated-fixture.result == 'skipped') }}
permissions:
contents: write
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
cache-dependency-path: |
plugins/**/package-lock.json
- name: Resolve OpenClaw track
id: openclaw-track
run: node scripts/resolve-openclaw-track.mjs --github-output
- uses: actions/checkout@v6
with:
repository: openclaw/openclaw
ref: ${{ steps.openclaw-track.outputs.ref }}
path: openclaw
- run: node scripts/sync-fixtures.mjs --materialize --openclaw ./openclaw
env:
CRABPOT_FIXTURE_SET: ${{ steps.openclaw-track.outputs.track == 'development' && 'openclaw-beta' || '' }}
CRABPOT_PLUGIN_TRACK: ${{ steps.openclaw-track.outputs.track == 'development' && 'source-pack' || steps.openclaw-track.outputs.track }}
- name: Install OpenClaw lifecycle dependencies
run: |
corepack enable
corepack prepare "$(node -p "require('./openclaw/package.json').packageManager.split('+')[0]")" --activate
pnpm --dir openclaw install --frozen-lockfile --ignore-scripts
- name: Fetch main dashboard baseline
if: ${{ steps.openclaw-track.outputs.track != 'latest' }}
run: |
mkdir -p .crabpot/baseline
git fetch --no-tags --depth=1 origin main
git show origin/main:reports/crabpot-dashboard-data.json > .crabpot/baseline/main-dashboard-data.json || true
- name: Write README dashboard
env:
CRABPOT_FIXTURE_SET: ${{ steps.openclaw-track.outputs.track == 'development' && 'openclaw-beta' || '' }}
CRABPOT_OPENCLAW_TRACK: ${{ steps.openclaw-track.outputs.track }}
CRABPOT_PLUGIN_TRACK: ${{ steps.openclaw-track.outputs.track == 'development' && 'source-pack' || steps.openclaw-track.outputs.track }}
CRABPOT_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
CRABPOT_SUMMARY_GENERATED_AT="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
export CRABPOT_SUMMARY_GENERATED_AT
node scripts/generate-report.mjs --openclaw ./openclaw
node scripts/capture-contracts.mjs --openclaw ./openclaw
node scripts/synthetic-probes.mjs --openclaw ./openclaw
node scripts/cold-import-readiness.mjs --openclaw ./openclaw
node scripts/workspace-plan.mjs --openclaw ./openclaw
node scripts/platform-probes.mjs --openclaw ./openclaw
node scripts/import-loop-profile.mjs --openclaw ./openclaw --runs 3
node scripts/profile-contract-runtime.mjs --openclaw ./openclaw --runs 3
node scripts/compare-runtime-profile.mjs
node scripts/check-ci-policy.mjs
node scripts/write-ci-summary.mjs --mode check --openclaw-label "${{ steps.openclaw-track.outputs.label }}"
node scripts/update-track-metadata.mjs
baseline_arg=()
if [ -f .crabpot/baseline/main-dashboard-data.json ]; then
baseline_arg=(--baseline-data .crabpot/baseline/main-dashboard-data.json)
fi
node scripts/update-readme-summary.mjs "${baseline_arg[@]}"
git add README.md reports/
if ! git diff --cached --quiet; then
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -m "chore(readme): update crabpot dashboard [skip ci]"
git push || echo "::notice::Skipped stale dashboard push because ${GITHUB_REF_NAME} moved; a newer check run will refresh it."
fi