Skip to content

Commit 416a8a2

Browse files
authored
Merge branch 'main' into fix/bundled-channel-load-doctor-hint
2 parents fbe18d0 + 04eac15 commit 416a8a2

1,412 files changed

Lines changed: 28941 additions & 6479 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/autoreview/SKILL.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,10 @@ Include:
136136
- the clean review result from the final helper/review run, or why a remaining finding was consciously rejected
137137

138138
Do not run another Codex review solely to improve the final report wording. If the final helper run exited 0 and produced no accepted/actionable findings, report that exact run as clean.
139+
140+
## PR / CI Closeout
141+
142+
- Prefer direct run/job APIs after CI starts: `gh run view <run-id> --json jobs`; use PR rollup only for final mergeability.
143+
- After rebase, compare `origin/main..HEAD`; drop CI-fix commits already upstream before pushing.
144+
- For prompt snapshot CI failures, prove/generate with Linux Node 24 before rerunning the failed job.
145+
- Update PR body once near the final head unless proof labels are missing or stale enough to block CI.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: channel-message-flows
3+
description: "Use when previewing local channel message flow fixtures."
4+
---
5+
6+
# Channel Message Flows
7+
8+
Use this from the OpenClaw repo root to send canned channel preview flows while iterating on message UX. These are real sends/edits/deletes against the configured channel target.
9+
10+
## Telegram
11+
12+
Native Telegram `sendMessageDraft` tool progress, then a final answer:
13+
14+
```bash
15+
node --import tsx scripts/dev/channel-message-flows.ts \
16+
--channel telegram \
17+
--target <telegram-chat-id> \
18+
--flow working-final \
19+
--duration-ms 20000
20+
```
21+
22+
Thinking preview, then a final answer:
23+
24+
```bash
25+
node --import tsx scripts/dev/channel-message-flows.ts \
26+
--channel telegram \
27+
--target <telegram-chat-id> \
28+
--flow thinking-final
29+
```
30+
31+
## Options
32+
33+
- `--account <accountId>`: Telegram account id when not using the default.
34+
- `--thread-id <id>`: Telegram forum topic/message thread id.
35+
- `--delay-ms <ms>`: Override preview update cadence.
36+
- `--duration-ms <ms>`: Simulated working duration for `working-final`.
37+
- `--final-text <text>`: Override the durable final message.
38+
39+
## Notes
40+
41+
- `--target` is the numeric Telegram chat id.
42+
- `working-final` exercises native Telegram `sendMessageDraft` with static `Working` status and sample tool progress.
43+
- `thinking-final` exercises formatted `Thinking` reasoning preview clearing before the final answer.
44+
- Only `--channel telegram` is implemented for now.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
name: openclaw-docker-e2e-authoring
3+
description: "Author OpenClaw Docker E2E and live provider Docker lanes."
4+
---
5+
6+
# OpenClaw Docker E2E Authoring
7+
8+
Use this when adding or changing Docker E2E lanes, release-path Docker tests,
9+
or live-provider Docker proof.
10+
11+
## Lane Choice
12+
13+
- Deterministic Docker: fake the dependency/server and assert the exact runtime
14+
contract crossing the boundary.
15+
- Live Docker: use real provider credentials/model only when user-visible
16+
behavior needs the real service.
17+
- Prefer both when they prove different risks: deterministic for byte/payload
18+
routing, live for actual provider behavior.
19+
20+
## Authoring Rules
21+
22+
- Test-only helpers live in `test/helpers` or `scripts/e2e/lib/<lane>/`, not
23+
`src/**`, unless production imports them.
24+
- Package-installed app runs from `/app`; mount only explicit harness/helper
25+
paths read-only.
26+
- Fake servers should log boundary requests as JSONL and clients should assert
27+
the real dependency payload, not just process success.
28+
- Add the package script and `scripts/lib/docker-e2e-scenarios.mjs` lane in the
29+
same change.
30+
- If a lane installs a plugin from npm, default the spec via env so published
31+
and local override paths are both testable.
32+
33+
## Media And Vision
34+
35+
- Expected answer must exist only in pixels or provider output being tested.
36+
- Use neutral filenames, neutral prompts, and no metadata leaks.
37+
- Random bitmap/OCR tokens reuse the repo OCR-safe alphabet `24567ACEF` unless
38+
the test owns a stronger glyph set.
39+
- Make the expected answer unique per run when proving real image
40+
understanding.
41+
42+
## `chat.send` E2E
43+
44+
- Require `chat.send` to return `status: "started"` and a string `runId`.
45+
- Wait for completion with `agent.wait`.
46+
- Assert final user-visible text via `chat.history` when event ordering is not
47+
the behavior under test.
48+
- Keep originating channel/account metadata only when the bug path needs queued
49+
inbound/channel context.
50+
51+
## Verification
52+
53+
Run the smallest proof that covers the touched lane:
54+
55+
```bash
56+
pnpm exec oxfmt --write <changed files>
57+
node --check <new .mjs files>
58+
bash -n <new .sh files>
59+
node scripts/run-vitest.mjs test/scripts/docker-e2e-plan.test.ts
60+
OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:<lane>
61+
```
62+
63+
For real-provider lanes, run the matching live Docker script after deterministic
64+
Docker is green. Finish with `$autoreview` before commit/PR.
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
name: openclaw-mac-release
3+
description: "Run or recover OpenClaw macOS release signing, notarization, appcast, and asset promotion."
4+
---
5+
6+
# OpenClaw Mac Release
7+
8+
Use with `$openclaw-release-maintainer`, `$openclaw-release-ci`, and `$one-password` when stable macOS assets, private mac preflight, notarization, appcast promotion, or mac release recovery is involved.
9+
10+
## Credentials
11+
12+
- Canonical ASC item: vault `Molty`, title `API Key - App Store Connect - Personal - Release`.
13+
- Fields: `private_key_p8`, `key_id`, `issuer_id`.
14+
- Current known good key id: `AKVLXW849T`.
15+
- Legacy mirror: vault `Private`, title `API Key - App Store Connect - Personal`; keep it synced for older refs.
16+
- Stale/revoked key symptom: `xcrun notarytool submit` fails with `HTTP status code: 401. Unauthenticated`.
17+
- Validate candidate ASC credentials with `xcrun notarytool history` before setting GitHub secrets.
18+
19+
## 1Password
20+
21+
- Use `$one-password`: all `op` work inside one persistent tmux session, no secret output.
22+
- Prefer `OP_SERVICE_ACCOUNT_TOKEN` from `~/.profile` for Molty reads.
23+
- Do not assume `MOLTY_OP_SERVICE_ACCOUNT_TOKEN` is alive; it has previously pointed at a deleted service account.
24+
- If a service token fails, run status-only checks: token present/length and `op whoami`; never print token values.
25+
- If desktop app auth is needed but Touch ID is unavailable, set `OP_BIOMETRIC_UNLOCK_ENABLED=false` for the manual `op account add --signin` path.
26+
27+
## GitHub Secrets
28+
29+
Target private repo environment: `openclaw/releases-private`, env `mac-release`.
30+
31+
Set only after local notary auth validation:
32+
33+
- `APP_STORE_CONNECT_API_KEY_P8`
34+
- `APP_STORE_CONNECT_KEY_ID`
35+
- `APP_STORE_CONNECT_ISSUER_ID`
36+
37+
Do not update these from mixed sources. All three ASC fields must come from the same 1Password item.
38+
39+
## Workflow Shape
40+
41+
- Public release branch may carry mac-only packaging fixes after the stable tag/npm are already live.
42+
- Use `source_ref=release/YYYY.M.D` for private mac preflight/validation when building that branch variation.
43+
- Keep `tag=vYYYY.M.D` pointing at the original stable release commit.
44+
- Real mac publish must reuse:
45+
- a successful private mac preflight run for the same tag/source SHA
46+
- a successful private mac validation run for the same tag/source SHA
47+
- If preflight source SHA differs from tag SHA, validation must also use the same `source_ref`; promotion rejects mismatched proof.
48+
49+
## Notarization
50+
51+
- OpenClaw uses `scripts/notarize-mac-artifact.sh`.
52+
- `xcrun notarytool submit` should use `--no-s3-acceleration`; accelerated upload can surface misleading 401s even when `notarytool history` succeeds.
53+
- If signing succeeds but notarization fails immediately with 401, check ASC key freshness first.
54+
- If notarization stays in progress for several minutes after key-file write, that is normal Apple wait time; do not edit blindly.
55+
56+
## Dispatch
57+
58+
Private preflight:
59+
60+
```bash
61+
gh workflow run openclaw-macos-publish.yml --repo openclaw/releases-private --ref main \
62+
-f tag=vYYYY.M.D \
63+
-f source_ref=release/YYYY.M.D \
64+
-f preflight_only=true \
65+
-f smoke_test_only=false \
66+
-f allow_late_calver_recovery=false \
67+
-f public_release_branch=release/YYYY.M.D
68+
```
69+
70+
Private validation for a branch-variation preflight:
71+
72+
```bash
73+
gh workflow run openclaw-macos-validate.yml --repo openclaw/releases-private --ref main \
74+
-f tag=vYYYY.M.D \
75+
-f source_ref=release/YYYY.M.D
76+
```
77+
78+
Real publish:
79+
80+
```bash
81+
gh workflow run openclaw-macos-publish.yml --repo openclaw/releases-private --ref main \
82+
-f tag=vYYYY.M.D \
83+
-f preflight_only=false \
84+
-f smoke_test_only=false \
85+
-f preflight_run_id=<successful-preflight-run> \
86+
-f validate_run_id=<successful-validation-run> \
87+
-f allow_late_calver_recovery=false \
88+
-f public_release_branch=release/YYYY.M.D
89+
```
90+
91+
## Verify
92+
93+
- `gh release view vYYYY.M.D --repo openclaw/openclaw` shows zip, dmg, dSYM zip, not draft, not prerelease.
94+
- Public `main` `appcast.xml` points at `OpenClaw-YYYY.M.D.zip`.
95+
- Appcast entry has `sparkle:version`, `sparkle:shortVersionString`, length, and `sparkle:edSignature`.

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Prove the touched surface first. Do not reflexively run the whole suite.
2727
use the Crabbox wrapper with the provider that matches the proof surface.
2828
For maintainer heavy `pnpm` gates, that is usually delegated Blacksmith
2929
Testbox through Crabbox, e.g. `node scripts/crabbox-wrapper.mjs run
30-
--provider blacksmith-testbox ... -- pnpm check:changed`. For direct AWS
30+
--provider blacksmith-testbox ... -- pnpm check:changed`. For direct AWS
3131
Crabbox proof, omit `--provider` and let `.crabbox.yaml` choose AWS.
3232
- workflow-only: `git diff --check`, workflow syntax/lint (`actionlint` when available)
3333
- docs-only: `pnpm docs:list`, docs formatter/lint only if docs tooling changed or requested
@@ -131,6 +131,8 @@ gh run view <run-id> --job <job-id> --log
131131
- Check exact SHA. Ignore newer unrelated `main` unless asked.
132132
- For cancelled same-branch runs, confirm whether a newer run superseded it.
133133
- Fetch full logs only for failed or relevant jobs.
134+
- Prefer `gh run view <run-id> --json jobs` over PR rollup while debugging; rollup can be stale/noisy.
135+
- For `prompt:snapshots:check` failures, treat Linux Node 24 as CI truth. If macOS passes but CI drifts, reproduce in a Linux Node 24 container or Testbox, commit that generated output, then rerun.
134136

135137
## GitHub Release Workflows
136138

.agents/skills/telegram-crabbox-e2e-proof/SKILL.md

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ artifact bundle. The runner leases the shared burner account from Convex.
1717
Run from the OpenClaw repo and branch under test:
1818

1919
```bash
20-
pnpm qa:telegram-user:crabbox -- start \
20+
proof_cmd="${OPENCLAW_TELEGRAM_USER_PROOF_CMD:-openclaw-telegram-user-crabbox-proof}"
21+
"$proof_cmd" start \
2122
--tdlib-url http://artifacts.openclaw.ai/tdlib-v1.8.0-linux-x64.tgz \
2223
--output-dir .artifacts/qa-e2e/telegram-user-crabbox/pr-review
2324
```
@@ -39,7 +40,8 @@ For deterministic visual repros, put the exact mock-model reply in a file and
3940
pass it to `start`:
4041

4142
```bash
42-
pnpm qa:telegram-user:crabbox -- start \
43+
proof_cmd="${OPENCLAW_TELEGRAM_USER_PROOF_CMD:-openclaw-telegram-user-crabbox-proof}"
44+
"$proof_cmd" start \
4345
--tdlib-url http://artifacts.openclaw.ai/tdlib-v1.8.0-linux-x64.tgz \
4446
--mock-response-file .artifacts/qa-e2e/telegram-user-crabbox/reply.txt \
4547
--output-dir .artifacts/qa-e2e/telegram-user-crabbox/pr-review
@@ -55,29 +57,31 @@ For visual proof, first send or identify a bottom marker message, then open the
5557
group/topic directly by message id:
5658

