67 lines
4.7 KiB
Markdown
67 lines
4.7 KiB
Markdown
# 02 — Native C++ configuration frontend
|
|
|
|
Implementation status: IMPLEMENTED & VERIFIED (2026-11-26). See
|
|
[STATE](../agent-workflow/STATE.md) and [VERIFICATION](../agent-workflow/VERIFICATION.md)
|
|
for implemented files and observed checks.
|
|
|
|
## Requirements and ownership
|
|
|
|
- Requirements: R-002, R-003, R-004, R-014.
|
|
- Delivery phase: Core native engine.
|
|
- Intended configured role: astra_implementer at XHigh; fresh astra_reviewer acceptance.
|
|
- Dependencies: 01; toolchain identity from 04; configuration capture/state primitives from 05/07; seed action execution from 06.
|
|
- Proposed exclusive implementation scope: src/config/, include/vbs/config/, tests/config/; root owns public SDK/protocol changes and shared build registration.
|
|
|
|
Before dispatch, reconcile these paths with the real HEAD, write a full task spec,
|
|
lint it, and transfer shared-file ownership explicitly. Paths that do not yet exist
|
|
are NEW. Source-disjoint work still coordinates shared state, ports and build directories.
|
|
|
|
## Design and interfaces
|
|
|
|
- Construct the seed compilation graph without running project code: root build.cpp, optional build.profiles.cpp, default SDK profile implementation when absent, filesystem-discovered build-support/**/*.cpp and explicit repeated --build-source paths. Header depfiles and helper membership are inputs.
|
|
- Compile against a fixed SDK with the host toolchain. Newly declared project packages cannot supply headers for this executable. Package-based configuration extensions require a separately approved future bootstrap mechanism.
|
|
- Generate an SDK driver with separate profile-discovery and graph-evaluation requests. Resolve profile inheritance and installed target toolchains in the parent before evaluating build(Project&) once for each effective context.
|
|
- Provide target OS, architecture, compiler and effective options as runtime SDK facts. Host preprocessor macros never stand in for target selection. Separate seed-compilation identity from target-context evaluation identity.
|
|
- Use a dedicated bounded result channel/file with protocol version, request identity, context and complete graph. Logs cannot corrupt results. Validate before installing a generation.
|
|
- Reuse a valid compiled description but reevaluate each reconciliation initially. Track SDK-mediated reads and namespace queries; arbitrary C++ remains trusted and complete hidden-I/O tracking is not promised.
|
|
|
|
## Implementation sequence
|
|
|
|
1. Version the seed request/result envelopes and freeze SDK runtime context types.
|
|
2. Implement filesystem helper selection and a CMake-independent seed recipe using the action engine.
|
|
3. Implement profile discovery, target capability resolution and per-context evaluation.
|
|
4. Validate protocol/graph responses, report source locations/origins, and integrate with build and metadata-only modes.
|
|
|
|
## Failure behavior and boundaries
|
|
|
|
- Compilation failure, crash, malformed response, wrong protocol/request/context, timeout or invalid graph fails current configuration.
|
|
- A prior graph may remain for diagnostics/editor stale status, never masquerade as current success.
|
|
- Snapshot captures work from archives without .git; include helper manifest in exported source packages.
|
|
- Metadata mode may execute trusted local C++ but schedules no project/package actions.
|
|
|
|
## Acceptance scenarios
|
|
|
|
1. Add/delete a helper cpp or included hpp; description recompiles; non-Git exported archive yields equivalent graph.
|
|
2. One host executable emits distinct GCC/Clang and cross-target configurations.
|
|
3. Build.cpp attempting to depend on unresolved package headers gets a clear bootstrap diagnostic.
|
|
4. Crashing/noisy/truncated/mismatched configuration result cannot replace a valid generation.
|
|
5. Target-context or SDK/toolchain change never reuses the wrong evaluated graph.
|
|
|
|
## Verification and integration gate
|
|
|
|
NEW future fixtures under tests/config/ run through the project's test target. Exercise native configuration via vbs build and vbs compdb watch only after those commands exist. Record seed recompilation and graph-generation counts.
|
|
|
|
Acceptance requires observed results for these scenarios, the affected regression
|
|
suite, reviewed cross-component contracts, and a fresh independent review. Record
|
|
unrun checks and environment limitations; tests passing alone do not waive an invariant.
|
|
No merge, push or deployment is authorized by a review verdict.
|
|
|
|
## VoidLibrary reuse and upstream candidates
|
|
|
|
Void process/serialization/Result facilities through verified adapters. Potential upstream candidate: stable bounded protocol and configuration-observation helpers.
|
|
|
|
Shared invariants and input/publication policies are defined in
|
|
[ARCHITECTURE](ARCHITECTURE.md); requirement authority is
|
|
[REQUIREMENTS](REQUIREMENTS.md). Return implementation evidence to
|
|
[VERIFICATION](../agent-workflow/VERIFICATION.md).
|