Skip to content

Commit 52bafb4

Browse files
committed
chore: merge main into UI session ownership repair
2 parents e60d474 + 2bfe383 commit 52bafb4

409 files changed

Lines changed: 17375 additions & 5336 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/telegram-e2e-userbot/scripts/run-mock-sut-user-e2e.mjs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,7 @@ async function runCronScenarioAction({
691691
gatewayEnv,
692692
cronDeliveryTarget,
693693
message,
694+
bestEffort,
694695
isStopped,
695696
}) {
696697
let jobId;
@@ -717,6 +718,7 @@ async function runCronScenarioAction({
717718
"telegram",
718719
"--to",
719720
cronDeliveryTarget,
721+
...(bestEffort ? ["--best-effort-deliver"] : []),
720722
"--json",
721723
"--keep-after-run",
722724
],
@@ -1324,6 +1326,7 @@ async function driveWithTelegramProxy(args, repoRoot, creds) {
13241326
gatewayEnv: controlEnv,
13251327
cronDeliveryTarget: selectedChatTarget.cronDeliveryTarget,
13261328
message: action.message,
1329+
bestEffort: action.bestEffort,
13271330
isStopped: () => controlsStopped,
13281331
}).then(
13291332
(result) => {

‎.agents/skills/telegram-e2e-userbot/scripts/scenario.mjs‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const ACTION_KEYS = {
99
restartGateway: new Set(["type", "atMs", "graceMs"]),
1010
patchConfig: new Set(["type", "atMs", "patch"]),
1111
systemEvent: new Set(["type", "atMs", "text"]),
12-
cron: new Set(["type", "atMs", "message"]),
12+
cron: new Set(["type", "atMs", "message", "bestEffort"]),
1313
command: new Set(["type", "atMs", "argv", "cwd", "timeoutMs"]),
1414
telegramApiHold: new Set(["type", "atMs", "method", "skip"]),
1515
telegramApiWaitHeld: new Set(["type", "atMs", "method", "timeoutMs"]),
@@ -77,10 +77,14 @@ export function parseScenario(value) {
7777
return { type: action.type, atMs, text: nonEmptyString(action.text, `${label}.text`) };
7878
}
7979
if (action.type === "cron") {
80+
if (action.bestEffort !== undefined && typeof action.bestEffort !== "boolean") {
81+
throw new Error(`${label}.bestEffort must be a boolean.`);
82+
}
8083
return {
8184
type: action.type,
8285
atMs,
8386
message: nonEmptyString(action.message, `${label}.message`),
87+
...(action.bestEffort === true ? { bestEffort: true } : {}),
8488
};
8589
}
8690
if (action.type === "command") {

‎.agents/skills/telegram-e2e-userbot/scripts/scenario.test.mjs‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ test("normalizes Telegram and gateway actions", () => {
2020
},
2121
{ type: "patchConfig", atMs: 750, patch: { channels: { telegram: { historyLimit: 9 } } } },
2222
{ type: "systemEvent", atMs: 900, text: "heartbeat proof" },
23-
{ type: "cron", atMs: 950, message: "deliver the schedule" },
23+
{ type: "cron", atMs: 950, message: "deliver the schedule", bestEffort: true },
2424
{ type: "command", atMs: 975, argv: ["node", "--version"], cwd: "repo" },
2525
{ type: "telegramApiHold", atMs: 980, method: "sendMessage", skip: 1 },
2626
{ type: "telegramApiWaitHeld", atMs: 990, method: "sendMessage" },
@@ -48,7 +48,7 @@ test("normalizes Telegram and gateway actions", () => {
4848
patch: { channels: { telegram: { historyLimit: 9 } } },
4949
},
5050
{ type: "systemEvent", atMs: 900, text: "heartbeat proof" },
51-
{ type: "cron", atMs: 950, message: "deliver the schedule" },
51+
{ type: "cron", atMs: 950, message: "deliver the schedule", bestEffort: true },
5252
{
5353
type: "command",
5454
atMs: 975,
@@ -113,6 +113,10 @@ test("rejects fields and action types outside the closed schema", () => {
113113
() => parseScenario({ actions: [{ type: "restartGateway", atMs: -1 }] }),
114114
/atMs must be a non-negative integer/u,
115115
);
116+
assert.throws(
117+
() => parseScenario({ actions: [{ type: "cron", message: "deliver", bestEffort: "yes" }] }),
118+
/bestEffort must be a boolean/u,
119+
);
116120
});
117121

118122
test("validates the recorder-ready artifact as a closed shape", () => {

‎.github/workflows/mantis-discord-status-reactions.yml‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ jobs:
126126
persist-credentials: false
127127
fetch-depth: 0
128128

129+
- name: Prepare Git owner
130+
uses: openclaw/openclaw/.github/actions/git-owner@dd4528b6393e7d00063067a080ca7241b48ce475
131+
129132
- name: Setup Node environment
130133
uses: ./.github/actions/setup-node-env
131134
with:
@@ -148,7 +151,7 @@ jobs:
148151
set -euo pipefail
149152
install_dir="${RUNNER_TEMP}/crabbox"
150153
mkdir -p "$install_dir" "$HOME/.local/bin"
151-
timeout --signal=TERM --kill-after=10s 120s git clone --depth 1 https://github.com/openclaw/crabbox.git "$install_dir/src"
154+
python3 -I -S "$CI_GIT_OWNER" --git 120 clone --depth 1 https://github.com/openclaw/crabbox.git "$install_dir/src"
152155
go build -C "$install_dir/src" -o "$HOME/.local/bin/crabbox" ./cmd/crabbox
153156
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
154157
"$HOME/.local/bin/crabbox" --version
@@ -164,8 +167,8 @@ jobs:
164167
165168
worktree_root=".artifacts/qa-e2e/mantis/discord-status-reactions-worktrees"
166169
mkdir -p "$worktree_root"
167-
git worktree add --detach "$worktree_root/baseline" "$BASELINE_SHA"
168-
git worktree add --detach "$worktree_root/candidate" "$CANDIDATE_SHA"
170+
python3 -I -S "$CI_GIT_OWNER" --checkout-git 0 worktree add --detach "$worktree_root/baseline" "$BASELINE_SHA"
171+
python3 -I -S "$CI_GIT_OWNER" --checkout-git 0 worktree add --detach "$worktree_root/candidate" "$CANDIDATE_SHA"
169172
170173
for lane in baseline candidate; do
171174
lane_dir="$worktree_root/${lane}"

‎.github/workflows/mantis-discord-thread-attachment.yml‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ jobs:
128128
persist-credentials: false
129129
fetch-depth: 0
130130

131+
- name: Prepare Git owner
132+
uses: openclaw/openclaw/.github/actions/git-owner@dd4528b6393e7d00063067a080ca7241b48ce475
133+
131134
- name: Setup Node environment
132135
uses: ./.github/actions/setup-node-env
133136
with:
@@ -150,7 +153,7 @@ jobs:
150153
set -euo pipefail
151154
install_dir="${RUNNER_TEMP}/crabbox"
152155
mkdir -p "$install_dir" "$HOME/.local/bin"
153-
timeout --signal=TERM --kill-after=10s 120s git clone --depth 1 https://github.com/openclaw/crabbox.git "$install_dir/src"
156+
python3 -I -S "$CI_GIT_OWNER" --git 120 clone --depth 1 https://github.com/openclaw/crabbox.git "$install_dir/src"
154157
go build -C "$install_dir/src" -o "$HOME/.local/bin/crabbox" ./cmd/crabbox
155158
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
156159
"$HOME/.local/bin/crabbox" --version
@@ -165,8 +168,8 @@ jobs:
165168
166169
worktree_root=".artifacts/qa-e2e/mantis/discord-thread-attachment-worktrees"
167170
mkdir -p "$worktree_root"
168-
git worktree add --detach "$worktree_root/baseline" "$CANDIDATE_SHA"
169-
git worktree add --detach "$worktree_root/candidate" "$CANDIDATE_SHA"
171+
python3 -I -S "$CI_GIT_OWNER" --checkout-git 0 worktree add --detach "$worktree_root/baseline" "$CANDIDATE_SHA"
172+
python3 -I -S "$CI_GIT_OWNER" --checkout-git 0 worktree add --detach "$worktree_root/candidate" "$CANDIDATE_SHA"
170173
171174
baseline_file="$worktree_root/baseline/extensions/discord/src/actions/handle-action.guild-admin.ts"
172175
node - "$baseline_file" <<'NODE'

‎.github/workflows/mantis-slack-desktop-smoke.yml‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ jobs:
137137
persist-credentials: false
138138
fetch-depth: 0
139139

140+
- name: Prepare Git owner
141+
uses: openclaw/openclaw/.github/actions/git-owner@dd4528b6393e7d00063067a080ca7241b48ce475
142+
140143
- name: Setup Node environment
141144
uses: ./.github/actions/setup-node-env
142145
with:
@@ -169,10 +172,13 @@ jobs:
169172
set -euo pipefail
170173
install_dir="${RUNNER_TEMP}/crabbox"
171174
mkdir -p "$install_dir" "$HOME/.local/bin"
172-
git init "$install_dir/src"
173-
git -C "$install_dir/src" remote add origin https://github.com/openclaw/crabbox.git
174-
timeout --signal=TERM --kill-after=10s 120s git -C "$install_dir/src" fetch --depth 1 origin "$CRABBOX_REF"
175-
git -C "$install_dir/src" checkout --detach FETCH_HEAD
175+
python3 -I -S "$CI_GIT_OWNER" --git 0 init "$install_dir/src"
176+
(
177+
cd "$install_dir/src"
178+
python3 -I -S "$CI_GIT_OWNER" --checkout-git 0 remote add origin https://github.com/openclaw/crabbox.git
179+
python3 -I -S "$CI_GIT_OWNER" --checkout-git 120 fetch --depth 1 origin "$CRABBOX_REF"
180+
python3 -I -S "$CI_GIT_OWNER" --checkout-git 0 checkout --detach FETCH_HEAD
181+
)
176182
go build -C "$install_dir/src" -o "$HOME/.local/bin/crabbox" ./cmd/crabbox
177183
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
178184
"$HOME/.local/bin/crabbox" --version
@@ -188,7 +194,7 @@ jobs:
188194
set -euo pipefail
189195
worktree_root=".artifacts/qa-e2e/mantis/slack-desktop-smoke-worktrees"
190196
mkdir -p "$worktree_root"
191-
git worktree add --detach "$worktree_root/candidate" "$CANDIDATE_SHA"
197+
python3 -I -S "$CI_GIT_OWNER" --checkout-git 0 worktree add --detach "$worktree_root/candidate" "$CANDIDATE_SHA"
192198
pnpm --dir "$worktree_root/candidate" install --frozen-lockfile --prefer-offline
193199
pnpm --dir "$worktree_root/candidate" build
194200

‎.github/workflows/mantis-web-ui-chat-proof.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ jobs:
123123
persist-credentials: false
124124
fetch-depth: 0
125125

126+
- name: Prepare Git owner
127+
uses: openclaw/openclaw/.github/actions/git-owner@dd4528b6393e7d00063067a080ca7241b48ce475
128+
126129
- name: Setup Node environment
127130
uses: ./.github/actions/setup-node-env
128131
with:
@@ -139,7 +142,7 @@ jobs:
139142
set -euo pipefail
140143
worktree_root=".artifacts/qa-e2e/mantis/web-ui-chat-proof-worktrees"
141144
mkdir -p "$worktree_root"
142-
git worktree add --detach "$worktree_root/candidate" "$CANDIDATE_SHA"
145+
python3 -I -S "$CI_GIT_OWNER" --checkout-git 0 worktree add --detach "$worktree_root/candidate" "$CANDIDATE_SHA"
143146
pnpm --dir "$worktree_root/candidate" install --frozen-lockfile --prefer-offline
144147
145148
- name: Run web UI chat proof

‎AGENTS.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ Review invariants; full doctrine: `docs/gateway/audit.md`.
189189
- Proof routing: source trust first, required environment second. Trusted development tests, changed gates, typecheck/lint, builds, and full suites run locally with scope proportional to the touched contract. Use Crabbox/Testbox only when the environment is part of the proof: clean-machine, install/package, Docker, E2E, live, desktop, cross-OS, CI parity, or explicit operator-requested remote work. Do not use it merely as generic compute offload. Lease/procedure mechanics: `$crabbox`.
190190
- Untrusted (contributor/fork) source: never run its scripts, tests, checks, wrappers, config, or package hooks locally, regardless of proof size, and never fall back to local. Use secretless fork CI or the sanitized direct AWS Crabbox procedure in `$crabbox`, never a credential-hydrated Testbox. Maintainer approval of credentialed execution after review makes it trusted; an explicit owner/maintainer instruction to land named, reviewed PRs is that approval — do not ask twice.
191191
- Visual proof: use a real isolated browser/desktop on the current host when capable; otherwise use Crabbox. Set up like a user, then screenshot-verify. No harness/bypass/shortcut unless explicitly asked.
192+
- Isolated browsers are pre-approved for development, testing, and sanitized screenshots/recordings; never ask again. Use the signed-in profile only when the flow needs its existing login.
192193
- Captured screenshots/videos are proof only after the agent has looked at them: open every capture, confirm the asserted state is actually visible in frame, and re-shoot when it is not. An uninspected capture is not verification and must not be attached as evidence.
193194
- UI-visible change (Control UI, native app, or user-visible chat/session behavior): before/after screenshots or a short video are mandatory PR evidence, captured from a real running surface and sanitized. Exception: channel-visible chat behavior may satisfy the real-behavior-proof gate via the mock-gateway harness verdict (ClawSweeper section) when it covers the changed path; live proof is stronger. UI proof infeasible: state the exact blocker in the PR.
194195
- Gateway-behavior change provable in the Control UI (session lifecycle, steering/queue, subagent flows, delivery states): prove on a live dev gateway — isolated `OPENCLAW_STATE_DIR`, own port, never the operator's gateway — and attach a video of the flow. Default recorder: Playwright `recordVideo` against the dashboard URL; keep the driving script's waits on asserted UI states, not sleeps.

0 commit comments

Comments
 (0)