67 lines
4.6 KiB
Markdown
67 lines
4.6 KiB
Markdown
# 03 — Targets, usage requirements and action graph
|
|
|
|
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-018, R-019.
|
|
- Delivery phase: Core native engine.
|
|
- Intended configured role: sol_implementer at XHigh; fresh astra_reviewer acceptance.
|
|
- Dependencies: 01/02 description model; interface contract with 04 toolchains and 13 imported targets.
|
|
- Proposed exclusive implementation scope: src/graph/, include/vbs/graph/, tests/graph/; shared SDK and action schema changes belong to root.
|
|
|
|
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
|
|
|
|
- Explicit target kinds cover executable, static/shared/interface/object libraries, custom producers and test registrations. Conventional source sets are selectors over src/source and include, with overrides; do not infer target type from a main function.
|
|
- Expand source selectors deterministically and retain membership as an input. Explicit missing files fail; a new matching file joins the target. Exclude configuration sources and owned output roots from automatic product discovery.
|
|
- Model compile usage visibility separately from link requirements. Static private implementation libraries can still be required at the final link; preserve ordered archives, flags and groups rather than sorting or globally deduplicating them.
|
|
- Lower target descriptions to typed compile/archive/link/generator actions and artifacts with one producer. Explicit generated prerequisites establish first-build ordering; an old depfile is not a substitute.
|
|
- Reject action cycles and output collisions, including relevant canonical path aliases and source/output overlap. Model valid static link groups separately from execution dependency cycles.
|
|
- Freeze an immutable graph generation per resolved profile. Selected target closure controls execution, while configured enabled targets remain available for editor projection.
|
|
|
|
## Implementation sequence
|
|
|
|
1. Implement typed records and origin-rich validation for names, references and source selection.
|
|
2. Resolve public/private/interface compile and link requirements with deterministic traversal.
|
|
3. Lower generators and normal C/C++ products to actions, then validate producer ownership and action DAG.
|
|
4. Add selected-target closure, stable graph identities and explain/diagnostic records.
|
|
|
|
## Failure behavior and boundaries
|
|
|
|
- Conflicting requirements identify both origins; do not silently overwrite incompatible toolchain/profile facts.
|
|
- Missing generated producer or a discovered unordered generated input triggers replan or an error, not retrospective success.
|
|
- Removing an object must regenerate the archive without stale members.
|
|
- Unsupported arbitrary shell behavior is an explicit custom action, not hidden parsing of command strings.
|
|
|
|
## Acceptance scenarios
|
|
|
|
1. Public/private/interface exposure, transitive static link requirements and archive ordering.
|
|
2. New/removed/renamed selected sources, missing explicit sources, custom layouts and duplicate aliases.
|
|
3. First-build generated headers; cycles, producer collisions and source/output overlap.
|
|
4. Selected app target builds only required closure; database still covers other configured targets.
|
|
5. Delete a source defining a symbol and verify it disappears from the static archive.
|
|
|
|
## Verification and integration gate
|
|
|
|
NEW future graph unit fixtures compare semantic action records and diagnostics, not incidental IDs. Integration fixtures compile/link executable outputs through both supported target drivers once 06 is available.
|
|
|
|
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
|
|
|
|
Evaluate Void graph/container primitives against required invariants; graph algorithms can reuse verified generic components without coupling the public SDK to their storage.
|
|
|
|
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).
|