PM: merge H6 isolated data directory for dev and live-check instances
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
f6ea0b708c
10 changed files with 418 additions and 29 deletions
|
|
@ -72,6 +72,7 @@ As built in M0:
|
|||
- **Security:** only the user may read the token. Unix: the file is created with mode `0600`. Windows: it lives in the user's roaming AppData folder, whose inherited ACL grants the user, `SYSTEM` and Administrators only (checked with `icacls` in the M3.7 live check); Lutra sets no ACL of its own. Both listeners bind `127.0.0.1` only. On the token listener the first request must be `app.auth {token}` within 10 s (`AUTH_TIMEOUT`); a wrong token, another method or garbage gets `unauthorized` and the connection is closed. Tokens are compared in constant time. The `--control PORT` listener stays open (no token) for development and agents; it is opt-in and documented as such.
|
||||
- **Second start:** `lutra-desktop [PATH]` without `--control` reads the rendezvous file first. If the listener answers, accepts the token and pings, the start forwards `PATH` (folder → `project.open`, file → `file.open`), calls `app.focus` and exits 0. If the file is missing, unreadable, invalid, or its port refuses or rejects the token, it is stale: this start becomes the instance and replaces the file. Two starts in the same instant can both become instances; the later file wins (accepted, rare).
|
||||
- **Development instances:** a start with `--control PORT` skips the single instance (no forwarding, no rendezvous file) so parallel agents' instances never forward to each other, unless `LUTRA_RENDEZVOUS_DIR` is set, which opts it into the single instance in that directory (used for isolated live checks).
|
||||
- **Data directory isolation (H6):** `lutra-desktop --data-dir DIR` or `LUTRA_DATA_DIR=DIR` makes an isolated instance (`apps/lutra-desktop/src/datadir.rs`): `EngineConfig { config_dir: DIR, data_dir: DIR }` (settings, `recovery/`), the rendezvous file in `DIR`, and the webview's own data in `DIR/webview` (`WebviewWindowBuilder::data_directory`, the WebView2 user data folder, so local storage is separate too). `--control PORT` without either uses `<temp>/lutra-control/<port>/`, kept between runs. The managed tools stay shared: `Engine::share_tools_from(user app_data_dir)` makes the toolchain look for (and, only if missing, download) `tools/phpactor/<version>/` there, SHA-256 checked as before. Rendezvous order: `LUTRA_RENDEZVOUS_DIR` if set; else none for `--control`; else the isolated directory; else the default. `rendezvous::dir()` (CLI, `lutra mcp`) honours `LUTRA_DATA_DIR` after `LUTRA_RENDEZVOUS_DIR`, so `lutra` finds an isolated instance started with the same environment. An isolated instance therefore never forwards to, or registers as, the user's main instance.
|
||||
- **New methods:** `app.auth {token}` (always succeeds on the open listener) and `app.focus` (restore, show and focus the main window; `focus_failed` without a window; `Backend::focus` has a default that fails, so test backends need no change).
|
||||
- **`lutra` CLI** (`apps/lutra-cli`, binary `lutra`, now L6 so it can use `lutra-control`): `lutra [--wait] [PATH[:LINE[:COLUMN]]]...`.
|
||||
- **Targets:** up to two trailing `:N` groups are a 1-based line and column (`N` all digits, something before it; on Windows a lone drive letter is never split). If the path part does not exist but the whole argument does, the argument is the path. Paths are made absolute against the current directory without resolving symlinks.
|
||||
|
|
@ -556,6 +557,7 @@ Watched directories: the VFS watcher is non-recursive, so `project.children` wat
|
|||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-10-25 | minor | H6: isolated data directory (`--data-dir`, `LUTRA_DATA_DIR`, `--control` temp dir), shared tools dir, rendezvous order |
|
||||
| 2026-10-24 | minor | H1: `crates/proc` (L0), child processes in kill-on-close groups (Windows job objects, Unix process groups with a watchdog); Phpactor and the PHP probe use it |
|
||||
| 2026-10-22 | minor | M3.5: definition, references, rename (`lsp_nav`, workspace edits, undoable remote edits, nav UI) |
|
||||
| 2026-10-22 | minor | M3.4: code assistance (`lsp.completion`, `lsp.hover`, `lsp.signatureHelp` on pending outcomes; editor completion source, hover, signature help, safe Markdown, assist UI commands), Phpactor latency and resources |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue