Repository navigation
Expose the running extension API for integration tests - #143
Conversation
CatarinaGamboa
left a comment
There was a problem hiding this comment.
Reviewed with Claude Code (reviewer + adversarial agents per PR, findings checked against the code before posting).
| extension.webview?.sendMessage({ type: "diagnostics", diagnostics }); | ||
| if (extension.context) | ||
| extension.webview?.sendMessage({ type: "context", context: extension.context, errorAtCursor: extension.errorAtCursor }); | ||
| extension.diagnosticsEmitter.fire(diagnostics); |
There was a problem hiding this comment.
A verifier crash fires no event. onDiagnostics only fires on liquidjava/diagnostics. When the verifier throws, the server catches it in LJDiagnosticsService.generateDiagnostics and sends liquidjava/failure instead, and handleLJFailure doesn't fire anything. A test waiting on onDiagnostics then sits until the 120s Mocha timeout, with nothing saying the server crashed. #130 asked for tests to be able to tell a crash apart from a slow run.
Suggest firing something from handleLJFailure too (a separate onFailure event, or a status-change event), so tests can fail fast with a clear message.
There was a problem hiding this comment.
Added onFailure to the test API in f68f1e8. Verifier crashes now emit it after setting the crashed state, so integration tests can fail immediately. The focused regression check, lint, typecheck, and extension installation passed.
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <noreply@openai.com>
|
Restacked this PR on #141 to put the release, client tests, server tests, and integration API into one dependency chain before #147. The diff against the new base preserves this PR's feature changes. Combined validation passed 32 client tests, 24 server tests, lint, production/test type checks, and extension installation; this PR's new Checks run also passed. |
Adds a real VS Code stable smoke test for activation, readiness, and the refinement diagnostic returned after Verify in an isolated failing workspace. CI runs it on pull requests and main with Java 21 and xvfb, and uploads VS Code logs on failure. Validated: smoke test locally and in CI, npm ci, lint, production/test type checks, and extension installation. Depends on #143. Closes #131. Generated by Codex. --------- Co-authored-by: Codex <noreply@openai.com>
## Description Closes #134. Add weekly and manual Windows/macOS runs for client and server unit tests plus VS Code stable integration tests, with logs uploaded on failure. The diff contains only `platform-tests.yml`. ## Related Issues Depends on #146. The existing prerequisite PRs now form one chain through #145, #144, #143, #141, #142, #140, #139, #138, and #137 to main. The schedule becomes active when merged to the default branch. Validation: 32 client tests, 24 server tests, lint, production/test TypeScript checks, and extension installation passed. Stable and minimum VS Code integration passed in [PR CI](https://github.com/liquid-java/vscode-liquidjava/actions/runs/37541530280). Fresh [Windows/macOS validation](https://github.com/liquid-java/vscode-liquidjava/actions/runs/37541530341) passed on the final commit, including both unit-test suites and VS Code integration. 🤖 Generated with [Codex](https://openai.com/codex/) --------- Co-authored-by: Codex <noreply@openai.com>
Expose readiness, diagnostic events (including empty results), current status/diagnostics, and webview messages through the running extension’s activation API. Startup failures reject readiness while existing extension behavior stays intact.
Validation: lint, TypeScript, production bundle, VSIX packaging, and extension installation passed. The integration smoke test in #131 uses this API.
Depends on #141. Closes #130.
Generated by Codex.