# Map the first recorded and live debugger protocol operations to actual compiler evidence Task ID: T-PLAN-DAP-020 Role: astra_planner Status: READY ## 1. Context and baseline Shared branch feat/implement-roadmap ca04975. Roadmaps 17–21 require both live/replay DAP plus custom inspection. Root built local GCC 16.2 patches, standalone vls_gcc_probe leaf/supervisor and bounded journal/replay; 13 trace cases and actual step/cancel processes pass. An unmodified Nix GCC 16.2 with GDB can separately expose two nested integer constexpr returns. Neither prototype currently speaks DAP. Normal VLS stdio runs LSP. ## 2. Objective and deliverables Design the smallest real end-to-end first DAP + shared inspection package. Map current code and wire data to a recording session a user can inspect without a compiler, plus the first real live control integration. Identify disjoint implementable files, what can run now, exact preflight contracts and acceptance tests on an actual captured compiler trace. No release decision. ## 3. Scope and non-goals Read-only plan for DAP + shared session/inspection. Scope current integral returns/capabilities only. No application changes, no compiler modifications, no misleading claims for templates, constraints, full source locations or general product readiness. No calls to user or external messaging. ## 4. Files to inspect Inspect docs/roadmap/{17-compiler-debug-instrumentation,18-live-debugging,20-dap-service,21-inspection-api}.md and the recorded replay roadmap; experiments/frontend/gcc-worker/{Trace,Supervisor,Main,Leaf}.{hpp,cpp} as existing, tests/debug/TraceTests.cpp, tests/native/{GccLeaf,GccSupervisor}.py, tests/corpus/frontend/verify-stock-gcc-gdb.py; include/Void/LanguageServer/Protocol/{Framing,Json}.hpp; src/main.cpp, include/vls/Server.hpp, build.cpp. Use actual trace capture/replay outputs if available for the fixed fixture. Consult official Microsoft DAP specification for request/event ordering, handle lifetimes, coordinate bases, source references, paging and capability flags. ## 5. Write ownership and coordination Write scope: none Use only private build/plan-dap-020 for optional neutral data/transcripts. No source edits, spawned agents, remote publication, starting an editor or shared build changes. ## 6. Implementation or investigation approach Trace creation/replay, sequence validation, available frame tree/name/value, authored snapshot and sourceKind, unavailable coordinates, integrity checks, seek/finish, error/truncated status and memory limits. For DAP distinguish protocol seq from compiler sequence and reference lifetime. Derive minimal client path initialize→launch→configured→stopped→threads/stack/scopes/variables/source→move→disconnect or terminate. Consider custom immutable timeline/tree payload sharing the session. Identify when to emit responses/events and handle expired refs and true source vs logical declaration. Decide whether existing replay rereads the whole mutable path per seek and propose a bounded retained immutable read/index. Avoid a second journal parser/timeline. ## 7. Interfaces and data contracts Suggest NEW C++ owner/types for immutable replay open/seek and DAP state, separate from a standalone stdio runner. Show exact public contract and wire field mapping; fixed recording file explicitly selected by launcher. No client-provided arbitrary filesystem reads on source requests. Scope live backend to actual supervisor stop ordinal/ack and one command authority. Explain how stock-GDB recordings could join without fabricating unsupported hook events. ## 8. Dependencies and integration Prior research and evaluator/trace probes allow narrow functionality pending a separate integrated review. Default projects continue using their usual compiler. Root will write/lint subsequent assignments and integrate manifests. Name independent packages that can start while stock diagnostic integration proceeds. ## 9. Edge cases security and performance Bound traffic, output entries, replay record source bytes, retained dictionary state, handle namespace, old/stale actions and client disconnect; don't invent blanket authentication, new external services or additional approval UX for a private stdio connection. Explicit read-only recording authority preserved. ## 10. Acceptance criteria Return source-confirmed initial slice, follow-ons, accepted limitations, concrete executable acceptance commands/fixtures. Distinguish actual feature from plan, through actual step/seek/source/value evidence. If DAP implicit method expectations conflict with data, show exact official basis and a truthful behavior. Options should work for both VS Code and Neovim clients in later stages. ## 11. Verification commands and evidence Read-only. Optional run build/native-validation/profiles/debug/out/bin/vls_gcc_probe replay on an existing explicitly named fixed-test journal in private scratch, or run build/bootstrap/tests/vls_trace_tests. Obtain wire facts from sources and targeted small outputs. Cite evidence lines and primary official documentation; don't expose source outside the approved environment. ## 12. Constraints and stop conditions Stop if actual files contradict the needed evidence and report which distinct capability or small change can close the gap. No staging, rich UI, general redesign, product license, alternate model or public launch. No target exploitation or reverse engineering of unrelated software. ## 13. Authorization and decisions User authorized all plans and D-027 GPT-6.2 Max. D-030 permits local compiler feasibility experiments. Output is a concrete graph for the approved implementation, not a new product scope decision. ## 14. Return format T-PLAN-DAP-020 DONE/PARTIAL with dependency order, new interfaces/owners, actual and missing trace facts, exact DAP events for fixture, minimal verification and limitations. Send ready independent packages early.