5759
```bash
58-
pnpm qa:telegram-user:crabbox -- view \
60+
proof_cmd="${OPENCLAW_TELEGRAM_USER_PROOF_CMD:-openclaw-telegram-user-crabbox-proof}"
61+
"$proof_cmd" view \
5962
--session .artifacts/qa-e2e/telegram-user-crabbox/pr-review/session.json \
6063
--message-id <message-id>
6164
```
6265

6366
This uses Telegram Desktop directly with `tg://privatepost`, not `xdg-open`.
6467
It also resizes Telegram to `650x1000` at the tested desktop position so
65-
Telegram switches to single-chat mode with no left chat list or right info
66-
pane. Do not press Escape after this; Escape can close the selected chat.
68+
the crop can isolate the chat pane even if Telegram keeps a split/sidebar
69+
layout. Do not press Escape after this; Escape can close the selected chat.
6770

6871
Bottom behavior matters:
6972

7073
- deep-linking to the newest message keeps Telegram pinned to the bottom, so
7174
later messages appear live in the recording
7275
- deep-linking to an older message does not auto-scroll to new arrivals; link
7376
again to the newest/final marker instead of clicking the down-arrow
74-
- `650px` is the largest tested clean width; `660px` switches Telegram back to
75-
split/sidebar layout
77+
- the cropped GIF intentionally uses the chat pane, not the whole desktop or
78+
whole Telegram window
7679

