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.
50 lines
7.2 KiB
Markdown
50 lines
7.2 KiB
Markdown
# Preflight the recorded DAP session and inspection contract
|
|
|
|
Task ID: T-PREFLIGHT-DAP-020
|
|
Role: astra_reviewer
|
|
Status: READY
|
|
|
|
## 1. Context and baseline
|
|
The real shared root is /home/faumaray/Projects/VoidLanguageServer. Work is on feat/implement-roadmap at ca04975 plus local changes. T-PLAN-DAP-020 designed the DAP path. T-REPLAY-RECORDING-019 implemented ReplayRecording. The existing four real 17/34 and 41/82 journals still replay from the CLI. Requirements R-017 through R-020 require DAP and custom inspection over one compiler session. Root owns DAP code and build integration, and the semantic reviewer owns an independent read-only review.
|
|
|
|
## 2. Objective and deliverables
|
|
Check the following NEW DAP replay contract against actual source, compiler data and official DAP requirements. Identify concrete errors before implementation. Send a readiness verdict and distinguishing test. Verify the contract independently of root reasoning.
|
|
|
|
## 3. Scope and non-goals
|
|
Focus on recorded sessions in a private stdio process, honest replay controls, frame/value/source mapping, bounded inspection, authority and test coverage. Actual live compiler control is a separate implementation on this same service. Avoid source edits, broad LSP reviews, compiler changes or external messages.
|
|
|
|
## 4. Files to inspect
|
|
Read experiments/frontend/gcc-worker/{Trace.hpp,Trace.cpp,Main.cpp}, tests/debug/RecordingTests.cpp, docs/agent-workflow/tasks/T-{PLAN-DAP-020,PREFLIGHT-REPLAY-020}.md, docs/roadmap/{20-dap-service,21-inspection-api}.md, include/Void/LanguageServer/Protocol/{Framing,Json}.hpp. Use the official Microsoft DAP overview and specification for capability implications, configuration ordering, unavailable stack positions and paging.
|
|
|
|
## 5. Write ownership and coordination
|
|
Write scope: none
|
|
Private benign fixtures only in build/preflight-dap-020. No writes to code, manifests or workflow docs, no Git changes, no subagents. Root coordinates application paths and integration. Avoid mutable VBS selection changes.
|
|
|
|
## 6. Implementation or investigation approach
|
|
Review a standalone C++ vls-dap --replay ABSOLUTE_TRACE. Launch opens only the launcher-selected journal; optional matching trace argument verifies equality. Retain one immutable ReplayRecording across inspection. Reuse framing and strict JSON, keep DAP protocol sequence distinct from compiler signal and cursor. Respond to initialize before initialized. Accept configurationDone before or after launch; respond to configurationDone before the deferred launch response and then send stopped. Disconnect settles a deferred launch. Keep source-only, partial-prefix and empty recordings honest.
|
|
|
|
## 7. Interfaces and data contracts
|
|
NEW DAP API supports initialize, launch, configurationDone, setBreakpoints (one unverified result per unsupported source breakpoint), empty setExceptionBreakpoints, threads, stackTrace, scopes, variables, loadedSources, source, continue, disconnect and terminate. Continue visits the next observed integral value with matching stop if present; source statement stepping remains unsupported. Logical declaration metadata stays in custom views, physical frame source is absent with line/column zero. The captured primary file has a positive session-lifetime sourceReference and no client-path reopening. Positive frame/scope references expire on every movement and never alias later stops in the same connection. Preserve signed integer precision/bits, provisional vs final outcomes and cached or missing values. NEW vls/session bootstrap returns schemaVersion=1, unique sessionId, generation, mode, eventSequence, pauseKind, sourceReference, compiler identity and separate recording-level outcome. NEW vls/timeline and vls/frames require schemaVersion, sessionId and generation, page start/count <=256, and return matching identity. NEW vls/seek is a DAP control with the same expected identity, and exactly one eventSequence or direction previousValue/nextValue. Successful movement responds before stopped, changes generation even after seeking back. A replay cursor can represent an event lacking a matching recorded compiler stop. Statement-granularity reverse/next is not advertised.
|
|
|
|
## 8. Dependencies and integration
|
|
Captured source ownership includes binary input. Offer a positive sourceReference and a loadedSources entry only for representable UTF-8 bytes. Keep sourceAvailable, sourceByteLength and sourceSha256 in the custom session metadata for all recordings. Embedded NUL in valid text must survive JSON serialization, including at the 1 MiB raw limit. An unavailable source request cannot substitute a hex string or current disk content.
|
|
T-PLAN-DAP-020 and T-REPLAY-RECORDING-019 provide the existing index and public interface. No raw journal parser or duplicated timeline. Root will implement and test in both build systems, including staged VBS. A second owner may write process tests after the contract is frozen.
|
|
|
|
## 9. Edge cases security and performance
|
|
No public network listener, arbitrary executable, debuggee argument forwarding or client-chosen source reads. Validate request types and integer variants. Cap malformed framing and selected journal using existing limits, preserve 1 MiB captured source through JSON expansion. Treat truncated/failed files, missing HELLO, terminal prefixes and expired handles honestly. At most 4096 events and 256 per custom page. Never expose current timeline state in a historical cursor. Limit handle allocation and output, keep bounded work without caching full stacks at every event. Handle back-to-back controls and EOF during configuration.
|
|
|
|
## 10. Acceptance criteria
|
|
1. Check initialize/launch/configuration order and deferred-request cleanup against generic DAP clients. 2. Trace real events 5/6,7,8,9/10,11 and unpaired 20,22; preserve ack stop/action and provisional result. 3. Show that stale refs/pages, a replaced journal and a mismatching sourceReference cannot return another source or control a later generation. 4. Identify any reachable false capability, fake position, incorrect value or unbounded path. 5. Name the bounded correction and distinguishing acceptance check if necessary.
|
|
|
|
## 11. Verification commands and evidence
|
|
From the shared root use build/bootstrap/tests/vls_trace_tests --list --no-color. Run build/bootstrap/vls_gcc_probe replay build/plan-dap-020/capture-16mqf07g/source17-stepped.vls 6 and 8. Compare source17-every-return.vls and source41-cancelled.vls at real event ordinals. For missing framing details inspect src/Protocol/Framing.cpp. Use source and official media; no external upload of repo contents.
|
|
|
|
## 12. Constraints and stop conditions
|
|
Read-only scope. Report missing evidence or an incompatibility immediately. An unavailable upstream service only limits that research leg. No release or merging decision. No approvals or questions to the user. Return to the root.
|
|
|
|
## 13. Authorization and decisions
|
|
Full roadmap implementation D-022, native priority D-025, authorized GPT-6.2 Astra at Max D-027/029. The user selected the generic runtime for the named review assignment. D-030 defers distribution of compiler changes.
|
|
|
|
## 14. Return format
|
|
T-PREFLIGHT-DAP-020 READY or CHANGES_REQUIRED. Include findings, trigger, source/evidence, exact suggested amendment, commands and unrun checks. Send a ready independent slice early. Do not spawn children.
|