Skip to content

Commit 6c72095

Browse files
committed
Merge origin/main into feat/macos-prewarmed-runtime-pr
2 parents e942563 + 672ac11 commit 6c72095

1,667 files changed

Lines changed: 69351 additions & 15159 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-pr-maintainer/SKILL.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,9 @@ gh search issues --repo openclaw/openclaw --match title,body --limit 50 \
365365
- Stacked branches over a squash-merged parent: rebase with `git rebase --onto origin/main <landed-branch>`; a plain `git rebase origin/main` replays the parent's already-squashed commits and manufactures conflicts.
366366
- Non-main PRs: do not run `scripts/pr prepare-run` or `merge-run`; they diff against `main`. Use review artifacts, exact base-head CI, revalidate `headRefOid`, then `gh pr merge --match-head-commit <verified-sha>`.
367367
- PR-create merge-ref race recognition: the dropped/killed pull_request CI run appears as `startup_failure`/`BuildFailed` (`(Unknown event)`) and is not rerunnable — close/reopen or wait for the hourly `pr-ci-sweeper`; rerun attempts are wasted.
368-
- PR/issue media upload: 422 = unsupported type; 404 = bad repo id/no push. Video: `content_type` `video/mp4` or `video/webm`; embed the returned URL on its own bare line — GitHub renders a player, `![]()` does not; transcode Playwright webm via `ffmpeg -i in.webm -c:v libx264 -pix_fmt yuv420p out.mp4` for broad playback. Non-media artifacts or endpoint failure: Crabbox artifact publishing plus the manifest URL.
368+
- Preferred PR/issue media upload: when the command help exposes `--attach`, use the repeatable flag on `gh issue create`, `gh issue edit`, `gh issue comment`, and the matching `gh pr` commands. Example: `gh pr comment <pr> --repo openclaw/openclaw --body-file <comment.md> --attach <proof.mp4>`.
369+
- `gh --attach` video rules: accepted extensions are `.mp4`, `.mov`, and `.webm`; the local maximum is 100 MB, while GitHub's account limit may be lower. Do not add `#alt` to a video path. `gh` inserts a bare URL so GitHub renders a player, and the uploaded asset cannot be deleted.
370+
- Compatibility fallback: if the installed `gh` lacks `--attach`, use the raw user-attachments upload command in root `AGENTS.md`. For that endpoint, 422 = unsupported type and 404 = bad repo id/no push. Use `content_type` `video/mp4`, `video/quicktime`, or `video/webm`, and put the returned URL on its own bare line; `![]()` does not render the player. Transcode Playwright webm via `ffmpeg -i in.webm -c:v libx264 -pix_fmt yuv420p out.mp4` for broad playback. Non-media artifacts or endpoint failure: Crabbox artifact publishing plus the manifest URL.
369371
- Use standard Git commands and stage only the files intended for each commit.
370372
- Keep commit messages concise and action-oriented.
371373
- Group related changes; avoid bundling unrelated refactors.

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,9 +350,10 @@ the failure to that exact active run.
350350
The child-dispatch jobs record run ID, run attempt, and URL, then finish. The
351351
parent seals those tuples, original dispatch titles, gate coverage, reuse
352352
policy, and original parent attempt in one immutable
353-
`full-release-execution-plan-<run-id>` artifact. Collector retries restore that
354-
artifact and adopt its children; they never reconstruct the plan or redispatch
355-
tests.
353+
`full-release-execution-plan-<run-id>` artifact and exact run-ID cache entry.
354+
Collector retries restore the cached bytes, validate them, and re-upload the
355+
artifact for their attempt before adopting its children; they never reconstruct
356+
the plan or redispatch tests.
356357
`Release Decision` polls those exact identities and can report
357358
`blocked_diagnostics_running` before unrelated children finish.
358359
For reused evidence, it also repeats the canonical target, policy, changed-path,

