Skip to content

Expose the running extension API for integration tests - #143

Merged
rcosta358 merged 3 commits into
codex/issue-129-server-unit-testsfrom
codex/issue-130-test-api
Oct 7, 2026
Merged

rcosta358 merged 3 commits into
codex/issue-129-server-unit-testsfrom
codex/issue-130-test-api

Conversation

@rcosta358

@rcosta358 rcosta358 commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

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.

@rcosta358 rcosta358 added the testing Testing related label Oct 2, 2026

@CatarinaGamboa CatarinaGamboa left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@rcosta358
rcosta358 changed the base branch from codex/issue-125-test-workflow to codex/issue-129-server-unit-tests October 6, 2026 22:31
@rcosta358

Copy link
Copy Markdown
Collaborator Author

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.

@rcosta358
rcosta358 added this pull request to stack #148 October 7, 2026 11:17
@rcosta358
rcosta358 merged commit 1d2a957 into main Oct 7, 2026
1 of 2 checks passed
rcosta358 added a commit that referenced this pull request Oct 7, 2026
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>
rcosta358 added a commit that referenced this pull request Oct 7, 2026
## 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Testing related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Return a small test API from activate()

2 participants