Skip to content

Commit da9d36a

Browse files
committed
fx
2 parents 2daea64 + 6c384eb commit da9d36a

197 files changed

Lines changed: 9647 additions & 5450 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.

.github/workflows/cla.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,27 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- uses: contributor-assistant/github-action@v2.6.1
19+
# Run on close only if the PR was merged. This will lock the PR to preserve
20+
# the CLA agreement. We don't want to lock PRs that have been closed without
21+
# merging because the contributor may want to respond with additional comments.
22+
# This action has a "lock-pullrequest-aftermerge" option that can be set to false,
23+
# but that would unconditionally skip locking even in cases where the PR was merged.
1924
if: |
20-
github.event_name == 'pull_request_target' ||
21-
github.event.comment.body == 'recheck' ||
22-
github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA'
25+
(
26+
github.event_name == 'pull_request_target' &&
27+
(
28+
github.event.action == 'opened' ||
29+
github.event.action == 'synchronize' ||
30+
(github.event.action == 'closed' && github.event.pull_request.merged == true)
31+
)
32+
) ||
33+
(
34+
github.event_name == 'issue_comment' &&
35+
(
36+
github.event.comment.body == 'recheck' ||
37+
github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA'
38+
)
39+
)
2340
env:
2441
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2542
with:
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: Close stale contributor PRs
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 6 * * *"
7+
8+
permissions:
9+
contents: read
10+
issues: write
11+
pull-requests: write
12+
13+
jobs:
14+
close-stale-contributor-prs:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Close inactive PRs from contributors
18+
uses: actions/github-script@v7
19+
with:
20+
github-token: ${{ secrets.GITHUB_TOKEN }}
21+
script: |
22+
const DAYS_INACTIVE = 14;
23+
const cutoff = new Date(Date.now() - DAYS_INACTIVE * 24 * 60 * 60 * 1000);
24+
const { owner, repo } = context.repo;
25+
const dryRun = false;
26+
const stalePrs = [];
27+
28+
core.info(`Dry run mode: ${dryRun}`);
29+
30+
const prs = await github.paginate(github.rest.pulls.list, {
31+
owner,
32+
repo,
33+
state: "open",
34+
per_page: 100,
35+
sort: "updated",
36+
direction: "asc",
37+
});
38+
39+
for (const pr of prs) {
40+
const lastUpdated = new Date(pr.updated_at);
41+
if (lastUpdated > cutoff) {
42+
core.info(`PR ${pr.number} is fresh`);
43+
continue;
44+
}
45+
46+
if (!pr.user || pr.user.type !== "User") {
47+
core.info(`PR ${pr.number} wasn't created by a user`);
48+
continue;
49+
}
50+
51+
let permission;
52+
try {
53+
const permissionResponse = await github.rest.repos.getCollaboratorPermissionLevel({
54+
owner,
55+
repo,
56+
username: pr.user.login,
57+
});
58+
permission = permissionResponse.data.permission;
59+
} catch (error) {
60+
if (error.status === 404) {
61+
core.info(`Author ${pr.user.login} is not a collaborator; skipping #${pr.number}`);
62+
continue;
63+
}
64+
throw error;
65+
}
66+
67+
const hasContributorAccess = ["admin", "maintain", "write"].includes(permission);
68+
if (!hasContributorAccess) {
69+
core.info(`Author ${pr.user.login} has ${permission} access; skipping #${pr.number}`);
70+
continue;
71+
}
72+
73+
stalePrs.push(pr);
74+
}
75+
76+
if (!stalePrs.length) {
77+
core.info("No stale contributor pull requests found.");
78+
return;
79+
}
80+
81+
for (const pr of stalePrs) {
82+
const issue_number = pr.number;
83+
const closeComment = `Closing this pull request because it has had no updates for more than ${DAYS_INACTIVE} days. If you plan to continue working on it, feel free to reopen or open a new PR.`;
84+
85+
if (dryRun) {
86+
core.info(`[dry-run] Would close contributor PR #${issue_number} from ${pr.user.login}`);
87+
continue;
88+
}
89+
90+
await github.rest.issues.createComment({
91+
owner,
92+
repo,
93+
issue_number,
94+
body: closeComment,
95+
});
96+
97+
await github.rest.pulls.update({
98+
owner,
99+
repo,
100+
pull_number: issue_number,
101+
state: "closed",
102+
});
103+
104+
core.info(`Closed contributor PR #${issue_number} from ${pr.user.login}`);
105+
}