‎.agents/skills/release-openclaw-ci/SKILL.md‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,12 @@ Use this with `$release-openclaw-maintainer` and `$openclaw-testing` when a rele
5757
child that owns a blocking failure.
5858
- After dispatch, one immutable execution-plan artifact records the original
5959
parent attempt, exact child tuples and titles, selected coverage, gates, and
60-
reuse identity. Decision, Drain, manifest writing, evidence validation, and
61-
final verification consume that plan. A collector retry restores it and
62-
adopts the same children; missing plan state is an orchestration failure, not
63-
permission to redispatch.
60+
reuse identity. The same bytes are saved under an exact run-ID cache key.
61+
Decision, Drain, manifest writing, evidence validation, and final verification
62+
consume the artifact for their current attempt. A collector retry restores
63+
the cached plan, validates it, re-uploads its artifact, and adopts the same
64+
children; missing plan state is an orchestration failure, not permission to
65+
reconstruct the plan or redispatch.
6466
- Reused evidence is not trusted merely because plan sealing found it. Release
6567
Decision repeats the sealed target SHA, evidence SHA, policy, changed paths,
6668
selected run, root run, source manifest, trusted tooling identity, and
@@ -321,7 +323,8 @@ The `full-release-diagnostics-<run-id>-<attempt>` artifact is the terminal
321323
failure and timing manifest. Use it after an early blocker instead of
322324
restarting `all` merely to discover what the still-running children found.
323325
The stable `full-release-execution-plan-<run-id>` artifact is the identity
324-
source for every collector attempt.
326+
source within each collector attempt; retry attempts restore its immutable
327+
run-ID-cached bytes first.
325328

326329
## Failure Triage
327330

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Mantis proof recipes
2+
3+
Use the closest recipe, keep baseline and candidate inputs identical, and adapt
4+
only identifiers returned by the lane. Trusted request facts can prove a change
5+
even when Telegram Desktop pixels match.
6+
7+
- `send-failure-injection.md`: outbound Bot API failures and retry behavior
8+
- `busy-queue-scripted-provider.md`: ordered slow/fast multi-turn responses
9+
- `callback-data-payload-proof.md`: byte-level callback payload differences
10+
- `staged-media-provider-proof.md`: staged Telegram media proven through provider content facts
11+
12+
Return to `mantis-telegram-desktop-proof.md` for limits, cleanup, and publishing.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Busy queue with scripted provider responses
2+
3+
Use when two turns overlap and response order or queue draining is under test.
4+
5+
Write `provider-script.json`:
6+
7+
```json
8+
{
9+
"responses": [
10+
{ "text": "slow first response", "chunkDelayMs": 5000 },
11+
{ "text": "distinct second response" }
12+
]
13+
}
14+
```
15+
16+
Then run each lane without changing provider controls mid-flight:
17+
18+
```bash
19+
sha="$(sha256sum "$MANTIS_OUTPUT_DIR/provider-script.json" | cut -d ' ' -f1)"
20+
lane="$OPENCLAW_TELEGRAM_MANTIS_LANE_CMD"
21+
$lane start --lane baseline --repo-root "$MANTIS_BASELINE_ROOT" --config "$config"
22+
$lane mock --lane baseline --script "$MANTIS_OUTPUT_DIR/provider-script.json" "$sha"
23+
$lane send --lane baseline --text '@{sut} turn one'
24+
$lane send --lane baseline --text '@{sut} turn two'
25+
$lane observe --lane baseline --seconds 60 --until-text 'distinct second response' --until-provider-requests 2
26+
$lane requests --lane baseline
27+
$lane finish --lane baseline
28+
```
29+
30+
Repeat for `candidate`. Proof facts: session events and recorded Bot API
31+
messages show the slow first and distinct second outcomes without a
32+
control-file race. The tamper-evident provider request facts (`scriptEntry` 0
33+
then 1, turn order in bodies) independently prove provider arrival order.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Callback data payload proof
2+
3+
Use when a button looks identical but its callback bytes or follow-up Bot API
4+
payload changed.
5+
6+
```bash
7+
lane="$OPENCLAW_TELEGRAM_MANTIS_LANE_CMD"
8+
$lane start --lane baseline --repo-root "$MANTIS_BASELINE_ROOT" --config "$config"
9+
$lane turn --lane baseline --text '@{sut} show the callback button' --observe-seconds 30
10+
$lane press --lane baseline --message-id "$bot_message_id" --button 0
11+
$lane observe --lane baseline --seconds 60 --until-events "$expected_event_count"
12+
$lane botapi-requests --lane baseline --method answerCallbackQuery --limit 20
13+
$lane botapi-requests --lane baseline --method editMessageText --limit 20
14+
$lane finish --lane baseline --focus-message-id "$bot_message_id"
15+
```
16+
17+
Repeat for `candidate`, using each lane's returned bot message id. Proof facts:
18+
compare parsed `requestBody` values for `answerCallbackQuery` and
19+
`editMessageText`, including exact callback-related strings and whitespace.
20+
Screenshots establish identical visible context; a material recorded payload-byte
21+
difference is the comparison evidence.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Send failure injection
2+
3+
Use when the change affects Telegram send failure handling, retrying, or visible
4+
failure evidence.
5+
6+
```bash
7+
lane="$OPENCLAW_TELEGRAM_MANTIS_LANE_CMD"
8+
$lane start --lane baseline --repo-root "$MANTIS_BASELINE_ROOT" --config "$config"
9+
$lane botapi-fail sendMessage --lane baseline --times 2 --status 429
10+
$lane send --lane baseline --text '@{sut} prove send failure handling'
11+
$lane observe --lane baseline --seconds 60 --until-provider-requests 1
12+
$lane botapi-requests --lane baseline --method sendMessage --limit 20
13+
$lane finish --lane baseline
14+
```
15+
16+
Repeat with `candidate` and `MANTIS_CANDIDATE_ROOT`. Proof facts: two ordered
17+
`sendMessage` entries with `status:429` and `injected:true`, followed by any retry
18+
or recovery call; lane events/screenshots show the corresponding visible outcome.
19+
Use `botapi-clear` only when the scenario needs recovery before finishing.
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# Staged media provider proof
2+
3+
Use when a change alters how an uploaded document or image reaches the provider.
4+
5+
```bash
6+
lane="$OPENCLAW_TELEGRAM_MANTIS_LANE_CMD"
7+
media="$MANTIS_OUTPUT_DIR/sample.pdf"
8+
sent="$($lane send --lane baseline --media "$media" --text '@{sut} inspect this document')"
9+
message_id="$(jq -er '.sent.messageId' <<<"$sent")"
10+
$lane observe --lane baseline --seconds 60 --until-provider-requests 1
11+
requests="$($lane requests --lane baseline)"
12+
jq -e '[.requests[].contentFacts[]? | select(.type == "legacy_media")] | length > 0' \
13+
<<<"$requests"
14+
```
15+
16+
With no tool round trip, finish now using `message_id`. Otherwise continue below;
17+
`finish` stops the lane.
18+
19+
For a reply-mention turn, first `send --media "$media"` without text, capture its
20+
`.sent.messageId`, then `send --reply-to "$message_id" --text '@{sut} inspect this document'`.
21+
A bare unmentioned upload stages the file but produces no provider turn.
22+
23+
Repeat for `candidate` with its returned message id, selecting `type == "input_file"`.
24+
Assert the complete selected facts: `filename`, `mimeType`, and `byteLength` when present.
25+
The structured facts are comparison evidence; never scrape `body` strings.
26+
27+
For a PDF tool round trip, start each lane with this patch. `pdf` is already in
28+
the Code Mode catalog; `document-extract` lets the mock OpenAI route execute it.
29+
30+
```json
31+
{ "configPatch": { "plugins": { "allow": ["telegram", "openai", "document-extract"] } } }
32+
```
33+
34+
Replace `<legacy_media.filename>` below with the recorded value and save the
35+
array as `pdf-exec-events.json` under `MANTIS_OUTPUT_DIR`:
36+
37+
```json
38+
[
39+
{
40+
"type": "response.output_item.added",
41+
"item": {
42+
"type": "function_call",
43+
"id": "fc_mantis_pdf_exec",
44+
"call_id": "call_mantis_pdf_exec",
45+
"name": "exec",
46+
"arguments": ""
47+
}
48+
},
49+
{
50+
"type": "response.function_call_arguments.delta",
51+
"delta": "{\"language\":\"javascript\",\"code\":\"return await pdf({ pdf: \\\"<legacy_media.filename>\\\", prompt: \\\"Inspect this PDF.\\\" });\"}"
52+
},
53+
{
54+
"type": "response.output_item.done",
55+
"item": {
56+
"type": "function_call",
57+
"id": "fc_mantis_pdf_exec",
58+
"call_id": "call_mantis_pdf_exec",
59+
"name": "exec",
60+
"arguments": "{\"language\":\"javascript\",\"code\":\"return await pdf({ pdf: \\\"<legacy_media.filename>\\\", prompt: \\\"Inspect this PDF.\\\" });\"}"
61+
}
62+
},
63+
{
64+
"type": "response.completed",
65+
"response": {
66+
"id": "resp_mantis_pdf_exec",
67+
"status": "completed",
68+
"output": [
69+
{
70+
"type": "function_call",
71+
"id": "fc_mantis_pdf_exec",
72+
"call_id": "call_mantis_pdf_exec",
73+
"name": "exec",
74+
"arguments": "{\"language\":\"javascript\",\"code\":\"return await pdf({ pdf: \\\"<legacy_media.filename>\\\", prompt: \\\"Inspect this PDF.\\\" });\"}"
75+
}
76+
],
77+
"usage": {
78+
"input_tokens": 64,
79+
"output_tokens": 16,
80+
"total_tokens": 80,
81+
"input_tokens_details": { "cached_tokens": 0 }
82+
}
83+
}
84+
}
85+
]
86+
```
87+
88+
Save this beside it as `pdf-exec-script.json`, install the two-response script,
89+
then send the tool-driven turn:
90+
91+
```json
92+
{
93+
"responses": [
94+
{ "eventsFile": "pdf-exec-events.json" },
95+
{ "text": "PDF tool round trip complete." }
96+
]
97+
}
98+
```
99+
100+
```bash
101+
script="$MANTIS_OUTPUT_DIR/pdf-exec-script.json"
102+
sha256="$(sha256sum "$script" | cut -d ' ' -f 1)"
103+
$lane mock --lane baseline --script "$script" "$sha256"
104+
tool_sent="$($lane send --lane baseline --text '@{sut} inspect the staged PDF with the pdf tool')"
105+
tool_message_id="$(jq -er '.sent.messageId' <<<"$tool_sent")"
106+
$lane observe --lane baseline --seconds 120 --until-provider-requests 4
107+
requests="$($lane requests --lane baseline)"
108+
jq -e '[.requests[] | .body.input[]? | select(.type == "function_call_output"
109+
and .call_id == "call_mantis_pdf_exec")] | length > 0' <<<"$requests"
110+
$lane finish --lane baseline --focus-message-id "$tool_message_id"
111+
```
112+
113+
`finish` tears the lane down, so wait for the cumulative provider-request count
114+
(staging turn, exec turn, the pdf tool's own model call, follow-up) and assert
115+
the recorded `function_call_output` before finishing; its `output` carries the
116+
serialized exec result. The pdf tool's model call consumes the script's second
117+
response; the follow-up then repeats the exhausted script's last entry, which
118+
is fine. The pdf tool's request is where the lanes diverge: compare its
119+
`contentFacts` for `input_file` versus extracted text. Repeat the same script,
120+
turn, wait, and assertions for `candidate`.

0 commit comments

Comments
 (0)