forked from cleveragents/cleveragents-core
23803f14ec
Added minimal LSP server entrypoint supporting initialize/shutdown/exit handshake over JSON-RPC stdin/stdout transport with Content-Length framing. Unsupported methods return MethodNotFound error with descriptive message. Wired LSP requests through ACP facade in local mode. Added agents lsp serve CLI command with --log-level flag, PID output, and startup banner. Created reference documentation for the stub server. Includes Behave BDD tests for protocol handshake, Robot smoke test, and ASV startup latency benchmark. ISSUES CLOSED: #203
50 lines
2.0 KiB
Plaintext
50 lines
2.0 KiB
Plaintext
*** Settings ***
|
|
Documentation Smoke tests for LSP server stub startup and protocol
|
|
Resource ${CURDIR}/common.resource
|
|
Suite Setup Setup Test Environment
|
|
Suite Teardown Cleanup Test Environment
|
|
|
|
*** Variables ***
|
|
${HELPER} ${CURDIR}/helper_lsp_stub.py
|
|
|
|
*** Test Cases ***
|
|
LSP Server Initialize Handshake
|
|
[Documentation] Send initialize request and verify response
|
|
${result}= Run Process ${PYTHON} ${HELPER} initialize cwd=${WORKSPACE}
|
|
Log ${result.stdout}
|
|
Log ${result.stderr}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} lsp-initialize-ok
|
|
|
|
LSP Server Shutdown Handshake
|
|
[Documentation] Send initialize, shutdown, exit and verify clean exit
|
|
${result}= Run Process ${PYTHON} ${HELPER} shutdown cwd=${WORKSPACE}
|
|
Log ${result.stdout}
|
|
Log ${result.stderr}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} lsp-shutdown-ok
|
|
|
|
LSP Server Unsupported Method
|
|
[Documentation] Send unsupported method and verify MethodNotFound error
|
|
${result}= Run Process ${PYTHON} ${HELPER} unsupported cwd=${WORKSPACE}
|
|
Log ${result.stdout}
|
|
Log ${result.stderr}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} lsp-unsupported-ok
|
|
|
|
LSP Server Startup Reports PID
|
|
[Documentation] Verify server startup reports PID
|
|
${result}= Run Process ${PYTHON} ${HELPER} startup-pid cwd=${WORKSPACE}
|
|
Log ${result.stdout}
|
|
Log ${result.stderr}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} lsp-startup-pid-ok
|
|
|
|
LSP Server Full Lifecycle
|
|
[Documentation] Complete lifecycle: initialize, shutdown, exit
|
|
${result}= Run Process ${PYTHON} ${HELPER} full-lifecycle cwd=${WORKSPACE}
|
|
Log ${result.stdout}
|
|
Log ${result.stderr}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} lsp-full-lifecycle-ok
|