Skip to content

Commit 4c96f0a

Browse files
committed
Merge tag 'rust-v0.139.0'
Release 0.139.0 # Conflicts: # codex-rs/Cargo.toml
2 parents 4eac02d + a7dff90 commit 4c96f0a

244 files changed

Lines changed: 7238 additions & 2604 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.

‎.codex/skills/babysit-pr/SKILL.md‎

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Accept any of the following:
2929
4. If `diagnose_ci_failure` is present, inspect failed run logs and classify the failure.
3030
5. If the failure is likely caused by the current branch, patch code locally, commit, and push. Do not patch random flaky tests, CI infrastructure, dependency outages, runner issues, or other failures that are unrelated to the branch.
3131
6. If `process_review_comment` is present, inspect surfaced review items and decide whether to address them.
32-
7. If a review item is actionable and correct, patch code locally, commit, push, and then mark the associated review thread/comment as resolved once the fix is on GitHub.
32+
7. If a review item is actionable and correct, patch code locally, commit, push, and then resolve the associated review thread only when allowed by the GitHub state mutation policy below.
3333
8. Do not post replies to human-authored review comments/threads unless the user explicitly confirms the exact response. If a human review item is non-actionable, already addressed, or not valid, surface the item and recommended response to the user instead of replying on GitHub.
3434
9. If the failure is likely flaky/unrelated and `retry_failed_checks` is present, rerun failed jobs with `--retry-failed-now`.
3535
10. If both actionable review feedback and `retry_failed_checks` are present, prioritize review feedback first; a new commit will retrigger CI, so avoid rerunning flaky checks on the old SHA unless you intentionally defer the review change.
@@ -101,14 +101,39 @@ When you agree with a comment and it is actionable:
101101
1. Patch code locally.
102102
2. Commit with `codex: address PR review feedback (#<n>)`.
103103
3. Push to the PR head branch.
104-
4. After the push succeeds, mark the associated GitHub review thread/comment as resolved.
104+
4. After the push succeeds, resolve the associated GitHub review thread only when allowed by the GitHub state mutation policy below.
105105
5. Resume watching on the new SHA immediately (do not stop after reporting the push).
106106
6. If monitoring was running in `--watch` mode, restart `--watch` immediately after the push in the same turn; do not wait for the user to ask again.
107107

108108
Do not post replies to human-authored GitHub review comments/threads automatically. If you disagree with a human comment, believe it is non-actionable/already addressed, or need to answer a question, report the item to the user with a suggested response and wait for explicit confirmation before posting anything on GitHub. If the user approves a response, prefix it with `[codex]` so it is clear the response is automated and not from the human user.
109109
If the watcher later surfaces your own approved reply because the authenticated operator is treated as a trusted review author, treat that self-authored item as already handled and do not reply again.
110110
If a code review comment/thread is already marked as resolved in GitHub, treat it as non-actionable and safely ignore it unless new unresolved follow-up feedback appears.
111111

112+
## GitHub State Mutation Policy
113+
114+
You can read any PR state you need for monitoring. Writes must comply with this policy.
115+
116+
You can push PRs to update the code under review or to force CI re-runs as described above.
117+
118+
You can resolve review comment threads from the human who requested babysitting or from the Codex
119+
review bot. When resolving, leave a comment prefixed with `[from Codex]: ` and explain what changes
120+
you made and which commit includes them. Don't touch review threads if other humans other than the
121+
user who requested babysitting have participated.
122+
123+
Before making any changes, fetch the PR state yourself instead of relying on the PR watcher script's
124+
output.
125+
126+
Unless explicitly asked, do not:
127+
128+
* comment on other humans' review threads, communicate with the user in chat instead
129+
* resolve review threads from humans other than the user
130+
* interact with humans other than the user
131+
* mark PRs as drafts or ready for review
132+
* close or reopen PRs
133+
134+
In general, never act on GitHub in ways that would make it hard to tell whether you or the user did
135+
something visible to other humans. When in doubt, ask the user for clarification in chat.
136+
112137
## Git Safety Rules
113138

114139
- Work only on the PR head branch.
@@ -133,10 +158,10 @@ Use this loop in a live Codex session:
133158
3. First check whether the PR is now merged or otherwise closed; if so, report that terminal state and stop polling immediately.
134159
4. Check CI summary, new review items, and mergeability/conflict status.
135160
5. Diagnose CI failures and classify branch-related vs flaky/unrelated. If the overall run is still pending but `failed_jobs` already includes a failed job, fetch that job's logs and diagnose immediately instead of waiting for the whole workflow run to finish. Patch only when the failure is branch-related.
136-
6. For each surfaced review item from another author, patch/commit/push and then resolve it if it is actionable. If it is non-actionable, already addressed, or requires a written answer, surface it to the user with a suggested response instead of posting automatically. If a later snapshot surfaces your own approved reply, treat it as informational and continue without responding again.
161+
6. For each surfaced review item from another author, patch/commit/push if it is actionable, then resolve it only when allowed by the GitHub state mutation policy above. If it is non-actionable, already addressed, or requires a written answer, surface it to the user with a suggested response instead of posting automatically. If a later snapshot surfaces your own approved reply, treat it as informational and continue without responding again.
137162
7. Process actionable review comments before flaky reruns when both are present; if a review fix requires a commit, push it and skip rerunning failed checks on the old SHA.
138163
8. Retry failed checks only when `retry_failed_checks` is present and you are not about to replace the current SHA with a review/CI fix commit. Do not make code changes for unrelated flakes or infrastructure failures just to get CI green.
139-
9. If you pushed a commit, resolved a review thread, or triggered a rerun, report the action briefly and continue polling (do not stop). If a human review comment needs a written GitHub response, stop and ask for confirmation before posting.
164+
9. If you pushed a commit, resolved an eligible review thread, or triggered a rerun, report the action briefly and continue polling (do not stop). If a human review comment needs a written GitHub response, stop and ask for confirmation before posting.
140165
10. After a review-fix push, proactively restart continuous monitoring (`--watch`) in the same turn unless a strict stop condition has already been reached.
141166
11. If everything is passing, mergeable, not blocked on required review approval, and there are no unaddressed review items, report that the PR is currently ready to merge but keep the watcher running so new review comments are surfaced quickly while the PR remains open.
142167
12. If blocked on a user-help-required issue (infra outage, exhausted flaky retries, unclear reviewer request, permissions), report the blocker and stop.

‎.github/CODEOWNERS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/codex-rs/core/ @openai/codex-core-agent-team
33
/codex-rs/ext/extension-api/ @openai/codex-core-agent-team
44
/codex-rs/prompts/ @openai/codex-core-agent-team
5+
/codex-rs/utils/path-uri/ @openai/codex-core-agent-team
56

