You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CI_INVESTIGATION_STATUS.md
+75Lines changed: 75 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -316,3 +316,78 @@ These changes ensure:
316
316
- ❓ **Theory 3 (Non-Determinism)**: UNLIKELY - But binary checksums will confirm/deny
317
317
318
318
**For next session**: Review CI logs after pushing workflow changes, check parser checksums, determine if failures persist.
319
+
320
+
---
321
+
322
+
## Session 3 Update (2025-11-30)
323
+
324
+
### CONFIRMED: Root Cause is Platform-Specific Parser Binaries
325
+
326
+
**Critical Discovery:** Parser binaries are fundamentally different between local and CI environments, despite using identical nvim-treesitter v0.10.0 source code.
The parser binaries are platform-specific compiled C code. Even with identical source code (v0.10.0), the compiled binaries differ between:
355
+
- **macOS ARM64** (Apple Silicon with Clang)
356
+
- **Ubuntu x86-64** (Intel/AMD with GCC)
357
+
358
+
These different binaries produce **different AST structures** for comment nodes, which is why the same test passes locally but fails on CI.
359
+
360
+
### Why This Matters
361
+
362
+
This is NOT a bug in our code or a configuration issue - it's an **inherent platform difference** in tree-sitter parser compilation. The code comment in `lua/treewalker/nodes.lua:24-30` already acknowledges this:
363
+
364
+
```lua
365
+
-- On Ubuntu, on nvim 0.11, TS is diff for comments, with source as the child of comment
366
+
```
367
+
368
+
### Current Workaround Status
369
+
370
+
The workaround in `lua/treewalker/targets.lua:15-21` works for Java tests but not TypeScript:
371
+
- ✅ **Java tests**: PASSING (3/3)
372
+
- ❌ **TypeScript test**: FAILING (1 test: "Moves out from Ok class comment to class declaration")
373
+
374
+
The Java workaround succeeds because `M.down()` from the comment finds the correct target. The TypeScript test fails because the AST structure is different enough that `M.down()` doesn't help.
375
+
376
+
### Theory Status - FINAL
377
+
378
+
- ✅ **Theory 1 (Platform-Specific)**: **CONFIRMED** - Different architectures produce different parser binaries
379
+
- ❌ **Theory 2 (Code Changed)**: RULED OUT - No functional code changed
380
+
- ⚠️ **Theory 4 (Parser Caching)**: PARTIAL - Cleaning directory helped Java but can't fix fundamental platform differences
381
+
- ❌ **Theory 3 (Non-Determinism)**: RULED OUT - Behavior is deterministic per platform
382
+
383
+
### Recommended Next Steps
384
+
385
+
Since this is a platform-specific parser difference (not a code or configuration issue), we have these options:
386
+
387
+
1. **Accept platform differences** - Document that CI may have different behavior than local
388
+
2. **Adjust the workaround** - Enhance `targets.lua` to handle TypeScript comment structure on Linux
389
+
3. **Skip failing test on CI** - Use platform detection to skip TypeScript comment test on Ubuntu
390
+
4. **File upstream issue** - Report to nvim-treesitter about comment node structure inconsistencies
391
+
5. **Use Docker for local testing** - Always test on Ubuntu locally before pushing (but Makefile test-ubuntu hangs)
392
+
393
+
**Recommendation**: Option 2 or 3 - either fix the workaround to handle both platforms, or skip the test on CI with a comment explaining the platform difference.
0 commit comments