Skip to content

feat(lsp): transient-open lifecycle, workspace queue, and env scrubbing (DSH 2.12) - #217

Merged
Patel230 merged 1 commit into
mainfrom
feat/dsh-harness-rfc-2.12-lsp-transient-open-env-scrubbing
Aug 20, 2026
Merged

feat(lsp): transient-open lifecycle, workspace queue, and env scrubbing (DSH 2.12)#217
Patel230 merged 1 commit into
mainfrom
feat/dsh-harness-rfc-2.12-lsp-transient-open-env-scrubbing

Conversation

@Patel230

Copy link
Copy Markdown
Contributor

Summary

Port of DSH lsp/lsp-stdio operational semantics into Hawk (Phase 2.12 of DSH RFC port plan).

  • Transient-open lifecycle: Implemented ExecuteTransient managing per-file transient didOpen (version 1, full text) -> query -> didClose (defer) lifecycle with 10 MiB ReadBoundedSource cap.
  • Workspace queue: Implemented WorkspaceQueue providing per-workspace FIFO execution queue with context-abortable locking. Distinct workspaces execute concurrently.
  • Environment scrubbing: Implemented ScrubEnvironment stripping ambient sensitive environment variables (KEY, PASSWORD, SECRET, TOKEN, AUTH, CREDENTIAL, PRIVATE, BEARER, SIGNATURE, APIKEY) and detecting secret values via tok.DefaultSecretDetector(). Merges explicit configuration values after the scrub.
  • Tree-kill on shutdown: Implemented KillProcessTree across POSIX process groups (Unix) and taskkill /T /F (Windows), with WaitForProcessQuiescence polling.
  • Protocol compatibility: Configured LSP initialize handshake with processId: null per DSH specification.
  • Tools integration: Connected file-based tools (lsp_diagnostics, lsp_goto_definition, lsp_find_references, lsp_symbols, lsp_prepare_rename, lsp_rename) to execute through ExecuteTransient.
  • Test coverage: Added test suites for environment scrubbing, process tree disposal, workspace FIFO ordering, parallel workspace isolation, source bounding, and transient lifecycle.

Verification

  • go test -race ./internal/lsp/... ./internal/tools/... -> PASS
  • ./scripts/check-internal-layer-imports.sh -> PASS
  • make lint -> 0 issues
  • hawk verify -> verification passed

…ng (DSH 2.12)

Port of DSH lsp/lsp-stdio operational semantics into Hawk.

- lsp: Implemented ExecuteTransient managing per-file transient didOpen (version 1, full text) -> query -> didClose defer lifecycle with 10 MiB ReadBoundedSource cap.
- lsp: Implemented WorkspaceQueue providing per-workspace FIFO execution queue with context-abortable locking.
- lsp: Implemented ScrubEnvironment removing ambient sensitive environment variables (KEY, PASSWORD, SECRET, TOKEN, etc.) with tok.SecretDetector value scanning and explicit config merging.
- lsp: Implemented KillProcessTree and WaitForProcessQuiescence across Unix (POSIX process groups) and Windows (taskkill /T /F).
- lsp: Updated initialize request with null processId per DSH specification.
- tools: Updated all file-based LSP tools (diagnostics, goto_definition, find_references, symbols, prepare_rename, rename) to execute via ExecuteTransient.
- tests: Added test suites for environment scrubbing, process tree disposal, workspace FIFO ordering, parallel workspace execution, source bounding, and transient lifecycle.
@Patel230
Patel230 merged commit c28931a into main Aug 20, 2026
26 checks passed
@Patel230
Patel230 deleted the feat/dsh-harness-rfc-2.12-lsp-transient-open-env-scrubbing branch August 20, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant