Skip to content

Commit 7fb67d7

Browse files
GiuspepeCopilot
andcommitted
debug: probe codex optional-dep install on self-hosted Linux pool
Throwaway diagnostic workflow (DO NOT MERGE). Reproduces the aliased @openai/codex-<platform> optional-dependency install with --loglevel=silly on the self-hosted 1ES ubuntu-22.04 pool (the node_modules cache producer) plus a github-hosted ubuntu-24.04 control, to determine why @openai/codex-linux-x64 is silently omitted from the shared Linux cache. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 7ad5744 commit 7fb67d7

1 file changed

Lines changed: 187 additions & 0 deletions

File tree

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
# THROWAWAY diagnostic workflow — DO NOT MERGE.
2+
#
3+
# Investigates why `@openai/codex-linux-x64` (the ~293 MB native Codex binary,
4+
# shipped as an *aliased* optional dependency `npm:@openai/codex@<ver>-linux-x64`)
5+
# is silently omitted from the shared Linux node_modules cache built on the
6+
# self-hosted 1ES pool, while the same `npm ci` installs it on GitHub-hosted
7+
# macOS and self-hosted Windows.
8+
#
9+
# It runs the SAME probes on two runners for a same-commit A/B:
10+
# * self-hosted 1es-vscode-oss-ubuntu-22.04-x64 (the cache producer — expected BAD)
11+
# * github-hosted ubuntu-24.04 (the PR-test runner — expected GOOD)
12+
#
13+
# Each job:
14+
# A. dumps npm/registry config
15+
# B. probes whether the runner can even see/fetch the aliased platform tarball
16+
# (npm view + curl of both the configured registry and public npmjs.org)
17+
# C. reproduces `npm ci` of `@openai/codex@0.142.0` with --loglevel=silly and
18+
# reports whether the native binary landed, then greps the npm debug log.
19+
#
20+
# Safe: touches nothing shared, saves no cache, needs no secrets. Delete after use.
21+
22+
on:
23+
workflow_dispatch:
24+
push:
25+
branches:
26+
- codex-cache-debug
27+
28+
permissions: {}
29+
30+
jobs:
31+
self-hosted-linux:
32+
name: Probe (self-hosted 1ES ubuntu-22.04)
33+
runs-on: [ self-hosted, 1ES.Pool=1es-vscode-oss-ubuntu-22.04-x64, "JobId=codex-probe-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" ]
34+
steps:
35+
- name: Checkout microsoft/vscode
36+
uses: actions/checkout@v6
37+
38+
- name: Setup Node.js
39+
uses: actions/setup-node@v6
40+
with:
41+
node-version-file: .nvmrc
42+
43+
- name: A — Environment + npm config
44+
run: |
45+
set +e
46+
echo "runner: $RUNNER_NAME ($RUNNER_OS)"
47+
echo "node: $(node -v)"
48+
echo "npm: $(npm -v)"
49+
echo "registry: $(npm config get registry)"
50+
echo "cache dir: $(npm config get cache)"
51+
echo "--- npm config ls -l (filtered, secrets redacted) ---"
52+
npm config ls -l 2>/dev/null | grep -iE "registry|cache|omit|optional|proxy|fetch|_auth|always-auth|prefer-|offline" | sed -E 's/(_auth[^=]*=).*/\1<redacted>/'
53+
54+
- name: B — Can this runner see & fetch the codex platform tarball?
55+
run: |
56+
set +e
57+
pkg="@openai/codex@0.142.0-linux-x64"
58+
echo "=== npm view $pkg dist.tarball ==="
59+
tarball=$(npm view "$pkg" dist.tarball 2>viewA.err)
60+
echo "tarball: ${tarball:-<none>}"
61+
echo "--- npm view stderr ---"; cat viewA.err
62+
echo "=== npm view @openai/codex@0.142.0 optionalDependencies ==="
63+
npm view "@openai/codex@0.142.0" optionalDependencies 2>&1 | head
64+
if [ -n "$tarball" ]; then
65+
echo "=== curl -sSIL configured-registry tarball ==="
66+
curl -sSIL --max-time 120 "$tarball" 2>&1 | grep -iE "^HTTP|content-length|location" | head -20
67+
fi
68+
echo "=== curl -sSIL public registry.npmjs.org tarball (egress test) ==="
69+
curl -sSIL --max-time 120 "https://registry.npmjs.org/@openai/codex/-/codex-0.142.0-linux-x64.tgz" 2>&1 | grep -iE "^HTTP|content-length|location" | head -20
70+
71+
- name: C — Reproduce `npm ci` of codex with silly logging
72+
run: |
73+
set +e
74+
work="$(mktemp -d)"
75+
cd "$work"
76+
cat > package.json <<'JSON'
77+
{ "name": "codex-probe", "version": "1.0.0", "private": true,
78+
"devDependencies": { "@openai/codex": "0.142.0" } }
79+
JSON
80+
echo "=== generate lockfile (npm install --package-lock-only) ==="
81+
npm install --package-lock-only --loglevel=verbose 2>&1 | tail -30
82+
echo "=== lockfile @openai entries ==="
83+
grep -nE '@openai/codex' package-lock.json | head -40
84+
echo "=== npm ci --loglevel=silly (tail) ==="
85+
rm -rf node_modules
86+
npm ci --loglevel=silly 2>&1 | tee ci.log | tail -15
87+
echo "=== RESULT: node_modules/@openai ==="
88+
ls -la node_modules/@openai/ 2>/dev/null || echo "NO @openai dir"
89+
echo "=== codex-linux-x64 tree ==="
90+
find node_modules/@openai/codex-linux-x64 -maxdepth 3 2>/dev/null || echo "codex-linux-x64 ABSENT"
91+
echo "=== binary check ==="
92+
if [ -x node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin/codex ]; then
93+
echo ">>> BINARY PRESENT + EXECUTABLE"
94+
else
95+
echo ">>> BINARY MISSING"
96+
fi
97+
echo "=== ci.log: codex / optional / skip / EBADPLATFORM / http fetch ==="
98+
grep -iE "codex|@openai|optional|skip|ebadplatform|notarget|reify|http fetch" ci.log | tail -150
99+
100+
- name: D — Dump npm debug logs (always silly level)
101+
if: always()
102+
run: |
103+
set +e
104+
shopt -s nullglob
105+
for f in "$HOME"/.npm/_logs/*-debug-0.log; do
106+
echo "== $f =="
107+
grep -iE "codex|@openai|optional|ebadplatform|notarget|reify|http fetch" "$f" | tail -200
108+
done
109+
110+
github-hosted-linux:
111+
name: Probe (github-hosted ubuntu-24.04 control)
112+
runs-on: ubuntu-24.04
113+
steps:
114+
- name: Checkout microsoft/vscode
115+
uses: actions/checkout@v6
116+
117+
- name: Setup Node.js
118+
uses: actions/setup-node@v6
119+
with:
120+
node-version-file: .nvmrc
121+
122+
- name: A — Environment + npm config
123+
run: |
124+
set +e
125+
echo "runner: $RUNNER_NAME ($RUNNER_OS)"
126+
echo "node: $(node -v)"
127+
echo "npm: $(npm -v)"
128+
echo "registry: $(npm config get registry)"
129+
echo "cache dir: $(npm config get cache)"
130+
echo "--- npm config ls -l (filtered, secrets redacted) ---"
131+
npm config ls -l 2>/dev/null | grep -iE "registry|cache|omit|optional|proxy|fetch|_auth|always-auth|prefer-|offline" | sed -E 's/(_auth[^=]*=).*/\1<redacted>/'
132+
133+
- name: B — Can this runner see & fetch the codex platform tarball?
134+
run: |
135+
set +e
136+
pkg="@openai/codex@0.142.0-linux-x64"
137+
echo "=== npm view $pkg dist.tarball ==="
138+
tarball=$(npm view "$pkg" dist.tarball 2>viewA.err)
139+
echo "tarball: ${tarball:-<none>}"
140+
echo "--- npm view stderr ---"; cat viewA.err
141+
echo "=== npm view @openai/codex@0.142.0 optionalDependencies ==="
142+
npm view "@openai/codex@0.142.0" optionalDependencies 2>&1 | head
143+
if [ -n "$tarball" ]; then
144+
echo "=== curl -sSIL configured-registry tarball ==="
145+
curl -sSIL --max-time 120 "$tarball" 2>&1 | grep -iE "^HTTP|content-length|location" | head -20
146+
fi
147+
echo "=== curl -sSIL public registry.npmjs.org tarball (egress test) ==="
148+
curl -sSIL --max-time 120 "https://registry.npmjs.org/@openai/codex/-/codex-0.142.0-linux-x64.tgz" 2>&1 | grep -iE "^HTTP|content-length|location" | head -20
149+
150+
- name: C — Reproduce `npm ci` of codex with silly logging
151+
run: |
152+
set +e
153+
work="$(mktemp -d)"
154+
cd "$work"
155+
cat > package.json <<'JSON'
156+
{ "name": "codex-probe", "version": "1.0.0", "private": true,
157+
"devDependencies": { "@openai/codex": "0.142.0" } }
158+
JSON
159+
echo "=== generate lockfile (npm install --package-lock-only) ==="
160+
npm install --package-lock-only --loglevel=verbose 2>&1 | tail -30
161+
echo "=== lockfile @openai entries ==="
162+
grep -nE '@openai/codex' package-lock.json | head -40
163+
echo "=== npm ci --loglevel=silly (tail) ==="
164+
rm -rf node_modules
165+
npm ci --loglevel=silly 2>&1 | tee ci.log | tail -15
166+
echo "=== RESULT: node_modules/@openai ==="
167+
ls -la node_modules/@openai/ 2>/dev/null || echo "NO @openai dir"
168+
echo "=== codex-linux-x64 tree ==="
169+
find node_modules/@openai/codex-linux-x64 -maxdepth 3 2>/dev/null || echo "codex-linux-x64 ABSENT"
170+
echo "=== binary check ==="
171+
if [ -x node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin/codex ]; then
172+
echo ">>> BINARY PRESENT + EXECUTABLE"
173+
else
174+
echo ">>> BINARY MISSING"
175+
fi
176+
echo "=== ci.log: codex / optional / skip / EBADPLATFORM / http fetch ==="
177+
grep -iE "codex|@openai|optional|skip|ebadplatform|notarget|reify|http fetch" ci.log | tail -150
178+
179+
- name: D — Dump npm debug logs (always silly level)
180+
if: always()
181+
run: |
182+
set +e
183+
shopt -s nullglob
184+
for f in "$HOME"/.npm/_logs/*-debug-0.log; do
185+
echo "== $f =="
186+
grep -iE "codex|@openai|optional|ebadplatform|notarget|reify|http fetch" "$f" | tail -200
187+
done

0 commit comments

Comments
 (0)