7780
Send as the real Telegram user:
7881

7982
```bash
80-
pnpm qa:telegram-user:crabbox -- send \
83+
proof_cmd="${OPENCLAW_TELEGRAM_USER_PROOF_CMD:-openclaw-telegram-user-crabbox-proof}"
84+
"$proof_cmd" send \
8185
--session .artifacts/qa-e2e/telegram-user-crabbox/pr-review/session.json \
8286
--text /status
8387
```
@@ -87,7 +91,8 @@ For slash commands, omit the bot username; the runner targets the SUT bot.
8791
Run arbitrary commands on the Crabbox:
8892

8993
```bash
90-
pnpm qa:telegram-user:crabbox -- run \
94+
proof_cmd="${OPENCLAW_TELEGRAM_USER_PROOF_CMD:-openclaw-telegram-user-crabbox-proof}"
95+
"$proof_cmd" run \
9196
--session .artifacts/qa-e2e/telegram-user-crabbox/pr-review/session.json \
9297
-- bash -lc 'source /tmp/openclaw-telegram-user-crabbox/env.sh && python3 /tmp/openclaw-telegram-user-crabbox/user-driver.py transcript --limit 20 --json'
9398
```
@@ -106,14 +111,16 @@ python3 /tmp/openclaw-telegram-user-crabbox/user-driver.py probe --text '@{sut}
106111
Capture the current desktop without ending the session:
107112

