cloudaxe-opencode/packages/opencode/test/tool
Kit Langton 4c52af2a65 test: add reproducer for write tool hanging on slow LSP initialize (#22872)
Adds a failing regression test that reproduces the write tool hang
reported in #22872. The write tool calls lsp.touchFile + lsp.diagnostics
to enrich its output; if a matching LSP server spawns but never responds
to the initialize request, the tool blocks on LSPClient.create's 45s
withTimeout.

The test configures a fake LSP server (hanging-lsp-server.js) that
swallows every message and never replies, asserts the file is still
written correctly, and checks the tool returns within 10s. On dev today
the assertion fails with ~45s actual, proving the hang. The fix should
make this green by bounding the diagnostic-enrichment tail.
2026-04-16 15:50:06 -04:00
..
__snapshots__ chore: fix test to have deterministic testing (#1401) 2025-07-29 17:54:22 -05:00
fixtures test: update model test fixture (#20182) 2026-03-31 16:20:01 +00:00
apply_patch.test.ts feat: unwrap tool namespaces to flat exports + barrel (#22762) 2026-04-16 03:56:54 +00:00
bash.test.ts feat: unwrap tool namespaces to flat exports + barrel (#22762) 2026-04-16 03:56:54 +00:00
edit.test.ts feat: unwrap tool namespaces to flat exports + barrel (#22762) 2026-04-16 03:56:54 +00:00
external-directory.test.ts feat: unwrap tool namespaces to flat exports + barrel (#22762) 2026-04-16 03:56:54 +00:00
glob.test.ts feat: unwrap tool namespaces to flat exports + barrel (#22762) 2026-04-16 03:56:54 +00:00
grep.test.ts feat: unwrap tool namespaces to flat exports + barrel (#22762) 2026-04-16 03:56:54 +00:00
question.test.ts feat: unwrap tool namespaces to flat exports + barrel (#22762) 2026-04-16 03:56:54 +00:00
read.test.ts CLI perf: reduce deps (#22652) 2026-04-16 02:03:03 -04:00
registry.test.ts feat: unwrap tool namespaces to flat exports + barrel (#22762) 2026-04-16 03:56:54 +00:00
skill.test.ts feat: unwrap tool namespaces to flat exports + barrel (#22762) 2026-04-16 03:56:54 +00:00
task.test.ts feat: unwrap tool namespaces to flat exports + barrel (#22762) 2026-04-16 03:56:54 +00:00
tool-define.test.ts feat: unwrap tool namespaces to flat exports + barrel (#22762) 2026-04-16 03:56:54 +00:00
truncation.test.ts feat: unwrap tool namespaces to flat exports + barrel (#22762) 2026-04-16 03:56:54 +00:00
webfetch.test.ts feat: unwrap tool namespaces to flat exports + barrel (#22762) 2026-04-16 03:56:54 +00:00
write-lsp-hang.test.ts test: add reproducer for write tool hanging on slow LSP initialize (#22872) 2026-04-16 15:50:06 -04:00
write.test.ts feat: unwrap tool namespaces to flat exports + barrel (#22762) 2026-04-16 03:56:54 +00:00