.github/workflows/codespell.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ jobs:
2222
- name: Annotate locations with typos
2323
uses: codespell-project/codespell-problem-matcher@b80729f885d32f78a716c2f107b4db1025001c42 # v1
2424
- name: Codespell
25-
uses: codespell-project/actions-codespell@406322ec52dd7b488e48c1c4b82e2a8b3a1bf630 # v2.1
25+
uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 # v2.2
2626
with:
2727
ignore_words_file: .codespellignore

.github/workflows/issue-labeler.yml

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,36 @@ jobs:
2626
prompt: |
2727
You are an assistant that reviews GitHub issues for the repository.
2828
29-
Your job is to choose the most appropriate existing labels for the issue described later in this prompt.
29+
Your job is to choose the most appropriate labels for the issue described later in this prompt.
3030
Follow these rules:
31-
- Only pick labels out of the list below.
32-
- Prefer a small set of precise labels over many broad ones.
3331
34-
Labels to apply:
32+
- Add one (and only one) of the following three labels to distinguish the type of issue. Default to "bug" if unsure.
3533
1. bug — Reproducible defects in Codex products (CLI, VS Code extension, web, auth).
3634
2. enhancement — Feature requests or usability improvements that ask for new capabilities, better ergonomics, or quality-of-life tweaks.
37-
3. extension — VS Code (or other IDE) extension-specific issues.
38-
4. windows-os — Bugs or friction specific to Windows environments (always when PowerShell is mentioned, path handling, copy/paste, OS-specific auth or tooling failures).
39-
5. mcp — Topics involving Model Context Protocol servers/clients.
40-
6. codex-web — Issues targeting the Codex web UI/Cloud experience.
41-
8. azure — Problems or requests tied to Azure OpenAI deployments.
42-
9. documentation — Updates or corrections needed in docs/README/config references (broken links, missing examples, outdated keys, clarification requests).
43-
10. model-behavior — Undesirable LLM behavior: forgetting goals, refusing work, hallucinating environment details, quota misreports, or other reasoning/performance anomalies.
35+
3. documentation — Updates or corrections needed in docs/README/config references (broken links, missing examples, outdated keys, clarification requests).
36+
37+
- If applicable, add one of the following labels to specify which sub-product or product surface the issue relates to.
38+
1. CLI — the Codex command line interface.
39+
2. extension — VS Code (or other IDE) extension-specific issues.
40+
3. codex-web — Issues targeting the Codex web UI/Cloud experience.
41+
4. github-action — Issues with the Codex GitHub action.
42+
5. iOS — Issues with the Codex iOS app.
43+
44+
- Additionally add zero or more of the following labels that are relevant to the issue content. Prefer a small set of precise labels over many broad ones.
45+
1. windows-os — Bugs or friction specific to Windows environments (always when PowerShell is mentioned, path handling, copy/paste, OS-specific auth or tooling failures).
46+
2. mcp — Topics involving Model Context Protocol servers/clients.
47+
3. mcp-server — Problems related to the codex mcp-server command, where codex runs as an MCP server.
48+
4. azure — Problems or requests tied to Azure OpenAI deployments.
49+
5. model-behavior — Undesirable LLM behavior: forgetting goals, refusing work, hallucinating environment details, quota misreports, or other reasoning/performance anomalies.
50+
6. code-review — Issues related to the code review feature or functionality.
51+
7. auth - Problems related to authentication, login, or access tokens.
52+
8. codex-exec - Problems related to the "codex exec" command or functionality.
53+
9. context-management - Problems related to compaction, context windows, or available context reporting.
54+
10. custom-model - Problems that involve using custom model providers, local models, or OSS models.
55+
11. rate-limits - Problems related to token limits, rate limits, or token usage reporting.
56+
12. sandbox - Issues related to local sandbox environments or tool call approvals to override sandbox restrictions.
57+
13. tool-calls - Problems related to specific tool call invocations including unexpected errors, failures, or hangs.
58+
14. TUI - Problems with the terminal user interface (TUI) including keyboard shortcuts, copy & pasting, menus, or screen update issues.
4459
4560
Issue number: ${{ github.event.issue.number }}
4661

.github/workflows/rust-ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
steps:
7777
- uses: actions/checkout@v5
7878
- uses: dtolnay/rust-toolchain@1.90
79-
- uses: taiki-e/install-action@0c5db7f7f897c03b771660e91d065338615679f4 # v2
79+
- uses: taiki-e/install-action@44c6d64aa62cd779e873306675c7a58e86d6d532 # v2
8080
with:
8181
tool: cargo-shear
8282
version: 1.5.1
@@ -170,7 +170,7 @@ jobs:
170170
171171
# Install and restore sccache cache
172172
- name: Install sccache
173-
uses: taiki-e/install-action@0c5db7f7f897c03b771660e91d065338615679f4 # v2
173+
uses: taiki-e/install-action@44c6d64aa62cd779e873306675c7a58e86d6d532 # v2
174174
with:
175175
tool: sccache
176176
version: 0.7.5
@@ -228,7 +228,7 @@ jobs:
228228
229229
- name: Install cargo-chef
230230
if: ${{ matrix.profile == 'release' }}
231-
uses: taiki-e/install-action@0c5db7f7f897c03b771660e91d065338615679f4 # v2
231+
uses: taiki-e/install-action@44c6d64aa62cd779e873306675c7a58e86d6d532 # v2
232232
with:
233233
tool: cargo-chef
234234
version: 0.1.71
@@ -370,7 +370,7 @@ jobs:
370370
cargo-home-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-
371371
372372
- name: Install sccache
373-
uses: taiki-e/install-action@0c5db7f7f897c03b771660e91d065338615679f4 # v2
373+
uses: taiki-e/install-action@44c6d64aa62cd779e873306675c7a58e86d6d532 # v2
374374
with:
375375
tool: sccache
376376
version: 0.7.5
@@ -399,17 +399,17 @@ jobs:
399399
sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-
400400
sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-
401401
402-
- uses: taiki-e/install-action@0c5db7f7f897c03b771660e91d065338615679f4 # v2
402+
- uses: taiki-e/install-action@44c6d64aa62cd779e873306675c7a58e86d6d532 # v2
403403
with:
404404
tool: nextest
405405
version: 0.9.103
406406

407407
- name: tests
408408
id: test
409-
continue-on-error: true
410409
run: cargo nextest run --all-features --no-fail-fast --target ${{ matrix.target }} --cargo-profile ci-test
411410
env:
412411
RUST_BACKTRACE: 1
412+
NEXTEST_STATUS_LEVEL: leak
413413

414414
- name: Save cargo home cache
415415
if: always() && !cancelled() && steps.cache_cargo_home_restore.outputs.cache-hit != 'true'

.github/workflows/rust-release.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,15 @@ jobs:
295295
# ${{ matrix.target }}
296296
dest="dist/${{ matrix.target }}"
297297
298+
# We want to ship the raw Windows executables in the GitHub Release
299+
# in addition to the compressed archives. Keep the originals for
300+
# Windows targets; remove them elsewhere to limit the number of
301+
# artifacts that end up in the GitHub Release.
302+
keep_originals=false
303+
if [[ "${{ matrix.runner }}" == windows* ]]; then
304+
keep_originals=true
305+
fi
306+
298307
# For compatibility with environments that lack the `zstd` tool we
299308
# additionally create a `.tar.gz` for all platforms and `.zip` for
300309
# Windows alongside every single binary that we publish. The end result is:
@@ -324,7 +333,11 @@ jobs:
324333
325334
# Also create .zst (existing behaviour) *and* remove the original
326335
# uncompressed binary to keep the directory small.
327-
zstd -T0 -19 --rm "$dest/$base"
336+
zstd_args=(-T0 -19)
337+
if [[ "${keep_originals}" == false ]]; then
338+
zstd_args+=(--rm)
339+
fi
340+
zstd "${zstd_args[@]}" "$dest/$base"
328341
done
329342
330343
- name: Remove signing keychain

AGENTS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ If you don’t have the tool:
8484
- Use `ResponseMock::single_request()` when a test should only issue one POST, or `ResponseMock::requests()` to inspect every captured `ResponsesRequest`.
8585
- `ResponsesRequest` exposes helpers (`body_json`, `input`, `function_call_output`, `custom_tool_call_output`, `call_output`, `header`, `path`, `query_param`) so assertions can target structured payloads instead of manual JSON digging.
8686
- Build SSE payloads with the provided `ev_*` constructors and the `sse(...)`.
87+
- Prefer `wait_for_event` over `wait_for_event_with_timeout`.
88+
- Prefer `mount_sse_once` over `mount_sse_once_match` or `mount_sse_sequence`
8789

8890
- Typical pattern:
8991

0 commit comments

Comments
 (0)