Repository navigation
[Spec 1658] windows-native-non-wsl-support - #1859
amrmelsayed wants to merge 274 commits into
Conversation
…l install; quote the dispatch filter
…source builds from npm output; probe the published package
… installs with a user's npm environment
# Conflicts: # .github/workflows/windows.yml # scripts/windows-probe.mjs
…ARM64 leg, failing probe exit, guarded seam, missed launch sites
…roduction recorded
…ilure; probe published 3.3.3 (the 2026-09-09 release)
…not reproducible on the 2026-09-09 release
…session secret, WELCOME reconnect identity Endpoint abstraction (POSIX socket path, log path and handshake unchanged; Windows \\.\pipe\codev-shellper-<user>-<uuid>). Windows shellpers gate every connection on a Tower-minted secret passed via env (never argv), stripped from the PTY child, persisted in global.db (migration v19). Windows reconnect verifies WELCOME sessionId/shellperPid instead of start time; an identity refusal cleans the row without signaling the live pid (#1686 guard kept for transient failures).
… not stdout EOF On Windows the shellper's closeSync(1) leaves Tower's stdout pipe open, so creation timed out waiting for 'end' (windows.yml run 39566654461).
…t user prompt, temp cleanup)
|
Windows dispatch on head Purpose: run the Windows suites over the merge resolution (husk sweep on #1877's single Run: https://github.com/cluesmith/codev/actions/runs/42547114468 |
…er and reused-pid block, #1869 token-rotation stubs getProcessStartTime reads no start time on Windows, so #1686's live-row tests record any value there and #1877's reused-pid block skips on win32. #1869's token-rotation block drives #!/bin/sh stub servers and asserts POSIX modes, so it takes the file's posixStubsOnly marker like every other block.
|
Windows run 42547114468 (head
Fixed at |
… URI path (Windows drive and UNC) The IDE reads ?folder= as the path part of a URI. #1869's dashboard link passed the raw workspace path, which on Windows (C:\a\b) the IDE cannot resolve. ideFolderUriPath converts drive and UNC paths; POSIX paths pass through.
|
Windows dispatch on head Purpose: finding M7. The dashboard's Open IDE link (#1869) sent a raw Windows path as Run: https://github.com/cluesmith/codev/actions/runs/42713989622 |
…the path from a data attribute Start, Stop, Restart, + Create and copy path embedded the workspace path in a single-quoted inline JS string; escapeHtml leaves backslashes alone, so a Windows path's backslashes became JS escapes. Each element now carries data-workspace-path and its handler reads this.dataset.workspacePath, as openIde already did. The M7 test's fixture paths become neutral.
|
Windows dispatch on head Purpose: finding M8. The dashboard's Start, Stop, Restart, + Create and copy-path buttons embedded the workspace path in a single-quoted inline JS string, so a Windows path's backslashes were read as JS escapes. Each now carries Run: https://github.com/cluesmith/codev/actions/runs/42715696142 |
…owner-directed, architect-approved for scope)
…ec-1280 flake recorded
…oved verbatim, Windows via Git Bash adapters) Shared code asks commandLaunch() instead of branching on isWindows(): runStreaming, porch runCheck, forge concepts, the dev runner, shell sessions, builder launch scripts, bare-command spawns, which-probes, the terminal profile and the workspace shell. Site-specific POSIX forms are passed in, not unified. ptyCommand stays a leaf module (the shellper loads it). Adds the scoped useHostPlatform test helper and a contract test for both implementations.
…c exec and terminal profile; record as-built deviations (A2.10)
… verbatim, Windows canonicalization and separators behind it) Workspace canonicalization and keys, home expansion, separators, prefix tests, builder-worktree splitting, the state/notifications/send/consult worktree matchers, architect shellper cwd identity and canvas-relay file canonicalization ask hostPaths(). workspace-path.ts and host-paths.ts keep their exported names as thin wrappers; the Windows native-answer cache and sameWindowsPath now live in the Windows implementation, which stays a leaf module. Contract test for both implementations.
|
Plan Amendment 2 (platform-seam refactor, owner-directed, approved 2026-11-09) Windows dispatches:
|
…ementations; one home for the default ops; reuse BuilderWorktreeRef; A2.10 and A2.9 entries
…st resolve (Windows runner)
…verbatim, Windows modules behind adapters) listProcessCensus, getProcessStartTime (incl. its darwin/linux switch), getProcessesOnPort(+Async), killSessionTree, waitForTreeExit, the husk sweep's console-host check and start-time lookup ask processes(). The Windows census, teardown and port query move unchanged into process-census-windows.ts, process-tree-windows.ts and port-windows.ts, which import nothing that reaches the accessor (no cycle); the original modules re-export their names. Contract test pins census failure ([] on POSIX, reject on Windows) and the synchronous POSIX group signal.
…-export; port.ts header states its graph; POSIX startTime covered; A2.10 entry (budgets and commandLineText recorded)
…rceHostPlatform/useHostPlatform (41 suites); arch.md Platform Layer describes the capabilities; A2.10 records A2-4 and the A2-3 ruling No product code changed. Kept as written: platform.test.ts, the two vi.mock factories that pin linux at module-mock time, and six mid-test resets. host-platform-helpers.test.ts proves an override does not leak into the next test.
…blank lines removed; forceHostPlatform registers its reset first and documents the afterEach order and ctx.skip gap; platform.ts docstring points at the helpers; arch.md census wording; A2.10 counts corrected
…IX moved verbatim, Windows pipe/secret/identity behind it) The endpoint, the per-session secret, the reconnect gate (start time and socket file on POSIX; the row's secret and session id on Windows), the ENOENT refusal, the spawn-info read, the attach scan and how a shellper's command line reads ask shellperTransport(). reconnectSession keeps its shared steps. Branches on the endpoint's form or on a secret's presence are data and stay. PID_REUSE_TOLERANCE_MS and the two command-line parsers move to leaf modules (re-exported), so the implementations import nothing that reaches back. Contract test for both implementations.
…tested, Windows refusal pinned, the real-socket test skips on a Windows host; spec-1280 third sighting recorded
…chitect ruling: three sightings, MSYS fork emulation under load); Flaky Tests entry
…ower), findings M10-M12, vitest worker-exit flake, PR CMAP round 4; porch rebuttals tracked
Architect integration review, round 3 (final head after Amendment 2)Head reviewed: Method. High tier (392 files). Three-way consultation: Claude (worktree read; the consult-generated diff was 0 bytes again, third occurrence, tracked as a consult filing), Codex, Gemini (via agy). Plus my own per-phase reads of A2-1 through A2-5 against Verdicts
Architect position: no builder code change required. Merge remains gated on the four owner-held items already declared in the review's "Open at the PR gate": (1) Claude ConPTY fixtures (directory absent at the head, confirmed), (2) the owner's Windows manual pass on packs built from the final head (A2.8 table), (3) the #1858 Codex scope decision, (4) the README wording versus the cwd-first lookup follow-up. Rulings on reviewer findings
Follow-ups the architect files after merge (owner's word pending)cwd-first executable lookup hardening incl. unified shell-free NextBuilder applies items 3 to 5 (docs and one comment), reports the head, then repacks tarballs + vsix from that head with RECHECK.txt from the A2.8 table. Owner's Windows pass follows on that head; then the pr gate word. |
…SIX ps (creation time and pre-reap PID-reuse check are Windows-only); shellper-transport.posix.ts states its processes() import is not a cycle
Summary
Native (non-WSL) Windows support at parity with macOS and Linux, built over 12 phases (1-11 plus 3b) in one PR, then restructured at the pr gate by Plan Amendment 2 (phases A2-1 to A2-5, owner-directed): platform-dependent behaviour now sits behind four capabilities instead of
isWindows()forks in shared code. WSL 2 stays documented as a supported alternative.Closes #1658
Changes
lib/platform/{command-launch,host-paths,processes,shellper-transport}.ts, each with a.posix.tsand a.windows.tsimplementation and one accessor that picks by the seam. The POSIX implementations are the pre-refactor macOS/Linux code moved verbatim (scripted comparison againstorigin/mainper phase); the Windows ones are adapters over the Windows modules. ProductisWindows()calls went from 103 to 56 (including the four accessors). Each remaining one is listed with its reason in the plan (A2.5, A2.10): mostly single-site one-offs (doctor sections, install checks, Tower start/stop, worktree links), plus eight IDE-server forks recorded individually; the IDE server lifecycle is the next capability candidate. Tests force the platform throughforceHostPlatform/useHostPlatform.killSessionTreesession teardown, and a per-session Job Object for re-parented descendants. Orphan and husk sweeps work on Windows.tower stopover HTTP (POST /api/shutdown: keyed, local, not tunnel-borne). A Tower started inside a session launches through CIM so it survives that session.codev-sdk/node/executable) and an MSYS path translator. PowerShell for human shells.c:\vsC:\no longer splits a workspace); the dashboard's Open IDE link (M7) and workspace buttons (M8) handle Windows paths.codeventrypoint and a drive-root hang). Apreinstallguard refuses a Node version with no prebuilds.doctorgains Windows prerequisite checks.windows.yml(dispatch only, never required): probes, targeted tests, and theunit/cli-e2e/post-release-e2esuites on Node 22 and 24.Testing (code head
5bc668fb1; later commits change only docs, comments and porch files)spec-1280-measurement-instrument, after three sightings of Git Bash fork emulation failing under runner load in a repo measurement script; it runs in full on both POSIX legs. Two Flaky: session-manager real-shellper tests use fixed wall-clock deadlines that fail under full-suite load (CI-skipped, so only local/porch runs see them) #1800 POSIX real-shellper tests remain skipped as FLAKY (Flaky: session-manager real-shellper tests use fixed wall-clock deadlines that fail under full-suite load (CI-skipped, so only local/porch runs see them) #1800 open).Known gaps (recorded in the review)
afxCLI cannot target a non-default Tower port).Open before the pr gate
fixtures/gate/conpty/. Codex fixtures are blocked on Render gate holds all mail to Codex agents: region-end pattern misses the 'GPT-6.1-Sol default' status line #1858.Spec
codev/specs/1658-windows-native-non-wsl-support.md
Plan
codev/plans/1658-windows-native-non-wsl-support.md (Amendment 2)
Review
codev/reviews/1658-windows-native-non-wsl-support.md