Skip to content

Commit 2580fe2

Browse files
authored
Merge branch 'main' into fix-mcp-ref-union-schema
2 parents f4beb91 + 8af2af2 commit 2580fe2

1,072 files changed

Lines changed: 50090 additions & 8631 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/codex-review/SKILL.md‎

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ Use when:
2121
- Prefer small fixes at the right ownership boundary; no refactor unless it clearly improves the bug class.
2222
- Keep going until Codex review returns no accepted/actionable findings.
2323
- If a review-triggered fix changes code, rerun focused tests and rerun Codex review.
24+
- Never switch or override the review model. If the review hits model capacity, retry the same command a few times with the same model. The helper runs nested review in yolo/full-access mode by default; use `--no-yolo` only when intentionally testing sandbox behavior.
25+
- Stop as soon as the review command/helper exits 0 with no accepted/actionable findings. Do not run an extra direct `codex review` just to get a nicer "clean" line, a second opinion, or clearer closeout wording.
26+
- Treat the helper's successful exit plus absence of actionable findings as the clean review result, even if the underlying Codex CLI output is terse.
2427
- If rejecting a finding as intentional/not worth fixing, add a brief inline code comment only when it explains a real invariant or ownership decision that future reviewers should know.
2528
- Do not push just to review. Push only when the user requested push/ship/PR update.
2629

@@ -32,6 +35,12 @@ Dirty local work:
3235
codex review --uncommitted
3336
```
3437

38+
Use this only when the patch is actually unstaged/staged/untracked in the
39+
current checkout. For committed, pushed, or PR work, point Codex at the commit
40+
or branch diff instead; do not force `--mode local` / `--uncommitted` just
41+
because the helper docs mention dirty work first. A clean `--uncommitted` review
42+
only proves there is no local patch.
43+
3544
Branch/PR work:
3645

3746
```bash
@@ -54,6 +63,17 @@ Committed single change:
5463
codex review --commit HEAD
5564
```
5665

66+
or with the helper:
67+
68+
```bash
69+
/Users/steipete/Projects/agent-scripts/skills/codex-review/scripts/codex-review --mode commit --commit HEAD
70+
```
71+
72+
Use commit review for already-landed or already-pushed work on `main`. Reviewing
73+
clean `main` against `origin/main` is usually an empty diff after push. For a
74+
small stack, review each commit explicitly or review the branch before merging
75+
with `--base`.
76+
5777
## Parallel Closeout
5878

5979
Format first if formatting can change line locations. Then it is OK to run tests and review in parallel:
@@ -62,7 +82,7 @@ Format first if formatting can change line locations. Then it is OK to run tests
6282
scripts/codex-review --parallel-tests "<focused test command>"
6383
```
6484

65-
Tradeoff: tests may force code changes that stale the review. If tests or review lead to code edits, rerun the affected tests and rerun review until no accepted/actionable findings remain.
85+
Tradeoff: tests may force code changes that stale the review. If tests or review lead to code edits, rerun the affected tests and rerun review until no accepted/actionable findings remain. Once that rerun exits cleanly, stop; do not spend another long review cycle on redundant confirmation.
6686

6787
## Context Efficiency
6888

@@ -91,13 +111,20 @@ The helper:
91111
- chooses dirty `--uncommitted` first
92112
- otherwise uses current PR base if `gh pr view` works
93113
- otherwise uses `origin/main` for non-main branches
114+
- use `--mode commit --commit <ref>` for already-committed work, especially clean `main` after landing
115+
- should be left in `--mode auto` or forced to `--mode branch` for PR/branch work; do not force `--mode local` after committing
94116
- writes only to stdout unless `--output` or `CODEX_REVIEW_OUTPUT` is set
95-
- supports `--dry-run` and `--parallel-tests`
117+
- supports `--dry-run`, `--parallel-tests`, and commit refs
118+
- runs nested review with `--dangerously-bypass-approvals-and-sandbox` by default
119+
- keeps accepting `--full-access`; use `--no-yolo` or `CODEX_REVIEW_YOLO=0` to opt out
120+
- prints `codex-review clean: no accepted/actionable findings reported` when the selected review command exits 0
96121

97122
## Final Report
98123

99124
Include:
100125
- review command used
101126
- tests/proof run
102127
- findings accepted/rejected, briefly why
103-
- final clean review command, or why a remaining finding was consciously rejected
128+
- the clean review result from the final helper/review run, or why a remaining finding was consciously rejected
129+
130+
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.

‎.agents/skills/codex-review/scripts/codex-review‎

Lines changed: 106 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ usage() {
66
Usage: codex-review [options]
77
88
Options:
9-
--mode auto|local|branch Target selection. Default: auto.
9+
--mode auto|local|branch|commit
10+
Target selection. Default: auto.
1011
--base REF Base ref for branch review. Default: PR base or origin/main.
12+
--commit REF Commit ref for commit review. Default: HEAD.
1113
--codex-bin PATH Codex binary. Default: codex.
14+
--full-access Keep yolo/full-access mode enabled. Default.
15+
--no-yolo Run nested Codex review with normal sandbox/approval prompts.
1216
--output FILE Also save output to file.
1317
--parallel-tests CMD Run review and test command concurrently.
1418
--dry-run Print selected commands, do not run.
@@ -17,13 +21,17 @@ Options:
1721
Modes:
1822
local codex review --uncommitted
1923
branch codex review --base <base>
24+
commit codex review --commit <commit>
2025
auto dirty tree -> local, else PR/current branch -> branch
2126
EOF
2227
}
2328

2429
mode=auto
2530
base_ref=
31+
commit_ref=HEAD
2632
codex_bin=${CODEX_BIN:-codex}
33+
codex_args=()
34+
yolo=${CODEX_REVIEW_YOLO:-1}
2735
output=${CODEX_REVIEW_OUTPUT:-}
2836
parallel_tests=
2937
dry_run=false
@@ -38,10 +46,22 @@ while [[ $# -gt 0 ]]; do
3846
base_ref=${2:-}
3947
shift 2
4048
;;
49+
--commit)
50+
commit_ref=${2:-}
51+
shift 2
52+
;;
4153
--codex-bin)
4254
codex_bin=${2:-}
4355
shift 2
4456
;;
57+
--full-access)
58+
yolo=1
59+
shift
60+
;;
61+
--no-yolo)
62+
yolo=0
63+
shift
64+
;;
4565
--output)
4666
output=${2:-}
4767
shift 2
@@ -65,8 +85,13 @@ while [[ $# -gt 0 ]]; do
6585
esac
6686
done
6787

88+
case "$yolo" in
89+
0|false|False|FALSE|no|No|NO|off|Off|OFF) ;;
90+
*) codex_args+=(--dangerously-bypass-approvals-and-sandbox) ;;
91+
esac
92+
6893
case "$mode" in
69-
auto|local|branch) ;;
94+
auto|local|branch|commit) ;;
7095
*)
7196
echo "invalid --mode: $mode" >&2
7297
exit 2
@@ -99,6 +124,8 @@ fi
99124
review_kind=
100125
if [[ "$mode" == local || ( "$mode" == auto && "$dirty" == true ) ]]; then
101126
review_kind=local
127+
elif [[ "$mode" == commit ]]; then
128+
review_kind=commit
102129
elif [[ "$mode" == branch || ( "$mode" == auto && -n "$current_branch" && "$current_branch" != "main" ) ]]; then
103130
review_kind=branch
104131
else
@@ -107,9 +134,11 @@ else
107134
fi
108135

109136
if [[ "$review_kind" == local ]]; then
110-
review_cmd=("$codex_bin" review --uncommitted)
137+
review_cmd=("$codex_bin" "${codex_args[@]}" review --uncommitted)
138+
elif [[ "$review_kind" == commit ]]; then
139+
review_cmd=("$codex_bin" "${codex_args[@]}" review --commit "$commit_ref")
111140
else
112-
review_cmd=("$codex_bin" review --base "$base_ref")
141+
review_cmd=("$codex_bin" "${codex_args[@]}" review --base "$base_ref")
113142
fi
114143

115144
printf 'codex-review target: %s\n' "$review_kind"
@@ -140,28 +169,92 @@ if [[ "$review_kind" == branch ]]; then
140169
}
141170
fi
142171

