Skip to content

Commit 3a94db8

Browse files
committed
Merge origin/main into main
2 parents 58a8ba2 + a9c111d commit 3a94db8

287 files changed

Lines changed: 13794 additions & 4101 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.

.bazelrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ common:linux --test_env=PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
2929
common:macos --test_env=PATH=/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
3030

3131
# Pass through some env vars Windows needs to use powershell?
32-
common:windows --test_env=PATH
3332
common:windows --test_env=SYSTEMROOT
3433
common:windows --test_env=COMSPEC
3534
common:windows --test_env=WINDIR

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
codex-rs/app-server-protocol/schema/** linguist-generated
2+
codex-rs/hooks/schema/generated/** linguist-generated

.github/actions/macos-code-sign/codex.entitlements.plist

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>com.apple.application-identifier</key>
6+
<string>2DC432GLL2.com.openai.codex</string>
7+
<key>com.apple.developer.team-identifier</key>
8+
<string>2DC432GLL2</string>
59
<key>com.apple.security.cs.allow-jit</key>
610
<true/>
11+
<key>keychain-access-groups</key>
12+
<array>
13+
<string>2DC432GLL2.com.openai.codex</string>
14+
</array>
715
</dict>
816
</plist>

.github/actions/setup-bazel-ci/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ runs:
122122
}
123123
}
124124
125+
- name: Compute cache-stable Windows Bazel PATH
126+
if: runner.os == 'Windows'
127+
shell: pwsh
128+
run: ./.github/scripts/compute-bazel-windows-path.ps1
129+
125130
- name: Enable Git long paths (Windows)
126131
if: runner.os == 'Windows'
127132
shell: pwsh
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<#
2+
BuildBuddy cache keys include the action and test environment, so Bazel should
3+
not inherit the full hosted-runner PATH on Windows. That PATH includes volatile
4+
tool entries, such as Maven, that can change independently of this repo and
5+
cause avoidable cache misses.
6+
7+
This script derives a smaller, cache-stable PATH that keeps the Windows
8+
toolchain entries Bazel-backed CI tasks need: MSVC and Windows SDK paths, Git,
9+
PowerShell, Node, Python, DotSlash, and the standard Windows system
10+
directories.
11+
`setup-bazel-ci` runs this after exporting the MSVC environment, and the script
12+
publishes the result via `GITHUB_ENV` as `CODEX_BAZEL_WINDOWS_PATH` so later
13+
steps can pass that explicit PATH to Bazel.
14+
#>
15+
16+
$stablePathEntries = New-Object System.Collections.Generic.List[string]
17+
$seenEntries = [System.Collections.Generic.HashSet[string]]::new([System.StringComparer]::OrdinalIgnoreCase)
18+
$windowsAppsPath = if ([string]::IsNullOrWhiteSpace($env:LOCALAPPDATA)) {
19+
$null
20+
} else {
21+
"$($env:LOCALAPPDATA)\Microsoft\WindowsApps"
22+
}
23+
$windowsDir = if ($env:WINDIR) {
24+
$env:WINDIR
25+
} elseif ($env:SystemRoot) {
26+
$env:SystemRoot
27+
} else {
28+
$null
29+
}
30+
31+
function Add-StablePathEntry {
32+
param([string]$PathEntry)
33+
34+
if ([string]::IsNullOrWhiteSpace($PathEntry)) {
35+
return
36+
}
37+
38+
if ($seenEntries.Add($PathEntry)) {
39+
[void]$stablePathEntries.Add($PathEntry)
40+
}
41+
}
42+
43+
foreach ($pathEntry in ($env:PATH -split ';')) {
44+
if ([string]::IsNullOrWhiteSpace($pathEntry)) {
45+
continue
46+
}
47+
48+
if (
49+
$pathEntry -like '*Microsoft Visual Studio*' -or
50+
$pathEntry -like '*Windows Kits*' -or
51+
$pathEntry -like '*Microsoft SDKs*' -or
52+
$pathEntry -like 'C:\Program Files\Git\*' -or
53+
$pathEntry -like 'C:\Program Files\PowerShell\*' -or
54+
$pathEntry -like 'C:\hostedtoolcache\windows\node\*' -or
55+
$pathEntry -like 'C:\hostedtoolcache\windows\Python\*' -or
56+
$pathEntry -eq 'D:\a\_temp\install-dotslash\bin' -or
57+
($windowsDir -and ($pathEntry -eq $windowsDir -or $pathEntry -like "${windowsDir}\*"))
58+
) {
59+
Add-StablePathEntry $pathEntry
60+
}
61+
}
62+
63+
$gitCommand = Get-Command git -ErrorAction SilentlyContinue
64+
if ($gitCommand) {
65+
Add-StablePathEntry (Split-Path $gitCommand.Source -Parent)
66+
}
67+
68+
$nodeCommand = Get-Command node -ErrorAction SilentlyContinue
69+
if ($nodeCommand) {
70+
Add-StablePathEntry (Split-Path $nodeCommand.Source -Parent)
71+
}
72+
73+
$python3Command = Get-Command python3 -ErrorAction SilentlyContinue
74+
if ($python3Command) {
75+
Add-StablePathEntry (Split-Path $python3Command.Source -Parent)
76+
}
77+
78+
$pythonCommand = Get-Command python -ErrorAction SilentlyContinue
79+
if ($pythonCommand) {
80+
Add-StablePathEntry (Split-Path $pythonCommand.Source -Parent)
81+
}
82+
83+
$pwshCommand = Get-Command pwsh -ErrorAction SilentlyContinue
84+
if ($pwshCommand) {
85+
Add-StablePathEntry (Split-Path $pwshCommand.Source -Parent)
86+
}
87+
88+
if ($windowsAppsPath) {
89+
Add-StablePathEntry $windowsAppsPath
90+
}
91+
92+
if ($stablePathEntries.Count -eq 0) {
93+
throw 'Failed to derive cache-stable Windows PATH.'
94+
}
95+
96+
if ([string]::IsNullOrWhiteSpace($env:GITHUB_ENV)) {
97+
throw 'GITHUB_ENV must be set.'
98+
}
99+
100+
$stablePath = $stablePathEntries -join ';'
101+
Write-Host 'Derived CODEX_BAZEL_WINDOWS_PATH entries:'
102+
foreach ($pathEntry in $stablePathEntries) {
103+
Write-Host " $pathEntry"
104+
}
105+
"CODEX_BAZEL_WINDOWS_PATH=$stablePath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

.github/scripts/run-bazel-ci.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,6 @@ if [[ "${RUNNER_OS:-}" == "Windows" ]]; then
306306
INCLUDE
307307
LIB
308308
LIBPATH
309-
PATH
310309
UCRTVersion
311310
UniversalCRTSdkDir
312311
VCINSTALLDIR
@@ -323,6 +322,17 @@ if [[ "${RUNNER_OS:-}" == "Windows" ]]; then
323322
post_config_bazel_args+=("--action_env=${env_var}" "--host_action_env=${env_var}")
324323
fi
325324
done
325+
326+
if [[ -z "${CODEX_BAZEL_WINDOWS_PATH:-}" ]]; then
327+
echo "CODEX_BAZEL_WINDOWS_PATH must be set for Windows Bazel CI." >&2
328+
exit 1
329+
fi
330+
331+
post_config_bazel_args+=(
332+
"--action_env=PATH=${CODEX_BAZEL_WINDOWS_PATH}"
333+
"--host_action_env=PATH=${CODEX_BAZEL_WINDOWS_PATH}"
334+
"--test_env=PATH=${CODEX_BAZEL_WINDOWS_PATH}"
335+
)
326336
fi
327337

328338
bazel_console_log="$(mktemp)"

codex-rs/Cargo.lock

Lines changed: 30 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codex-rs/analytics/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ workspace = true
1616
codex-app-server-protocol = { workspace = true }
1717
codex-git-utils = { workspace = true }
1818
codex-login = { workspace = true }
19+
codex-model-provider = { workspace = true }
1920
codex-plugin = { workspace = true }
2021
codex-protocol = { workspace = true }
2122
os_info = { workspace = true }

0 commit comments

Comments
 (0)