Repository navigation
WIP: feat(debugger): DAP frontend — protocol adapter over the session core (1.5.0 row 10) - #1892
Conversation
… watch pre-pass (1.5.0 row 10) The --dap protocol adapter over the landed session core (design section 13): Content-Length framed JSON on stdio with a hand-rolled JSON subset (no serde, PLAN section 3), a reader thread whose only session access is the async stop flag, the section 13 request set with capabilities claimed only where the machinery exists, debuggee stdio captured into output events, and the section 5.4 stop-and-diff watch wired into debugger_serve_stop's pre-pass (row 8 residual). Tests follow in the next commit.
… (1.5.0 row 10) Scripted in-memory DAP conversations pin the section 8 golden set item by item (handshake/capabilities, lifecycle, breakpoint verdicts incl. the sourced-file Pending -> Verified DE-11 flip, stepping with the stack cross-checked against FUNCNAME / BASH_LINENO, scopes/variables with array children, evaluate safe + rejected forms, output categories), plus the brief's full session script (watch registration and stop-and-diff over the protocol, setVariable write-back with the readonly refusal, terminate, pause during a free run) and capability backing fixtures (conditions, function breakpoints, attach refusal, noDebug). Wiring pins cover the stop-and-diff pre-pass: baseline, announce-at-a-breakpoint-stop, array element writes through the snapshot rendering, disabled and rejected entries, and the watch-only inert limit. KPI: the 4500-line step echo through the real adapter, ignored harness, numbers in the cluster REPORT. Fixes folded in from fixture evidence: the watch pre-pass now renders name watches from the stop's inspection snapshot (a plain $NAME reading shows only element 0 and hides element writes); watch-context evaluate normalizes a bare name to its $-form; resume-class responses are preceded by the running flag so an immediate pause cannot race the reader thread.
…se cost Three fixture defects, all in the tests, none in the adapter: - temp-path assertions compared the raw temp spelling against the server's canonical identity (macOS /var is a symlink to /private/var): stack source paths and the write-back diagnostic now compare canonical-to-canonical, and the sourced-file fixture sources the lib by its canonical spelling while the client still sends the raw one. - the pause fixture's 400k-iteration loop costs ~100 s in a debug build and timed out on CI: 6000 iterations is seconds locally while leaving the reader thread ample scheduling window.
The sourced-file fixture still stalls on macOS and Windows CI while passing locally (including under a local symlink-split reproduction of the canonicalization gap), so the next CI run needs evidence, not another guess: a stall now panics with the full conversation transcript, and the fixture checkpoints its awaits on stderr (nextest surfaces captured output on failure).
…al spelling CI evidence (run 40594412133, macOS transcript): the breakpoint entry was stored under the canonical identity while the fixture's program sourced the lib under the raw temp spelling (/var/folders vs /private/var, RUNNER~1 vs its long form), so the row-7 identity contract — a file's identity is the spelling the engine reports — never let the two meet: no DE-11 flip, no hit, script ran clean. Linux temp paths are already canonical, which hid it locally. The fixture now sources the lib by its canonical spelling (the client still sends the raw path; the adapter canonicalizes), and documents the contract plus the divergent-spelling residual: canonical keying inside the session core, shared by both frontends, is the mechanism-level home (row 11/12). Also keeps the client stall instrumentation (transcript in the panic message) that produced this evidence.
|
Row-10 final state: head CI history (all reds were this row's new tests, none inherited; goldens never diverged):
Local gates on the final tree: lib 868 passed / 1 failed / 3 ignored, failure set identical by name to the pristine-master baseline (sole failure |
WIP: 1.5.0 PLAN row 10 — DAP session (M2 depth). Do not merge; gates in progress.
Deliverables (PLAN row 10 + finalized design section 13):
diff_watchwired into thedebugger_serve_stoppre-pass; watch hits produce a stop + diff presentation (DAP variables face + design event shape).Gates: pristine-baseline lib failure set equality (sole stock failure
ownership_unary_operators_check_existing_file, measured on 015b4f9);-D warningscheck clean; diffcorpus 306 ⊆ {ms10}; per-file rustfmt; CR=0; CI all jobs green (goldens are fully green on master since 40578706634 — no new red accepted).