Skip to content

Commit bcfdccc

Browse files
committed
debug(ci): override @rspack/core to traced canary + dump trace on failure
Pin @rspack/core to a canary build of rspack worktree-rstest-native-watcher (commit 27bc1e20) so the binding writes RCA trace lines into /tmp/rca-binding-trace.log on the runner: - NativeWatcher::new aggregateTimeout/poll/symlink - JsEventHandler::on_event_handle aggregate changedFiles/deletedFiles - JsEventHandlerUndelayed::on_change every undelayed path Replace the prior tmate step with a `cat /tmp/rca-binding-trace.log` step on failure so the dump shows up directly in the macos-14 job log without needing an interactive SSH. Will be reverted after the investigation; not for merge.
1 parent 1ede01c commit bcfdccc

4 files changed

Lines changed: 214 additions & 179 deletions

File tree

.github/workflows/test.yml

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -223,20 +223,38 @@ jobs:
223223
- name: Install Playwright Browsers
224224
run: npx playwright install chromium webkit
225225

226+
# RCA debug: confirm the e2e workspace actually resolves the canary
227+
# binding (root pnpm overrides should propagate, but verify before
228+
# blaming binding behaviour).
229+
- name: Debug — show resolved @rspack/* versions in e2e
230+
if: matrix.os == 'macos-14'
231+
run: |
232+
echo '----- root resolved versions -----'
233+
pnpm why @rspack/core -r --depth 0 || true
234+
echo '----- e2e workspace lock entry -----'
235+
pnpm --filter @rstest/tests why @rspack/core --depth 0 || true
236+
pnpm --filter @rstest/tests why @rspack/binding-darwin-arm64 --depth 0 || true
237+
echo '----- actual .node binary path/size -----'
238+
find e2e/node_modules /Users/runner/work/rstest/rstest/node_modules \
239+
-name 'rspack.darwin-arm64.node' 2>/dev/null | xargs -I{} ls -lh {} || true
240+
226241
- name: E2E Test (${{ matrix.test_script }})
227242
run: cd e2e && pnpm ${{ matrix.test_script }}
228243

229-
# RCA debug: SSH into the macos-14 + node 24 runner on e2e failure
230-
# so we can inspect why the watch test sees stale dist content
231-
# (mode B "No test files need re-run") that we cannot reproduce
232-
# locally on the same Node version. Limited to the one matrix slot
233-
# that consistently fails, so other failures are not impacted.
234-
- name: Setup tmate session (RCA debug)
235-
if: failure() && matrix.os == 'macos-14' && matrix.node_version == '24'
236-
uses: mxschmitt/action-tmate@v3
237-
timeout-minutes: 30
238-
with:
239-
limit-access-to-actor: true
244+
# RCA debug: a canary rspack build with file-level trace writes to
245+
# /tmp/rca-binding-trace.log inside the runner. Dump it on failure
246+
# so the actual aggregateTimeout / changedFiles / undelayed event
247+
# paths seen by the binding land in the CI job log.
248+
- name: Dump rspack binding RCA trace
249+
if: failure() && matrix.os == 'macos-14'
250+
run: |
251+
echo '===== /tmp/rca-binding-trace.log ====='
252+
if [ -f /tmp/rca-binding-trace.log ]; then
253+
cat /tmp/rca-binding-trace.log
254+
else
255+
echo "(file not present)"
256+
fi
257+
echo '===== END trace ====='
240258
241259
- name: VS Code Extension Test
242260
if: matrix.test_script == 'test'

package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,15 @@
4343
"engines": {
4444
"node": "^20.19.0 || >=22.12.0",
4545
"pnpm": ">=10.33.4"
46+
},
47+
"pnpm": {
48+
"peerDependencyRules": {
49+
"allowAny": [
50+
"@rspack/*"
51+
]
52+
},
53+
"overrides": {
54+
"@rspack/core": "npm:@rspack-canary/core@2.0.4-canary-708545a8-20260518031054"
55+
}
4656
}
4757
}

0 commit comments

Comments
 (0)