summaryrefslogtreecommitdiff
path: root/test/behaviour/tree.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-26 04:54:39 -0300
committerGabriel Schneider <[email protected]>2026-11-26 06:12:14 -0300
commit02b64ff90ae2f82fb83a604f6d4ded3459a84620 (patch)
tree066e398aac05727d7b64d3413fdbe92f6c204fcc /test/behaviour/tree.zig
parent5dab435d7262b87d2cf40d6a27cea9c2d981c2e8 (diff)
downloadpardes-02b64ff90ae2f82fb83a604f6d4ded3459a84620.tar.gz
pardes-02b64ff90ae2f82fb83a604f6d4ded3459a84620.zip
Lsp, lsp_client, File, dump: a file of a language a server speaks, opened in a pane (a Look, a landing, a walk step, the boot's file, a restored session's), starts that server and tells it of the file on a worker of its own, so the file's first question finds it ready (agent V4's find for the comparison video, VIDEO2/STORY.md §4.1 and §10.2: pardes's first `gd` cost about 2.5 s where Helix's, LazyVim's and Doom's cost 0.05 s; the user was asked, the default yes); THE CAUSE: dev/lsp/lsp_client.zig spawned a server on the first query that needed it (its header's lifecycle), and that query paid the spawn, the handshake and the server's first parse of the file; THE FIX: an effect `lsp_open`, emitted beside the file's watch by File.open (look.open, Trail's step, the boot document) and dump.revivePane (a restored or upgraded session), performed through a Host entry `lsp_open` (tui, gui and macOS: Inbox.openLsp; not held for `threads_ok`: the boot's file and a restored session's are opened before the loop's threads start); dev/Lsp.zig `open` asks nothing for a file no spec speaks for (lsp.speaks, on the loop), else copies the pane's file (`snapshot`) and hands it to a worker of its own (`Opener`, one at a time: a file opened while one is under way is let go and told at its first query, syncDoc; one done is awaited, at once, before the next), which calls lsp_client.open: a spec disabled asks nothing, a binary not found disables the spec without a word (its first query says `language server for .py not found`, not every file opened), else `ensure` (the server started as a query starts it, `starting` and `ready` narrated as before, one per spec) and `syncDoc` (didOpen); nothing in the query log; not through Lsp.start (its cancel and join of the query in flight waits out a protected handshake, up to init_ms = 8 s, on the loop) nor `work` (the queries' one fixed region, memory.takeLspQuery); a picker's preview (Pick.preview, no pane) and a 9P `ctl get` (ninep/ctl.zig getFile, no File.open) start none; Lspinfo says `not started yet (a file of its opened starts it)`; docs/typ/setup.typ and reference.typ say when a server starts; THE HARNESSES (the coordinator's ruling: no test starts a server of this machine's): PARDES_LSP_OPEN=off starts none and is the process harnesses' default (test/process.zig's child environment, test/tty.zig, and test/fs.py, selfmount.py and daemon.py's base_env), so the `lsp` tty cases' zls is started by their first query as before; a test binary (builtin.is_test) starts none unless it says `on`, as the behaviour harness's language sessions do (Session.initLanguage, every spec the mock or off, `.lsp_open` drained as a host performs it, awaited); RUN (TEST FIRST): behaviour/language_servers.zig "a file of a server's language opened in a pane starts that server and tells it of the file, with no query asked; a picker's preview of one starts none, a second file no second server, and a server not installed is found silently" previews a.zig in Find's picker (Lspinfo: zls `not started yet`), opens it (zls `ready`, `docs 1`, the query count unchanged), opens b.zig (`docs 2`: the same server), and opens c.py and d.py with PARDES_LSP_PY naming no binary (pyright `disabled`, no query, nothing on the screen): fails on the base at language_servers.zig:367 (zls not started by the open), passes now; lsp_client.zig "a file opened whose server is not installed disables it without a word ..." opens two .py files with a status sink set: the spec disabled, no word posted, a query then `not found`; MEASURED (.scratch/walkui/T23/measure-v8.sh: VIDEO's probe.py, the screen polled every 50 ms, this change's Debug tui, a reflink copy of VIDEO2's V8 tree with clangd and its 27-file compile database, torque-parser.cc opened, `743ggfI` then `gd` 4 s after the start, until utils.h's `bool IsUpperCamelCase` shows): with PARDES_LSP_OPEN=off (the base's way) 1.97, 1.98, 1.97 s; started at the open 0.05, 0.05, 0.05 s; on VIDEO's tally with zls (measure.sh) both ways 0.05-0.10 s (zls starts and answers within one poll there); a user hit it on the first question of every file of a session's languages, about 2 s with clangd over a real project; NEW HOT PATHS: none per key or frame; per file opened, one effect more and on the loop lsp.speaks (the spec table's extensions); for a file a spec speaks for, a copy of its text (the snapshot a query makes) and a worker started; GATES: core-test 1130/1304 (174 skipped: +1), shell-test 1352/1355 (3 skipped: +1), pane-test 183/184, behaviour-test 286/286 (+1) and --replay 20 seeds of 70 steps, 0 failures, process-test 0 of 147 failed (3 skipped), term-test 17/17, kitty-test 45/45; the wire's semantics move (a Host entry, tape.shape); no dump change (effects are local, not dumped); the soak `replicas -- --clients 5 --rtt 30,80,207` dies on the base too (5dab435d7262, run here: `allocator leaks detected` at seed 0 rtt 80, MuPDF's allocations of documents a picker previewed, Pick.showKind), so run without the pdf addon (its binary, `--addon` image and life): diverged 0, unequal 0, quiet checks 468/0 251/0 657/0, stops not on may_wait 0, the corpus 22 of 22 scenes the same, no leak (a first run had one key stop at `spawn` at seed 3 rtt 80, exec.zig's rerun of a command pane, which emits a spawn with no `open a terminal` stop; the base's run and a second run had none); the gui unit-test run once, on T3's change over this one (its description); no frame or perf gate (the user's rule of 2026-11-26); load 1.1 to 9.1
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE
Diffstat (limited to 'test/behaviour/tree.zig')
0 files changed, 0 insertions, 0 deletions