pmacs/docs
Levi Neuwirth 2a16e0eed5
fix(lsp): read the glob form from the pattern, and stop a cancelled scan emitting
Review of the #233 implementation found two correctness defects. Both
are cases where the FIRST fix for #233 was itself wrong, which is worth
naming: this lane repaired absolute globs and, in the same change, broke
a case that had worked since May.

P1 --- `resolve_watcher` returned "absolute" for EVERY string, so the
form was carried but derived from the union arm rather than from the
pattern. A bare `*.txt` is a valid relative pattern (LSP 3.17 defines
`Pattern` relative to a base path; VS Code treats string watchers as
applying across workspace folders), and classifying it absolute matched
it against `<base>/foo.txt`, which `^[^/]*%.txt$` can never match. A
leading `/` is what makes a pattern absolute. The `filewatchflat` test
could not catch this: it sends the RelativePattern OBJECT form, so it
constrains the object arm, never the string arm the regression lived in
--- the framing's own F1 finding, repeating inside the lane that named
it.

P2 --- `scan_tree` awaits `read_dir` once per directory, so the watcher
coroutine sits suspended for most of a tick with `_sleep` already
cleared. A cancel arriving there sets `cancelled` and has no sleep to
interrupt, and the resumed scan ran on to `did_change_watched_files`:
one stale batch under the superseded pattern, which is a wrong-pattern
notification the server acts on. Cancellation and liveness are rechecked
after the scan.

Both tests are mutation-checked and each bite fails only its own defect.
Reverting P1 fails the bare-string test alone --- the absolute test
still passes, so the two readings are independent. Deleting P2's recheck
reproduces the defect verbatim: `.received = "1 file:///…/foo.txt"`,
a batch from a watcher that was already cancelled.

P2's witness needs a seam. The race is a cancel landing during one of
the scan's suspensions, which no arrangement of real timing produces on
demand --- the same situation, and the same device, as `git.lua`'s
`_deliver_status`. `pmacs.lsp._after_scan_for_tests` is nil in
production and is handed the SCAN RESULT deliberately: a test that
cancels on any other scan passes with the recheck deleted, because the
loop would break at the post-sleep check and emit nothing anyway.

