Files
Language-Server/docs/agent-workflow/tasks/T-MODULE-CORPUS-011.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

6.2 KiB

Connect the real stock GCC module corpus to the C++ module planner

Task ID: T-MODULE-CORPUS-011 Role: sol_implementer Status: READY

1. Context and baseline

Shared branch feat/implement-roadmap, ca04975 plus working tree. Roadmap 11 and T-PREFLIGHT-MODULE-011 cleared a pure ModuleGraph API. Its owner now released the public header for consumers. The existing tests/corpus/modules/verify.py compiles three named module generations with stock GCC16.2, checks 33 real P1689 observations, header-unit CMI shadowing and a failed scan that still emitted a rule. Until this task it validates output in Python only.

2. Objective and deliverables

Make an explicit opt-in bridge between the actual GCC scanner invocations and the exact same C++ planner used by the server. The Python reference should exercise the bridge in its existing isolated fixture sandboxes. Include distinct ready DAGs for unbiased/biased generations and a true failed scan with retained GCC output.

3. Scope and non-goals

Test-only integration. These closed, deliberately authored fixture inputs can be attested by the harness. No compiler invocation in product, metadata provider changes, editing ModuleGraph, test framework generalization or shipping this test helper.

4. Files to inspect

Read tests/corpus/modules/verify.py and its source fixtures, include/vls/modules/ModuleGraph.hpp, src/modules/ModuleGraph.cpp, include/Void/LanguageServer/Build/Model.hpp, src/Build/Model.cpp, tests/providers/ModelTests.cpp, docs/agent-workflow/tasks/T-MODULE-GRAPH-011.md. Check exact field types and public behavior. Do not read unlisted repository contents for corpus data.

5. Write ownership and coordination

Write scope: tests/modules/GccScanFixture.cpp; tests/corpus/modules/verify.py You alone own these two files. ModuleGraph.hpp/.cpp and ModuleGraphTests.cpp belong to the model implementer; manifests, other tests, docs, private reference-compiler paths and Git belong to the parent. Preserve existing tests/CLI and current tree. No nested agents or user communication.

6. Implementation or investigation approach

Use a small purpose-specific C++ fixture that decodes bounded real raw P1689 with decode_scan and chooses a real BuildGeneration built from the admitted ContextKeys and compiler invocations; populate census, evidence and private destinations from the fixture's actual command/source + transitive inputs/lookup identities. Existing Python harness owns exact compiler path, prepared fixture tree, private cwd and validates depfiles. Pass checked lengths/data (JSON via stdin or a private file) to helper without extra shell steps. Hash actual fixture inputs, compiler identity and appropriate options for command/compatibility, keep compatible legal per-TU -D differences; capture exact scan exit/status/output/cwd. Capture only explicitly known inputs and distinguish CMI warming; no exposing general project discovery. Root will inspect and rerun the real compiler checks.

7. Interfaces and data contracts

NEW optional --planner PATH on verify.py (existing --cxx and ordinary no-planner command unchanged); NEW fixture executable target vls_module_scan_fixture, single source tests/modules/GccScanFixture.cpp. Communicate argv early. Keep nonzero errors distinct from expected typed blockers. Ready DAG order includes importer last; inspect internal partition/unknown import-only kinds and topological reverse edges when possible. Accept context keys and original spellings, retain actual scan revision/census. Use fixture-specific physical claims only when supported by this run. If a header-stage provenance claim is missing, test an explicit pending outcome.

8. Dependencies and integration

Frozen ModuleGraph header exists, ModuleGraph.cpp passed GCC16 syntax. Root owns CMake and VBS registration of the helper, can start building after your path exists. Independent unit tests cover deep/failure/CMI provenance combinations. This task adds the true cross-component scan witness.

9. Edge cases security and performance

Limit test input and subprocess output, use 30s deadline like existing corpus, keep temporary cache isolated. Do not compile arbitrary rows/scan commands from a database. Compute expected outcomes from the fixture design independently of the produced graph order. Different private invocations can use the same label, values reflect only observed GCC 16.2. Avoid accepting missing stderr/rule as success.

10. Acceptance criteria

Both stock --cxx runs with/without the bridge succeed. In the real biased context internal :detail precedes :api, primary, importer. In the unbiased context :detail is outside the importer closure. Source edit and legal reader -D variations retain correct domain-specific result. Positive rule on exit1 cannot authorize planning. Preserve all 33 scan checks, 17/41/48 outcomes and old generation 17 and header11/29. A malformed/wrong primary-output fixture fed to the real decoder returns nonready. Add an additional true header-CMI witness only when current captured provenance is provable.

11. Verification commands and evidence

Initial dev cpp-gcc -c g++ -std=c++26 -freflection -Iinclude -Ibuild/voidlibrary/current/include -fsyntax-only tests/modules/GccScanFixture.cpp. Use python3 -B tests/corpus/modules/verify.py --help and dev cpp-gcc -c python3 -B tests/corpus/modules/verify.py --cxx g++ --planner /absolute/helper after linking; root builds both systems and reruns. Use build/module-corpus-011 for isolated intermediate outputs only.

12. Constraints and stop conditions

Return early ready-to-build source notice. Do not select production backend, change flags in the reference script except what is needed to capture evidence, or invent global project/source authority. If a missing library interface prevents integration, send a minimal counterexample to parent, continue independent real controls.

13. Authorization and decisions

User authorized full roadmap in separate branch; D-025 native VBS, D-027 GPT-6.2 family Max. Regular stock GCC16 tests and the independent approved module planner contract are in scope. No staging/commit/push/shared-build mutations.

14. Return format

T-MODULE-CORPUS-011 DONE/PARTIAL with syntax/link/test exits, real compiler identity, counts, fixture contract, exact planned order and failure witnesses, residual limitations.