Skip to content

Commit adb3caf

Browse files
authored
Merge branch 'main' into fix/copilot-image-token-bypass
2 parents e7e3ba0 + 99a313d commit adb3caf

1,728 files changed

Lines changed: 45647 additions & 25564 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/crabbox/SKILL.md‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -294,18 +294,19 @@ Common Crabbox-only failures:
294294
report the capacity blocker.
295295

296296
If Crabbox cannot dispatch, sync, attach, or stop but Blacksmith itself works,
297-
use direct Blacksmith from the repo root:
297+
first try the same command through the repo wrapper with `--debug` and
298+
`--timing-json`:
298299

299300
```sh
300-
blacksmith testbox warmup ci-check-testbox.yml --ref main --idle-timeout 90
301-
blacksmith testbox run --id <tbx_id> "env CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm test:changed"
302-
blacksmith testbox stop --id <tbx_id>
301+
pnpm crabbox:run -- --provider blacksmith-testbox --debug --timing-json -- \
302+
CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm test:changed
303303
```
304304

305-
Direct full suite:
305+
Full suite:
306306

307307
```sh
308-
blacksmith testbox run --id <tbx_id> "env CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm test"
308+
pnpm crabbox:run -- --provider blacksmith-testbox --debug --timing-json -- \
309+
CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 pnpm test
309310
```
310311

311312
Auth fallback, only when `blacksmith` says auth is missing:
@@ -340,16 +341,15 @@ The hydration workflow owns checkout, Node/pnpm setup, dependency install,
340341
secrets, ready marker, and keepalive. Crabbox owns dispatch, sync, SSH command
341342
execution, timing, logs/results, and cleanup.
342343

343-
Minimal direct Blacksmith fallback, from repo root:
344+
Minimal Blacksmith-backed Crabbox run, from repo root:
344345

345346
```sh
346-
blacksmith testbox warmup ci-check-testbox.yml --ref main --idle-timeout 90
347-
blacksmith testbox run --id <tbx_id> "env CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test:changed"
348-
blacksmith testbox stop --id <tbx_id>
347+
pnpm crabbox:run -- --provider blacksmith-testbox --timing-json -- \
348+
CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test:changed
349349
```
350350

351-
Use direct Blacksmith only when Crabbox is the broken layer and Blacksmith
352-
itself still works. Prefer direct `blacksmith testbox list` for cleanup
351+
Use direct Blacksmith only when Crabbox is the broken layer and you are
352+
isolating a Crabbox bug. Prefer direct `blacksmith testbox list` for cleanup
353353
diagnostics, not as a reusable work queue.
354354

355355
Important Blacksmith footguns:

‎.agents/skills/openclaw-test-performance/SKILL.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ barrels, package-boundary tests, or extension suites.
9292
- runtime capture should be quiet and config-tolerant.
9393
- command output should include wall time, exit code, and peak RSS when
9494
available.
95-
4. For broad or package-heavy plugin proof, use Blacksmith Testbox by default on
96-
maintainer machines. Warm once and reuse the same box:
97-
- `blacksmith testbox warmup ci-check-testbox.yml --ref main --idle-timeout 90`
98-
- `blacksmith testbox run --id <ID> "OPENCLAW_TESTBOX=1 pnpm test:extensions:batch <ids>"`
99-
- stop the box when done.
95+
4. For broad or package-heavy plugin proof, use Crabbox-backed Blacksmith
96+
Testbox by default on maintainer machines:
97+
- `pnpm crabbox:run -- --provider blacksmith-testbox --timing-json -- OPENCLAW_TESTBOX=1 pnpm test:extensions:batch <ids>`
98+
- add `--keep`/`--id <id-or-slug>` only when several commands must share one
99+
warmed box; stop it with `pnpm crabbox:stop -- <id-or-slug>`.
100100
5. If plugin performance is package-artifact sensitive, switch to
101101
`openclaw-pre-release-plugin-testing` and Package Acceptance rather than
102102
trusting source-only timing.

‎.agents/skills/openclaw-testing/SKILL.md‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,11 @@ Prove the touched surface first. Do not reflexively run the whole suite.
3636
- Prefer GitHub Actions for release/Docker proof when the workflow already has the prepared image and secrets.
3737
- Use `scripts/committer "<msg>" <paths...>` when committing; stage only your files.
3838
- If deps are missing, run `pnpm install`, retry once, then report the first actionable error.
39-
- For Blacksmith Testbox proof, reuse only an id warmed and claimed in this
40-
operator session. `blacksmith testbox list` is diagnostics only; a listed id
41-
can have a local key and still carry stale rsync state from another lane.
42-
After warmup, run `pnpm testbox:claim --id <id>`, then prefer
43-
`pnpm testbox:run --id <id> -- "<command>"` for OpenClaw gates so stale
44-
org-visible ids fail fast before syncing. Claims older than 12 hours are
45-
stale unless `OPENCLAW_TESTBOX_CLAIM_TTL_MINUTES` is explicitly set for long
46-
work.
39+
- For Blacksmith Testbox proof, use Crabbox first. `pnpm crabbox:run -- --provider
40+
blacksmith-testbox --timing-json -- <command...>` warms, claims, syncs, runs,
41+
reports, and cleans up one-shot boxes. Reuse only an id/slug created in this
42+
operator session; `blacksmith testbox list` is diagnostics only, not a shared
43+
work queue.
4744