108113
```bash
109-
pnpm qa:telegram-user:crabbox -- screenshot \
114+
proof_cmd="${OPENCLAW_TELEGRAM_USER_PROOF_CMD:-openclaw-telegram-user-crabbox-proof}"
115+
"$proof_cmd" screenshot \
110116
--session .artifacts/qa-e2e/telegram-user-crabbox/pr-review/session.json
111117
```
112118

113119
Check lease state and get the WebVNC command:
114120

115121
```bash
116-
pnpm qa:telegram-user:crabbox -- status \
122+
proof_cmd="${OPENCLAW_TELEGRAM_USER_PROOF_CMD:-openclaw-telegram-user-crabbox-proof}"
123+
"$proof_cmd" status \
117124
--session .artifacts/qa-e2e/telegram-user-crabbox/pr-review/session.json
118125
```
119126

@@ -122,7 +129,8 @@ pnpm qa:telegram-user:crabbox -- status \
122129
Always finish or explicitly keep the box:
123130

124131
```bash
125-
pnpm qa:telegram-user:crabbox -- finish \
132+
proof_cmd="${OPENCLAW_TELEGRAM_USER_PROOF_CMD:-openclaw-telegram-user-crabbox-proof}"
133+
"$proof_cmd" finish \
126134
--session .artifacts/qa-e2e/telegram-user-crabbox/pr-review/session.json \
127135
--preview-crop telegram-window
128136
```
@@ -150,7 +158,8 @@ Attach only the useful visual artifact to the PR unless logs are needed. The
150158
runner is GIF-only by default:
151159

152160
```bash
153-
pnpm qa:telegram-user:crabbox -- publish \
161+
proof_cmd="${OPENCLAW_TELEGRAM_USER_PROOF_CMD:-openclaw-telegram-user-crabbox-proof}"
162+
"$proof_cmd" publish \
154163
--session .artifacts/qa-e2e/telegram-user-crabbox/pr-review/session.json \
155164
--pr <pr-number> \
156165
--summary 'Telegram real-user Crabbox session motion GIF'
@@ -189,7 +198,8 @@ experiments unless those artifacts are explicitly needed.
189198
For a fast one-shot check, use:
190199

191200
```bash
192-
pnpm qa:telegram-user:crabbox -- --text /status
201+
proof_cmd="${OPENCLAW_TELEGRAM_USER_PROOF_CMD:-openclaw-telegram-user-crabbox-proof}"
202+
"$proof_cmd" --text /status
193203
```
194204

195205
This is a start/send/finish shortcut. Prefer the held session for PR review,

0 commit comments

Comments
 (0)