Skip to content

Commit 0fdcbd2

Browse files
ci: add temporary PATH probe job to diagnose memory-mode flag loss
Generated with AI Agent (Claude Code)
1 parent 7871edc commit 0fdcbd2

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/codspeed.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,41 @@ on:
77
workflow_dispatch:
88

99
jobs:
10+
# TEMPORARY diagnostic — remove before merge.
11+
# Proves whether turbo/pnpm demotes the runner's introspected-node PATH shim
12+
# in memory mode. Compares node resolution & flags: (a) directly, (b) through
13+
# `pnpm turbo run`, (c) through `pnpm --filter run`.
14+
path-probe:
15+
name: PATH probe (memory mode)
16+
runs-on: "ubuntu-latest"
17+
steps:
18+
- uses: "actions/checkout@v4"
19+
with:
20+
fetch-depth: 0
21+
submodules: true
22+
- uses: pnpm/action-setup@v2
23+
- uses: actions/setup-node@v3
24+
with:
25+
cache: pnpm
26+
node-version-file: .nvmrc
27+
- run: pnpm install --frozen-lockfile --prefer-offline
28+
- run: pnpm turbo run build
29+
30+
- name: Probe under memory mode
31+
uses: CodSpeedHQ/action@main
32+
with:
33+
mode: memory
34+
run: |
35+
PROBE='console.log("execPath="+process.execPath); console.log("execArgv="+JSON.stringify(process.execArgv)); console.log("PATHhead="+(process.env.PATH||"").split(":").slice(0,3).join(":")); try { eval("%OptimizeFunctionOnNextCall(()=>{})"); console.log("natives=OK") } catch(e){ console.log("natives=FAIL "+e.message) }'
36+
echo "=== (a) direct node (runner PATH intact) ==="
37+
echo "PATHhead(shell)=$(echo $PATH | cut -d: -f1-3)"
38+
echo "which node=$(command -v node)"
39+
node -e "$PROBE"
40+
echo "=== (b) via pnpm exec node (pnpm PATH reconstruction, same family as turbo) ==="
41+
pnpm exec node -e "$PROBE" || echo "pnpm exec exit=$?"
42+
echo "=== (c) via pnpm turbo run bench (real path, expect FAIL) ==="
43+
pnpm turbo run bench --filter=@codspeed/tinybench-plugin 2>&1 | grep -iE "execPath|natives|missing required|SyntaxError|Measured" || true
44+
1045
codspeed-instrumented:
1146
name: Run CodSpeed instrumented (${{ matrix.plugin }})
1247
runs-on: "ubuntu-latest"

0 commit comments

Comments
 (0)