4845
## Local Test Shortcuts
4946

‎.github/actions/setup-node-env/action.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ inputs:
1010
cache-key-suffix:
1111
description: Suffix appended to the pnpm store cache key.
1212
required: false
13-
default: "node24"
13+
default: "node24-pnpm11"
1414
pnpm-version:
1515
description: pnpm version for corepack.
1616
required: false
17-
default: "10.33.0"
17+
default: "11.0.8"
1818
install-bun:
1919
description: Whether to install Bun alongside Node.
2020
required: false

‎.github/actions/setup-pnpm-store-cache/action.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ inputs:
44
pnpm-version:
55
description: pnpm version to activate via corepack.
66
required: false
7-
default: "10.33.0"
7+
default: "11.0.8"
88
cache-key-suffix:
99
description: Suffix appended to the cache key.
1010
required: false
11-
default: "node24"
11+
default: "node24-pnpm11"
1212
use-restore-keys:
1313
description: Whether to use restore-keys fallback for actions/cache.
1414
required: false
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Mantis Telegram Desktop Proof Agent
2+
3+
You are Mantis running native Telegram Desktop visual proof for an OpenClaw PR.
4+
5+
Goal: inspect the pull request, decide the best Telegram-visible behavior to
6+
prove, run before/after native Telegram Desktop sessions, iterate until the GIFs
7+
are visually good, and leave a Mantis evidence manifest for the workflow to
8+
publish.
9+
10+
Hard limits:
11+
12+
- Do not post GitHub comments or reviews. The workflow publishes the manifest.
13+
- Do not commit, push, label, merge, or edit PR metadata.
14+
- Do not print secrets, credential payloads, Telegram profile data, TDLib data,
15+
or raw session archives.
16+
- Do not use fixed `/status` proof unless it genuinely proves the PR.
17+
- Do not finish with tiny, cropped-wrong, off-bottom, or sidebar-heavy GIFs.
18+
- Do not invent a generic proof. The proof must match the PR behavior.
19+
20+
Inputs are provided as environment variables:
21+
22+
- `MANTIS_PR_NUMBER`
23+
- `BASELINE_REF`
24+
- `BASELINE_SHA`
25+
- `CANDIDATE_REF`
26+
- `CANDIDATE_SHA`
27+
- `MANTIS_OUTPUT_DIR`
28+
- `MANTIS_INSTRUCTIONS`
29+
- `CRABBOX_PROVIDER`
30+
- optional `CRABBOX_LEASE_ID`
31+
32+
Required workflow:
33+
34+
1. Read `.agents/skills/telegram-crabbox-e2e-proof/SKILL.md`.
35+
2. Inspect the PR with `gh pr view "$MANTIS_PR_NUMBER"` and
36+
`gh pr diff "$MANTIS_PR_NUMBER"` when `MANTIS_PR_NUMBER` is set. If the run
37+
came from workflow dispatch without a PR number, inspect
38+
`BASELINE_SHA..CANDIDATE_SHA`.
39+
3. Decide what Telegram message, mock model response, command, callback, button,
40+
media, or sequence best proves the PR. Use `MANTIS_INSTRUCTIONS` as extra
41+
maintainer guidance, not as a replacement for reading the PR.
42+
4. Create detached worktrees under
43+
`.artifacts/qa-e2e/mantis/telegram-desktop-proof-worktrees/baseline` and
44+
`.artifacts/qa-e2e/mantis/telegram-desktop-proof-worktrees/candidate`, then
45+
install and build each worktree with the repo's normal `pnpm` commands.
46+
5. In each worktree, run the real-user Telegram Crabbox proof flow from the
47+
skill. Use the same proof idea for baseline and candidate. You may iterate
48+
and rerun if the visual result is not convincing.
49+
6. Open Telegram Desktop directly to the newest relevant message with the
50+
runner `view` command before finishing each recording. Keep the chat scrolled
51+
to the bottom so new proof messages appear in-frame.
52+
7. Finish each session with `--preview-crop telegram-window`.
53+
8. Build `${MANTIS_OUTPUT_DIR}/mantis-evidence.json` with:
54+
55+
```bash
56+
node scripts/mantis/build-telegram-desktop-proof-evidence.mjs \
57+
--output-dir "$MANTIS_OUTPUT_DIR" \
58+
--baseline-repo-root <baseline-worktree> \
59+
--baseline-output-dir <baseline-session-output-dir> \
60+
--baseline-ref "$BASELINE_REF" \
61+
--baseline-sha "$BASELINE_SHA" \
62+
--candidate-repo-root <candidate-worktree> \
63+
--candidate-output-dir <candidate-session-output-dir> \
64+
--candidate-ref "$CANDIDATE_REF" \
65+
--candidate-sha "$CANDIDATE_SHA" \
66+
--scenario-label telegram-desktop-proof
67+
```
68+
69+
Visual acceptance:
70+
71+
- The GIFs show native Telegram Desktop, not transcript HTML.
72+
- Telegram is in single-chat proof view with no left chat list or right info
73+
pane.
74+
- The proof behavior is visible without reading logs.
75+
- Main and PR GIFs are comparable side by side.
76+
- The final relevant message or button is visible near the bottom.
77+
- If one run fails because the PR genuinely changes behavior, still finish the
78+
session and produce the manifest if useful visual artifacts exist.
79+
80+
Expected final state:
81+
82+
- `${MANTIS_OUTPUT_DIR}/mantis-evidence.json` exists.
83+
- The manifest contains paired `motionPreview` artifacts labeled `Main` and
84+
`This PR`.
85+
- The worktree can be dirty only under `.artifacts/`.

