Repository navigation
feat(proof-lsp): implement Deno LSP adapter (Coq/Lean/Isabelle/Agda) - #7
Merged
Merged
Conversation
Ports polystack/poly-proof Elixir LSP to Deno per
handover/cartridge-04-lsp-adapter-pattern.adoc. First of 11 LSP cartridge
adapter implementations.
Adapter surface:
- adapter/server.ts: Content-Length framing + JSON-RPC dispatch
- adapter/handlers/{initialize,diagnostic,hover,completion,executeCommand}.ts
- adapter/backends/{coq,lean,isabelle,agda}.ts + base.ts + registry.ts
- 28 tests pass (deno test --allow-read --allow-run --allow-env):
- 14 backend unit tests (registry, detect, lint, complete)
- 13 server tests (FrameDecoder, dispatch per method)
- 1 integration test spawning the adapter subprocess
Manifest changes:
- states[]: added "adapter-implemented"
- mod.js start() now spawns adapter/server.ts (was throwing)
Repo housekeeping:
- .gitignore: **/deno.lock (matches orchestrator-mcp adapter precedent)
This establishes the pattern for the remaining 10 LSP adapter ports
(cloud, container, database, k8s, git, iac, observe, queues, secrets,
ssg) — each is ~2h of focused work, throttled per the secondary
rate-limit memo.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
3 tasks done
hyperpolymath
added a commit
that referenced
this pull request
May 26, 2026
…or-mcp (#8) Ports polystack/poly-orchestrator-lsp/lib/orchestrator/executor.ex + lsp_client.ex to Deno per handover/cartridge-02-phase-3-execute-rollback.adoc. Wires the `stack_execute_phase` and `stack_rollback` MCP tools. New adapter modules: - adapter/executor.ts: phase loop, parallel-group dispatch, retry, output propagation, dryRun matrix, maxParallel slicing - adapter/lsp_client.ts: LspClient interface + StdioLspClient (spawns per-cartridge subprocesses, JSON-RPC over stdio) + MockLspClient for testing + lspServerToPath() name resolver (direct + legacy poly-* aliases) - adapter/rollback.ts: reverse-execute via planner.buildRollbackPlan, honours toPhase, skips non-succeeded steps, refuses when disabled Tests (51 passed, 0 failed; was 23): - executor_test.ts (13): forward + dryRun + parallel + sibling-failure + retry success/exhaustion + maxParallel + interpolation + all-phases propagation + halt-on-error + dispatch matrix - rollback_test.ts (4): reverse order + toPhase + skip-failed + disabled - lsp_client_test.ts (10): MockLspClient default/override/error/failOnce /call-recording + lspServerToPath direct/legacy/unknown - integration_test.ts: StdioLspClient drives the *real* proof-lsp cartridge (from PR #7) end-to-end — verifies framing + JSON-RPC round-trip including error responses Manifest: - states[] adds `phase-3-execute-rollback` - deno.json bumps to 0.2.0, exports executor/rollback/lsp_client, test task gains --allow-run Deferred (per handover doc): - VerisimDB-backed persistence (in-memory only for now) - Per-LSP `execute_component` handler is the natural next step on each domain LSP adapter; until then StdioLspClient surfaces the unknown- method error path cleanly Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
2 tasks done
hyperpolymath
added a commit
that referenced
this pull request
May 26, 2026
Adds STATUS banners to two handover prompts so a future session doesn't re-execute completed work: - cartridge-02 (Phase 3 execute+rollback) — landed as PR #8. - cartridge-04 (LSP adapter pattern) — proof-lsp landed as PR #7; remaining 10 listed in suggested order. The other 8 prompts remain live (cartridge-03 Idris2/Shield, cartridge-05 boj-server cleanup, cartridge-06 standards#200 follow-through, cartridge-07 boj-server#158 follow-through, plus earlier-01/02/03). Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
hyperpolymath
added a commit
that referenced
this pull request
May 26, 2026
…al (#10) Aligns the machine-readable handover with the prose banners just landed in PR #9, so an ingesting agent doesn't pick up tasks that are already done. Status updates: - cartridge-01: done (PR #6) - cartridge-02: done (PR #8, 28 tests added) - cartridge-04: partial (proof-lsp done as PR #7; 10 remain) - earlier-02: closed_abandoned (with resolution rationale) - earlier-03: in_flight (hypatia#344, auto-merge ON) - cartridge-06 + cartridge-07: blockers cleared (standards#200 + boj-server#158 both merged today) Remaining live work: - cartridge-03 Phase 4 Idris2/Shield (12h, blocks on #2 only — now unblocked) - cartridge-04 sub-tasks (10 LSP adapters, ~20h) - cartridge-05 (boj-server cartridges/ removal, gated on #158 burn-in judgment) - cartridge-06/07 follow-throughs (1h + 4h) - earlier-01 (duplicate-reconciliation, 3h) Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First of the 11 LSP cartridge adapter ports per the handover document
docs/handover/2026-05-26/prompts/cartridge-04-lsp-adapter-pattern.adoc.Ports
polystack/poly-proofElixir LSP to Deno; establishes the patternfor the remaining 10 LSP cartridges (cloud, container, database, k8s, git,
iac, observe, queues, secrets, ssg).
adapter/server.ts—Content-Lengthframing + JSON-RPC dispatch (CRLF-correct).adapter/handlers/{initialize,diagnostic,hover,completion,executeCommand}.ts.adapter/backends/{coq,lean,isabelle,agda}.ts+base.ts+registry.ts.states[]advances toadapter-implemented;mod.js#start()now spawns the adapter (was throwing).Tests
deno test --allow-read --allow-run --allow-env— 28 passed, 0 failed:detect()on temp dirs,lint()short-circuit on wrong extension,complete()for Coq/Lean tactics.FrameDecoder(single, partial-input, multi-message, CRLF),dispatchper method, unknown-method-32601, notification → null,shutdownround-trip.deno run adapter/server.tsas a subprocess, sends framedinitialize, assertsserverInfo.name === "proof-lsp".Pitfalls noted in handover doc
Content-Lengthuses\r\n, not\n(covered byencodeFramed uses CRLF header terminator).available()checks--versionexit, diagnostics surface "not available" as info severity instead of failing.stdout.cancel()+stderr.cancel()+ writer close before kill).Repo housekeeping
.gitignoreadds**/deno.lock— matches thestack-orchestrator-mcpadapter precedent (lockfile is per-adapter, regenerated on demand).Test plan
deno check adapter/server.ts adapter/types.ts adapter/handlers/*.ts adapter/backends/*.tspasses.deno test --allow-read --allow-run --allow-envpasses (28/28).initialize.🤖 Generated with Claude Code