Files
Language-Server/docs/agent-workflow/tasks/T-DAP-TRANSCRIPTS-020.md
T
faumaray da8003f6d4 Implement the VLS roadmap on the native VBS build
Native VBS and CMake builds of the server and every registered suite:
protocol and document sync, VBS/compdb providers, stock GCC diagnostics
(including in-process default profile preparation), the stock occurrence
observer and hover/definition, the bounded Scheduler, C++ module graph,
scan and artifact cache with real CMI production, the context-aware
symbol index with schema-2 snapshot migration, navigation and guarded
rename, reflection provenance with splice-origin extraction, index-backed
completion and signature help, live GCC worker control with a registered
DAP suite, and the Neovim and VS Code clients.

VoidLibrary follows main. The private GCC 16.2.0 frontend is reproduced
from the versioned patches and verified stepping reflection/template code
with projected values 17/34 and 41/82.
2026-12-05 14:06:50 +03:00

49 lines
7.5 KiB
Markdown

# Exercise a real recorded compiler session through the DAP process
Task ID: T-DAP-TRANSCRIPTS-020
Role: sol_implementer
Status: READY
## 1. Context and baseline
The shared repo /home/faumaray/Projects/VoidLanguageServer is on feat/implement-roadmap, ca04975 plus local changes. T-PLAN-DAP-020 and the replay reader are in place. The root is implementing vls-dap; you own only tests. The independent preflight accepted initialization order and value mapping and required validation of UTF-8 before offering captured text. Three new, real, verified GCC journals exist in tests/debug/fixtures/{integral-17,integral-41,cancelled-41}.vls. Their exact source is the repository's tests/corpus/frontend/gcc-live.cpp, with Ready=41 in the latter two.
## 2. Objective and deliverables
Write NEW tests/debug/DapReplayTests.cpp for the normal C++ inventory and NEW tests/native/DapReplay.py for interactive stdio scenarios using an actual vls-dap binary. Capture distinguishing behaviors that prove replay values, lifecycle ordering, generation-bound views and source ownership. Report test counts and an executable registration witness. Tests must preserve existing build and source files.
## 3. Scope and non-goals
Recorded, offline GCC v1 integral evaluation only. These tests use real trace fixtures and benign temporary copies. Do not implement the adapter, live compiler, clients or build configuration. No custom journal parser or general source rewriter.
## 4. Files to inspect
Read docs/agent-workflow/tasks/T-PREFLIGHT-DAP-020.md, experiments/frontend/gcc-worker/Trace.hpp, tests/{ProcessTests.cpp,TestExecutable.hpp}, tests/native/{StockDiagnostics.py,GccSupervisor.py} for existing process/framing patterns, plus the fixture paths above. Official Microsoft DAP overview and schema control standard responses. Root owns the CLI and future clients.
## 5. Write ownership and coordination
Write scope: tests/debug/DapReplayTests.cpp, tests/native/DapReplay.py
Private outputs under build/test-dap-020 permitted. Shared root owns build.cpp, CMakeLists.txt, tests/CMakeLists.txt and tests/NativeRegistration.cpp. No other application/test changes or Git mutations. Tell root which files can be wired as soon as they compile. No other model or user contact.
## 6. Implementation or investigation approach
Use registered Void::Testing C++ cases in suite DapReplay. For CMake root supplies VLS_DAP_EXECUTABLE as an absolute string compile definition and both builds use absolute __FILE__ to locate the three sibling fixtures. For native builds resolve vls-dap next to /proc/self/exe unless the compile definition is present. Reuse bounded Void::Process and Protocol framing. The Python corpus uses --adapter PATH and may take optional --fixtures PATH defaulting to tests/debug/fixtures. Use interactive framing with deadlines; test in an empty PATH with one adapter process per connection. Keep tests deterministic and small.
## 7. Interfaces and data contracts
vls-dap --replay ABSOLUTE_TRACE. Send DAP seq=1,2,..., type=request, command and arguments. initialize(adapterID=vls) responds with configurationDone, terminate and loadedSources capabilities and emits initialized. launch may defer until configurationDone; configurationDone response precedes deferred launch response followed by stopped(threadId=1). Give launch no extra arguments; trace, if supplied, must name the same launcher-selected path. threads/stackTrace/scopes/variables/loadedSources/source/continue/terminate/disconnect are standard. Top frame at E6 is reflected_value over twice. A variable named Result shows 17, later 34; provisional state remains separately inspectable. Frames have no source and line/column=0 because original data has only logicalDeclaration. SourceReference is positive for valid text. Continue visits next observed integral value, even if no live STOP was recorded. Any unsupported next/stepBack is an explicit failure. vls/session returns schemaVersion=1,sessionId,generation,eventSequence,pauseKind,sourceAvailable,sourceByteLength,sourceReference when available, recording (outcome/exitCode/partial/corrupt), mode="replay". For vls/timeline and vls/frames copy schemaVersion/sessionId/generation and supply start/count (max 256). Body includes events or frames and total. Resumed events carry acknowledgedStop, acknowledgedAction. vls/frames includes lastLeave and captured frames with v1 fields. vls/seek accepts the same three identity fields and exactly one eventSequence or direction="previousValue" or "nextValue", responds with new identity before stopped. Old generation, frame and scope refs must fail even after seeking back to the same event.
## 8. Dependencies and integration
The root will publish the binary path as soon as it links; interim checks can compile the test translation unit in isolation. The public DAP names above are frozen unless preflight requires a narrowly communicated change. Root owns both integrated builds and installation.
## 9. Edge cases security and performance
Test correlations, configurationDone before/after launch, pending launch settled on disconnect, distinct DAP vs compiler ordinals, sourceReference/path mismatch cannot select disk, stale references, pagination under the public caps, partial/cancelled replay, invalid trace, unreachable state commands, no invented exited/step capabilities. Verify no file mutation for replay and no recompilation. Test a replaced/unlinked selected recording remains inspectable once opened. Use finite I/O deadlines, bounded logs and guaranteed child cleanup. No access to unrelated files.
## 10. Acceptance criteria
1. C++ test runner lists nonzero DapReplay cases covering lifecycle, unavailable features and ordinary client controls; Python checks exact 17/34 plus 22/44 and edit 41/82 against real files. 2. Old handles fail across stop/seek ABA while captured bytes and sourceReference remain usable. 3. Historical E5 provisional result vs E8 committed lastLeave, E7 ack and E11 action appear only at the correct ordinals. 4. Cancelled recording presents a verified prefix and recorded exit 125, alone without live process. 5. Reports contain real executable evidence, expected outputs and any blocked cases.
## 11. Verification commands and evidence
Run python3 -B tests/native/DapReplay.py --adapter "$PWD/build/bootstrap/vls-dap" once root confirms ready. C++: derive the GCC16 compile arguments from build/bootstrap/compile_commands.json for tests/debug/RecordingTests.cpp and replace only the TU/output into build/test-dap-020; use dev cpp-gcc -c. Root adds target vls_dap_tests, then run build/bootstrap/tests/vls_dap_tests --list --no-color and --no-color. Check dev cpp -c clang-format --dry-run --Werror tests/debug/DapReplayTests.cpp. Check Python syntax using ast.parse. No directory-wide format or build from your side.
## 12. Constraints and stop conditions
Report early if the protocol contract is inconsistent with the verified v1 recordings or upstream DAP. Never weaken assertions to pass an implementation defect; send a distinguishing transcript. No pushes, commits, installs, toolchain changes or other agents. Preserve the shared worktree.
## 13. Authorization and decisions
Full roadmap D-022, VBS D-025 and authorized GPT-6.2 Sol at Max D-027. The local compiler experiment D-030 has already produced all four recordings. The executing adapter uses stock libraries and reads the selected saved trace.
## 14. Return format
T-DAP-TRANSCRIPTS-020 DONE/PARTIAL; changed files, cases/witness, commands and exit codes, observations, unmet contracts and release of ownership. Notify root of any confirmed protocol defect early.