sangkyoonnam opened a new pull request, #1290: URL: https://github.com/apache/flink-agents/pull/1290
Linked issue: #1289 (tracks the production fix; this hotfix only changes test setup) ### Purpose of change This hotfix creates the bash parser before `interruptionPropagatesInsteadOfReturningToolResult` sets its interrupt flag, which unblocks the `ut-java` jobs. As of 2026-10-20 05:12 UTC, 14 of the 19 completed CI runs created since 2026-10-19 17:40 UTC, excluding `release-0.3` branches, had at least one failing `ut-java` job, including all three runs on main. The ones I opened fail with `BashToolTest` at 1 failure and 7 errors and `BashValidatorTest` at 15 errors ([39352352652](https://github.com/apache/flink-agents/actions/runs/39352352652) on main). The test interrupts its thread and then calls `BashTool`. When that call is the JVM's first parser use and `~/.tree-sitter/lib` has no copy of the native library, tree-sitter writes it under a `FileChannel.lock()`, which throws `FileLockInterruptionException` on the interrupted thread. `TSParser`'s static initializer fails, and the other bash tests in that JVM fail with it. The CI workflow doesn't cache `~/.tree-sitter`, and in the failing jobs `BashToolTest` runs before `BashValidatorTest`. The test's assertions are unchanged: `BashTool` must throw `CancellationException` caused by `InterruptedException` and keep the interrupt flag. The test no longer exercises an interrupted first parser creation. That can happen outside tests too, and #1289 tracks the fix in `BashValidator`. ### Tests Local tests on macOS arm64, with `JDK_JAVA_OPTIONS="-Dtree-sitter-lib=$(mktemp -d)"` so the library has to be written. On main (`742faf60`, JDK 17), `BashToolTest` fails during native library loading (`FileLockInterruptionException` / `ExceptionInInitializerError`). With this change, `BashToolTest` passes against an empty directory on JDK 11, 17 and 21. Both bash test classes also pass with the library already on disk on those JDKs. `tools/lint.sh -f` passes on JDK 11 and `-c` on JDK 21. ### API No. ### Documentation - [ ] `doc-needed` - [x] `doc-not-needed` - [ ] `doc-included` ### Was this patch authored or co-authored using generative AI tooling? - [x] Yes - [ ] No Generated-by: Claude Code 2.1.304 (Claude Opus 5.5) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