Gates: 9/9 green.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bqGA6s9tTUFzYpbeW3tai
2026-08-11 09:00:15 +02:00
..
active-work.md fix(lsp): read the glob form from the pattern, and stop a cancelled scan emitting 2026-08-11 09:00:15 +02:00
agent-handoff.md feat(discovery): M-x rows carry descriptions — protocol v22 -> v23 2026-08-10 13:52:32 +02:00
auto-indent-framing.md docs: sync auto-indent review metadata 2026-07-10 15:57:38 -04:00
auto-pairing-framing.md test(edit): PR #110 round 3 — pin raw-byte predicate posture and top-level sets guard 2026-07-12 16:20:01 +01:00
autosave-recovery-framing.md fix(persistence): adopt clears the old owner's skip cache; failing sweeps are loud 2026-07-09 12:06:49 -04:00
bottom-panel-framing.md docs: bottom panel framing (revision 4, amended) 2026-07-24 13:00:46 -04:00
bottom-panel-stage2-framing.md docs(bottom-panel): record framing revision 7 2026-07-29 22:37:41 -04:00
bottom-panel-stage3-framing.md review round 1: the crdt suite Stage 3 missed, and two stale explanations 2026-08-04 12:08:28 +02:00
ci-crdt-coverage-framing.md review round 2: assert the CRDT capability defaults, not their round-trip 2026-08-01 11:37:19 -04:00
ci-red-signatures.md docs: U9 --- the first red in this family with an in-run control 2026-08-10 20:18:45 +02:00
comment-toggle-framing.md docs: comment-toggle framing (Arc 2) 2026-07-09 22:35:35 -04:00
compile-mode-framing.md fix(compile): make overlay teardown atomic 2026-07-14 10:57:14 +01:00
config-registry-framing.md fix(config): reject wrongly-typed spec fields; make trim-on-save buffer-aware 2026-07-21 18:29:18 -04:00
context-menu-framing.md
cua-typeover-undo-framing.md
desktop-save-framing.md fix(persistence): reliable daemon gate, unarm, per-pane after-load 2026-07-08 22:27:24 -04:00
destination-capture-framing.md docs: carry the four-plus-one dedication count into the framing 2026-08-10 14:11:43 +02:00
dired-framing.md docs: record dired Stage 1 (#165) as landed 2026-07-25 17:39:27 -04:00
dired-stage2-framing.md docs: dired Stage 2 framing rev 9 2026-07-28 21:09:11 -04:00
discovery-stage1-command-family-framing.md docs(discovery): finalize Stage 1 framing review 2026-07-31 18:28:35 -04:00
discovery-stage2-framing.md docs: record discovery Stage 2 framing approval 2026-08-10 13:52:32 +02:00
distribution-stage1-framing.md docs(release): a tag before the merge does nothing, silently 2026-08-01 14:46:27 -04:00
editing-conveniences-framing.md fix(edit): PR #111 round 1 — scalar-valid UTF-8, per-word capitalize, trim error reporting 2026-07-12 16:34:18 +01:00
folding-framing.md docs(folding): framing rev 5 — record approval + keybinding decision 2026-07-23 09:59:37 -04:00
folding-stage2-framing.md docs(folding): Stage 2 framing rev 4 — address review round 3 2026-07-23 17:25:55 -04:00
full-grid-resync-framing.md docs: the framing said "awaiting approval" after being approved 2026-08-06 15:22:03 +02:00
gate-protocol-build-framing.md docs: gate framing revision 5 --- pin both emitter pairs, correct print-plan 2026-08-09 18:11:14 +02:00
gate-script-framing.md build: scripts/gate — a target dir per worktree, and one gate suite (#225) 2026-08-09 09:43:33 +00:00
generated-buffer-immutability-framing.md merge: integrate main after PR 188 lands 2026-07-29 12:28:25 -04:00
gpu-attach-robustness-framing.md
gpu-chord-forwarding-framing.md
gpu-golden-harness-framing.md
gpu-horizontal-scroll-framing.md feat(gpu): horizontal scroll — QoL Stage 5, closing the long-lines arc (#223) 2026-08-08 10:55:49 +00:00
gpu-initial-target-framing.md test(journey): pin the destination commit, and land the doc updates 2026-07-26 17:25:22 -04:00
gpu-invocation-framing.md Record second GPU invocation review closure 2026-07-23 12:40:03 -04:00
gpu-minibuffer-framing.md
gpu-set-font-framing.md fix(font): close stage-2 GPU behavioral findings 2026-07-18 15:29:25 +01:00
gpu-terminal-input-framing.md docs: measure the CI coverage gap and record the vterm as-framed audit 2026-07-25 17:17:23 -04:00
gui-zoom-framing.md docs(zoom): the ties both round up, they do not oppose 2026-08-06 17:50:03 +02:00
horizontal-scroll-framing.md feat(view): horizontal scroll, text and decorations together 2026-08-07 22:43:17 +02:00
in-buffer-completion-framing.md docs(completion): phase-2 as-built notes (Q#C6 narrowing, window routing, v15 riders) 2026-07-07 19:57:10 -04:00
in-buffer-search-framing.md
inline-math-framing.md docs: record the inline-math slice (#158) as landed 2026-07-25 18:16:31 -04:00
inline-math-slice-framing.md fix(math): review round 3 — mapping bug, whitespace defect, real MATH gaps 2026-07-24 20:19:40 -04:00
journey-stage1a-framing.md feat(compile): make building discoverable — journey step 9 2026-07-30 21:13:12 -04:00
journey-stage1b1-compile-defaults-framing.md docs(journey): framing revision 2 — close review round 1 2026-07-30 18:40:34 -04:00
journey-stage1b2-lsp-guidance-framing.md docs(journey): framing revision 4 — close review round 3 2026-07-30 21:52:15 -04:00
journey-stage1b3-welcome-framing.md docs(journey): framing revision 4 — close review round 3 2026-07-31 14:55:57 -04:00
json-yaml-framing.md docs: absorption pass at c5f7501#209 landed, and six weeks of drift 2026-08-01 13:56:23 -04:00
keybindings.md docs(coherence): §5 substrate-without-surface -> Partial 2026-07-31 19:17:22 -04:00
kill-ring-framing.md docs: kill-ring framing (Arc 2), rev 3 2026-07-09 20:10:39 -04:00
latex-grammar-math-substrate-framing.md docs(inline-math): commit the parent inline-math framing 2026-07-23 14:06:26 -04:00
lean4-mode-framing.md fix(lean4): count fan-outs where a claim cannot skip the count 2026-07-26 17:15:24 -04:00
locals-query-processing-framing.md docs: record landed locals-query processing 2026-07-22 13:30:07 -04:00
long-lines-framing.md test: the report itself, at a real PTY — and §1.1 was wrong 2026-08-07 19:37:46 +02:00
lsp-file-watcher-framing.md fix(lsp): read the glob form from the pattern, and stop a cancelled scan emitting 2026-08-11 09:00:15 +02:00
lsp-language-coverage-framing.md docs: LaTeX framing revision 3 --- step zero corrected the premise 2026-08-10 10:48:49 +02:00
lsp-panels-framing.md docs(panels): correct as-built accuracy — position encoding landed, refresh drifted refs 2026-07-08 14:29:23 -04:00
lua-bindings-split-framing.md refactor(lua): re-export install_* wiring fns to preserve the public API 2026-07-06 11:57:56 -04:00
macos-ci-signal-integrity-framing.md docs: record Stage 2 in the framing, and fence R3 off from R2's retirement 2026-08-05 13:51:40 +02:00
mcp-for-package-authors.md
mode-system-wiring-framing.md fix: harden mode acceptance startup 2026-07-22 08:18:18 -04:00
modeline-detection-framing.md docs: record landed modeline detection 2026-07-22 11:30:45 -04:00
multi-language-injections-framing.md fix(injections): PR #122 round 2 — sibling precedence, observable cap, docs 2026-07-15 12:07:21 +01:00
package-author-guide.md feat(statusline): add composable modeline segments at protocol v18 2026-07-21 12:01:25 -04:00
package-manager-hardening-framing.md
packages.md
persistence-framing.md docs: persistence framing (Arc 3) 2026-07-08 17:33:25 -04:00
pmacs-gpu-design.md test(font): wire acceptance suite + protocol/design docs (items 2-8, 15) 2026-07-18 11:46:44 +01:00
pmacs-gpu-diagnostic-parity-framing.md
pmacs-gpu-mouse-deferred-framing.md
pmacs-gpu-mouse-framing.md
pmacs-gpu-perline-reshape-framing.md
pmacs-gpu-phase-a-audit.md
pmacs-gpu-quad-backgrounds-audit.md
pmacs-gpu-quad-backgrounds-framing.md
pmacs-gpu-scroll-framing.md
pmacs-gpu-status-band-framing.md
pmacs-gpu-wavy-squiggles-framing.md
process-signal-diagnostic-completeness-framing.md docs(process): stop overclaiming the pre-kill sample; drop a dead comment 2026-07-30 14:41:50 -04:00
process-signal-tolerance-framing.md docs: frame the PTY terminate diagnostic (revision 4) 2026-07-25 21:12:51 -04:00
process-teardown-stdin-deadlock-framing.md fix(process): arm the setsid dependency, correct the orphan account 2026-07-29 22:54:06 -04:00
project.md
query-replace-framing.md fix(query-replace): pin the session to its origin buffer (wrong-buffer guard) 2026-07-08 17:07:08 -04:00
r8-fixture-boundary-framing.md fix(tests): bound the LSP fixture's project detection — retires R8 (#226) 2026-08-09 08:54:06 +00:00
reap-ledger-silent-failures-framing.md fix(process): scope the escalation claim to ticks, and pin the boundary 2026-07-30 20:41:03 -04:00
repository-audit-2026-07-03.md
resource-op-delete-guard-framing.md fix(lsp): close review gaps in workspace edit reporting 2026-07-29 12:29:50 -04:00
roadmap-2026-07.md docs: record Vterm Stage 3 landing 2026-07-22 19:54:14 -04:00
semantic-frontend-protocol.md feat(statusline): add composable modeline segments at protocol v18 2026-07-21 12:01:25 -04:00
side-quest-backlog.md docs: absorption pass at c5f7501#209 landed, and six weeks of drift 2026-08-01 13:56:23 -04:00
statusline-segments-framing.md fix(statusline): harden narrow-band review edges 2026-07-21 12:43:22 -04:00
tab-width-parity-framing.md docs: link tab-width parity PR 2026-07-22 15:06:10 -04:00
terminal-config-and-copy-mode-framing.md docs: correct the non-adopter attribution and two stale anchors 2026-07-26 16:45:12 -04:00
test-ambient-config-isolation-framing.md docs(framing): record the deliberate departure from the §7 branch plan 2026-07-31 19:46:33 -04:00
theme-faces-framing.md perf(themes): PR #120 round 5 -- O(1) frozen counts via store totals 2026-07-15 11:19:03 +01:00
tree-primitive-framing.md fix(listview): ids must also be unique and not NaN 2026-08-05 23:06:25 +02:00
ux-arc-framing.md docs(ux): as-built for sub-arc 3 + arc close (relative/hybrid, protocol v14) 2026-07-07 10:03:32 -04:00
vterm-framing.md Merge main, and fold #173's a37 findings into the CI-coverage lane 2026-07-26 09:29:42 -04:00
web-grammars-html-css-framing.md docs+test(web): name and pin the @attribute retro-paint (review round 3) 2026-07-23 16:11:47 -04:00
worker-identity-framing.md fix(workers): a safe display-text boundary for purpose and handler names 2026-08-10 14:51:54 +02:00