67
# Keep macOS AKV signing changes reviewed by Codex maintainers.
78
/.github/actions/setup-akv-pkcs11-codesigning/ @openai/codex-core-agent-team
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
usage() {
5+
cat <<'EOF'
6+
Usage: archive-release-symbols-and-strip-binaries.sh \
7+
--target <rust-target> \
8+
--artifact-name <artifact-name> \
9+
--release-dir <dir> \
10+
--archive-dir <dir> \
11+
--binaries "<space-delimited binary basenames>"
12+
EOF
13+
}
14+
15+
target=""
16+
artifact_name=""
17+
release_dir=""
18+
archive_dir=""
19+
binaries=""
20+
21+
while [[ $# -gt 0 ]]; do
22+
case "$1" in
23+
--target)
24+
target="${2:?--target requires a value}"
25+
shift 2
26+
;;
27+
--artifact-name)
28+
artifact_name="${2:?--artifact-name requires a value}"
29+
shift 2
30+
;;
31+
--release-dir)
32+
release_dir="${2:?--release-dir requires a value}"
33+
shift 2
34+
;;
35+
--archive-dir)
36+
archive_dir="${2:?--archive-dir requires a value}"
37+
shift 2
38+
;;
39+
--binaries)
40+
binaries="${2:?--binaries requires a value}"
41+
shift 2
42+
;;
43+
-h|--help)
44+
usage
45+
exit 0
46+
;;
47+
*)
48+
echo "Unexpected argument: $1" >&2
49+
usage >&2
50+
exit 1
51+
;;
52+
esac
53+
done
54+
55+
if [[ -z "$target" || -z "$artifact_name" || -z "$release_dir" || -z "$archive_dir" || -z "$binaries" ]]; then
56+
usage >&2
57+
exit 1
58+
fi
59+
60+
symbols_root="${RUNNER_TEMP:-/tmp}/codex-symbols-${artifact_name}"
61+
symbols_dir="${symbols_root}/codex-symbols-${artifact_name}"
62+
archive_path="${archive_dir%/}/codex-symbols-${artifact_name}.tar.gz"
63+
rm -rf "$symbols_root"
64+
mkdir -p "$symbols_dir" "$archive_dir"
65+
read -r -a binary_names <<< "$binaries"
66+
67+
case "$target" in
68+
*apple-darwin)
69+
for binary in "${binary_names[@]}"; do
70+
binary_path="${release_dir%/}/${binary}"
71+
dsym_path="${binary_path}.dSYM"
72+
if [[ ! -f "$binary_path" ]]; then
73+
echo "Binary $binary_path not found" >&2
74+
exit 1
75+
fi
76+
if [[ ! -d "$dsym_path" ]]; then
77+
echo "dSYM $dsym_path not found" >&2
78+
exit 1
79+
fi
80+
81+
cp -RL "$dsym_path" "${symbols_dir}/${binary}.dSYM"
82+
strip -S -x "$binary_path"
83+
done
84+
;;
85+
*linux*)
86+
objcopy_bin="${OBJCOPY:-objcopy}"
87+
strip_bin="${STRIP:-strip}"
88+
for binary in "${binary_names[@]}"; do
89+
binary_path="${release_dir%/}/${binary}"
90+
debug_path="${symbols_dir}/${binary}.debug"
91+
if [[ ! -f "$binary_path" ]]; then
92+
echo "Binary $binary_path not found" >&2
93+
exit 1
94+
fi
95+
96+
"$objcopy_bin" --only-keep-debug "$binary_path" "$debug_path"
97+
"$strip_bin" --strip-debug --strip-unneeded "$binary_path"
98+
"$objcopy_bin" --add-gnu-debuglink="$debug_path" "$binary_path"
99+
done
100+
;;
101+
*windows*)
102+
for binary in "${binary_names[@]}"; do
103+
pdb_path="${release_dir%/}/${binary}.pdb"
104+
if [[ ! -f "$pdb_path" ]]; then
105+
echo "PDB $pdb_path not found" >&2
106+
exit 1
107+
fi
108+
109+
cp "$pdb_path" "${symbols_dir}/${binary}.pdb"
110+
done
111+
;;
112+
*)
113+
echo "No symbols packaging support for target: $target" >&2
114+
exit 1
115+
;;
116+
esac
117+
118+
rm -f "$archive_path"
119+
tar -C "$symbols_root" -czf "$archive_path" "codex-symbols-${artifact_name}"

‎.github/workflows/bazel.yml‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ jobs:
152152
- 3
153153
- 4
154154
runs-on:
155-
group: codex-runners
156-
labels: codex-windows-x64
155+
group: ${{ github.event.repository.name }}-runners
156+
labels: ${{ github.event.repository.name }}-windows-x64
157157
name: Bazel test on windows-latest for x86_64-pc-windows-gnullvm shard ${{ matrix.shard }}/4
158158
environment:
159159
name: bazel
@@ -267,8 +267,8 @@ jobs:
267267
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
268268
timeout-minutes: 40
269269
runs-on:
270-
group: codex-runners
271-
labels: codex-windows-x64
270+
group: ${{ github.event.repository.name }}-runners
271+
labels: ${{ github.event.repository.name }}-windows-x64
272272
name: Bazel test on windows-latest for x86_64-pc-windows-gnullvm (native main)
273273
environment:
274274
name: bazel
@@ -357,8 +357,8 @@ jobs:
357357
- os: windows-latest
358358
target: x86_64-pc-windows-gnullvm
359359
runs_on:
360-
group: codex-runners
361-
labels: codex-windows-x64
360+
group: ${{ github.event.repository.name }}-runners
361+
labels: ${{ github.event.repository.name }}-windows-x64
362362
runs-on: ${{ matrix.runs_on || matrix.os }}
363363
name: Bazel clippy on ${{ matrix.os }} for ${{ matrix.target }}
364364
environment:
@@ -453,8 +453,8 @@ jobs:
453453
- os: windows-latest
454454
target: x86_64-pc-windows-gnullvm
455455
runs_on:
456-
group: codex-runners
457-
labels: codex-windows-x64
456+
group: ${{ github.event.repository.name }}-runners
457+
labels: ${{ github.event.repository.name }}-windows-x64
458458
runs-on: ${{ matrix.runs_on || matrix.os }}
459459
name: Verify release build on ${{ matrix.os }} for ${{ matrix.target }}
460460
environment:

‎.github/workflows/rust-ci-full.yml‎

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ jobs:
112112
- name: Windows
113113
runner: windows-x64
114114
runs_on:
115-
group: codex-runners
116-
labels: codex-windows-x64
115+
group: ${{ github.event.repository.name }}-runners
116+
labels: ${{ github.event.repository.name }}-windows-x64
117117
steps:
118118
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
119119
with:
@@ -185,38 +185,38 @@ jobs:
185185
target: x86_64-unknown-linux-musl
186186
profile: dev
187187
runs_on:
188-
group: codex-runners
189-
labels: codex-linux-x64
188+
group: ${{ github.event.repository.name }}-runners
189+
labels: ${{ github.event.repository.name }}-linux-x64
190190
- runner: ubuntu-24.04
191191
target: x86_64-unknown-linux-gnu
192192
profile: dev
193193
runs_on:
194-
group: codex-runners
195-
labels: codex-linux-x64
194+
group: ${{ github.event.repository.name }}-runners
195+
labels: ${{ github.event.repository.name }}-linux-x64
196196
- runner: ubuntu-24.04-arm
197197
target: aarch64-unknown-linux-musl
198198
profile: dev
199199
runs_on:
200-
group: codex-runners
201-
labels: codex-linux-arm64
200+
group: ${{ github.event.repository.name }}-runners
201+
labels: ${{ github.event.repository.name }}-linux-arm64
202202
- runner: ubuntu-24.04-arm
203203
target: aarch64-unknown-linux-gnu
204204
profile: dev
205205
runs_on:
206-
group: codex-runners
207-
labels: codex-linux-arm64
206+
group: ${{ github.event.repository.name }}-runners
207+
labels: ${{ github.event.repository.name }}-linux-arm64
208208
- runner: windows-x64
209209
target: x86_64-pc-windows-msvc
210210
profile: dev
211211
runs_on:
212-
group: codex-runners
213-
labels: codex-windows-x64
212+
group: ${{ github.event.repository.name }}-runners
213+
labels: ${{ github.event.repository.name }}-windows-x64
214214
- runner: windows-arm64
215215
target: aarch64-pc-windows-msvc
216216
profile: dev
217217
runs_on:
218-
group: codex-runners
219-
labels: codex-windows-arm64
218+
group: ${{ github.event.repository.name }}-runners
219+
labels: ${{ github.event.repository.name }}-windows-arm64
220220

221221
# Also run representative release builds on Mac and Linux because
222222
# there could be release-only build errors we want to catch.
@@ -229,26 +229,26 @@ jobs:
229229
target: x86_64-unknown-linux-musl
230230
profile: release
231231
runs_on:
232-
group: codex-runners
233-
labels: codex-linux-x64
232+
group: ${{ github.event.repository.name }}-runners
233+
labels: ${{ github.event.repository.name }}-linux-x64
234234
- runner: ubuntu-24.04-arm
235235
target: aarch64-unknown-linux-musl
236236
profile: release
237237
runs_on:
238-
group: codex-runners
239-
labels: codex-linux-arm64
238+
group: ${{ github.event.repository.name }}-runners
239+
labels: ${{ github.event.repository.name }}-linux-arm64
240240
- runner: windows-x64
241241
target: x86_64-pc-windows-msvc
242242
profile: release
243243
runs_on:
244-
group: codex-runners
245-
labels: codex-windows-x64
244+
group: ${{ github.event.repository.name }}-runners
245+
labels: ${{ github.event.repository.name }}-windows-x64
246246
- runner: windows-arm64
247247
target: aarch64-pc-windows-msvc
248248
profile: release
249249
runs_on:
250-
group: codex-runners
251-
labels: codex-windows-arm64
250+
group: ${{ github.event.repository.name }}-runners
251+
labels: ${{ github.event.repository.name }}-windows-arm64
252252

253253
steps:
254254
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -479,8 +479,8 @@ jobs:
479479
uses: ./.github/workflows/rust-ci-full-nextest-platform.yml
480480
with:
481481
runner: ubuntu-24.04
482-
runner_group: codex-runners
483-
runner_labels: codex-linux-x64
482+
runner_group: ${{ github.event.repository.name }}-runners
483+
runner_labels: ${{ github.event.repository.name }}-linux-x64
484484
target: x86_64-unknown-linux-gnu
485485
profile: ci-test
486486
artifact_id: linux-x64-remote
@@ -493,8 +493,8 @@ jobs:
493493
uses: ./.github/workflows/rust-ci-full-nextest-platform.yml
494494
with:
495495
runner: ubuntu-24.04-arm
496-
runner_group: codex-runners
497-
runner_labels: codex-linux-arm64
496+
runner_group: ${{ github.event.repository.name }}-runners
497+
runner_labels: ${{ github.event.repository.name }}-linux-arm64
498498
target: aarch64-unknown-linux-gnu
499499
profile: ci-test
500500
artifact_id: linux-arm64
@@ -506,8 +506,8 @@ jobs:
506506
uses: ./.github/workflows/rust-ci-full-nextest-platform.yml
507507
with:
508508
runner: windows-x64
509-
runner_group: codex-runners
510-
runner_labels: codex-windows-x64
509+
runner_group: ${{ github.event.repository.name }}-runners
510+
runner_labels: ${{ github.event.repository.name }}-windows-x64
511511
target: x86_64-pc-windows-msvc
512512
profile: ci-test
513513
artifact_id: windows-x64
@@ -519,11 +519,11 @@ jobs:
519519
uses: ./.github/workflows/rust-ci-full-nextest-platform.yml
520520
with:
521521
runner: windows-arm64
522-
runner_group: codex-runners
523-
runner_labels: codex-windows-arm64
522+
runner_group: ${{ github.event.repository.name }}-runners
523+
runner_labels: ${{ github.event.repository.name }}-windows-arm64
524524
archive_runner: windows-x64
525-
archive_runner_group: codex-runners
526-
archive_runner_labels: codex-windows-x64
525+
archive_runner_group: ${{ github.event.repository.name }}-runners
526+
archive_runner_labels: ${{ github.event.repository.name }}-windows-x64
527527
target: aarch64-pc-windows-msvc
528528
profile: ci-test
529529
artifact_id: windows-arm64

‎.github/workflows/rust-ci.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ jobs:
176176
runner: windows-x64
177177
timeout_minutes: 30
178178
runs_on:
179-
group: codex-runners
180-
labels: codex-windows-x64
179+
group: ${{ github.event.repository.name }}-runners
180+
labels: ${{ github.event.repository.name }}-windows-x64
181181
steps:
182182
- name: Check whether argument comment lint should run
183183
id: argument_comment_lint_gate

0 commit comments

Comments
 (0)