‎.github/workflows/ci.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ jobs:
11141114
uses: ./.github/actions/setup-node-env
11151115
with:
11161116
node-version: "22.18.0"
1117-
cache-key-suffix: "node22"
1117+
cache-key-suffix: "node22-pnpm11"
11181118
install-bun: "false"
11191119

11201120
- name: Configure Node test resources
@@ -1194,7 +1194,7 @@ jobs:
11941194
uses: ./.github/actions/setup-node-env
11951195
with:
11961196
node-version: "${{ matrix.node_version || '24.x' }}"
1197-
cache-key-suffix: "${{ matrix.cache_key_suffix || 'node24' }}"
1197+
cache-key-suffix: "${{ matrix.cache_key_suffix || 'node24-pnpm11' }}"
11981198
install-bun: "false"
11991199

12001200
- name: Configure Node test resources
@@ -1844,8 +1844,8 @@ jobs:
18441844
id: pnpm-cache
18451845
uses: ./.github/actions/setup-pnpm-store-cache
18461846
with:
1847-
pnpm-version: "10.33.0"
1848-
cache-key-suffix: "node24"
1847+
pnpm-version: "11.0.8"
1848+
cache-key-suffix: "node24-pnpm11"
18491849
use-restore-keys: "false"
18501850
use-actions-cache: "true"
18511851

‎.github/workflows/clawsweeper-dispatch.yml‎

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ jobs:
183183
ITEM_NUMBER: ${{ github.event.issue.number }}
184184
COMMENT_ID: ${{ github.event.comment.id }}
185185
COMMENT_BODY: ${{ github.event.comment.body }}
186+
AUTHOR_ASSOCIATION: ${{ github.event.comment.author_association }}
186187
SOURCE_ACTION: ${{ github.event.action }}
187188
run: |
188189
set -euo pipefail
@@ -213,13 +214,33 @@ jobs:
213214
else
214215
echo "::notice::Skipping ClawSweeper comment acknowledgement because no target token is configured."
215216
fi
217+
status_comment_id=""
218+
if [ -n "$TARGET_TOKEN" ]; then
219+
case "$AUTHOR_ASSOCIATION" in
220+
OWNER|MEMBER|COLLABORATOR)
221+
status_body="$(printf '%s\n' \
222+
"<!-- clawsweeper-command-ack:$COMMENT_ID -->" \
223+
"🦞👀" \
224+
"ClawSweeper picked this up." \
225+
"" \
226+
"Command router queued. I will update this comment with the next step.")"
227+
status_payload="$(jq -nc --arg body "$status_body" '{body:$body}')"
228+
status_response="$(GH_TOKEN="$TARGET_TOKEN" gh api \
229+
"repos/$TARGET_REPO/issues/$ITEM_NUMBER/comments" \
230+
--method POST \
231+
--input - <<< "$status_payload")"
232+
status_comment_id="$(jq -r '.id // empty' <<< "$status_response")"
233+
;;
234+
esac
235+
fi
216236
payload="$(jq -nc \
217237
--arg target_repo "$TARGET_REPO" \
218238
--argjson item_number "$ITEM_NUMBER" \
219239
--argjson comment_id "$COMMENT_ID" \
240+
--arg status_comment_id "$status_comment_id" \
220241
--arg source_event "issue_comment" \
221242
--arg source_action "$SOURCE_ACTION" \
222-
'{event_type:"clawsweeper_comment",client_payload:{target_repo:$target_repo,item_number:$item_number,comment_id:$comment_id,source_event:$source_event,source_action:$source_action}}')"
243+
'{event_type:"clawsweeper_comment",client_payload:({target_repo:$target_repo,item_number:$item_number,comment_id:$comment_id,source_event:$source_event,source_action:$source_action,max_comments:"1"} + (if $status_comment_id != "" then {status_comment_id:($status_comment_id|tonumber)} else {} end))}')"
223244
if GH_TOKEN="$DISPATCH_TOKEN" gh api repos/openclaw/clawsweeper/dispatches \
224245
--method POST \
225246
--input - <<< "$payload"; then

0 commit comments

Comments
 (0)