172+
review_output=$output
173+
review_output_is_temp=false
174+
if [[ -z "$review_output" ]]; then
175+
review_output=$(mktemp)
176+
review_output_is_temp=true
177+
fi
178+
179+
cleanup() {
180+
if [[ "${review_output_is_temp:-false}" == true && -n "${review_output:-}" ]]; then
181+
rm -f "$review_output"
182+
fi
183+
}
184+
trap cleanup EXIT
185+
143186
run_review() {
144-
if [[ -n "$output" ]]; then
145-
mkdir -p "$(dirname "$output")"
146-
"${review_cmd[@]}" 2>&1 | tee "$output"
187+
mkdir -p "$(dirname "$review_output")"
188+
"${review_cmd[@]}" 2>&1 | tee "$review_output"
189+
}
190+
191+
elapsed_since() {
192+
local started_at=$1
193+
local finished_at
194+
finished_at=$(date +%s)
195+
printf '%s\n' "$((finished_at - started_at))"
196+
}
197+
198+
format_elapsed() {
199+
local seconds=$1
200+
if (( seconds < 60 )); then
201+
printf '%ss\n' "$seconds"
147202
else
148-
"${review_cmd[@]}"
203+
printf '%sm%ss\n' "$((seconds / 60))" "$((seconds % 60))"
204+
fi
205+
}
206+
207+
review_output_empty() {
208+
[[ ! -s "$review_output" ]] || ! grep -q '[^[:space:]]' "$review_output"
209+
}
210+
211+
review_output_has_findings() {
212+
grep -Eq '\[P[0-3]\]' "$review_output"
213+
}
214+
215+
report_clean_review_or_fail() {
216+
local elapsed_text
217+
elapsed_text=$(format_elapsed "${review_elapsed_seconds:-0}")
218+
219+
if review_output_has_findings; then
220+
printf 'codex-review complete after %s\n' "$elapsed_text"
221+
printf 'codex-review findings: accepted/actionable findings reported\n'
222+
return 1
223+
fi
224+
if review_output_empty; then
225+
printf 'codex-review complete after %s; no output\n' "$elapsed_text"
226+
return 1
149227
fi
228+
printf 'codex-review complete after %s\n' "$elapsed_text"
229+
printf 'codex-review clean: no accepted/actionable findings reported\n'
150230
}
151231

152232
if [[ -z "$parallel_tests" ]]; then
233+
review_started_at=$(date +%s)
234+
set +e
153235
run_review
154-
exit $?
236+
review_status=$?
237+
review_elapsed_seconds=$(elapsed_since "$review_started_at")
238+
set -e
239+
if [[ "$review_status" == 0 ]]; then
240+
report_clean_review_or_fail
241+
exit $?
242+
fi
243+
exit "$review_status"
155244
fi
156245

157246
review_status_file=$(mktemp)
247+
review_elapsed_file=$(mktemp)
158248
tests_status_file=$(mktemp)
159249

160250
(
161251
set +e
252+
review_started_at=$(date +%s)
162253
run_review
163254
status=$?
255+
elapsed=$(elapsed_since "$review_started_at")
164256
printf '%s\n' "$status" > "$review_status_file"
257+
printf '%s\n' "$elapsed" > "$review_elapsed_file"
165258
) &
166259
review_pid=$!
167260

@@ -177,12 +270,15 @@ wait "$review_pid" || true
177270
wait "$tests_pid" || true
178271

179272
review_status=$(cat "$review_status_file")
273+
review_elapsed_seconds=$(cat "$review_elapsed_file")
180274
tests_status=$(cat "$tests_status_file")
181-
rm -f "$review_status_file" "$tests_status_file"
275+
rm -f "$review_status_file" "$review_elapsed_file" "$tests_status_file"
182276

183277
printf 'codex-review exit: %s\n' "$review_status"
184278
printf 'tests exit: %s\n' "$tests_status"
185279

186280
if [[ "$review_status" != 0 || "$tests_status" != 0 ]]; then
187281
exit 1
188282
fi
283+
284+
report_clean_review_or_fail

‎.agents/skills/crabbox/SKILL.md‎

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,22 @@ Use these only when the task needs an existing non-Linux host. OpenClaw broad
7878
Linux validation uses the repo Crabbox config unless a provider is explicitly
7979
requested.
8080

81+
When the user explicitly asks for brokered macOS runners, use Crabbox AWS
82+
macOS only after confirming the deployed coordinator supports EC2 Mac host
83+
lifecycle/image routes and the operator has AWS EC2 Mac Dedicated Host quota
84+
and IAM. Prefer `CRABBOX_HOST_ID` for a known Crabbox-managed Dedicated Host,
85+
or run the no-spend preflight first:
86+
87+
```sh
88+
crabbox admin hosts quota --provider aws --target macos --region eu-west-1 --type mac2.metal --json
89+
crabbox admin hosts allocate --provider aws --target macos --region eu-west-1 --type mac2.metal --dry-run --json
90+
CRABBOX_MACOS_TYPES=all scripts/macos-host-region-preflight.sh
91+
```
92+
93+
Do not silently substitute AWS macOS for normal OpenClaw Linux proof. Report
94+
paid-host blockers as quota, IAM, coordinator deployment, or host availability
95+
instead of falling back to local macOS.
96+
8197
Crabbox supports static SSH targets:
8298

8399
```sh
@@ -271,6 +287,13 @@ Use the smallest Crabbox lane that proves the reported user path, not just the
271287
touched code. Aim for one after-fix E2E proof before commenting, closing, or
272288
opening a PR for a user-visible bug.
273289

290+
When the user says "test in Crabbox", do not simply copy tests to the remote
291+
box and run them there. Crabbox is for remote real-scenario proof: copy or
292+
install OpenClaw as the user would, run the same setup/update/CLI/Gateway/API
293+
call that failed, and capture behavior from that entrypoint. For regressions or
294+
bug reports, prove the broken state first when feasible, then run the same
295+
scenario after the fix.
296+
274297
Pick the lane by symptom:
275298

276299
- Docker/setup/install bug: build a package tarball and run the matching
@@ -292,8 +315,9 @@ Pick the lane by symptom:
292315

293316
Efficient flow:
294317

295-
1. Reproduce or prove the pre-fix symptom when feasible. If the issue cannot be
296-
reproduced, capture the exact command and observed behavior instead.
318+
1. Reproduce or prove the pre-fix symptom from the real user-facing entrypoint
319+
when feasible. If the issue cannot be reproduced, capture the exact command
320+
and observed behavior instead.
297321
2. Patch locally and run narrow local tests for edit speed.
298322
3. Run one Crabbox E2E command that starts from the user-facing entrypoint:
299323
package install, Docker setup, onboarding, channel add, gateway start, or

‎.github/labeler.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@
101101
- changed-files:
102102
- any-glob-to-any-file:
103103
- "extensions/qa-lab/**"
104+
- "qa/scenarios/**"
104105
- "docs/concepts/qa-e2e-automation.md"
106+
- "docs/concepts/personal-agent-benchmark-pack.md"
105107
- "docs/channels/qa-channel.md"
106108
"channel: signal":
107109
- changed-files:

‎.github/workflows/mantis-discord-smoke.yml‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@ jobs:
3333
authorize_actor:
3434
name: Authorize workflow actor
3535
runs-on: blacksmith-8vcpu-ubuntu-2404
36+
outputs:
37+
authorized: ${{ steps.permission.outputs.authorized }}
3638
steps:
3739
- name: Require maintainer-level repository access
40+
id: permission
3841
uses: actions/github-script@v8
3942
with:
4043
script: |
@@ -48,14 +51,18 @@ jobs:
4851
const permission = data.permission;
4952
core.info(`Actor ${context.actor} permission: ${permission}`);
5053
if (!allowed.has(permission)) {
51-
core.setFailed(
54+
core.notice(
5255
`Workflow requires write/maintain/admin access. Actor "${context.actor}" has "${permission}".`,
5356
);
57+
core.setOutput("authorized", "false");
58+
return;
5459
}
60+
core.setOutput("authorized", "true");
5561
5662
validate_selected_ref:
5763
name: Validate selected ref
5864
needs: authorize_actor
65+
if: needs.authorize_actor.outputs.authorized == 'true'
5966
runs-on: blacksmith-8vcpu-ubuntu-2404
6067
outputs:
6168
selected_revision: ${{ steps.validate.outputs.selected_revision }}

0 commit comments

Comments
 (0)