After Step 1

This commit is contained in:
GAJ3T 2026-10-28 11:08:30 -04:00
parent 6bbc3959c3
commit 01287d2868
71 changed files with 4102 additions and 98 deletions

21
.editorconfig Normal file
View File

@ -0,0 +1,21 @@
root = true
[*]
charset = utf-8
end_of_line = crlf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
[*.{json,xml,csproj,props,slnx}]
indent_size = 2
[*.md]
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = false
[*.cs]
csharp_style_namespace_declarations = file_scoped:warning
dotnet_sort_system_directives_first = true

7
.gitignore vendored
View File

@ -412,3 +412,10 @@ FodyWeavers.xsd
# JetBrains Rider # JetBrains Rider
*.sln.iml *.sln.iml
# Local environment secrets (keep shareable example files visible)
.env
.env.*
!.env.example
# Private captures, firmware and model assets belong here, never in source fixtures
/src/local-data/

8
Directory.Build.props Normal file
View File

@ -0,0 +1,8 @@
<Project>
<PropertyGroup>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Deterministic>true</Deterministic>
</PropertyGroup>
</Project>

15
Directory.Packages.props Normal file
View File

@ -0,0 +1,15 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.14" />
<PackageVersion Include="Microsoft.Extensions.Logging.Debug" Version="10.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="10.0.13" />
<PackageVersion Include="Microsoft.Maui.Controls" Version="10.0.110" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="10.0.110" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.11.0" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="4.0.1" />
</ItemGroup>
</Project>

7
NuGet.Config Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>

154
README.md
View File

@ -1,3 +1,151 @@
# AutoForge # AutoForge
AI-assisted automotive diagnostics and programming platform. Read and back up vehicle data or build AI-researched vehicle profiles. Simulate control modules and driving scenarios, replay telemetry, and test calibration changes before real-world programming. Diagnose faults, read/clear trouble codes, and program supported vehicle modules. ## Product vision
The following describes the product vision, not implemented capabilities:
AI-assisted automotive diagnostics and programming platform. Read and back up
vehicle data or build AI-researched vehicle profiles. Simulate control modules
and driving scenarios, replay telemetry, and test calibration changes before
real-world programming. Diagnose faults, read/clear trouble codes, and program
supported vehicle modules.
## Implementation status
### IMPLEMENTED
- Step-01 repository and headless Core/Application foundation, accepted
2026-10-28; its original report remains historical evidence.
- Step-01A single Windows-first .NET MAUI Blazor Hybrid Client, UI and generic
Components RCLs, plus feature-oriented execution-target selection UI.
- Actual home, metadata-selection and not-found routes in the UI RCL; shared
accessible, text-safe status notices in Components.
- Immutable Simulation, RecordedReplay and PhysicalHardware target descriptors,
explicit provider/kind validation, case-insensitive exact metadata resolution,
no fallback, and DI composition in the in-process application.
- Selection and page messaging clearly state that metadata does not connect to a
vehicle or authorize any operation.
Step-01A implementation, builds, tests and a native Windows smoke run are complete.
Manual orchestrator review and acceptance are pending; no later milestone has
started. Step-02 remains held and is not authorized by this report.
### IN PROGRESS
Manual Step-01A acceptance by the orchestrator.
### PLANNED
Vehicle/module profiles, deterministic AI-independent simulation, diagnostics,
telemetry and replay, calibration and backups, and replaceable local AI with
validated runbooks require later approved assignments. Hardware integration is a
future, initially read-only boundary with separate authorization/evidence gates
for any programming. No capability is implemented merely because it appears in
the product vision or roadmap.
## Architecture
One Windows-first **AutoForge.Client** .NET 10 MAUI Blazor Hybrid executable hosts
the entire application UI via `BlazorWebView`. **AutoForge.UI** owns routing,
navigation, layouts, pages and presentation. **AutoForge.Components** owns
vehicle-independent reusable UI. Application features run in-process in a
modular monolith; the Client is the composition root. There is no backend,
browser-hosted WASM shell, Blazor Server host or second application executable.
The initial UI features are the foundation home page and explicit
execution-target metadata selection. Selection uses the existing real
Application resolver; the empty Client registration correctly shows
`ProviderNotRegistered`. No fake connected provider is installed to make the UI
look operational.
```mermaid
flowchart TD
Client[MAUI Blazor Hybrid Client] --> UI[UI RCL: routes and feature screens]
UI --> Components[Reusable Components RCL]
UI --> App[Application feature slices]
Client --> App
App --> Core[Platform-neutral Core contracts]
UnitTests[Headless unit tests] --> Components
UnitTests --> Core
IntegrationTests[Headless rendered integration tests] --> UI
IntegrationTests --> App
IntegrationTests --> Core
```
`src/AutoForge.Application/Features/ExecutionTargets/SelectExecutionTarget`
owns the explicit selection feature while its public `AutoForge.Application.ExecutionTargets`
namespace remains stable. New application behaviors should form cohesive,
independently testable feature slices. Reusable engines and domain capabilities
stay independent of the UI; add no mediator, generic repository layer or empty
future-feature projects without a concrete need.
## Repository layout
```text
AutoForge/
docs/ Technical docs and architecture decisions
prompts/ Manual assignments, state and worker evidence
src/
AutoForge.slnx
AutoForge.Client/ The sole app executable; Windows MAUI Hybrid
AutoForge.UI/ Complete routed application UI RCL
AutoForge.Components/ Generic, reusable status/notification component
AutoForge.Core/ Platform-neutral target-kind descriptors
AutoForge.Application/ Inward-dependent target-selection feature
tests/
AutoForge.UnitTests/
AutoForge.IntegrationTests/
```
## Development and prerequisites
Prerequisites for this Windows-first Client build:
- .NET SDK **10.0.402**, or a later stable patch in the same **10.0.4xx** feature
band, as pinned in [global.json](global.json).
- Installed `maui-windows` workload (10.0.110 workload manifest) and Windows SDK
target **10.0.26100.0**.
- Windows x64 runtime target and Microsoft Edge WebView2 Runtime. Native smoke
verification used WebView2 **155.0.4283.62**.
- nuget.org access for package restore.
No automotive driver, vehicle, model, backend or cloud account is required.
Other Windows, macOS, Android or iOS targets are not configured or verified.
From the repository root in PowerShell, restore and build the actual native
framework/runtime target:
```powershell
dotnet restore .\src\AutoForge.Client\AutoForge.Client.csproj --runtime win-x64
dotnet restore .\src\AutoForge.slnx
dotnet build .\src\AutoForge.Client\AutoForge.Client.csproj --configuration Release --no-restore --framework net10.0-windows10.0.26100.0
dotnet build .\src\AutoForge.slnx --configuration Release --no-restore
dotnet test .\src\tests\AutoForge.UnitTests\AutoForge.UnitTests.csproj --configuration Release --no-build
dotnet test .\src\tests\AutoForge.IntegrationTests\AutoForge.IntegrationTests.csproj --configuration Release --no-build
```
Start the application on a Windows desktop:
```powershell
dotnet run --project .\src\AutoForge.Client\AutoForge.Client.csproj --framework net10.0-windows10.0.26100.0
```
There is no backend or browser/server startup command. Headless UI/application
integration tests run independently of the native Client; they render the real
RCL components/routes and compose the actual application registration.
## Documentation and handoff
- [Documentation index](docs/README.md)
- [Current project graph and UI architecture](docs/architecture.md)
- [Original foundation ADR and its superseded decision](docs/adr-0001-headless-foundation.md)
- [Single-shell and feature-slice ADR](docs/adr-0002-single-shell-vsa.md)
- [Build, test and native smoke guide](docs/build-and-test.md)
- [Step-01 historical report](prompts/Step-01-Report.md)
- [Step-01A assignment](prompts/Step-01A.md) and
[Step-01A worker report](prompts/Step-01A-Report.md)
- [Orchestrator-owned roadmap](prompts/ROADMAP.md) and
[orchestration state](prompts/STATE.md)
Handoffs are manual. Worker completion does not mean orchestrator acceptance or
authorize the held Step-02.

21
docs/README.md Normal file
View File

@ -0,0 +1,21 @@
# AutoForge documentation
The implemented scope is the accepted Step-01 foundation plus the Step-01A
Windows-first MAUI Blazor Hybrid shell, two RCLs and metadata-selection UI.
Vehicle diagnostics, simulation and operation capabilities remain planned.
- [Architecture](architecture.md): actual seven-project graph, Client/UI/RCL
ownership, feature-slice organization and explicit target-selection contract.
- [ADR-0001: Headless .NET 10 foundation](adr-0001-headless-foundation.md):
historical foundation decisions, with its dual-shell/deferred-host decision
explicitly superseded.
- [ADR-0002: Single native shell and feature slices](adr-0002-single-shell-vsa.md):
current one-Client/two-RCL/modular-monolith architecture.
- [Build and test](build-and-test.md): SDK/MAUI/Windows/WebView2 prerequisites,
exact commands, rendered/native verification, evidence and limitations.
See the [root README](../README.md) for product vision and implementation status,
the [roadmap](../prompts/ROADMAP.md) for future milestones, the
[Step-01 historical report](../prompts/Step-01-Report.md), and the
[Step-01A worker report](../prompts/Step-01A-Report.md) for execution evidence.
Manual acceptance remains the orchestrator's responsibility.

View File

@ -0,0 +1,55 @@
# ADR-0001: Headless .NET 10 foundation and explicit targets
- Date: 2026-10-28
- Status: foundation decisions retained; host-timing decision superseded by [ADR-0002](adr-0002-single-shell-vsa.md)
- Scope: repository and application foundation only
## Context
This ADR records the original 2026-10-28 Step-01 foundation decision, before the
owner's later architectural realignment. At that time the repository contained
only its product vision and ignore rules, and the planned hosts were standalone
Blazor WebAssembly plus Windows-first MAUI Blazor Hybrid. The dual-host and
deferred-host decision is historical and is explicitly superseded by ADR-0002;
the platform-neutral foundation, explicit-target and honest-error decisions
remain in force.
## Decision
1. Use .NET 10/C# with a single solution under `src`, Core and Application
libraries, and unit/integration test projects under `src/tests`. Keep technical
documentation in `docs` and manual handoffs in `prompts`.
2. Keep Core platform-neutral and dependency-free. Application depends inward on
Core, with only the DI abstractions needed for its composition extension.
The concrete DI container belongs only to integration tests in this step.
3. Implement a genuine metadata-selection use case first. Each request supplies
its provider identifier and defined target kind. Never infer a kind, default
a provider or fall back between simulation, replay and physical hardware.
Snapshot registrations, reject ambiguity, and return explicit failures.
4. Do not equate metadata with connection, capability or authorization. Add no
transport, driver, command sender, write operation or real provider.
5. **Superseded by ADR-0002:** stage both standalone WASM and Windows-first MAUI
Hybrid until Step-05. The owner instead requires one initial Windows-first
MAUI Blazor Hybrid Client and two purposeful UI/Components RCLs now.
6. Use the installed .NET 10.0.402 SDK with stable, same-feature-band patch
roll-forward only, centralized direct package pins and one VSTest/xUnit stack.
Run real tests, without hardware/cloud dependencies.
## Consequences
- At the time of this decision there was no interactive application startup
command; Step-01A subsequently adds the actual native Client.
- The original four purposeful projects are retained and extended by Step-01A
with Client/UI/Components.
- Synthetic metadata tests prove selection semantics and actual DI composition,
not simulation, replay, diagnostics or physical device availability.
- Feature-organized Application and UI slices can consume the resolver without
owning domain truth. An isolated simulation oracle must not leak into UI paths.
- Initial future hardware integration is read-only. Physical programming requires
separate authorization/evidence; no selection or simulation approval grants it.
- Test tooling uses the SDK's xUnit v2 template family. v2 remains maintained for
critical fixes, while new framework features are developed in v3. A future
framework migration should be deliberate, not mix VSTest and MTP accidentally.
See the [current architecture](architecture.md), [ADR-0002](adr-0002-single-shell-vsa.md)
and [build/test policy](build-and-test.md) for current composition and verification.

View File

@ -0,0 +1,68 @@
# ADR-0002: One native shell, two RCLs, feature-oriented application
- Date: 2026-10-28
- Status: implemented for Step-01A; manual orchestrator acceptance pending
- Supersedes: ADR-0001's dual-shell and deferred-host decision only
- Scope: initial application composition and organization
## Context
The accepted Step-01 foundation provides real, headless Core/Application
target-selection behavior and regression tests, but no host or UI. The owner
subsequently realigned the architecture before the held Step-02: add a usable
Windows-first native application now, keep work in-process and use vertical
feature slices without unnecessary hosting/infrastructure layers. Preserve the
accepted target-selection feature and every original regression behavior.
## Decision
1. The sole initial application executable is **AutoForge.Client**, a .NET 10
MAUI Blazor Hybrid app initially targeting Windows x64.
2. **AutoForge.UI**, a `net10.0` RCL, owns the complete application routes, pages,
navigation, layout and feature presentation. **AutoForge.Components**, a
separate `net10.0` RCL, owns generic reusable controls.
3. Use exactly the primary production dependency path
`Client -> UI -> Components`. UI calls application contracts; Client composes
the real existing Application feature in-process. Dependencies on Application
needed for composition/presentation are direct; neither UI nor Client is
substituted by a web/server host.
4. Preserve Core as platform-neutral and organize Application behavior by cohesive,
independently testable feature slices. The existing target selection lives at
`Features/ExecutionTargets/SelectExecutionTarget` without changing its public
namespace or wrapping it in mediator/handler boilerplate.
5. Headless unit/integration tests compile and render Components/UI/Application
independently of MAUI. The native Client references those same real RCLs and
application registration; tests do not mock the feature/component under test.
6. Initial routes are `/` (foundation), `/execution-targets` (explicit metadata
selection), and an explicit not-found presentation. Selection requires a
provider identifier and defined kind, resolves only registered metadata, and
never means connection, capability or operation authorization.
7. Keep the application startable without backend, database, vehicle, native
driver, model, cloud account or service. The Client registers an empty real
provider list; the UI communicates `ProviderNotRegistered` explicitly rather
than fabricating a connected provider.
8. Add future features only when assigned and owned: domain engines remain
independent, slices coordinate their relevant use cases, and additional
processes/hosts require a concrete requirement and approval.
## Consequences
- The four original Core/Application/test projects and all 54 accepted tests are
retained. The solution now contains seven projects including the one native
executable and two purposeful RCLs.
- A MAUI Windows workload, Windows SDK and WebView2 runtime are real native build/
run prerequisites. RCL compilation and headless tests do not substitute for
native Client build/smoke evidence.
- The standalone Blazor WebAssembly plus MAUI Hybrid dual-shell plan and Step-05
host deferral recorded in ADR-0001 are superseded; ADR-0001's platform-neutral
foundation, dependency direction, explicit target and no-fallback decisions
remain valid.
- No empty automotive feature directory, simulation/diagnostic/AI service, server
process, database, cloud service, generic manager/repository layer or mediator
is introduced.
- Future simulation remains deterministic and AI-independent with isolated
verification. Future initial hardware integration is read-only; neither
selection nor simulated approval grants physical write authority.
See the [implemented architecture](architecture.md) and
[build/test policy](build-and-test.md) for source paths and concrete evidence.

108
docs/architecture.md Normal file
View File

@ -0,0 +1,108 @@
# Implemented architecture
## Application shape
AutoForge is an in-process modular monolith with exactly one application
executable: the Windows-first MAUI Blazor Hybrid Client. The application uses
Razor component libraries for the complete routed UI and generic shared controls.
There is no web/server host, WASM host or backend process.
```mermaid
flowchart TD
Client[AutoForge.Client: MAUI startup, BlazorWebView and DI] --> UI[AutoForge.UI: routes and feature presentation]
UI --> Components[AutoForge.Components: reusable generic UI]
UI --> Application[AutoForge.Application: cohesive feature slices]
Client --> Application
Application --> Core[AutoForge.Core: platform-neutral contracts]
UnitTests[AutoForge.UnitTests] --> Components
UnitTests --> Core
IntegrationTests[AutoForge.IntegrationTests] --> UI
IntegrationTests --> Application
IntegrationTests --> Core
```
## Projects and dependency boundaries
All seven projects are in [AutoForge.slnx](../src/AutoForge.slnx):
| Project | Target and responsibility | Project references |
|---|---|---|
| [Core](../src/AutoForge.Core/AutoForge.Core.csproj) | `net10.0`; platform-neutral explicit target-kind and immutable descriptor invariants | None |
| [Application](../src/AutoForge.Application/AutoForge.Application.csproj) | `net10.0`; in-process application use cases, organized by feature | Core |
| [Components](../src/AutoForge.Components/AutoForge.Components.csproj) | `net10.0` RCL; generic `StatusNotice` with accessible tone and safe text rendering | None |
| [UI](../src/AutoForge.UI/AutoForge.UI.csproj) | `net10.0` RCL; all application routes, navigation, layout and presentation | Application, Components |
| [Client](../src/AutoForge.Client/AutoForge.Client.csproj) | `net10.0-windows10.0.26100.0`; only MAUI Blazor Hybrid application executable | Application, UI |
| [UnitTests](../src/tests/AutoForge.UnitTests/AutoForge.UnitTests.csproj) | `net10.0`; descriptor/resolver and rendered generic component tests | Application, Components, Core |
| [IntegrationTests](../src/tests/AutoForge.IntegrationTests/AutoForge.IntegrationTests.csproj) | `net10.0`; real DI, rendered RCL, application and actual project-graph tests | Application, Components, Core, UI |
Components has no AutoForge project dependency. UI never references Client.
Core and Application never reference UI/Components/Client or tests. There are no
cycles or production-to-test edges. Tests render UI directly and never reference
or launch Client.
The Client contains only MAUI lifecycle/startup, its Windows platform entry
point, the `BlazorWebView`, host HTML/CSS and in-process composition. It registers
an empty target metadata set deliberately, so the real selection use case reports
not-registered until an explicit future composition supplies real metadata.
No fake connected/available provider is added.
## UI ownership and real routes
All Razor routes and layouts are owned by the UI RCL; `Routes` scans the UI
assembly, not the native Client assembly.
| Route | UI owner | Implemented behavior |
|---|---|---|
| `/` | `Features/Foundation/Home.razor` | Describes the current foundation and accurately distinguishes implemented from absent features |
| `/execution-targets` | `Features/ExecutionTargets/SelectExecutionTarget/ExecutionTargetSelectionPage.razor` | Requires explicit provider identifier and target kind, calls the real injected application resolver and displays success/errors |
| Any unmatched route | `Features/Foundation/NotFoundPage.razor` via UI `Routes.razor` | Presents an explicit not-found page and supported navigation |
`Layout/MainLayout.razor` supplies main navigation, shared layout and a permanent
metadata-only limitation statement. The generic
[StatusNotice](../src/AutoForge.Components/StatusNotice.razor) is shared by the
home, target-selection and not-found pages; isolated CSS bundles from both RCLs
are imported through the Client scoped-style bundle.
The target-selection page's feature-local `ExecutionTargetSelectionViewModel`
adapts explicit input to the existing Application resolver. It contains only
presentation state/input validation and expected error display; it does not
reimplement provider resolution. It receives the actual `IExecutionTargetResolver`
through DI. The same `AddAutoForgeTargetSelection` registration used in the
headless integration tests is composed by Client.
## Application feature organization
The accepted target-selection use case is grouped under
`Application/Features/ExecutionTargets/SelectExecutionTarget/`; its original
public namespace and API remain unchanged. Core still owns
`Simulation`, `RecordedReplay`, `PhysicalHardware` and immutable target descriptor
invariants. Application snapshots registrations, rejects duplicate IDs using
ordinal case-insensitive comparison, resolves only exact requested metadata and
returns the registered descriptor. Existing typed failures and no-fallback
behavior remain unchanged.
New use cases should be cohesive and independently testable slices. Each slice
owns its request/coordination and relevant application contract without forcing
unrelated projects to depend on Application. Domain engines/protocols remain
platform-neutral and can be extracted only when a real boundary warrants it.
Do not add mediator boilerplate, generic manager/repository layers or empty
future slices to demonstrate architecture.
## Honest limitations and safety boundaries
Current work implements application-shell/navigation behavior, accessible status
presentation and **metadata selection only**. It does not implement vehicle
profiles, connection/discovery, simulation, diagnostics, telemetry, replay,
backups, calibration, persistence, AI, cloud services, operation execution or
hardware integration. Physical-kind metadata neither connects nor grants a
capability/write approval.
Future simulation remains deterministic and AI-independent with an isolated
verification oracle. Future initial hardware integration is read-only. Physical
programming requires separate operation-specific authorization and evidence.
These are architectural requirements, not current app behavior.
The original [ADR-0001](adr-0001-headless-foundation.md) preserves valid foundation
decisions but marks its dual-shell/deferred-host decision superseded.
[ADR-0002](adr-0002-single-shell-vsa.md) is the current host and feature-slice
decision.

94
docs/build-and-test.md Normal file
View File

@ -0,0 +1,94 @@
# Build and test
## Prerequisites
- Windows x64, .NET SDK 10.0.402 with its approved .NET 10 patch roll-forward.
- Windows 10 SDK 10.0.26100.0 and the MAUI Windows workload (10.0.110).
- Microsoft Edge WebView2 Runtime for launching the native Blazor Hybrid Client.
The Client targets `net10.0-windows10.0.26100.0` and `win-x64`. The Core,
Application, UI, Components and test projects target portable `net10.0`. Headless
tests therefore do not require MAUI or WebView2. The solution uses centralized
package versions; change direct dependencies only through the central package
file and validate the resulting restore.
## Restore and build
From the repository root in PowerShell:
```powershell
dotnet restore .\src\AutoForge.slnx
dotnet build .\src\AutoForge.slnx --configuration Release
```
For an explicit Windows runtime pack restore or native Client build:
```powershell
dotnet restore .\src\AutoForge.Client\AutoForge.Client.csproj --runtime win-x64
dotnet build .\src\AutoForge.Client\AutoForge.Client.csproj --configuration Release --framework net10.0-windows10.0.26100.0 --no-restore
```
Run the app on Windows:
```powershell
dotnet run --project .\src\AutoForge.Client\AutoForge.Client.csproj --configuration Release --framework net10.0-windows10.0.26100.0
```
The app is a native MAUI window containing the actual `AutoForge.UI` routes in a
BlazorWebView. Its initial provider registration is empty by design. Startup and
selection remain useful to exercise the honest `ProviderNotRegistered` result;
they do not require a backend, a database or vehicle hardware.
## Automated verification
Run the focused portable suites:
```powershell
dotnet test .\src\tests\AutoForge.UnitTests\AutoForge.UnitTests.csproj --configuration Release
dotnet test .\src\tests\AutoForge.IntegrationTests\AutoForge.IntegrationTests.csproj --configuration Release
```
Unit tests cover Core/Application behavior and rendered reusable components.
Integration tests cover actual dependency-injection composition, rendered UI
routes with the real Application resolver, and the project-reference graph.
`ProjectGraphTests` reads the project manifests; it guards the production
dependency direction rather than relying on a diagram.
At Step-01A implementation verification, the full Release solution build and the
direct native Client build completed with zero warnings and errors. The portable
suite results were 39 unit tests and 26 integration tests passed (65 total).
All 54 Step-01 tests remain in the expanded suites.
## Native smoke checks
Run the Client on Windows and verify:
1. The native window opens with the AutoForge home route and no unhandled-error
banner.
2. Navigation reaches `/execution-targets` and displays the explicit
`ProviderNotRegistered` empty-provider state.
3. The UI states that selection is metadata-only and does not connect to a
vehicle or authorize operations.
4. Submitting a valid, explicit provider identifier and defined target kind
returns the honest not-registered result; it does not fall back to another
kind or invent a provider.
5. An unmatched path displays the explicit not-found presentation.
6. Components RCL scoped-style assets load in the WebView.
Automated rendered-route tests cover the route/component/Application behavior;
they are not evidence of native WebView startup. Record the native Client build,
window, route interactions and style asset verification separately in the
Step-01A execution report.
## Guardrails and limitations
- Selection is explicit registered **metadata** only. It is not a connection,
detected capability, health result or authorization.
- The Client's empty provider registry is deliberate. Do not add a fabricated
provider to make the screen look populated.
- No HTTP server, browser-only host, database, cloud service, simulation engine,
diagnostic engine or hardware driver is part of this foundation.
- Keep the native Client dependency and platform surface isolated; preserve
portable testability for UI, Components, Application and Core.
- Step-02 remains held for orchestrator acceptance; completing this build guide
does not authorize later roadmap work.

7
global.json Normal file
View File

@ -0,0 +1,7 @@
{
"sdk": {
"version": "10.0.402",
"rollForward": "latestPatch",
"allowPrerelease": false
}
}

View File

@ -3,12 +3,16 @@
## Status and authority ## Status and authority
- Initialized: 2026-10-28. - Initialized: 2026-10-28.
- Current phase: initial orchestration; no application functionality exists yet. - Current phase: corrected single-shell foundation accepted; profile/module work next.
- Active assignment: [Step-01](Step-01.md), ready for manual worker execution. - Active assignment: [Step-02](Step-02.md), regenerated for manual worker execution.
- Last accepted step: none. - Last accepted step: Step-01A, accepted 2026-10-28 after implementation/evidence review.
- Outstanding corrections: none.
- Step-02 status: READY FOR WORKER; explicitly supersedes its unexecuted pre-correction version.
- Current state and handoff: [STATE.md](STATE.md). - Current state and handoff: [STATE.md](STATE.md).
- Authority: the supplied master charter, as superseded by the repository - Authority: the master charter, repository/handoff amendment, and the owner's
structure and agent handoff amendment. The amendment's naming and layout win. 2026-10-28 architectural realignment. The latest decision cancels the dual-shell
requirement and adopts one MAUI Blazor Hybrid executable plus vertical slices.
The amendment's layout, naming, protected files and manual workflow still apply.
- This document describes the intended architecture and future capabilities. - This document describes the intended architecture and future capabilities.
Planned projects, interfaces, milestones, and demonstrations are not claims of Planned projects, interfaces, milestones, and demonstrations are not claims of
implemented or verified functionality. implemented or verified functionality.
@ -68,38 +72,74 @@ prompt/report naming convention.
## Architecture baseline ## Architecture baseline
### Initial physical projects ### Existing accepted foundation, preserved
Step-01 creates only four projects: Step-01 established four projects, all preserved by Step-01A. Their current references:
| Project | Responsibility | Allowed project references | | Project | Responsibility | Allowed project references |
|---|---|---| |---|---|---|
| `src/AutoForge.Core` | Platform-neutral foundational value types, invariants, and shared contracts | None | | `src/AutoForge.Core` | Platform-neutral foundational value types, invariants, and shared contracts | None |
| `src/AutoForge.Application` | Use-case coordination and application-facing services; initially explicit execution-target selection | Core | | `src/AutoForge.Application` | Use-case coordination and application-facing services; initially explicit execution-target selection | Core |
| `src/tests/AutoForge.UnitTests` | Focused domain and application behavior tests | Core, Application | | `src/tests/AutoForge.UnitTests` | Domain/application behavior and rendered generic component tests | Core, Application, Components |
| `src/tests/AutoForge.IntegrationTests` | Real application composition and cross-project behavior, without hardware/cloud | Core, Application | | `src/tests/AutoForge.IntegrationTests` | Real application/RCL composition and project-graph tests, without hardware/cloud | Core, Application, Components, UI |
This is deliberately a headless foundation. It must include real behavior and The original foundation was headless. Accepted Step-01A added Client/UI/Components
tests, not empty assemblies or always-passing test placeholders. Application without discarding these projects or their 54 cases. The solution now has seven
shells arrive in Step-05 when working services can support them. This is staging, projects and 65 worker-verified tests (39 unit, 26 integration). The old deferred
not a substitution for either required shell. dual-host plan remains canceled.
### Corrected application architecture
AutoForge is a **modular monolith** with **Vertical Slice Architecture** for
application use cases. Its sole initial application executable is
`src/AutoForge.Client`, a .NET 10 MAUI Blazor Hybrid application, initially Windows.
Simulation, diagnostics, calibration and AI services can run in-process. No
standalone WebAssembly shell, separate web application, or backend executable is
required. Additional processes/hosts need a concrete requirement and an approved
decision; do not scaffold speculative alternatives.
Accepted Step-01A established:
| Project | Responsibility | Allowed project references |
|---|---|---|
| `src/AutoForge.Client` | Thin native MAUI startup, lifecycle, configuration, BlazorWebView hosting and DI/platform composition | UI, Application and justified platform adapters; no test projects |
| `src/AutoForge.UI` | Complete application routes, pages, navigation, layouts, feature presentation and interaction workflows | Components, Application/contracts and justified domain contracts; never Client |
| `src/AutoForge.Components` | Generic reusable status controls, inputs, gauges/charts/layout building blocks as actually needed | Framework UI dependencies; no UI, Client, hardware or application feature implementation |
Primary UI direction: **Client -> UI -> Components**. The shell contains only
platform/bootstrap code, not routed application pages, business workflows,
diagnostic protocols or simulation algorithms. Application UI lives in the UI RCL;
vehicle-independent reusable widgets live in Components. No circular references.
Application remains necessary and owns the working target-selection slice at
`Features/ExecutionTargets/SelectExecutionTarget`, with its public namespace
preserved. Future slices group operations
under actual feature areas such as Vehicles, Diagnostics, Simulation, Calibration,
Telemetry and AI. Do not create their empty directories now. Slice-local request,
handler/service, validation and result types are added only when useful.
MediatR, generic repositories/managers and uniform boilerplate are not required.
UI feature presentation follows the same feature areas where practical; it calls
application contracts without duplicating business validation. Reusable engines,
protocols, calibration and telemetry capabilities remain independently testable
libraries, extracted only when needed. They must not depend on UI, Client or the
application slice that coordinates them. Do not force all technical libraries to
reference Application.
### Planned boundaries, added only when used ### Planned boundaries, added only when used
| Boundary / likely project | Responsibilities and dependency direction | | Boundary / likely project | Responsibilities and dependency direction |
|---|---| |---|---|
| Core | Vehicle/module identities, capability states, provenance, units, versioned domain schemas; no UI, inference, transport implementation, or storage dependencies | | Core | Vehicle/module identities, capability states, provenance, units, versioned domain schemas; no UI, inference, transport implementation, or storage dependencies |
| Application | Diagnostic use cases, provider selection, calibration/runbook validation, approval, execution coordination, application ports; depends on Core | | Application | Feature/use-case slices coordinating reusable capabilities; existing target selection retained; depends inward on domain and needed capability abstractions |
| Diagnostics | Addressing, protocol/service handling, decoding, transport interfaces and communication trace; depends on Core and only needed Application contracts | | Diagnostics | Addressing, protocol/service handling, decoding, transport interfaces and communication trace; depends on domain/transport abstractions, not UI or coordinating slices |
| Simulation | Virtual clock, coupled dynamics, virtual modules, simulated transport, deterministic faults; depends on shared contracts/Diagnostics, never on an LLM or UI | | Simulation | Virtual clock, coupled dynamics, virtual modules, simulated transport, deterministic faults; depends on shared contracts/Diagnostics, never on an LLM or UI |
| Persistence / telemetry infrastructure | Recording, replay, calibration/version storage, audit and knowledge repositories implementing application ports; introduce a project only when justified | | Persistence / telemetry infrastructure | Recording, replay, calibration/version storage, audit and knowledge repositories implementing application ports; introduce a project only when justified |
| AI / knowledge integration | Provider adapters, research and retrieval, schema-constrained planning; consumes restricted application query/planning ports, never hardware-driver access | | AI / knowledge integration | In-process replaceable inference/research/retrieval capabilities behind restricted planning contracts; no arbitrary hardware-driver access |
| Hardware adapter | Verified OBDX Pro GT/native integration behind shared diagnostic ports; Windows-specific code isolated from browser/shared UI | | Hardware adapter | Verified OBDX Pro GT/native integration behind shared diagnostic ports; Windows-specific integration composed by Client and isolated from reusable UI |
| Shared UI components RCL | Data-driven gauges, charts, controls, layouts; consumes platform-neutral view models/contracts | | AutoForge.Components | Generic data-bound gauges, charts, controls and status/layout components, introduced only as used |
| Shared application screens RCL | Profile, diagnostics, simulation, calibration, replay, knowledge, AI, settings screens; composes components and calls application services | | AutoForge.UI | Application feature pages/routes/navigation/layouts; composes Components and calls application features |
| Standalone Blazor WebAssembly shell | Browser composition, routing and shared RCL hosting; no native driver references | | AutoForge.Client | Sole initial executable: Windows-first MAUI Blazor Hybrid, thin startup/lifecycle/BlazorWebView and in-process DI composition |
| MAUI Blazor Hybrid shell | Windows-first native composition hosting the same RCLs; platform services injected at the host boundary |
| Local .NET hardware service | Browser-to-native bridge when needed; explicit authorization and local exposure controls, not a required cloud backend |
These are logical responsibilities, not an instruction to create all assemblies These are logical responsibilities, not an instruction to create all assemblies
now. Keep related responsibilities together until an actual dependency or now. Keep related responsibilities together until an actual dependency or
@ -109,23 +149,24 @@ Planned dependency flow:
```mermaid ```mermaid
flowchart TD flowchart TD
Browser[Standalone Blazor WebAssembly] --> Screens[Shared screens RCL] Client[AutoForge.Client - MAUI Blazor Hybrid] --> UI[AutoForge.UI - application RCL]
Hybrid[MAUI Blazor Hybrid] --> Screens UI --> Components[AutoForge.Components - reusable RCL]
Screens --> Components[Shared components RCL] Client --> App[Application feature slices]
Screens --> App[Application use cases and ports] UI --> App
AI[Local AI and knowledge adapters] --> App
App --> Core[Core domain and contracts] App --> Core[Core domain and contracts]
Sim[Simulation and virtual modules] --> Ports[Diagnostic and application ports] App --> Capabilities[Reusable simulation / diagnostics / calibration / telemetry / AI capabilities]
Store[Recording and persistence adapters] --> Ports Capabilities --> Core
Native[Native hardware adapter] --> Ports Client --> Native[Platform adapters]
Bridge[Local hardware service] --> App Native --> Ports[Appropriate shared capability ports]
Ports --> Core
App --> Ports App --> Ports
Ports --> Core
``` ```
Ports in the diagram are logical contracts, not an additional required project. Ports in the diagram are logical contracts, not an additional required project.
Composition roots wire implementations. Dependency injection does not grant AI Client is the native composition root; headless tests compose application services
or UI unrestricted programming authority. without Client. Capabilities in this diagram are logical responsibilities, not
instructions to create all assemblies. Dependency injection does not grant AI or
UI unrestricted programming authority.
### Invariants ### Invariants
@ -181,18 +222,22 @@ or UI unrestricted programming authority.
## Milestones and acceptance gates ## Milestones and acceptance gates
All milestones below are unimplemented. Only Step-01 is currently assigned. Step-01 and its owner-directed correction Step-01A are accepted. Step-02 has been
regenerated from the corrected seven-project implementation and is the only
active assignment. Its old unexecuted version is explicitly superseded.
All Step-02 and later product capabilities remain unimplemented.
Dependencies indicate acceptance prerequisites, not permission for automatic Dependencies indicate acceptance prerequisites, not permission for automatic
handoff. Later assignments refine these scopes using actual implementation handoff. Later assignments refine these scopes using actual implementation
evidence; they must not silently discard required capabilities. evidence; they must not silently discard required capabilities.
| Step | Milestone | Depends on | Status | Principal acceptance gate | | Step | Milestone | Depends on | Status | Principal acceptance gate |
|---|---|---|---|---| |---|---|---|---|---|
| 01 | Repository and solution foundation | Repository inspection | READY FOR WORKER | Four-project .NET 10 foundation, explicit target-selection behavior, real unit/integration tests, successful recorded build/test evidence, accurate README and architecture docs | | 01 | Repository and solution foundation | Repository inspection | ACCEPTED 2026-10-28 | Four-project .NET 10 foundation, explicit target-selection behavior, real unit/integration tests, successful recorded build/test evidence, accurate README and architecture docs |
| 02 | Vehicle profiles and module model | 01 accepted | PLANNED | Versioned profile round trips, validation, extensible module inventory, identity/applicability and explicit capability states; clearly synthetic vehicle fixture | | 01A | Single-shell and vertical-slice architectural correction | 01 accepted; owner realignment | ACCEPTED 2026-10-28 | Seven-project Client -> UI -> Components foundation; preserved Core/Application; 65 passing cases and successful solution/native build/startup reported; corrected ADR/docs inspected |
| 02 | Vehicle profiles and module model | 01A accepted; assignment regenerated | READY FOR WORKER | Versioned profile round trips, validation, extensible modules/capabilities/provenance, exact configuration selection, synthetic fixtures and a minimal metadata-only UI feature using application slices |
| 03 | Virtual modules and diagnostic communication | 02 | PLANNED | Application discovers/identifies synthetic modules and reads telemetry/DTCs through a simulated transport; trace, negative responses and deterministic timeout tests | | 03 | Virtual modules and diagnostic communication | 02 | PLANNED | Application discovers/identifies synthetic modules and reads telemetry/DTCs through a simulated transport; trace, negative responses and deterministic timeout tests |
| 04 | Deterministic vehicle dynamics | 03 | PLANNED | Coupled engine/transmission/road-load model, virtual clock and lifecycle controls; identical scenarios/inputs reproduce outputs under a documented numerical contract | | 04 | Deterministic vehicle dynamics | 03 | PLANNED | Coupled engine/transmission/road-load model, virtual clock and lifecycle controls; identical scenarios/inputs reproduce outputs under a documented numerical contract |
| 05 | Both application shells and live dashboard | 04 | PLANNED | Standalone WASM and Windows MAUI Hybrid share two logical RCLs; select a profile, control simulation and display independently collected live telemetry | | 05 | Live dashboard in the established Client/UI/Components architecture | 04; accepted 01A foundation | PLANNED | Feature pages select a profile, control simulation and display independently collected live telemetry through reusable Components; no new application host |
| 06 | Telemetry recording and replay | 05 | PLANNED | Persist raw messages and decoded signals with metadata; playback/seek/speed controls feed the same gauges without silently reconstructing missing data | | 06 | Telemetry recording and replay | 05 | PLANNED | Persist raw messages and decoded signals with metadata; playback/seek/speed controls feed the same gauges without silently reconstructing missing data |
| 07 | Calibration management and simulated programming | 06 | PLANNED | Versioned definitions/diffs, verified baseline and backup, approved simulated write, readback/unrelated-data checks, audit and supported restore; no physical writes | | 07 | Calibration management and simulated programming | 06 | PLANNED | Versioned definitions/diffs, verified baseline and backup, approved simulated write, readback/unrelated-data checks, audit and supported restore; no physical writes |
| 08 | Local AI, knowledge, and validated runbooks | 07 | PLANNED | Replaceable local inference, applicable knowledge retrieval, structured logical runbook, independent validation/approval and simulation-only execution | | 08 | Local AI, knowledge, and validated runbooks | 07 | PLANNED | Replaceable local inference, applicable knowledge retrieval, structured logical runbook, independent validation/approval and simulation-only execution |
@ -211,7 +256,14 @@ evidence; they must not silently discard required capabilities.
### Scope details for Steps 02-10 ### Scope details for Steps 02-10
- **02:** vehicle specifications and configuration/tune selection, arbitrary module - **01A accepted prerequisite:** one thin MAUI Client, two RCLs, feature-organized
target selection, actual headless rendered tests and worker native build/smoke
evidence. All 54 original cases remain in the expanded 65-case suites.
- **02:** the regenerated assignment explicitly supersedes the earlier unexecuted
version. Organize profile load/select/import/export as cohesive application
slices with reusable Core contracts. Add only a thin profile metadata page in
the existing UI, using those same services; no host restructuring or new engine.
Retain vehicle specifications and configuration/tune selection, arbitrary module
identities, supported/unsupported/unknown/inaccessible/restricted capability identities, supported/unsupported/unknown/inaccessible/restricted capability
states, firmware/calibration identity, relationships, provenance, validation, states, firmware/calibration identity, relationships, provenance, validation,
schema versioning, and multiple synthetic variants. Never imply a diagnostic schema versioning, and multiple synthetic variants. Never imply a diagnostic
@ -226,11 +278,12 @@ evidence; they must not silently discard required capabilities.
throttle/load/torque/fuel, transmission/shift scheduling, mass/drivetrain/road throttle/load/torque/fuel, transmission/shift scheduling, mass/drivetrain/road
load, temperatures, and a stationary-to-45-MPH-to-stop scenario with a five-minute load, temperatures, and a stationary-to-45-MPH-to-stop scenario with a five-minute
hold. Report mathematical assumptions and repeatability tolerances. hold. Report mathematical assumptions and repeatability tolerances.
- **05:** reusable data-bound gauges and feature screens, navigation and settings, - **05:** extend the already established UI feature pages with reusable data-bound
profile/module selection, connection state and diagnostics; compile-time feature gauges, settings, profile/module selection, connection state and diagnostics.
composition first, no unsupported arbitrary assembly loading. Missing MAUI Client remains thin; application slices coordinate in-process capabilities.
workloads are blockers, not permission to replace either shell. Native browser Use ordinary packaged RCL/feature composition, not unsupported arbitrary assembly
access eventually uses a verified local .NET service, never browser P/Invoke. loading. Missing MAUI workloads are blockers, not permission to substitute a
WebAssembly/web host. Native adapters do not require a separate backend.
- **06:** versioned recording format, module/source/units/time/quality metadata, - **06:** versioned recording format, module/source/units/time/quality metadata,
raw plus decoded retention, interrupted/corrupt session handling, replay raw plus decoded retention, interrupted/corrupt session handling, replay
play/pause/stop/restart/seek/navigation/speed. Acquisition must not depend on play/pause/stop/restart/seek/navigation/speed. Acquisition must not depend on
@ -264,8 +317,9 @@ Steps 11-20 retain richer gauges/clusters/charts and dashboard editing, comparis
and analysis, more vehicle/module/protocol coverage, independently validated and analysis, more vehicle/module/protocol coverage, independently validated
research, curated datasets, advanced dynamics and transmission modeling, local research, curated datasets, advanced dynamics and transmission modeling, local
model evaluation/specialization, authorized programming, and supported release model evaluation/specialization, authorized programming, and supported release
packaging. New MAUI platforms require platform-specific evidence. Avalonia is an packaging. New MAUI platforms require platform-specific evidence. Additional
optional feasibility investigation, not a promise that Razor embeds unchanged. hosts, including any Avalonia investigation, require a concrete use case and
approval; none are currently required or to be scaffolded speculatively.
Optional MCP does not bypass runbook safety. Firmware emulation is separate from Optional MCP does not bypass runbook safety. Firmware emulation is separate from
the initial behavioral simulator, never an implied capability of synthetic modules. the initial behavioral simulator, never an implied capability of synthetic modules.
@ -320,6 +374,10 @@ not proven real-world economy improvements.
Missing prerequisites or unexecuted tests are BLOCKED/NOT EXECUTED, never PASSED. Missing prerequisites or unexecuted tests are BLOCKED/NOT EXECUTED, never PASSED.
- Every assignment requires appropriate real unit/integration tests, documentation - Every assignment requires appropriate real unit/integration tests, documentation
and README review. No empty "integration" tests or success-shaped placeholders. and README review. No empty "integration" tests or success-shaped placeholders.
- RCL and application feature tests must run independently of MAUI. Native Client
build/startup evidence remains separate; headless tests cannot prove BlazorWebView
integration or satisfy a missing workload. Document exact native prerequisites
and successful/failed/not-executed checks without architectural substitution.
- The orchestrator inspects evidence without claiming independent runtime execution. - The orchestrator inspects evidence without claiming independent runtime execution.
## Decisions, completed work, remaining work, and blockers ## Decisions, completed work, remaining work, and blockers
@ -328,8 +386,8 @@ not proven real-world economy improvements.
- D-001: amendment layout and Step-XX naming supersede the original examples. - D-001: amendment layout and Step-XX naming supersede the original examples.
- D-002: one .NET 10 solution; minimal headless Core/Application foundation first. - D-002: one .NET 10 solution; minimal headless Core/Application foundation first.
- D-003: standalone WASM plus Windows-first MAUI Hybrid, shared components/screens; - D-003 (SUPERSEDED 2026-10-28): the previous dual-shell/deferred-host decision is
no Blazor Server substitution. retained as history only. It is canceled by D-009/D-010 below.
- D-004: common diagnostic/application interfaces across simulation, replay and - D-004: common diagnostic/application interfaces across simulation, replay and
physical providers; explicit execution target, no fallback. physical providers; explicit execution target, no fallback.
- D-005: deterministic simulation and independent verification are prerequisites - D-005: deterministic simulation and independent verification are prerequisites
@ -339,6 +397,18 @@ not proven real-world economy improvements.
- D-007: initial hardware is read-only; bench and vehicle writes have separate - D-007: initial hardware is read-only; bench and vehicle writes have separate
authorization/evidence gates and retain prohibited-operation restrictions. authorization/evidence gates and retain prohibited-operation restrictions.
- D-008: handoffs remain manual; only the worker builds/tests and implements. - D-008: handoffs remain manual; only the worker builds/tests and implements.
- D-009: sole initial executable AutoForge.Client, .NET 10 MAUI Blazor Hybrid,
initially Windows; complete UI in AutoForge.UI RCL and generic widgets in
AutoForge.Components RCL. No required WebAssembly/web/backend executable.
- D-010: modular monolith with application Vertical Slice Architecture; UI ->
application contracts, Client -> composition; engines/protocols remain independent.
Retain existing Application immediately and organize its actual use case by feature.
- D-011: Step-01A corrects the accepted foundation before Step-02. Do not rewrite
the final Step-02 until 01A is implemented, reviewed and accepted; regenerate it
using actual results and explicitly supersede the old unexecuted assignment.
- D-012: with 01A accepted, Step-02 adds a minimal metadata-only profile consumer
to the existing UI alongside headless feature services. This advances one
cohesive profile slice, not the later simulator/dashboard milestone.
The worker records the relevant accepted decisions as technical ADRs when creating The worker records the relevant accepted decisions as technical ADRs when creating
or changing the implementation. Future changes require a reason and roadmap/state or changing the implementation. Future changes require a reason and roadmap/state
@ -348,17 +418,61 @@ history, not repeated redesign without evidence.
- Read both supplied instruction sets and inspected the existing repository. - Read both supplied instruction sets and inspected the existing repository.
- Established the initial planned boundaries, sequence, and first worker assignment. - Established the initial planned boundaries, sequence, and first worker assignment.
- Accepted Step-01 after reviewing the assignment, report, all production/test
source, project/configuration files, root-file diffs and documentation.
- Confirmed immutable target descriptors, explicit/no-fallback resolution, eager
DI validation, snapshot isolation, and the intended four-project dependency graph.
- Reviewed worker evidence: .NET SDK 10.0.402, successful Release build with zero
warnings/errors, 35 unit plus 19 integration tests passed, zero failed/skipped.
Source case counts and existing restore/Release outputs corroborated the report;
the orchestrator did not run application builds or tests.
- Prepared [Step-02](Step-02.md) under the prior architecture; it was not executed.
It was held during correction and is now superseded by the regenerated version.
- At correction planning, inspected the then-four-project solution: there were
no obsolete hosts to delete; the missing UI foundation and obsolete plans/docs
were assigned rather than discarding useful code.
- Adopted the new single-shell/RCL/vertical-slice decisions and prepared
[Step-01A](Step-01A.md).
- Accepted Step-01A after inspecting shell bootstrap, RCL route/component ownership,
feature code, all affected tests, project/package graph, documentation and ADRs.
Worker evidence records successful seven-project Release/native builds with
zero warnings/errors, 39 unit + 26 integration cases passed, zero failed/skipped,
and actual Windows home/selection/not-found and RCL asset smoke observations.
- Static source counts, seven-project acyclic references, restored assets and
native/portable Release outputs corroborate the report. The orchestrator did
not execute application builds/tests or native startup.
- Regenerated Step-02 against that accepted implementation, with explicit
supersession, feature/RCL boundaries, regressions and worker verification duties.
### Remaining ### Remaining
- All application implementation, build/test verification, and technical - Worker execution of Step-02, then manual acceptance review and any Step-02A
documentation work, beginning with Step-01. corrections before Step-03.
- Review Step-01 and any corrections before issuing Step-02. - All profile/module and later product capabilities remain planned. Preserve the
complete sequence and safety gates rather than restarting or reducing scope.
### Known blockers and uncertainties ### Known blockers and uncertainties
No confirmed initialization blocker. The orchestrator has not inspected installed No blocking architectural/native verification deficiency remains for Step-02.
.NET SDKs, workloads, package compatibility, inference availability, or hardware. The Step-01A report records SDK 10.0.402, runtime 10.0.13, Windows target
The worker must inspect prerequisites; absence of evidence is not compatibility. 10.0.26100.0/win-x64, MAUI Windows manifest 10.0.110 and WebView2 155.0.4283.62.
Physical hardware access, applicable manufacturer definitions, and programming Native execution is worker evidence, not an orchestrator rerun. Other platforms,
authorization are future gates, not current claims. inference and automotive hardware remain unverified.
Non-blocking deviations are retained explicitly:
- The worker mistakenly invoked workload restore during inspection, reported
manifest updates (workload version 10.0.403 and iOS/MacCatalyst changes), stopped
the action and did not roll back. Required Windows manifest remained 10.0.110;
final Windows builds/tests/smoke passed according to the report. Broader
environment impact is unverified. This is not retroactive authorization.
Do not repeat workload-changing commands or attempt rollback without approval.
- Raw Git whitespace checking flags README CRLF against the mixed-line-ending
tracked baseline. There are no trailing spaces/tabs; a command-local
CR-at-EOL-aware check passes. Step-02 must normalize the already-to-be-updated
Markdown to the existing LF editor convention without changing Git settings.
- README/ADR acceptance-pending lifecycle text is accurate as of worker report
creation; Step-02 must align it with this acceptance while preserving history.
No major environment installation, update, repair or rollback is automatically
authorized. Physical definitions/access and programming approval remain future gates.

View File

@ -5,18 +5,19 @@
| Field | Value | | Field | Value |
|---|---| |---|---|
| Updated | 2026-10-28 | | Updated | 2026-10-28 |
| Phase | Initial orchestration complete; application foundation not started | | Phase | Corrected single-shell foundation accepted; vehicle profile slice next |
| Active step | Step-01 - Repository and solution foundation | | Active step | Step-02 - Vehicle profiles and control module model |
| Assignment | [Step-01.md](Step-01.md) | | Assignment | [Step-02.md](Step-02.md), regenerated after Step-01A acceptance |
| Assignment status | READY FOR WORKER / AWAITING MANUAL HANDOFF | | Assignment status | READY FOR WORKER / AWAITING MANUAL HANDOFF |
| Expected worker report | `prompts/Step-01-Report.md` - not yet created | | Expected worker report | `prompts/Step-02-Report.md` - not yet created |
| Last accepted step | None | | Last accepted step | Step-01A - accepted 2026-10-28 |
| Outstanding corrections | None | | Outstanding corrections | None |
| Worker execution | Not invoked; user controls handoff | | Step-02 status | READY FOR WORKER; old unexecuted assignment explicitly superseded |
| Immediate next action | User manually directs the worker to execute Step-01 only | | Worker execution | Step-01A manually completed; Step-02 not invoked |
| Immediate next action | User manually directs the worker to execute regenerated Step-02 only |
| Next orchestrator action | After manual return, inspect the assignment, report, implementation, tests, Git changes, documentation and recorded command evidence | | Next orchestrator action | After manual return, inspect the assignment, report, implementation, tests, Git changes, documentation and recorded command evidence |
## Repository baseline ## Repository baseline at initialization
- Repository: `D:\_Repos\Code\GAJ3T\AutoForge`. - Repository: `D:\_Repos\Code\GAJ3T\AutoForge`.
- Branch observed: `main`, tracking `origin/main`. - Branch observed: `main`, tracking `origin/main`.
@ -30,8 +31,8 @@
Step-01 requires preserving it while making implementation status explicit. Step-01 requires preserving it while making implementation status explicit.
- Existing `.gitignore` already includes common Visual Studio/.NET build patterns. - Existing `.gitignore` already includes common Visual Studio/.NET build patterns.
Worker must extend only where necessary and preserve existing entries. Worker must extend only where necessary and preserve existing entries.
- Orchestrator changes are limited to `prompts/ROADMAP.md`, this file, and - Initial orchestrator changes were limited to `prompts/ROADMAP.md`, this file,
`prompts/Step-01.md`. Existing tracked files and Git metadata are preserved. and `prompts/Step-01.md`. Step-01 subsequently added the implementation below.
## Architecture decisions in force ## Architecture decisions in force
@ -40,52 +41,168 @@ See [ROADMAP.md](ROADMAP.md) for the full planned architecture and milestones.
1. The repository has only three top-level project directories: `docs`, `src`, 1. The repository has only three top-level project directories: `docs`, `src`,
`prompts`; existing protected infrastructure is preserved. Tests are under `prompts`; existing protected infrastructure is preserved. Tests are under
`src/tests`. No root `tests`, root `artifacts`, or nested `AutoForge` directory. `src/tests`. No root `tests`, root `artifacts`, or nested `AutoForge` directory.
2. The worker creates `src/AutoForge.slnx` targeting .NET 10. Initial production 2. Keep the existing single `src/AutoForge.slnx`, Core, Application, UnitTests and
projects are Core and Application; initial test projects are UnitTests and IntegrationTests. Accepted target-selection code/tests remain useful.
IntegrationTests. No unused placeholder assemblies. 3. Sole initial application executable: AutoForge.Client, .NET 10 MAUI Blazor
3. Step-01 is headless with real target-selection validation and composition tests. Hybrid, initially Windows. No required standalone WebAssembly/web shell or
Simulation/diagnostics are introduced in Steps 02-04; both required UI shells separate backend. Ordinary desktop capabilities run in-process as a modular
and shared components/screens RCLs are introduced in Step-05. monolith; additional hosts/processes need a concrete approved requirement.
4. Domain logic is platform-neutral. Application use cases depend inward on Core. 4. Accepted Step-01A established Client -> UI -> Components. Client is thin native startup,
Hardware, inference, storage, and UI implementations never own domain truth. BlazorWebView and DI/lifecycle/platform composition. UI owns complete routes,
5. Simulation, replay, and physical hardware targets are explicit and cannot pages, navigation/layouts and feature presentation. Components owns generic
reusable controls. UI cannot reference Client; Components cannot reference UI.
5. Application is needed now and retained. Organize use cases into cohesive feature
slices, beginning with existing execution-target selection. No mediator,
generic repository/manager layer, prescribed boilerplate or empty future slices.
UI invokes application contracts; business logic stays outside Razor components.
6. Reusable domain, simulation, diagnostic, calibration, telemetry and AI capability
libraries remain independently testable and are added only when justified.
They do not depend on Client/UI or their coordinating application slices.
Hardware, inference, storage and UI implementations never own domain truth.
7. Simulation, replay, and physical hardware targets are explicit and cannot
silently substitute for one another. Selection is not connection or execution. silently substitute for one another. Selection is not connection or execution.
6. Synthetic data is labeled; simulation is deterministic and independent of AI, 8. Synthetic data is labeled; simulation is deterministic and independent of AI,
and verification uses an isolated oracle unavailable to ordinary UI/AI paths. and verification uses an isolated oracle unavailable to ordinary UI/AI paths.
7. AI plans are validated runbooks; no arbitrary hardware commands or offsets. 9. AI plans are validated runbooks; no arbitrary hardware commands or offsets.
Local inference is replaceable; core operation does not require AI/cloud. Local inference is replaceable; core operation does not require AI/cloud.
8. Initial hardware integration is read-only. Simulated approval, physical 10. Initial hardware integration is read-only. Simulated approval, physical
capability discovery, and driver availability cannot authorize physical writes. capability discovery, and driver availability cannot authorize physical writes.
Bench and vehicle programming require separate future authorization/evidence. Bench and vehicle programming require separate future authorization/evidence.
9. All handoffs are manual. Orchestrator never invokes the worker, implements 11. All handoffs are manual. Orchestrator never invokes the worker, implements
application changes, or executes application builds/tests. application changes, or executes application builds/tests.
10. The worker does not change the roadmap, state, or assignment; it may write only 12. The worker does not change the roadmap, state, or assignment; it may write only
the current assignment's report under `prompts`. No automatic commits/pushes. the current assignment's report under `prompts`. No automatic commits/pushes.
## Prerequisites and known issues ## Historical Step-01 acceptance review
- The worker must inspect installed SDKs, templates and package compatibility Decision at that review: **ACCEPTED**, 2026-10-28, with no identified blocking
before choosing exact versions. .NET 10 compatibility is not yet verified. defect under the then-current architecture. This acceptance and its evidence
remain historical facts. The later owner decision now requires Step-01A before
progression; it does not erase the accepted implementation or its reports.
Reviewed [Step-01](Step-01.md), the [worker report](Step-01-Report.md), all seven
production source files, all three test source files, four project files, solution,
five root configuration files, README/ignore diffs and all four technical documents.
The source enforces explicit identity/kind selection, case-insensitive uniqueness,
no cross-target fallback, immutable descriptors and registration snapshots.
Integration tests exercise the real DI/Core/Application path rather than mocks.
| Criterion | Decision | Evidence |
|---|---|---|
| AC-01 | ACCEPTED | Expected README/ignore changes only among pre-existing implementation files; empty index; original assignment/roadmap/state hashes matched the report before orchestration updates; protected instructions absent |
| AC-02 | ACCEPTED | Actual root project directories are docs/src/prompts; tests under src/tests; no root tests/artifacts or nested repository |
| AC-03 | ACCEPTED | Inspected solution and all project references: Core has none; Application -> Core; both test projects -> Core/Application; all net10.0 |
| AC-04 | ACCEPTED | Inspected SDK policy, nullable/build/editor settings, central package pins and assets; worker records installed SDK 10.0.402 and actual VSTest execution |
| AC-05 | ACCEPTED | Descriptor/resolver/DI source satisfies explicit validation, uniqueness, snapshot and no-fallback requirements; no production provider is fabricated |
| AC-06 | ACCEPTED | All composition tests inspected; real container/service path covers positive selection and empty/invalid/mismatched/duplicate cases |
| AC-07 | ACCEPTED ON WORKER EXECUTION EVIDENCE | Reported final Release build: zero warnings/errors; unit 35/35, integration 19/19, zero failures/skips; source case counts and existing restore/Release outputs corroborate the report |
| AC-08 | ACCEPTED | Documentation index, architecture/error contract/Mermaid, ADR, build/test guide and README describe actual scope and planned features accurately |
| AC-09 | ACCEPTED | No operational hardware/AI/UI dependency or extra placeholder project; no automatic handoff introduced |
| AC-10 | ACCEPTED | Complete report contains exact command outcomes, corrected failures, acceptance mapping and required sections in one plain copy window; no later implementation present |
Worker-reported execution: Windows x64, SDK 10.0.402, runtime 10.0.13;
restore, Release build and both suites succeeded after the documented
repository-local NuGet feed correction. Reported total: 54 passed, zero failed,
zero skipped. Existing assets confirm the framework/dependency graph; Release
binaries exist for all four projects. Their presence is corroboration, not an
independent test execution.
The orchestrator executed only read-only inspection and document/Git checks,
including static test-case counting and ignore-policy checks. It did **not**
execute dotnet, application builds, tests, formatting or hardware operations.
Runtime results are explicitly worker evidence. The worker's original report and
assignment remain unchanged; implementation is not committed by this review.
## Owner architectural realignment and current inspection
On 2026-10-28 the owner canceled the two-shell plan, required Client/UI/Components
and application Vertical Slice Architecture, and directed correction before
Step-02. [Step-01A](Step-01A.md) was the corrective assignment and is now accepted.
At correction planning, inspection found the original four-project solution unchanged:
Core has no dependencies, Application references Core and DI abstractions, and
both tests reference Core/Application. The existing target resolver and eager
registration are suitable for a feature slice and must be preserved.
There was no host/component implementation to delete or migrate. Correction was
additive UI composition plus feature organization, not a repository restart.
The old Step-02 was held, not executed.
After acceptance, [Step-02](Step-02.md) was regenerated from the seven-project
implementation and explicitly supersedes the prior unexecuted assignment. It now
uses application feature slices, reusable Core models and a thin profile metadata
consumer in the existing UI. No Step-02 implementation/report exists yet.
## Step-01A acceptance review
Decision: **ACCEPTED**, 2026-10-28. No Step-01B assignment is required.
Reviewed the [assignment](Step-01A.md), [worker report](Step-01A-Report.md),
solution and all project references, Client native/bootstrap/host code, RCL routes,
feature pages/view model/component/styles, moved Application feature, new rendered/
graph tests, package/build configuration, README and all affected technical docs.
| Criterion | Decision | Evidence |
|---|---|---|
| AC-01 | ACCEPTED | Existing descriptor/resolver semantics and 54 prior cases retained; expanded suites contain 39 unit/26 integration cases; root layout/history/manual workflow preserved |
| AC-02 | ACCEPTED | Actual seven-project solution, one production executable, MAUI/Windows Client configuration and native Release output |
| AC-03 | ACCEPTED | MainPage hosts UI Routes through BlazorWebView; UI owns routes/layout/pages, Components owns StatusNotice; native route/assets observations reported |
| AC-04 | ACCEPTED | Project files, graph test and independent static traversal confirm Client -> UI -> Components, allowed Application references and no cycles |
| AC-05 | ACCEPTED | Feature folder contains real resolver/DI/errors with stable public namespace and unchanged explicit selection/snapshot/no-fallback behavior |
| AC-06 | ACCEPTED | Actual HtmlRenderer component/route tests use real Core/Application DI, cover errors/unknown routes and safe text rendering, without Client references |
| AC-07 | ACCEPTED ON WORKER EXECUTION EVIDENCE | Reported complete Release solution and direct Windows Client builds: zero warnings/errors; 39 unit plus 26 integration passed, zero failed/skipped; matching source counts and Release outputs inspected |
| AC-08 | ACCEPTED ON WORKER NATIVE EVIDENCE | Detailed reported native home/selection/unregistered-physical/not-found checks, hidden error banner and both RCL CSS assets loading; native executable exists, not rerun by orchestrator |
| AC-09 | ACCEPTED | README/index/architecture/build guide and ADR-0001/0002 reflect one shell, two RCLs, VSA/modular monolith and metadata-only limitations |
| AC-10 | ACCEPTED | Evidence-bearing report, corrected failures and environment deviation disclosed; historical reports/assignments preserved and Step-02 unexecuted |
Worker-reported verified platform: SDK 10.0.402, runtime 10.0.13, Windows
10.0.26100.0/win-x64, MAUI Windows manifest 10.0.110 and WebView2 155.0.4283.62.
The source counts, framework/assets, seven-project graph and native/portable
Release artifacts corroborate the report. They do not prove an independent
runtime run. No application builds/tests/native launch were performed here.
Acceptance covers the application correction, not approval of the unintended
workload action or a claim that the broader tool environment is unchanged.
The deviations below are non-blocking for this verified Windows foundation and
must remain visible. No environment rollback or source fix was attempted.
## Prerequisites, limitations, and known issues
- Step-01A worker evidence establishes portable and native Windows compatibility
for the accepted foundation. Recheck prerequisites if the environment changes.
- No major SDK/workload/driver installation has been authorized. Report exact - No major SDK/workload/driver installation has been authorized. Report exact
missing prerequisites and mark blocked checks honestly; do not replace .NET 10 missing prerequisites and mark blocked checks honestly; do not replace .NET 10
or either required UI architecture. MAUI Blazor Hybrid with a web host.
- Step-01 does not need MAUI workloads, an AI model, containers, a vehicle, a - Reported workload incident: `dotnet workload restore` was mistakenly invoked
native driver, or cloud infrastructure. during inspection, began manifest updates and was stopped. Worker reports
- No confirmed implementation defects or environmental blockers are known because workload version 10.0.403 and newer iOS/MacCatalyst manifests; Windows manifest
there is no implementation yet. stayed 10.0.110. No rollback occurred. Final Windows checks passed, but broader
impact is unverified. Do not repeat workload-changing commands or repair/rollback
without explicit authorization; this review does not authorize them.
- Raw `git diff --check` failed on README CRLF, against a mixed-line-ending index.
Read-only byte inspection found 151 CRLF lines and no trailing spaces/tabs.
A command-local CR-at-EOL-aware check passed, with no Git configuration changed.
Require LF normalization during Step-02's already-required README update.
- README/ADR acceptance-pending text is historical to worker completion; Step-02
must align lifecycle statements while preserving original reports/decisions.
- No blocking Step-02 prerequisite is currently identified.
- Simulation, replay, diagnostics, profiles, telemetry, calibration, persistence,
AI and hardware operations remain unimplemented; only foundation UI is present.
- No application build or test has been executed by the orchestrator. - No application build or test has been executed by the orchestrator.
## Review and progression gate ## Review and progression gate
On manual return, evaluate every Step-01 acceptance criterion using the original On manual return, evaluate every Step-02 acceptance criterion using the original
assignment, worker report, actual code/tests, dependency graph, Git changes, assignment, worker report, actual code/tests, dependency graph, Git changes,
README/docs, and recorded build/test evidence. Do not accept solely on a success README/docs, and recorded build/test evidence. Do not accept solely on a success
claim; do not claim independent runtime verification. claim; do not claim independent runtime verification.
- If accepted: record the decision and evidence, update roadmap/state, create - Inspect domain/schema invariants, feature organization, profile UI/application
`Step-02.md`, and stop for manual handoff. tests, all regressions, native profile smoke evidence and documentation.
- If deficient: create `Step-01A.md` with measurable corrections, update state, - If accepted: record the decision, update roadmap/state, create Step-03 and stop
and stop. Further corrections use `Step-01B.md`, etc., with matching reports. for manual handoff. Do not execute it.
- If deficient: create `Step-02A.md` with measurable corrections and matching
report requirements, update state, and stop. Do not advance to Step-03.
- If blocked: retain the active step, document the prerequisite and required - If blocked: retain the active step, document the prerequisite and required
worker evidence; do not advance or mark unexecuted checks as successful. worker evidence; do not advance or mark unexecuted checks as successful.
- Never create the next major assignment while acceptance or corrections are open. - Never create the next major assignment while acceptance or corrections are open.
@ -96,10 +213,20 @@ claim; do not claim independent runtime verification.
|---|---|---| |---|---|---|
| 2026-10-28 | Initial repository inspection | Clean `main`; only root README and ignore file tracked; no application or protected instruction files found | | 2026-10-28 | Initial repository inspection | Clean `main`; only root README and ignore file tracked; no application or protected instruction files found |
| 2026-10-28 | Initial roadmap, state, and Step-01 prepared | Amendment layout/naming adopted; READY FOR WORKER, no implementation accepted | | 2026-10-28 | Initial roadmap, state, and Step-01 prepared | Amendment layout/naming adopted; READY FOR WORKER, no implementation accepted |
| 2026-10-28 | User returned Step-01 for review | Original assignment, worker report, code/tests, configuration, Git changes and documentation inspected |
| 2026-10-28 | Step-01 ACCEPTED | No blocking deficiency; worker evidence reports successful Release build and 54 passed, zero failed/skipped tests; no orchestrator runtime execution |
| 2026-10-28 | Step-02 prepared | Profile/module model, versioned JSON, synthetic fixtures and application selection; manual worker handoff pending |
| 2026-10-28 | Owner architecture decision superseded the dual-shell plan | One MAUI Client, UI/Components RCLs, vertical-slice modular monolith; Step-01 acceptance preserved but corrective 01A required |
| 2026-10-28 | Existing solution re-inspected | Only four headless projects; no obsolete hosts to delete; no application changes/builds/tests executed |
| 2026-10-28 | Step-01A prepared; Step-02 placed on hold | Correction is ready for manual worker execution; old Step-02 body retained, final regeneration deferred until correction acceptance |
| 2026-10-28 | Step-01A returned and ACCEPTED | Seven-project single-shell/RCL/VSA implementation inspected; worker reports successful solution/native builds, 65 passing cases and native route/asset checks |
| 2026-10-28 | Deviations recorded | Unintended workload manifest updates disclosed; no rollback; README CRLF-only diff hygiene noted for next documentation update |
| 2026-10-28 | Step-02 regenerated | Explicitly supersedes unexecuted pre-correction version; actual seven-project baseline and profile feature/UI scope; READY FOR WORKER |
## Manual handoff instruction ## Manual handoff instruction
Provide [Step-01.md](Step-01.md) to the separate worker and request execution of Provide regenerated [Step-02.md](Step-02.md) to the separate worker and request
that assignment only. The worker must produce `prompts/Step-01-Report.md` and stop. execution of that assignment only. The worker must produce
`prompts/Step-02-Report.md` and stop.
Return manually to the orchestrator for review. Reports, including final chat Return manually to the orchestrator for review. Reports, including final chat
reports, must follow the single plain triple-backtick copy-window requirement. reports, must follow the single plain triple-backtick copy-window requirement.

402
prompts/Step-01-Report.md Normal file
View File

@ -0,0 +1,402 @@
```
# Step-01 worker report
## 1. Step identifier and title
Step-01 - Repository and solution foundation.
Establish the .NET 10 repository, headless application foundation, real tests,
and truthful developer documentation.
Execution date: 2026-10-28. Role: worker. Only Step-01 was executed.
## 2. Completion status
COMPLETE - worker implementation and required verification succeeded.
Manual orchestrator review/acceptance is pending; this is not an acceptance claim.
All AC-01 through AC-10 are mapped below. No required check is blocked or skipped.
## 3. Implemented functionality
- Platform-neutral, immutable execution-target metadata for Simulation,
RecordedReplay and PhysicalHardware.
- Descriptor construction rejects null/blank/padded identifiers and all undefined
kinds, including zero/default. Both identifier and kind must be explicit.
- Provider identifiers use ordinal case-insensitive comparison without trimming
or culture-sensitive normalization; original registered spelling is preserved.
- The resolver returns the exact registered descriptor only when both the
requested identifier and kind match.
- Missing selections, unknown registrations, duplicates/casing ambiguity, and
kind mismatches fail explicitly. No guessed default or cross-target fallback.
- Private snapshotting isolates validated registrations from caller collection
mutation. Sealed, get-only descriptors cannot be mutated through the public API.
- Ordinary Microsoft.Extensions DI composition validates eagerly at setup.
Repeated resolver setup is rejected instead of silently replacing the registry.
- Empty production-like registration is valid but every selection reports
ProviderNotRegistered. Production code supplies no synthetic or real providers.
Selection is metadata only: no connection, availability, discovery, execution,
read/write capability or approval is asserted. All test metadata is synthetic.
## 4. Files created
25 new files, including this report. All remain unstaged/uncommitted.
Root configuration (5):
- [.editorconfig](../.editorconfig)
- [global.json](../global.json)
- [Directory.Build.props](../Directory.Build.props)
- [Directory.Packages.props](../Directory.Packages.props)
- [NuGet.Config](../NuGet.Config)
Solution and projects (5):
- [src/AutoForge.slnx](../src/AutoForge.slnx)
- [AutoForge.Core.csproj](../src/AutoForge.Core/AutoForge.Core.csproj)
- [AutoForge.Application.csproj](../src/AutoForge.Application/AutoForge.Application.csproj)
- [AutoForge.UnitTests.csproj](../src/tests/AutoForge.UnitTests/AutoForge.UnitTests.csproj)
- [AutoForge.IntegrationTests.csproj](../src/tests/AutoForge.IntegrationTests/AutoForge.IntegrationTests.csproj)
Production source (7):
- [ExecutionTargetKind.cs](../src/AutoForge.Core/ExecutionTargets/ExecutionTargetKind.cs)
- [ExecutionTargetDescriptor.cs](../src/AutoForge.Core/ExecutionTargets/ExecutionTargetDescriptor.cs)
- [IExecutionTargetResolver.cs](../src/AutoForge.Application/ExecutionTargets/IExecutionTargetResolver.cs)
- [ExecutionTargetResolver.cs](../src/AutoForge.Application/ExecutionTargets/ExecutionTargetResolver.cs)
- [TargetSelectionFailure.cs](../src/AutoForge.Application/ExecutionTargets/TargetSelectionFailure.cs)
- [TargetSelectionException.cs](../src/AutoForge.Application/ExecutionTargets/TargetSelectionException.cs)
- [ServiceCollectionExtensions.cs](../src/AutoForge.Application/ExecutionTargets/ServiceCollectionExtensions.cs)
Tests (3):
- [ExecutionTargetDescriptorTests.cs](../src/tests/AutoForge.UnitTests/ExecutionTargetDescriptorTests.cs)
- [ExecutionTargetResolverTests.cs](../src/tests/AutoForge.UnitTests/ExecutionTargetResolverTests.cs)
- [TargetSelectionCompositionTests.cs](../src/tests/AutoForge.IntegrationTests/TargetSelectionCompositionTests.cs)
Technical documentation (4):
- [docs/README.md](../docs/README.md)
- [docs/architecture.md](../docs/architecture.md)
- [docs/adr-0001-headless-foundation.md](../docs/adr-0001-headless-foundation.md)
- [docs/build-and-test.md](../docs/build-and-test.md)
Worker handoff (1):
- [Step-01-Report.md](Step-01-Report.md)
Template Class1 and UnitTest1 files were removed before validation. They were
newly generated, not deletions of pre-existing tracked implementation.
## 5. Files modified and preservation evidence
Only two pre-existing files changed:
- [README.md](../README.md): preserved the complete original product description,
labeled it as vision, and added truthful scope, prerequisites and documentation.
- [.gitignore](../.gitignore): retained existing entries; appended seven lines
for local environment secrets, a visible .env.example exception, and ignored
src/local-data/ for private captures/firmware/models.
Baseline Git status was clean. Five tracked files were present: these two root
files and the three orchestration documents. No concurrent changes were observed
or discarded. No staging, Git initialization, commits, pushes or Git configuration
changes were performed.
The assignment, roadmap and state were read in full and preserved. SHA-256 values
recorded before implementation matched afterward:
| Protected file | Unchanged SHA-256 |
|---|---|
| Step-01.md | D7412E8F47BCDE11E9F6902E35455CC3F6D3BF60AD2D334B093C4575FF8C0C90 |
| ROADMAP.md | F9E1B12C78D0C8FC6D5BD83007B9C71F4CF2FC841CB5ED2D664375736A0EC78C |
| STATE.md | 0BD016FFE478B2EC9B2C577E0C04E4F85FD9F93D26F24F1FA3D0C7BDFDB8E2E6 |
No applicable AGENTS.md existed in the repository or its ancestor locations.
.github/copilot-instructions.md was absent and remains absent. No replacement
instruction file was created. Git diffs for protected documents and the index
were empty, exit 0.
Final pre-report inventory: two modified tracked files and 24 intended untracked
files; this report is the 25th new file. Untracked source was explicitly listed.
No credentials, private captures, firmware or model assets were introduced.
## 6. Architecture and actual dependency graph
All four projects target net10.0. Actual project-reference queries confirmed:
| Project | Project references | Direct production infrastructure package |
|---|---|---|
| Core | None | None |
| Application | Core | Microsoft.Extensions.DependencyInjection.Abstractions |
| UnitTests | Core, Application | Not a production project |
| IntegrationTests | Core, Application | Concrete DI container only in tests |
Application -> Core; UnitTests -> Application/Core;
IntegrationTests -> Application/Core. No production-to-test dependency exists.
Core owns the validated descriptor and target-kind invariant. Application owns
resolution, typed selection/ambiguity exceptions and DI registration.
Invalid inputs use standard argument exceptions with parameter names.
TargetSelectionException exposes ProviderNotRegistered, KindMismatch or
DuplicateProviderIdentifier for application failures. Duplicate detection happens
at resolver construction/DI extension invocation, before container building.
Get-only descriptors and a private dictionary form the mutation boundary.
One identifier names one kind, including across case variants. Registration
requires a single deliberate setup call; no plugin framework/service locator.
Actual top-level directories: .git (preserved metadata), docs, prompts, src.
The only project directories are docs, src and prompts. Tests are under src/tests.
No root tests, root artifacts, nested AutoForge project directory or nested
src/.git was present. No future-feature placeholder directories were created.
Both eventual Blazor hosts and shared components/screens RCLs are staged for
Step-05, not replaced by another architecture. No host exists in Step-01.
## 7. Unit tests created and behavior coverage
35 discovered/passed cases in two real Core/Application test classes:
| Test group / method | Cases | Behavior |
|---|---:|---|
| Descriptor: Constructor_PreservesExplicitIdentifierAndKind | 3 | All defined kinds, exact input metadata |
| Descriptor: Constructor_RejectsNullIdentifier | 1 | Null identifier and parameter name |
| Descriptor: Constructor_RejectsBlankOrPaddedIdentifier | 5 | Empty, whitespace, leading/trailing whitespace |
| Descriptor: Constructor_RejectsUndefinedKind | 4 | Negative, default, out-of-range and maximum integer |
| Resolver: Resolve_ReturnsExactRegisteredDescriptor | 3 | Same registered object for each kind |
| Resolver: Resolve_UsesOrdinalCaseInsensitiveIdentifiers | 1 | Case-insensitive lookup preserves registered casing |
| Resolver: Resolve_DoesNotUseCultureSensitiveIdentifierComparison | 1 | Dotless-i lookalike is not substituted |
| Resolver: Resolve_RejectsMissingSelection | 1 | Null request fails explicitly |
| Resolver: Resolve_EmptyRegistryReportsNotRegistered | 3 | No fabricated availability for any kind |
| Resolver: Resolve_UnknownIdentifierDoesNotSelectAnotherProviderOfSameKind | 1 | No same-kind default/fallback |
| Resolver: Resolve_RejectsEveryKindMismatchWithoutFallback | 6 | All ordered cross-kind mismatches; another matching-kind provider cannot substitute |
| Resolver: Constructor_RejectsDuplicateIdentifiersRegardlessOfKind | 3 | Exact/case-ambiguous duplicates, including across kinds |
| Resolver: Constructor_SnapshotsCallerCollection | 1 | Clear/replace/add duplicates after construction cannot change validated metadata |
| Resolver: Constructor_RejectsNullRegistrations | 1 | Null collection rejected |
| Resolver: Constructor_RejectsNullDescriptor | 1 | Null entry rejected |
No placeholder tests, mocks of the use case, skipped cases or zero-discovery
projects are used.
## 8. Integration tests created and actual boundary coverage
19 discovered/passed cases in TargetSelectionCompositionTests. Every selection
uses the application service obtained through the actual DI extension/container.
| Method | Cases | Real boundary exercised |
|---|---:|---|
| Composition_ResolvesExactExplicitSyntheticMetadata | 3 | Real Core validation, registration, container and exact descriptor identity/kind |
| Composition_EmptyProductionLikeRegistryIsUnavailable | 3 | Empty composition fails for every target kind |
| Composition_MismatchDoesNotSelectOtherProvider | 3 | Physical/simulation/replay mismatch despite alternative metadata |
| Composition_DuplicatesFailAtRegistrationBeforeContainerBuild | 2 | Same/cross-kind casing ambiguity fails eagerly, leaving services unchanged |
| Composition_CallerMutationBeforeContainerBuildCannotChangeRegistry | 1 | DI setup snapshot survives list replacement/ambiguity before container build |
| Composition_RejectsRepeatedSetupRatherThanSilentlyReplacingResolver | 1 | Repeated registration fails; original service behavior remains |
| Composition_RejectsMissingSelectionThroughResolvedService | 1 | Missing selection through actual resolved service |
| Composition_RejectsInvalidIdentifierAtSelectionBoundary | 2 | Invalid identifier cannot enter the composed use case |
| Composition_RejectsUndefinedKindAtSelectionBoundary | 1 | Omitted/default kind cannot enter the composed use case |
| Composition_RejectsNullRegistrationsWithoutAddingServices | 1 | Invalid setup is explicit and atomic |
| Composition_RejectsNullServiceCollection | 1 | Invalid composition argument is explicit |
The registry is in-memory metadata, not simulated hardware. Physical-kind
descriptors have no connection/write-approval fields or operational services.
These tests do not claim device integration evidence.
## 9. Environment, packages and runner
Inspected dotnet --info, dotnet --list-sdks, dotnet new list,
dotnet new xunit --help and dotnet new sln --help before scaffolding.
The installed templates explicitly support net10.0 and slnx.
| Item | Observed/selected |
|---|---|
| OS | Windows, version 10.0.26200 |
| RID / execution architecture | win-x64 / x64 |
| Installed and selected SDK | 10.0.402 |
| MSBuild | 18.9.15+a8dd0577c |
| Used Microsoft.NETCore.App host/runtime | 10.0.13, x64 |
| Target/configuration | net10.0 / Release, all four projects |
| SDK policy | 10.0.402, latestPatch, allowPrerelease=false |
| Runner | VSTest, SDK default; no MTP opt-in |
The SDK policy permits later stable patches only within 10.0.4xx, not other
feature bands or major versions. dotnet --version after configuration returned
10.0.402. No SDK, workload, driver or model installation was performed.
Package versions were checked against public nuget.org version indexes and
nuspec dependency/framework groups before final dependency changes:
| Package | Requested/resolved version | Compatibility evidence |
|---|---|---|
| Microsoft.Extensions.DependencyInjection.Abstractions | 10.0.14 | net10.0 dependency group; Application restore/build succeeded |
| Microsoft.Extensions.DependencyInjection | 10.0.14 | net10.0 group, matching abstractions; real container tests succeeded |
| Microsoft.NET.Test.Sdk | 18.11.0 | net8.0 test-host assets usable from net10.0; both suites discovered/executed |
| xunit | 2.9.3 | Framework family/version supplied by installed .NET 10 xUnit template; actual net10.0 execution |
| xunit.runner.visualstudio | 4.0.1 | Metadata explicitly supports xUnit v1/v2/v3 and .NET 8+; actual net10.0 execution |
Both test projects use identical central test package pins. The official xUnit
v2 package guidance states critical-fix maintenance continues, while new features
are developed in v3: https://xunit.net/docs/nuget-packages-v2 .
This is a supported maintenance-framework choice, not a claim that v2 is the
newest framework. No incompatible MTP/VSTest combination was added.
The unused template coverage collector was removed.
dotnet list .\src\AutoForge.slnx package --no-restore confirmed all exact direct
versions above and no packages in Core. Per-project dotnet msbuild queries for
TargetFramework, Nullable, ImplicitUsings and TreatWarningsAsErrors returned
net10.0, enable, enable and true for every project.
NuGet.Config selects only public nuget.org at repository scope. Shared props
enable nullable references, implicit usings, deterministic builds and warnings
as errors. Editor conventions use CRLF for code/config and LF for Markdown.
## 10. Exact restore/build commands and results
Commands were run from D:\_Repos\Code\GAJ3T\AutoForge in PowerShell.
| Command | Execution/result |
|---|---|
| dotnet restore .\src\AutoForge.slnx | Initial exit 1: NU1507 treated as error because two inherited package feeds were configured with central package management |
| dotnet restore .\src\AutoForge.slnx | After repository NuGet.Config: exit 0, all four projects restored, no warnings/errors emitted |
| dotnet build .\src\AutoForge.slnx --configuration Release --no-restore | Initial post-restore build: exit 0, 0 warnings, 0 errors; 3.05 seconds |
| dotnet build .\src\AutoForge.slnx --configuration Release --no-restore | Final post-source-format build: exit 0, 0 warnings, 0 errors; 0.58 seconds |
Meaningful initial failure: "NU1507: Warning As Error: There are 2 package sources
defined in your configuration. When using central package management, map your
package sources ... or specify a single package source."
Resolved at repository scope without suppressing warnings or modifying
user/machine feeds. No restore/build failure remains.
Scaffolding used dotnet new sln --format slnx and net10.0 classlib/xunit templates
with --no-restore; dotnet sln add and dotnet add reference established the graph.
All scaffolding/reference commands succeeded. No manual solution format invention.
Formatting commands both exited 0:
- dotnet format whitespace .\src\AutoForge.slnx --no-restore --verbosity minimal
- dotnet format whitespace .\src\AutoForge.slnx --no-restore --verify-no-changes --verbosity minimal
Solution membership: dotnet sln .\src\AutoForge.slnx list, exit 0, exactly four
expected projects.
## 11. Exact test command and per-project results
dotnet test .\src\AutoForge.slnx --configuration Release --no-build
Executed twice: after the initial successful build and after C# formatting/final
build. Both invocations exited 0 with identical counts. No runner adaptation.
Final measured output:
| Project | Discovered/total | Passed | Failed | Skipped | Runner duration |
|---|---:|---:|---:|---:|---|
| AutoForge.UnitTests (net10.0) | 35 | 35 | 0 | 0 | 24 ms |
| AutoForge.IntegrationTests (net10.0) | 19 | 19 | 0 | 0 | 31 ms |
| Total | 54 | 54 | 0 | 0 | Not a deterministic performance claim |
Each project's output identified .NETCoreApp,Version=v10.0 and one matched test
assembly. No zero-discovery project, necessary skipped test or failed case.
No retained TRX was requested/generated. These durable counts and command results
are evidence; the temporary prerequisite tool output was removed after recording
its values, and this report does not depend on an ephemeral log path.
## 12. Acceptance verification
| ID | Status | Concrete evidence |
|---|---|---|
| AC-01 | PASSED | Initial clean status; only README/ignore modified among prior tracked files; protected hashes and Git diffs unchanged; index empty; no init/commit/push |
| AC-02 | PASSED | Actual root directories .git/docs/prompts/src only; tests under src/tests; prohibited root/nested paths absent |
| AC-03 | PASSED | slnx membership lists exactly four projects; per-project reference queries and MSBuild property inspection confirm net10.0 and inward graph |
| AC-04 | PASSED | Installed/selected SDK 10.0.402, runtime 10.0.13 x64; shared nullable/editor/build settings; central compatible pins and actual VSTest execution |
| AC-05 | PASSED | Core descriptor plus Application resolver/DI snapshot enforce explicit identity/kind, every mismatch, missing/unknown/duplicate errors and mutation isolation; 35 unit cases |
| AC-06 | PASSED | 19 real DI-based cases cover all target kinds, empty/invalid/mismatched/duplicate configuration and selection, without mocking the service |
| AC-07 | PASSED | Successful restore and final Release build, 0 build warnings/errors; both suites executed with 35/19 passed and 0 failed/skipped |
| AC-08 | PASSED | Four actual docs include index, architecture/Mermaid/error contract, ADR and exact build/testing policy; README distinguishes implemented/in-progress/planned |
| AC-09 | PASSED | Actual project/package graph has no operational/UI/AI/hardware dependency; no fake production providers, host substitution, automatic handoff or placeholder project |
| AC-10 | PASSED | This exact Step-01-Report.md contains the required evidence/sections inside one plain copy window; worker stops without advancing |
## 13. Documentation changes
Created the documentation index, actual dependency/Mermaid architecture and
failure contract, foundation ADR, and build/test guide. They document eager
registration validation, immutable snapshots, identifier comparison, package/SDK
policy, exact commands, test boundaries and current limitations.
Future read-only hardware and AI-independent deterministic simulation/oracle
boundaries are recorded as requirements, not implemented capabilities. Both
future Blazor hosts/shared RCLs are explicitly preserved.
## 14. Root README changes
Changed: YES. Original product description retained verbatim as product vision.
Added IMPLEMENTED, IN PROGRESS and PLANNED sections; explicit Step-01 manual
acceptance status; actual graph/layout, SDK policy and exact commands; real
documentation links; headless test entry point; no interactive startup command;
and explicit absence of simulation/diagnostics/backups/AI/UI/hardware operations.
## 15. Known limitations
- Metadata selection only; no real providers, discovery, connections, capability
inspection, operations or approval service.
- Simulation, replay, diagnostics, profiles, telemetry, calibration, backups,
persistence, AI, UI and hardware programming remain unimplemented.
- No real vehicle, native driver, MAUI host or model was used or verified.
- Core/Application are platform-neutral, but runtime verification is Windows x64
only. No cross-platform or UI build is claimed.
- xUnit v2 is critical-fix maintained, not the newest framework feature line.
- Direct dependency pins are centralized; no transitive lock file, offline
package mirror or coverage percentage is claimed.
- Initial restore needs nuget.org access; the use case/tests need no network,
hardware, wall-clock input, randomness or AI service.
- Manual acceptance is pending. No later assignment has been started.
## 16. Outstanding issues, failures, warnings and unexecuted scope
No blocking prerequisite, unresolved implementation defect or required failed/
unexecuted check remains.
Corrected execution/inspection issues:
1. Initial restore failed NU1507, exit 1; repository-local single-source
NuGet.Config fixed it. Subsequent restore/build/test succeeded.
2. Exploratory dotnet list .\src\AutoForge.slnx reference reported
"Project `.\src\AutoForge.slnx` is invalid." This reference subcommand did not
accept the solution path; it was not a solution build failure. Its individual
exit was not captured in that exploratory batch (the later package query
made the batch exit 0). Corrected per-project reference queries all exited 0:
- dotnet list .\src\AutoForge.Core\AutoForge.Core.csproj reference
- dotnet list .\src\AutoForge.Application\AutoForge.Application.csproj reference
- dotnet list .\src\tests\AutoForge.UnitTests\AutoForge.UnitTests.csproj reference
- dotnet list .\src\tests\AutoForge.IntegrationTests\AutoForge.IntegrationTests.csproj reference
3. Auxiliary Git whitespace check returned exit 2 after trying CRLF normalization
of README. Explicit LF Markdown convention and normalization restored
git diff --check to exit 0. This changed no functional source. The user's
core.autocrlf=true still emits a non-blocking README LF-to-CRLF notice; no Git
configuration was changed. Build warnings/errors remain 0/0.
4. Final ignore assertions used git check-ignore --no-index --quiet, avoiding
verbose output's matched-negation ambiguity. Confirmed .env/.env.local,
local private data, bin/obj and TestResults are ignored; .env.example,
synthetic fixture paths and both assignment/report paths remain visible.
Final Git status/diff/inventory and protected-file/index checks were reviewed.
No accidental extra files, secret assets, staged files or scope drift were found.
Generated output stays under ignored src project bin/obj directories.
Hardware, UI/MAUI, simulation, AI and non-Windows runtime checks were NOT EXECUTED
because they are outside Step-01, not skipped requirements or success claims.
## 17. Deviations and rationale
- User supplied "promps/Step-01.md"; that path does not exist. Executed the actual
repository assignment at prompts/Step-01.md after recursively reading all
repository content outside Git metadata. No replacement assignment was created.
- Added repository-local NuGet.Config, a permitted root config, to remove
inherited-feed ambiguity exposed by actual restore. No architecture change.
- Identifier padding rejection and repeated DI setup rejection are documented,
tested local invariant choices, not target inference or fallback.
- No required scope, target framework, UI architecture or handoff was substituted.
No other agent was invoked.
## 18. Recommendations and stop
Orchestrator should compare the implementation and test coverage with the
original assignment, inspect the unchanged protected files and actual reference
graph, and review the recorded restore correction, package support choice and
54 passing cases. Worker completion does not update orchestration state.
If accepted, the orchestrator may prepare a separate Step-02 assignment for
manual handoff. This worker has not created it, modified roadmap/state, committed,
pushed or begun any later feature.
Worker stops after persisting this report.
```

204
prompts/Step-01A-Report.md Normal file
View File

@ -0,0 +1,204 @@
```
# Step-01A Worker Report
## Status
**COMPLETE** — implementation, full solution/native builds, regression tests and
Windows native smoke verification are complete. Manual orchestrator acceptance
remains pending. Step-02 was not started.
## Implemented functionality
- Added one Windows-first .NET 10 MAUI Blazor Hybrid executable, `AutoForge.Client`,
hosting the entire routed application through `BlazorWebView`.
- Added `AutoForge.UI` and `AutoForge.Components` .NET 10 Razor Component
Libraries. UI owns the home, target-selection and not-found routes, layout and
navigation. Components owns the accessible, text-safe, reusable `StatusNotice`.
- Moved the existing Application target-selection implementation under
`Features/ExecutionTargets/SelectExecutionTarget` without changing its public
namespace, explicit-kind validation, typed failures, registration snapshot or
no-fallback behavior.
- Composed the existing application registration in Client with an intentionally
empty production metadata registry. The UI displays `ProviderNotRegistered`;
it does not fabricate a provider or claim connection, capability or
authorization.
- Added headless rendered component/UI tests and actual project-graph assertions.
The original 35 unit and 19 integration tests remain; the expanded suites have
39 unit and 26 integration tests (65 total).
- No vehicle feature, hardware operation, simulation/diagnostics engine, backend,
database, cloud service, browser/server host or additional application
executable was introduced.
## Projects, files and architectural changes
The solution now has seven projects: Core, Application, Components, UI, Client,
UnitTests and IntegrationTests. The actual production references are:
- Client -> UI and Application.
- UI -> Components and Application.
- Application -> Core.
- Components -> no AutoForge project.
- Core -> no AutoForge project.
- Tests -> portable production projects as needed; neither test project references
or launches Client.
Client is the only application executable. Application target selection is
feature-organized at
`src/AutoForge.Application/Features/ExecutionTargets/SelectExecutionTarget/`.
Routes and feature presentation are in UI; the reusable status control is in
Components. The UI calls the real resolver through DI. The design adds no
mediator, generic repository/manager layer, empty future feature slice or
speculative service.
Added the three projects and Windows platform bootstrap under `src`; updated
`src/AutoForge.slnx`; added UI routes, pages, view model, layout and RCL styles;
added the Components status control and its styles; and added component,
UI/application and project-graph test coverage to the existing test projects.
The host page now explicitly loads `_content/AutoForge.UI/app.css`, in addition
to the generated scoped-style bundle. Application source files were moved into
the feature slice while preserving their namespace and behavior.
Removed unused template sample pages/components/JavaScript and non-Windows
platform scaffolding. Kept the legitimate MAUI/Windows startup, manifest,
resources and Windows platform entry point. No useful Step-01 application
behavior or tests were removed.
Updated the root README, `docs/README.md`, `docs/architecture.md` and
`docs/build-and-test.md`. Updated ADR-0001 to retain its historical foundation
decisions and explicitly supersede only its dual-shell/deferred-host decision.
Added `docs/adr-0002-single-shell-vsa.md` for the corrected single-shell/RCL/VSA
decision.
## Tests and verification
Environment inspection:
- Windows `10.0.26200.0`; .NET SDK `10.0.402`; .NET and ASP.NET Core runtime
`10.0.13`.
- Windows SDK target `10.0.26100.0`; `maui-windows` workload manifest `10.0.110`
(`10.0.110/10.0.100` as listed); WebView2 Runtime `155.0.4283.62`.
- After the workload-restore incident below, `dotnet workload list` reported
workload version `10.0.403`; installed Android/iOS/MacCatalyst workloads were
not used as Client targets.
- Central package versions include MAUI Controls and BlazorWebView.Maui
`10.0.110`, Components.Web `10.0.13`, DI abstractions `10.0.14`, Test SDK
`18.11.0`, xUnit `2.9.3` and Visual Studio xUnit runner `4.0.1`. Tests use the
existing VSTest/xUnit runner.
Successful restore/build commands:
- `dotnet restore .\src\AutoForge.Client\AutoForge.Client.csproj --runtime win-x64`
— exit 0; restored the Windows runtime pack.
- `dotnet restore .\src\AutoForge.slnx` — exit 0; all projects up to date.
- `dotnet build .\src\AutoForge.slnx --configuration Release --no-restore` —
exit 0; all seven projects built, 0 warnings, 0 errors.
- `dotnet build .\src\AutoForge.Client\AutoForge.Client.csproj --configuration Release --framework net10.0-windows10.0.26100.0 --no-restore`
— exit 0; actual `net10.0-windows10.0.26100.0` / `win-x64` native target,
0 warnings, 0 errors.
Successful test commands and results:
- `dotnet test .\src\tests\AutoForge.UnitTests\AutoForge.UnitTests.csproj --configuration Release --no-build`
— 39 passed, 0 failed, 0 skipped.
- `dotnet test .\src\tests\AutoForge.IntegrationTests\AutoForge.IntegrationTests.csproj --configuration Release --no-build`
— 26 passed, 0 failed, 0 skipped.
- `dotnet test .\src\AutoForge.slnx --configuration Release --no-build`
— full solution regression command; both test projects ran, 65 passed, 0 failed,
0 skipped.
Unit coverage includes descriptor/resolver regressions and actual rendered status
component tones and safe text encoding. Integration coverage renders the real
UI routes with the real Application resolver, including registered synthetic
metadata, empty/unknown providers, invalid inputs, kind mismatch and unknown
routes. Project graph tests inspect actual project references. These headless
tests do not substitute for the following native smoke checks.
## Native Windows smoke evidence
Launched the built native Client executable from
`src\AutoForge.Client\bin\Release\net10.0-windows10.0.26100.0\win-x64\AutoForge.Client.exe`
with an isolated WebView2 profile and temporary local DevTools port. The native
window title was `AutoForge`; WebView2 exposed the app page at `https://0.0.0.1/`.
Observed:
- The home route rendered the foundation content and navigation. The unhandled
error banner was hidden (`display: none`).
- Navigation to `/execution-targets` rendered the explicit empty-provider notice,
input fields and all three target kinds.
- Submitting provider identifier `native-smoke-unregistered` with
`PhysicalHardware` rendered “Provider ... is not registered” with error tone.
No connection or operation was performed.
- An unmatched `/native-smoke-unknown` path rendered the explicit “Page not found”
presentation and navigation.
- Host `app.css` returned HTTP 200. The generated `AutoForge.UI` and
`AutoForge.Components` scoped CSS assets both returned HTTP 200 and contained
their expected UI/status-notice styles.
- No unhandled error banner appeared during navigation or form submission.
The initial native inspection found that the host HTML did not link the UI RCL's
global `app.css`, which left the template error element visible despite healthy
startup. Added the explicit RCL static-asset link, rebuilt and repeated the
native checks above successfully. The native process was stopped and both exact
temporary WebView2 smoke profiles were removed.
## Acceptance criteria evidence
| Criterion | Status | Evidence |
|---|---|---|
| AC-01 | PASSED | Existing Core/Application behavior, public namespace and all 54 accepted Step-01 test cases retained; expanded suites pass 65 tests. |
| AC-02 | PASSED | Seven-project solution; only application executable is Windows-first MAUI Blazor Hybrid Client; native Windows TFM build succeeds. |
| AC-03 | PASSED | BlazorWebView root is UI `Routes`; pages/layout/navigation are in UI, generic status component in Components; native home, selection and not-found routes verified. |
| AC-04 | PASSED | `ProjectGraphTests` and actual project manifests verify allowed references, no forbidden reverse edges/cycles, no extra application host. |
| AC-05 | PASSED | Target resolver moved into feature slice; public namespace, typed failures, validation, exact selection and no-fallback regressions pass. |
| AC-06 | PASSED | 39 headless unit tests and 26 integration tests render real components/routes and exercise actual Application DI; no Client reference required. |
| AC-07 | PASSED | Full Release solution build and direct Windows Client build: 0 warnings/errors; both test projects and full-solution test command pass. |
| AC-08 | PASSED | Native app loads both RCL style assets and routes; empty-provider notice and explicit unregistered selection observed without backend/model/vehicle. |
| AC-09 | PASSED | README, documentation index, architecture, build/test guide, ADR-0001 supersession and ADR-0002 match actual architecture and limitations. |
| AC-10 | PASSED | This report created; protected assignments/orchestration files preserved; no Step-02, stage, commit or push. |
## Failures, deviations and environment side effect
- The first Windows solution build needed the runtime-specific `win-x64` restore
to obtain its MAUI runtime pack (`NETSDK1112`); the explicit restore above
resolved it.
- An initial integration restore identified a redundant explicit
`Microsoft.Extensions.DependencyInjection` package (`NU1510`) because the
project already uses the ASP.NET Core framework reference. The redundant direct
package was removed from the integration-test project; restore and tests then
succeeded. No test assertion was removed.
- Native smoke identified and fixed the missing global UI stylesheet link as
described above. All final checks were rerun after the fix.
- **Unintended environment-level workload action:** during prerequisite
inspection, `dotnet workload restore .\src\AutoForge.slnx --skip-manifest-update`
was mistakenly invoked. It began updating workload manifests and was stopped.
Subsequent `dotnet workload list` output reports workload version `10.0.403`
and newer iOS/MacCatalyst manifest versions; the required `maui-windows`
manifest remains `10.0.110`. No rollback was attempted. This changed the local
tool environment, not repository source/configuration.
- A first DevTools form probe dispatched only an `input` event and therefore did
not trigger Blazor's `change` binding. The smoke probe was corrected to dispatch
the bound change event; explicit submission then produced the expected
`ProviderNotRegistered` result. No product-code change was needed for that
harness correction.
- No required build, test or native check remains blocked or unexecuted.
## Documentation, preservation and handoff
ADR-0002 records one native shell, two purposeful RCLs and feature-oriented
application slices. ADR-0001 retains the valid platform-neutral foundation,
explicit-target and no-fallback decisions; only the former dual-shell and
deferred-host decision is superseded. README/docs distinguish implemented
metadata selection from planned vehicle, simulation, diagnostics, AI and
hardware capabilities.
The worktree was already dirty with accepted Step-01 implementation and
orchestration files. Those changes were preserved; no destructive Git operation,
staging, commit or push was performed. `prompts/ROADMAP.md`, `prompts/STATE.md`,
the Step-01 assignment/report, Step-01A assignment, Step-02 assignment and
instruction files were not edited by this correction. No unrelated dirty files
were reverted.
Implementation and verification are complete for orchestrator review. The
orchestrator must perform manual acceptance; Step-02 remains held and was not
executed.
```

399
prompts/Step-01A.md Normal file
View File

@ -0,0 +1,399 @@
# Step-01A - Single-shell MAUI/RCL and vertical-slice foundation
## STEP IDENTIFIER
Step-01A, an owner-directed architectural correction to accepted Step-01.
This is the sole active assignment. Step-02 is unexecuted and NOT authorized.
## STEP TITLE
Preserve the accepted foundation while establishing one thin MAUI Blazor Hybrid
Client, two purposeful Razor Component Libraries, and feature-oriented application
organization.
## OBJECTIVE
Deliver a minimal but working Windows-first .NET 10 application foundation:
`AutoForge.Client -> AutoForge.UI -> AutoForge.Components`
Client hosts the complete application UI through BlazorWebView and composes
application services in-process. Application use cases follow Vertical Slice
Architecture within a modular monolith. Preserve domain behavior, useful source,
configuration and all accepted regression coverage.
Implement only this correction, build/test the actual targets, record evidence in
`prompts/Step-01A-Report.md`, and STOP. Do not begin Step-02.
## ARCHITECTURAL CONTEXT AND AUTHORITY
The owner's 2026-10-28 architectural realignment supersedes previous dual-shell
requirements and the plan to defer all host/RCL work until Step-05.
- Sole initial application executable: **AutoForge.Client**, a .NET 10 MAUI Blazor
Hybrid application, initially Windows.
- **AutoForge.UI**: .NET 10 RCL containing the complete application UI, including
routing, pages, navigation, layouts, feature presentation and interaction flows.
- **AutoForge.Components**: .NET 10 RCL for generic reusable components/controls.
- Client is thin: native startup/configuration, lifecycle, BlazorWebView,
dependency injection and platform services. No feature implementations inside it.
- No standalone Blazor WebAssembly shell, separate AutoForge.Web/AutoForge.Maui
hosts, Blazor Server substitute or initial backend executable is required.
- Application, simulation, diagnostics, calibration and AI services can execute
in-process. Additional hosts/processes need a concrete requirement and approval.
- Application features use cohesive vertical slices, not generic technical layers,
artificial manager/repository abstractions or mandatory mediator boilerplate.
- Reusable engines/protocols/domain capabilities remain independent of UI and
their coordinating application slices; do not force every library to reference
Application or create every planned subsystem now.
Read [ROADMAP.md](ROADMAP.md), [STATE.md](STATE.md), the original
[Step-01](Step-01.md) and [report](Step-01-Report.md), and current technical docs.
Old host descriptions in those historical files are superseded by this correction.
Do not alter historical assignments/reports or execute the held [Step-02](Step-02.md).
## CURRENT IMPLEMENTATION STATE
Actual inspection found only these projects in [AutoForge.slnx](../src/AutoForge.slnx):
| Project | Current responsibility / references |
|---|---|
| `src/AutoForge.Core` | net10.0 immutable execution-target kind/descriptor; no project or package dependencies |
| `src/AutoForge.Application` | net10.0 target resolution, typed failures and eager DI registration; references Core and DI abstractions |
| `src/tests/AutoForge.UnitTests` | net10.0 real Core/Application invariants; references Core/Application |
| `src/tests/AutoForge.IntegrationTests` | net10.0 real target-selection DI/container composition; references Core/Application |
No Client, UI, Components, Web or Maui project exists. There are no current Razor
pages/components to relocate or old hosts to delete. Do not invent migration work
or recreate the accepted libraries.
Existing Application code is under `ExecutionTargets`. The Core descriptor is
sealed and validated; the resolver snapshots registrations, uses ordinal
case-insensitive IDs and rejects missing/unknown/duplicate/mismatched selections.
The DI extension validates eagerly and rejects repeated registration.
Production contains no connected/available provider implementation.
The accepted worker report records SDK 10.0.402, runtime 10.0.13 on Windows x64,
successful Release build with zero warnings/errors and 54 passing cases:
35 unit, 19 integration, zero failed/skipped. These are previous worker results,
not new correction verification or orchestrator runtime execution.
Existing configuration includes a stable same-feature-band SDK pin, nullable
references, warnings as errors, central package versions and repository-local
nuget.org feed. Preserve these conventions and the working VSTest/xUnit stack.
MAUI/Windows/WebView2 prerequisites have NOT been verified.
The worktree contains accepted unstaged/uncommitted implementation. Preserve it,
any concurrent changes, Git metadata and the three top-level project directories
`docs`, `src`, `prompts`. No root tests/artifacts or nested repository.
## REQUIRED IMPLEMENTATION
### 1. Inspect prerequisites and scope before editing
- Inspect Git status, instructions, solution, source/tests, configuration and docs.
Reconcile differences from this snapshot without discarding unrelated work.
- Inspect installed .NET SDK, MAUI workloads/templates, supported Windows target
framework/Windows SDK and desktop/WebView2 prerequisites. Record actual versions
and exact commands. Do not infer native readiness from the accepted headless build.
- Use compatible .NET 10 templates/project tooling where available. Verify actual
package/API/template capabilities before adding references or code.
- Do not install major SDKs/workloads/Windows components/drivers without
authorization. If missing, report precise prerequisites and native checks as
BLOCKED/NOT EXECUTED, not PASSED. Preserve the architecture; do not substitute a
browser/server host or quietly exclude Client from the required solution.
- Continue independent RCL/application/test work where feasible, but do not claim
overall completion if mandatory native build/startup evidence remains blocked.
### 2. Add the three UI projects to the existing solution
| Project | Required foundation |
|---|---|
| `src/AutoForge.Client/AutoForge.Client.csproj` | .NET 10 MAUI Blazor Hybrid executable; initially Windows only, using an actual supported Windows TFM and verified MAUI tooling |
| `src/AutoForge.UI/AutoForge.UI.csproj` | net10.0 Razor Component Library for the entire routed application UI |
| `src/AutoForge.Components/AutoForge.Components.csproj` | net10.0 Razor Component Library for reusable vehicle-independent UI |
Expected solution total: seven projects, preserving the existing four. Do not
scaffold Android/iOS/Mac targets merely because a template includes them; additional
platforms require a later need and verification.
Use the framework's actual BlazorWebView bootstrap, root selector/component,
host page, resources, CSS and RCL static asset conventions. Client may contain
necessary MAUI App/MainPage/platform bootstrap and the host HTML, but application
Router, routes, layouts, navigation and feature pages must be in UI.
Ensure assets resolve from both RCLs and the root component loads the UI assembly.
Do not leave a Router pointed at an empty Client assembly.
Remove unused template Counter/Weather/sample services or relocate only genuinely
useful content. Do not create a second executable, separate backend, startup HTTP
server, browser host or fake platform fallback. Test runner executables are not
application shells.
### 3. Establish meaningful minimal RCL behavior
Provide only a small foundation UI, not future automotive features:
1. A foundation/home page and a minimal execution-target metadata selection page
in UI, with working navigation/layout and explicit unknown-route handling.
2. A generic reusable status/notification component in Components, used by the UI.
Give it a small useful parameter/state contract and test its actual rendered
behavior. Do not add placeholder gauges/charts that have no real data source.
3. The selection page invokes the existing application use case through DI,
requiring explicit provider identifier and target kind. Production registry
remains empty; display an honest unavailable/not-registered outcome.
4. Keep invalid-input/application errors visible to the user with specific handling,
not a broad catch, blank page, success-shaped fallback or hidden failure.
5. A selected metadata descriptor, if supplied in a synthetic headless test, must
never be labeled connected, hardware-capable, write-approved or programmable.
6. Keep application validation in the application/domain boundary. Razor code
contains presentation/input handling, not a duplicate resolver/business workflow.
The application must start without a vehicle, AI model, cloud account, backend or
native automotive driver. No synthetic production provider is to be registered
just to make the screen look connected.
### 4. Establish the vertical-slice foundation without rewriting behavior
Retain AutoForge.Application immediately: a real use case already exists there.
Organize the existing target-selection operation as a cohesive feature slice,
for example `Features/ExecutionTargets/SelectExecutionTarget`.
Keep its service/contract, errors and composition close to the use case as useful.
- Preserve validation, errors, exact descriptor identity, comparison semantics,
mutation isolation, duplicate handling, empty-registry behavior and no fallback.
- Moving files is sufficient if it establishes feature ownership; do not wrap
every method in requests/handlers or duplicate the resolver behind a new layer.
- Preserve public contracts/namespaces where practical. If a necessary rename
changes references, update all consumers/tests/docs coherently and explain it;
no speculative compatibility adapter is required.
- Keep target kinds/descriptors in reusable Core rather than dragging domain
contracts into UI, Client or an application-only request type.
- UI may use a `Features/Foundation` or `Features/ExecutionTargets` arrangement
for the two real presentation operations. Do not create empty Vehicles,
Diagnostics, Simulation, Calibration, Telemetry or AI feature directories.
- Document how future slices coordinate independently testable capabilities.
Do not implement those capabilities now.
- Do not add MediatR, generic repositories/managers, service locators, automatic
discovery or new infrastructure solely to demonstrate architecture.
### 5. Enforce project and composition boundaries
Required references:
- Client -> UI; Client -> Application as needed for composition.
- UI -> Components; UI -> Application/contracts and domain types as needed.
- Application -> Core, retaining its narrow infrastructure dependencies.
- Components -> no other AutoForge production project in this foundation.
Forbidden directions include Components -> UI/Client/Application, UI -> Client,
Core/Application -> UI/Client/Components, and production -> tests. No cycles.
Do not introduce a requirement for every capability library to depend on
Application. Future native adapters are composed by Client behind suitable ports.
Headless tests must exercise Components/UI/application features without referencing
or starting Client. The native shell must use the same application registration
and services tested headlessly, not a second fake implementation.
Review central package pins, RCL/MAUI references and shared build settings for
actual .NET 10 compatibility. Add only justified dependencies. Do not force
desktop-only settings or native targets onto Core/RCL/test projects, add a
server-only shared-framework requirement to MAUI by accident, suppress warnings
globally, or change SDK/test tooling just to conceal an integration failure.
## FILES OR PROJECTS EXPECTED TO CHANGE
- Add Client, UI and Components under `src`; update the existing solution.
- Move/reorganize the existing Application feature and update references only
where required, preserving Core and existing behavior.
- Extend the existing UnitTests/IntegrationTests with meaningful component,
application-UI integration and dependency-boundary coverage. Reference RCLs in
tests only as required; no new test project is expected.
- Update central package/build configuration only where justified by MAUI/RCL work.
- Update root README, documentation index, architecture and build/test guide.
- Add a superseding architecture ADR under `docs`, and mark affected old decisions
superseded while retaining their historical context.
- Under `prompts`, create/update only `Step-01A-Report.md`.
Do not change any assignment, ROADMAP, STATE, Step-01 report or held Step-02.
Do not modify/create `.github/copilot-instructions.md` or override instruction files.
Do not stage, commit, push, initialize Git, reset the repository or remove reports.
If an unexpected obsolete host appears due to concurrent work, inspect and preserve
its useful content before a narrowly justified migration; do not delete broad trees.
## INTERFACE AND DEPENDENCY REQUIREMENTS
The primary direction remains Client -> UI -> Components; UI invokes application
feature contracts, Client composes them in-process, and Core stays independent.
RCL/application testing is independent of MAUI. A backend is not required for
separation of concerns.
Use normal DI and small direct services/handlers. No UI or application feature may
acquire arbitrary hardware write authority. Preserve the distinction between
simulation, replay and physical target metadata. No operation execution is added.
Future deterministic simulation remains AI-independent with an isolated oracle.
Existing local-first behavior and all hardware safety/prohibited-operation
restrictions remain in force.
## TESTING REQUIREMENTS
### Unit and regression tests
Preserve all 35 existing unit and 19 integration cases/invariants. Add substantive
tests for any changed/new feature behavior and reusable component rendering.
If moving names/files, map the original cases to their preserved equivalents.
Do not delete assertions or introduce required skipped tests to report a green run.
For the generic component, verify meaningful rendered state/content changes and
safe text rendering, not merely that the type exists or DI can construct it.
Use framework-supported headless rendering or a narrowly justified compatible
test tool; verify its actual API rather than adding packages speculatively.
### Integration and architecture tests
Exercise the actual UI/Application/Components implementation without Client:
1. Render the foundation UI and verify it uses the reusable component and actual
application service contract through DI.
2. Exercise metadata selection with explicit synthetic registrations in tests:
exact selection, empty registry, invalid input and mismatched kind remain
truthful and visible; no connection/write-approval claim or fallback.
3. Verify application route ownership/navigation and unknown-route behavior in
the UI assembly, with native route smoke evidence below. Do not count only
string searches or file-existence assertions as UI integration.
4. Verify the actual project graph has Client -> UI -> Components, no reverse/
forbidden references or cycles, one intended production executable, and no
required obsolete WebAssembly/web/backend host.
5. Verify the feature registration used by Client is the real tested registration;
preserve eager validation, immutable snapshots and explicit target selection.
Graph/source-policy assertions supplement, not replace, actual Razor compilation,
rendered-behavior integration, native build and native startup evidence.
Do not mock the feature/component under test or relabel metadata tests as hardware
or native application integration.
### Required build and test execution
Record actual SDK/workload/Windows SDK/WebView2 versions and exact commands.
Build Core, Application, both RCLs and tests with the existing Release conventions.
Build the native Client for its actual Windows TFM, then the applicable complete
solution targets when prerequisites permit.
Use repository-root PowerShell entry points, verified for the actual project
configuration:
- Restore affected projects/solution after necessary manifest changes.
- `dotnet build .\src\AutoForge.slnx --configuration Release --no-restore`
when the single Windows Client target and installed workloads permit.
- Build Client directly with its actual Windows TFM if needed to identify the
native failure precisely. Do not apply a Windows `--framework` override to all
portable projects in the solution.
- Run both existing test projects explicitly in Release using the existing
VSTest runner; also run any appropriate full-solution regression command that
actually supports the configured native target.
If native workloads are missing, build/test independent projects directly and
report those successful results separately. Do not use a partial solution filter
or an excluded Client to claim the complete solution passed. Do not claim a MAUI
build from successful Core/RCL/test compilation alone.
### Native startup smoke verification
Where desktop execution is available, launch the actual Client, verify that
BlazorWebView displays the UI RCL, both foundation routes/navigation and shared
component assets work, and the empty-provider outcome is visible without a backend,
vehicle, driver or model. Record launch method, observed UI behavior, errors and
supporting evidence. A running process or a screenshot of a native blank window
does not prove the RCL loaded.
If startup is impossible due to the desktop session, WebView2 or another exact
prerequisite, mark native smoke BLOCKED/NOT EXECUTED and describe the limitation
separately from compile/headless tests. Do not mark COMPLETE while required native
build or smoke evidence remains missing; report BLOCKED/INCOMPLETE for review.
Only the orchestrator can accept the step and unblock subsequent work.
## DOCUMENTATION REQUIREMENTS
Update the root README and technical documents to describe actual results:
- One Client executable, UI RCL, Components RCL, in-process modular monolith and
primary dependency graph, with a Mermaid diagram where useful.
- Exactly which routes/pages/components and application slice exist, and their
metadata-only limitations; no simulation/diagnostics/AI feature claims.
- Feature ownership and future slice organization without mandatory mediator,
generic technical-layer boilerplate or speculative projects.
- Current SDK/workload/Windows/WebView2 prerequisites, native startup method,
portable versus native build/test commands and honest platform limitations.
- Implemented, in-progress and planned scope, Step-01 historical acceptance and
Step-01A worker completion versus pending orchestrator acceptance.
Create a focused ADR recording the owner's corrected single-shell/RCL/VSA
decision. Supersede the old dual-shell/deferred-host portions of ADR-0001 without
erasing the valid foundation decisions or falsifying its history. Remove obsolete
host requirements from active README/architecture/build descriptions. Historical
reports/assignments remain unchanged and explicitly historical, not active design.
Update `docs/README.md` to link actual documents; no empty placeholder documents.
## ACCEPTANCE CRITERIA
| ID | Criterion | Required evidence |
|---|---|---|
| AC-01 | Accepted Core/Application behavior, useful code/configuration, all 54 prior cases and history preserved; exact repository layout/manual workflow maintained | Git review, case mapping and regression outcomes |
| AC-02 | Existing solution includes the four original projects plus Client/UI/Components; Client is the only initial application executable and a genuine .NET 10 MAUI Blazor Hybrid target | Solution/project graph, actual native configuration/build evidence |
| AC-03 | Client hosts UI via BlazorWebView; application routes/pages/layout/navigation reside in UI, generic component in Components; no shell feature implementations | Source paths, Razor compilation, rendered tests and native smoke evidence |
| AC-04 | Required Client -> UI -> Components references and allowed application composition exist, without reverse/forbidden references or cycles | Architecture assertions and inspected actual project graph |
| AC-05 | Existing Application is retained and target selection is feature-organized with unchanged explicit/no-fallback validation and errors; no unnecessary mediator/layers/future slices | Feature/source paths, regression tests and design explanation |
| AC-06 | Real headless component and UI/application integration tests verify rendered behavior and errors independently of MAUI | Actual tests, assertions, commands and nonzero discovered/passed counts |
| AC-07 | Affected projects, RCLs, native Windows Client and applicable complete solution targets build; both test suites/regressions pass | Exact commands, targets, versions, exit outcomes, warnings and per-project counts |
| AC-08 | Native Client loads UI/navigation/shared assets and honest empty-provider behavior without a backend/model/vehicle | Native launch observations/evidence; exact blocker if execution unavailable, never a false pass |
| AC-09 | README, technical docs/index and superseding ADR match one shell, two RCLs, VSA/modular monolith and actual verification limits | Documentation paths and supersession/status summary |
| AC-10 | Correct report produced; assignments/state/roadmap/protected instructions and old reports preserved; worker stops without Step-02 execution | `prompts/Step-01A-Report.md`, preservation/scope review and explicit stop |
Map every criterion to PASSED, FAILED, NOT EXECUTED or BLOCKED with concrete
evidence. COMPLETE requires all required verification, including native evidence.
Missing workload/runtime prerequisites are real blockers, not permission to
replace architecture, suppress failures or start Step-02.
## OUT-OF-SCOPE WORK
Vehicle/profile implementation, module discovery/diagnostic protocols, simulation/
physics, telemetry acquisition/recording/replay, calibration editing/programming/
backups, AI inference/knowledge/research, driver integration, actual hardware
operations, future application features, additional executable hosts/backends,
new platforms, databases, containers, cloud services and automatic agent handoffs.
Do not implement every example slice/library/component listed in the product
vision. No emissions defeat, anti-theft bypass, mileage falsification or safety
disabling functionality is permitted.
## REPORTING REQUIREMENTS
Create `prompts/Step-01A-Report.md` entirely inside exactly one plain triple-backtick
code fence, without a language tag or content outside it. Use no nested fences.
Use the same copy-window format for the final chat report.
Include:
1. Step identifier/title and COMPLETE, INCOMPLETE or BLOCKED status.
2. Implemented functionality summary, distinct from future capabilities.
3. Files/projects created and modified; moves/removals with preservation rationale.
4. Actual project/reference graph, sole executable, application feature arrangement,
UI/component ownership, and architectural changes.
5. Unit tests created/modified and original-case preservation.
6. Integration/architecture tests created/modified and actual rendered/application
boundaries tested, distinct from native smoke.
7. SDK, workload, Windows SDK, WebView2, package and runner inspection/results.
8. Exact build/restore commands, targets, exit outcomes, warnings/errors and any
partial versus full-solution results.
9. Exact test commands/results and per-project discovered/passed/failed/skipped counts.
10. Native launch method, observed UI/navigation/assets/error behavior and evidence,
or exact missing prerequisites and unexecuted checks.
11. AC-01 through AC-10 evidence table.
12. Documentation changes, README changes and ADR supersession.
13. Known limitations, outstanding issues/blockers, corrected failures and any
failed/unexecuted verification.
14. Deviations and rationale; relevant recommendations for orchestrator review.
15. Protected assignment/report/orchestration preservation and final Git review.
Do not claim headless tests prove native integration or metadata proves operational
capability. Save the report and STOP. Do not modify orchestration files, regenerate
Step-02, begin profile work, invoke another agent, stage, commit or push.

493
prompts/Step-02.md Normal file
View File

@ -0,0 +1,493 @@
# Step-02 - Vehicle profiles and control module model
## STEP IDENTIFIER
Step-02, regenerated 2026-10-28 following acceptance of Step-01A.
This assignment explicitly **supersedes the previously prepared but unexecuted
Step-02 assignment** following the Step-01A architectural correction. The old
headless/four-project/dual-host instructions no longer apply.
This is the only currently authorized implementation assignment.
## STEP TITLE
Introduce validated vehicle profiles, extensible module metadata, provenance,
versioned JSON interchange and explicit configuration selection through cohesive
application feature slices, with a thin consumer in the existing UI.
## OBJECTIVE
Deliver a cohesive vertical slice that imports a clearly synthetic vehicle
profile, validates its module identities/capabilities and provenance, registers
multiple saved configurations, selects an exact configuration, and exports it
without losing information. Demonstrate the full path through real application
features, DI-based integration tests and a minimal profile metadata page in the
existing MAUI-hosted UI.
Do not implement simulation, diagnostic communication, calibration editing,
programming or AI. Profile metadata is not evidence that an operation exists
or is authorized.
You are the WORKER. Execute only this assignment, write
`prompts/Step-02-Report.md`, and STOP for manual orchestrator review.
## ARCHITECTURAL CONTEXT
Read [ROADMAP.md](ROADMAP.md), [STATE.md](STATE.md), and the existing
[architecture](../docs/architecture.md) and
[build/test policy](../docs/build-and-test.md).
AutoForge is one local-first .NET 10 platform integrating deterministic simulation,
vehicle-wide diagnostics/telemetry/calibration, and replaceable local AI. Vehicle
and module definitions must be data-driven rather than fixed to a manufacturer,
engine ECU, transmission controller or fixed list of module roles.
Core owns platform-neutral domain types and invariants. Application uses Vertical
Slice Architecture within a modular monolith; profile import/export/list/select
are cohesive feature operations, not a generic service/repository layer.
Organize them under `Features/Vehicles` or an equally clear profile feature area.
Share feature-local schema/catalog code only where it is genuinely reused; do not
force every operation into requests/handlers or introduce a mediator.
The sole executable remains AutoForge.Client (.NET 10 MAUI Blazor Hybrid);
AutoForge.UI owns pages/routes/feature presentation and AutoForge.Components owns
generic controls. UI invokes application contracts; Client performs thin in-process
composition. Preserve Client -> UI -> Components and inward domain dependencies.
Keep all seven projects. No new shell/RCL/backend or restructuring belongs here.
All source and automated tests remain under `src`; tests under `src/tests`.
Only `docs`, `src`, and `prompts` are top-level project directories. Preserve root
configuration and protected infrastructure. Handoffs are manual, with no watchers,
polling, automatic agent invocation or next-step execution.
## CURRENT IMPLEMENTATION STATE
Accepted Step-01 plus Step-01A provide:
- [AutoForge.slnx](../src/AutoForge.slnx) with Core, Application, Components, UI,
Client, UnitTests and IntegrationTests. Client targets
`net10.0-windows10.0.26100.0`/win-x64; the other projects target `net10.0`.
- Client -> UI/Application; UI -> Components/Application; Application -> Core.
Neither portable test project references Client; Components has no AutoForge
project dependency and there is no cycle or separate backend.
- Immutable target descriptors for Simulation, RecordedReplay and PhysicalHardware.
Resolution requires an explicit provider identifier and kind; unknown,
mismatched, invalid or ambiguous inputs fail without fallback.
- Snapshot isolation and eager DI validation through
[AddAutoForgeTargetSelection](../src/AutoForge.Application/Features/ExecutionTargets/SelectExecutionTarget/ServiceCollectionExtensions.cs).
There are no production provider registrations or operational transports.
- Existing application target-selection slice at
`Features/ExecutionTargets/SelectExecutionTarget` with stable public namespace.
Existing UI routes `/`, `/execution-targets` and explicit not-found presentation,
a feature-local selection view model, `AddAutoForgeUi`, and reusable StatusNotice.
Client uses real application DI with an empty provider registry.
- SDK 10.0.402 with stable same-feature-band patch roll-forward, shared nullable/
warnings-as-errors conventions, central package pins and a working VSTest/xUnit
test stack.
- Worker-recorded successful full solution/direct native Release builds, zero
warnings/errors, 39 unit plus 26 integration cases passed and zero failed/skipped.
This includes all 54 Step-01 regressions. Native Windows route/asset/selection
smoke was reported. See [Step-01A report](Step-01A-Report.md).
- Reported native prerequisites: MAUI Windows manifest 10.0.110, Windows SDK
10.0.26100.0, runtime 10.0.13 and WebView2 155.0.4283.62.
- No vehicle/profile model, simulator, diagnostic/telemetry engine, persistent
storage, AI or hardware operation exists.
The orchestrator accepted Step-01A by inspecting implementation and evidence,
not by rerunning builds/tests. Reinspect Git status and applicable instructions;
existing implementation changes are still unstaged/uncommitted and must not be
discarded. Preserve all prior assignments/reports.
Known hygiene/process notes:
- The prior worker mistakenly invoked workload restore during inspection and
reported manifest updates. No rollback occurred. Do not run `dotnet workload
restore`, install, update, repair or uninstall as inspection or without separate
authorization. Read-only SDK/workload listing is sufficient unless a concrete
failure identifies a prerequisite. Ordinary package restore is different.
- Raw Git whitespace checking flags README CRLF against a mixed-line-ending index;
no trailing spaces/tabs were found. Normalize README to the repository's existing
Markdown LF convention during its required update, without changing Git settings.
## REQUIRED IMPLEMENTATION
### 1. Vehicle definitions and saved profiles
Introduce a small, strongly typed domain model sufficient to represent:
1. A stable profile identifier, profile/configuration revision and vehicle identity
or definition reference. Keep schema version separate from profile revision.
2. Manufacturer/model/model year and optional trim, engine, transmission and
drivetrain information. Unknown optional facts must remain explicitly unknown,
not fabricated defaults such as a zero model year or invented engine.
3. A saved vehicle configuration with an arbitrary inventory of module instances.
The same vehicle may have multiple saved configurations or revisions; different
vehicles may have different inventories.
4. Module-instance identity distinct from its human-readable role/name, plus
hardware, software, firmware and calibration identifiers where known.
Unknown identifiers do not become "compatible" or a complete firmware image.
5. Calibration identity/reference metadata only, sufficient to distinguish saved
configurations. Do not model memory offsets, tune tables, firmware bytes or
real manufacturer definitions in this step.
Use explicit validation for required fields, positive revision/schema values,
identifier uniqueness and valid optional values. Define identifier comparison
semantics; do not silently trim or merge ambiguous identities. Modules of the same
role may coexist if their instance identities differ. Do not use a fixed enum of
module types that prevents a new/custom module role.
Prefer a self-contained profile document for this first interchange format.
If references are used internally, validate that required references resolve
within the document/catalog and cannot silently bind to an unrelated revision.
Avoid a generic entity/definition framework or arbitrary property-bag domain.
### 2. Capability declarations with explicit uncertainty
Represent operation identifiers independently of module role. Support ordinary
diagnostic/configuration/calibration/firmware/service operation declarations and
custom operation identifiers without changing a closed module-type enumeration.
Distinguish at least Supported, Unsupported, Unknown, Inaccessible and Restricted.
Describe their meaning in documentation and retain explanatory restrictions/
limitations and supporting provenance where supplied.
- A missing declaration must not become Supported. Expose a documented explicit
not-declared/Unknown outcome with a reason, or an explicit lookup failure.
- Unknown, inaccessible, restricted and unsupported are not interchangeable.
- Declared support is metadata, not an implemented service, connection, permission
or physical-write authorization.
- Reject invalid statuses and duplicate/ambiguous declarations. Ensure caller
mutation cannot alter a validated profile's capabilities.
Do not add an operation executor, a programming approval system or a real
capability-discovery implementation.
### 3. Provenance and applicability
Provide a practical reusable evidence representation for profile/module facts and
capability/identity metadata. It must carry:
- Classification: VERIFIED, UNVERIFIED, INFERRED or SYNTHETIC.
- Source/reference and useful evidence description.
- Publication/retrieval information when known, supplied explicitly rather than
generated from the current clock during validation or serialization.
- Applicable vehicle/configuration/module and hardware/software/firmware or
calibration context where known.
- Confidence/verification information and known limitations; unknown confidence
is allowed explicitly rather than silently treated as certain.
Define inheritance or reference rules so evidence is not copied everywhere while
its applicability remains unambiguous. Reject dangling evidence references,
invalid classification/confidence values, and conflicting applicability rather
than silently mixing vehicles, model years or module versions.
If confidence is numeric, document the scale and require finite in-range values,
including rejection of NaN/infinity through any direct construction path.
Do not claim that labeling a source VERIFIED independently verifies its contents.
The system preserves supplied evidence; no online research or authority promotion
is implemented. Synthetic fixture facts/evidence must remain visibly SYNTHETIC.
No provenance status authorizes physical writes.
### 4. Versioned JSON interchange with validation
Implement import/export of a documented schema version 1 through Application.
Use built-in .NET JSON support unless a concrete missing capability justifies a
dependency; verify any actual API before using it.
Requirements:
1. Schema version is explicit and distinct from profile/configuration revision.
2. Reject missing/unsupported schema versions, malformed JSON, null/missing required
fields, invalid enum/status values, duplicate identities/capabilities, broken
references and invalid domain data. Do not silently downgrade or "repair" input.
3. Reject ambiguous duplicate JSON properties. Define an explicit unknown-property
policy; prefer rejecting unknown schema fields for v1 rather than silently
discarding identity, capability or provenance information.
4. Optional unknown information has a documented representation that round-trips
without becoming a default fact. Persist all declared statuses and provenance.
5. Deserialization must enforce the same invariants as direct domain construction;
it cannot bypass validation through setters, mutable arrays or DTO mapping.
6. Round-trip a valid profile without semantic loss, including module inventory,
unknowns, identity/revision, capability states and evidence applicability.
7. Failures are explicit and actionable with schema/property/identifier context
as appropriate. Do not log full private payloads or silently return an empty
synthetic profile. Follow existing argument/typed-exception conventions.
8. No wall-clock-generated IDs/timestamps, random behavior, network calls or hidden
file writes during import/export. In-memory string/stream interchange is enough;
no database or permanent user-file storage is required.
The worker chooses straightforward domain and serialization representations.
If DTOs/mapping are necessary to preserve invariants, keep them local and small;
Core must not depend on DI, Application or persistence infrastructure.
### 5. Explicit catalog selection and real application composition
Provide a narrow application service/catalog that accepts validated profiles,
lists available configuration identities and resolves an explicitly requested
profile/configuration identifier and revision.
Expose these behaviors through cohesive feature operations; an in-memory
feature-local catalog is sufficient. Do not introduce generic repositories or
permanent database/file storage. Keep any selected configuration explicit to the
request/presentation scope rather than a mutable global execution mode.
- Support multiple vehicles and multiple saved variants of one vehicle.
- Reject duplicate keys under the documented identity rule. An exact unknown
revision must fail even when another revision of that profile exists.
- Require explicit selection; do not choose the first/latest/closest profile,
substitute another vehicle or infer a physical execution target.
- Preserve immutable snapshots. Editing/replacing caller collections or registering
another configuration must not mutate an original validated version.
- Empty catalogs produce explicit not-found/unavailable behavior, not a fabricated
vehicle. Failed import must not partially register a profile.
- Wire through the real DI path, without changing the existing target-selection
contract or registering fake connected/available providers.
Catalog selection is metadata selection only. It must not couple profile loading
to a global active target, a hardware connection, the UI or an AI model.
### 6. Clearly synthetic example data
Create source-controlled schema-v1 fixtures under the test tree:
- An AutoForge Synthetic Test Truck baseline with at least three differently
named module instances, including a non-powertrain role.
- A second saved configuration/revision for that vehicle with a meaningful metadata
difference, such as a distinct synthetic calibration identity. Preserve the
original baseline without modifying it.
- Test coverage for another differently shaped synthetic vehicle/inventory,
including a custom module role and operation identifier.
Across the fixtures/tests, exercise all five capability states and at least one
unknown optional identity. Supply explicit synthetic provenance and limitations.
Do not claim real manufacturer compatibility, use private VINs, invent authentic
diagnostic commands/offsets, or put synthetic fixture data in ignored local-data.
Fixtures describe metadata, not real services or working simulation.
Avoid duplicated fixture copies between test projects or an unnecessary shared
test-helper assembly. Use a simple existing test-tree arrangement.
### 7. Minimal profile UI in the existing application
Add a profile metadata feature page, for example `/vehicle-profiles`, under
AutoForge.UI's feature organization, plus a navigation entry in the existing
layout. Do not move routing/pages into Client or restructure the shell.
- Provide a simple JSON text input for explicit import, an available-profile/
revision listing and explicit selection, and a read-only metadata inspection/
JSON export area. No OS file picker, persistent user files or auto-loaded real
vehicle database is needed.
- Invoke the same application import/list/select/export operations tested
headlessly. Presentation adapts inputs and displays errors; domain/schema
validation remains in Core/Application.
- Show module identities, declared capability states, unknown information,
provenance and synthetic limitations accurately. Reuse StatusNotice.
- Do not silently select the first/latest/imported configuration, mutate a
previously selected baseline, or change execution-target/provider registration.
- Invalid JSON, unsupported schema, duplicate import and unknown selection must
produce explicit visible errors without partial registration or replacement.
- Do not claim a loaded profile is connected, a supported service is implemented,
or a synthetic calibration identity is firmware/tune data.
- Restrict Client changes to necessary feature DI composition; add no second
executable, backend, native adapter, fake provider or placeholder future screen.
## FILES OR PROJECTS EXPECTED TO CHANGE
- Add domain models/validation to `src/AutoForge.Core`.
- Add feature-organized JSON interchange/catalog operations and DI wiring under
`src/AutoForge.Application/Features`.
- Add profile feature presentation and navigation in `src/AutoForge.UI`; reuse
Components. Touch Client only for necessary in-process DI composition.
- Extend both existing test projects; place synthetic fixtures under `src/tests`.
- Update root README and relevant documentation under `docs`.
- Update dependency/build configuration only if necessary, with a specific rationale.
- Create only `prompts/Step-02-Report.md` under `prompts`.
Do not modify roadmap/state/assignments or prior worker reports. Do not modify or
create `.github/copilot-instructions.md`, or alternative override instructions.
Preserve existing uncommitted changes. Do not stage, commit, push or initialize Git.
## INTERFACE AND DEPENDENCY REQUIREMENTS
- Keep all seven existing projects and corrected reference direction. No new
framework, database, host, adapter, RCL, knowledge service or test project is needed.
- Reuse existing validation/error/DI patterns where applicable without forcing
unrelated abstractions. Keep the explicit-target service behavior unchanged.
- Profile/module/capability identity is data-driven. Unknown facts cannot enable
support or authorize execution, and provenance cannot override access restrictions.
- Use strongly typed models and immutable/snapshotted collections. Do not expose
backing arrays/lists/dictionaries that bypass validation.
- Use the installed SDK/test stack and existing central pins. Do not install
packages preemptively or retarget to another framework.
- Application/domain tests remain independent of UI/native startup. UI tests render
the actual portable RCL without Client. No external service, inference, cloud
account, device, model, wall-clock data input or uncontrolled randomness is needed.
- Do not add a simulation ground-truth shortcut to ordinary application models.
## TESTING REQUIREMENTS
### Unit tests
Cover domain construction and use-case behavior, including:
- Required identifiers, valid optional values, invalid revisions/year/confidence/
classification/status values and null/missing data where applicable.
- Multiple modules with the same role but distinct instance IDs; duplicate IDs
and duplicate operation declarations fail under the documented comparison rule.
- Every capability state and explicit missing-capability behavior.
- Evidence references/applicability, unknown identities and synthetic classification.
- Input-collection mutation and immutable original configuration preservation.
- Catalog empty/unknown/duplicate selection, exact revision selection and no
cross-vehicle/first/latest fallback.
- Import/export invalid-input boundaries and semantic round-trip behavior.
### Integration tests
Exercise actual Core/Application/JSON/catalog feature implementations through DI:
1. Load a synthetic fixture, validate and register it, explicitly select its exact
configuration, export/reimport it, and compare the meaningful complete model.
2. Select baseline and variant independently; verify their module/calibration
identity differences and that the baseline remains unchanged.
3. Load another vehicle/custom module/operation without changing production code.
4. Verify all five statuses, evidence classifications/applicability, explicit
unknown values and unknown-capability behavior survive round-trip.
5. Reject malformed JSON, missing/future schema, duplicate properties, invalid/
missing required fields, duplicate module/capability IDs, invalid statuses and
dangling/conflicting evidence. Failed import cannot leave a partial catalog entry.
6. Verify unknown profile/revision and mismatched identity cannot select another
saved configuration; caller mutation cannot change the selected snapshot.
7. Compose profile services alongside the existing target resolver. Loading or
selecting a profile must not create/replace a provider or change an explicit
target selection. Retain all Step-01/Step-01A regression behaviors.
8. Render the real new profile UI with the same application feature composition;
verify metadata/unknown/status/provenance/error presentation and explicit
selection/export behavior. Do not mock the feature under test.
Do not mock the services under test or assert only that a container returns an
object. Use exact structural assertions on identities, values, statuses, unknowns
and provenance; comparing only profile counts or JSON text is insufficient.
### Execution evidence
From the repository root, run the relevant focused tests while implementing,
then run the complete seven-project Release build and both suites for regression:
- `dotnet restore .\src\AutoForge.slnx` when dependency restoration is needed.
- `dotnet build .\src\AutoForge.slnx --configuration Release --no-restore`
- `dotnet test .\src\AutoForge.slnx --configuration Release --no-build`
Use the configured SDK and runner. Record exact commands/exit outcomes, warnings,
per-project discovered/passed/failed/skipped counts and any corrected failures.
Preserve the accepted 54 Step-01 cases/invariants and add substantive new coverage;
also preserve the 11 additional Step-01A rendered/graph cases (65 total baseline).
Do not remove checks or skip acceptance tests to produce a green report.
Build the real Windows Client as well if a direct native command is needed to
diagnose target/runtime issues. Use the existing verified Windows TFM; do not
apply a Windows framework override to portable projects. The established
runtime-specific package restore may be needed after manifest changes:
`dotnet restore .\src\AutoForge.Client\AutoForge.Client.csproj --runtime win-x64`.
This is package restore, not permission to change installed workloads.
### Native profile-feature smoke
Launch the actual Client on the existing supported Windows desktop. Navigate to
the new profile page, import synthetic fixture JSON, explicitly select baseline
and variant, inspect module/capability/provenance/unknown metadata, and export a
selected configuration. Confirm invalid/duplicate input is visible and does not
replace valid data or change target selection. Verify existing home/target/not-found
routes remain functional. Record observations separately from headless tests.
If native execution/build becomes unavailable, report the exact blocker and
unexecuted check honestly; do not substitute a web host or claim full completion.
Report durable evidence in the step report, with optional ignored result files
under `src`. The orchestrator will inspect it without executing builds/tests.
Finish with a Git status/diff and protected-file/scope review; do not discard
unrelated work or perform destructive cleanup.
## DOCUMENTATION REQUIREMENTS
Update the documentation index, architecture, build/test guidance and root README
to describe actual implemented profile/module/provenance/interchange/catalog
behavior and its limitations. Add concise schema-v1/profile documentation with:
- Model responsibilities, identifier/revision semantics and unknown representation.
- The five capability states, missing declaration behavior and no authorization.
- Provenance references/inheritance/applicability, validation and confidence rules.
- JSON schema shape, required/optional fields, unknown/duplicate property policy,
supported version, explicit unsupported-version outcome and future migration rule.
- Synthetic fixture purpose, provenance and how to exercise the application path.
- Immutable version selection and error outcomes.
- Application slice and UI ownership, in-memory/session-only lifetime, explicit
selection, synthetic import/export walkthrough and native smoke procedure.
Record a focused ADR only for a significant new decision, such as persisted
schema/versioning rules; do not create empty future-feature documents.
Align README and existing ADR lifecycle text with Step-01A's acceptance, clearly
distinguish Step-02 worker completion from pending orchestrator acceptance, and
preserve prior reports as historical evidence. Preserve the real native Client
startup/build commands; profiles are metadata only, not a diagnostic transport,
simulator or hardware support. Retain one Client/two RCLs and no backend.
Normalize the README's line endings as noted above; do not change global Git
settings or rewrite unrelated historical files to conceal whitespace warnings.
## ACCEPTANCE CRITERIA
| ID | Criterion | Required evidence |
|---|---|---|
| AC-01 | Existing repository, seven-project single-shell/RCL/VSA architecture, accepted target behavior and manual/protected workflow preserved; no shell restructuring or new assembly | Git/scope/reference review and all 65 baseline regression results |
| AC-02 | Validated versioned profiles model multiple vehicles/configurations, arbitrary module roles, identities and calibration references with explicit unknowns | Source paths and positive/negative domain tests |
| AC-03 | All five capability states, extensible operation IDs, duplicate rejection and explicit missing declarations work without granting operational authority | Behavior tests and documented status contract |
| AC-04 | Provenance classifications, sources, confidence/verification/limitations and applicable identity context round-trip; invalid/conflicting references fail | Model/schema documentation and evidence validation tests |
| AC-05 | Schema-v1 JSON import/export preserves semantic data and enforces domain invariants; malformed/missing/future/ambiguous data fail explicitly | Full round-trip and enumerated rejection tests |
| AC-06 | Feature-organized real DI path supports exact profile/revision selection, empty/unknown/duplicate failure, immutable originals and atomic import; thin real UI consumes it without target fallback | Source paths, application/rendered integration assertions and native profile smoke |
| AC-07 | Clearly synthetic baseline/variant and alternate-vehicle coverage prove data-driven module/operation handling without manufacturer claims | Visible fixture paths and integration evidence |
| AC-08 | Seven-project Release/native build, both suites with all accepted/new cases and native UI smoke succeed; no required skipped/zero-discovery cases | Exact commands/targets/outcomes, warnings, per-project counts and native observations |
| AC-09 | README/index/architecture/schema guidance match implemented scope, lifecycle and existing Markdown convention; prior reports unchanged | Documentation/preservation summary and line-ending check |
| AC-10 | Complete Step-02 report saved at the required path; worker stops without changing orchestration files or starting Step-03 | Report sections, acceptance table and Git review |
Map every criterion to PASSED, FAILED, NOT EXECUTED or BLOCKED with concrete
evidence. Overall COMPLETE requires every criterion and required execution to
succeed. State unresolved failures and environment blockers explicitly.
## OUT-OF-SCOPE WORK
Simulation/dynamics/virtual modules, diagnostics/protocols/transports, telemetry,
recording/replay, calibration definitions/values/editing/programming/backups,
runbooks/approval execution, real hardware/drivers, new/restructured UI hosts/RCLs, databases,
knowledge research/RAG/AI/model downloads, MCP, containers and cloud infrastructure.
No authentic manufacturer definitions or online vehicle research are needed.
No operation intended to defeat emissions, bypass anti-theft, falsify mileage or
disable safety systems is permitted.
## REPORTING REQUIREMENTS
Create `prompts/Step-02-Report.md`, entirely inside exactly one plain triple-backtick
code fence, without a language tag or content outside it. Use no nested fences.
Use the same copy-window format for the final chat report.
Include:
1. Step identifier/title and COMPLETE, INCOMPLETE or BLOCKED status.
2. Implemented functionality and explicit distinction from planned functionality.
3. Files created and modified; pre-existing/concurrent changes preserved.
4. Architectural/project/dependency changes and new public contracts/error behavior.
5. Schema/identifier/revision/unknown/capability/provenance decisions and limitations.
6. Unit tests created/modified and their behavior coverage.
7. Integration tests created/modified and actual boundaries/assertions exercised.
8. Environment/SDK/package/runner choices and any necessary changes.
9. Exact restore/build commands/results, exit outcomes and warnings/errors.
10. Exact test commands/results, per-project counts, prior regression preservation
and any failed/skipped/unexecuted cases.
Include native profile-feature launch/interaction observations separately.
11. AC-01 through AC-10 evidence table.
12. Documentation changes and root README changes.
13. Known limitations, outstanding issues/blockers and corrected failures.
14. Deviations and rationale; relevant recommendations for review.
15. Protected assignment/report/orchestration preservation and final Git review.
Include README line-ending verification and confirm no workload-changing
inspection/installation/update/rollback command was invoked.
Never claim unexecuted tests passed or metadata proves operational compatibility.
After saving the report, STOP. Do not change assignments/roadmap/state, create
Step-03, invoke another agent, automate handoff, stage, commit or push.

View File

@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\AutoForge.Core\AutoForge.Core.csproj" />
</ItemGroup>
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,53 @@
using AutoForge.Core.ExecutionTargets;
namespace AutoForge.Application.ExecutionTargets;
public sealed class ExecutionTargetResolver : IExecutionTargetResolver
{
private readonly Dictionary<string, ExecutionTargetDescriptor> registrations =
new(StringComparer.OrdinalIgnoreCase);
public ExecutionTargetResolver(IEnumerable<ExecutionTargetDescriptor> registrations)
{
ArgumentNullException.ThrowIfNull(registrations);
foreach (var descriptor in registrations)
{
if (descriptor is null)
{
throw new ArgumentException("Registrations cannot contain null descriptors.", nameof(registrations));
}
if (!this.registrations.TryAdd(descriptor.ProviderIdentifier, descriptor))
{
throw new TargetSelectionException(
TargetSelectionFailure.DuplicateProviderIdentifier,
$"Provider identifier '{descriptor.ProviderIdentifier}' is registered more than once. " +
"Use unique identifiers under ordinal case-insensitive comparison, even across target kinds.");
}
}
}
public ExecutionTargetDescriptor Resolve(ExecutionTargetDescriptor selection)
{
ArgumentNullException.ThrowIfNull(selection);
if (!registrations.TryGetValue(selection.ProviderIdentifier, out var descriptor))
{
throw new TargetSelectionException(
TargetSelectionFailure.ProviderNotRegistered,
$"Provider '{selection.ProviderIdentifier}' is not registered. " +
"Supply an explicitly registered provider identifier and target kind.");
}
if (descriptor.Kind != selection.Kind)
{
throw new TargetSelectionException(
TargetSelectionFailure.KindMismatch,
$"Provider '{selection.ProviderIdentifier}' is registered for {descriptor.Kind}, " +
$"not the requested {selection.Kind}. Select the correct provider explicitly; no fallback is allowed.");
}
return descriptor;
}
}

View File

@ -0,0 +1,9 @@
using AutoForge.Core.ExecutionTargets;
namespace AutoForge.Application.ExecutionTargets;
/// <summary>Resolves an explicit provider identifier and kind without substituting another target.</summary>
public interface IExecutionTargetResolver
{
ExecutionTargetDescriptor Resolve(ExecutionTargetDescriptor selection);
}

View File

@ -0,0 +1,25 @@
using AutoForge.Core.ExecutionTargets;
using Microsoft.Extensions.DependencyInjection;
namespace AutoForge.Application.ExecutionTargets;
/// <summary>Composes the explicit target-selection feature from validated metadata registrations.</summary>
public static class ServiceCollectionExtensions
{
public static IServiceCollection AddAutoForgeTargetSelection(
this IServiceCollection services,
IEnumerable<ExecutionTargetDescriptor> registrations)
{
ArgumentNullException.ThrowIfNull(services);
if (services.Any(service => service.ServiceType == typeof(IExecutionTargetResolver)))
{
throw new InvalidOperationException(
"Target selection is already registered. Supply all descriptors in a single registration call.");
}
var resolver = new ExecutionTargetResolver(registrations);
services.AddSingleton<IExecutionTargetResolver>(resolver);
return services;
}
}

View File

@ -0,0 +1,13 @@
namespace AutoForge.Application.ExecutionTargets;
/// <summary>Reports why an explicit target selection could not be resolved.</summary>
public sealed class TargetSelectionException : InvalidOperationException
{
public TargetSelectionException(TargetSelectionFailure failure, string message)
: base(message)
{
Failure = failure;
}
public TargetSelectionFailure Failure { get; }
}

View File

@ -0,0 +1,9 @@
namespace AutoForge.Application.ExecutionTargets;
/// <summary>Identifies an explicit target-selection failure.</summary>
public enum TargetSelectionFailure
{
ProviderNotRegistered = 1,
KindMismatch = 2,
DuplicateProviderIdentifier = 3
}

11
src/AutoForge.Client/.gitignore vendored Normal file
View File

@ -0,0 +1,11 @@
# Build outputs
bin/
obj/
# User-specific files
.vs/
*.user
*.suo
# OS-generated files
.DS_Store

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:AutoForge.Client"
x:Class="AutoForge.Client.App">
<Application.Resources>
<ResourceDictionary>
<!--
For information about styling .NET MAUI pages
please refer to the documentation:
https://go.microsoft.com/fwlink/?linkid=2282329
-->
</ResourceDictionary>
</Application.Resources>
</Application>

View File

@ -0,0 +1,14 @@
namespace AutoForge.Client;
public partial class App : Microsoft.Maui.Controls.Application
{
public App()
{
InitializeComponent();
}
protected override Window CreateWindow(IActivationState? activationState)
{
return new Window(new MainPage()) { Title = "AutoForge" };
}
}

View File

@ -0,0 +1,67 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net10.0-windows10.0.26100.0</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>AutoForge.Client</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<!-- Disable MAUI CSS handling so Blazor can handle it -->
<EnableDefaultCssItems>false</EnableDefaultCssItems>
<Nullable>enable</Nullable>
<!-- Enable XAML source generation for faster build times and improved performance.
This generates C# code from XAML at compile time instead of runtime inflation.
To disable, remove this line.
For individual files, you can override by setting Inflator metadata:
<MauiXaml Update="MyPage.xaml" Inflator="Default" /> (reverts to defaults: Runtime for Debug, XamlC for Release)
<MauiXaml Update="MyPage.xaml" Inflator="Runtime" /> (force runtime inflation) -->
<MauiXamlInflator>SourceGen</MauiXamlInflator>
<!-- Display name -->
<ApplicationTitle>AutoForge</ApplicationTitle>
<!-- App Identifier -->
<ApplicationId>com.companyname.autoforge.client</ApplicationId>
<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>
<!-- To develop, package, and publish an app to the Microsoft Store, see: https://aka.ms/MauiTemplateUnpackaged -->
<WindowsPackageType>None</WindowsPackageType>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
</PropertyGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />
<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AutoForge.UI\AutoForge.UI.csproj" />
<ProjectReference Include="..\AutoForge.Application\AutoForge.Application.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:ui="clr-namespace:AutoForge.UI;assembly=AutoForge.UI"
x:Class="AutoForge.Client.MainPage">
<BlazorWebView x:Name="blazorWebView" HostPage="wwwroot/index.html">
<BlazorWebView.RootComponents>
<RootComponent Selector="#app" ComponentType="{x:Type ui:Routes}" />
</BlazorWebView.RootComponents>
</BlazorWebView>
</ContentPage>

View File

@ -0,0 +1,9 @@
namespace AutoForge.Client;
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}
}

View File

@ -0,0 +1,27 @@
using Microsoft.Extensions.Logging;
using AutoForge.Application.ExecutionTargets;
using AutoForge.UI;
namespace AutoForge.Client;
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureFonts(fonts => fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"));
builder.Services.AddAutoForgeTargetSelection([]);
builder.Services.AddAutoForgeUi();
builder.Services.AddMauiBlazorWebView();
#if DEBUG
builder.Services.AddBlazorWebViewDeveloperTools();
builder.Logging.AddDebug();
#endif
return builder.Build();
}
}

View File

@ -0,0 +1,8 @@
<maui:MauiWinUIApplication
x:Class="AutoForge.Client.WinUI.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:maui="using:Microsoft.Maui"
xmlns:local="using:AutoForge.Client.WinUI">
</maui:MauiWinUIApplication>

View File

@ -0,0 +1,24 @@
using Microsoft.UI.Xaml;
// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.
namespace AutoForge.Client.WinUI;
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
public partial class App : MauiWinUIApplication
{
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
this.InitializeComponent();
}
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}

View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">
<Identity Name="maui-package-name-placeholder" Publisher="CN=User Name" Version="0.0.0.0" />
<mp:PhoneIdentity PhoneProductId="1F1D09CD-3B59-48F1-BB4B-328321B37B0E" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<Properties>
<DisplayName>$placeholder$</DisplayName>
<PublisherDisplayName>User Name</PublisherDisplayName>
<Logo>$placeholder$.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="$placeholder$"
Description="$placeholder$"
Square150x150Logo="$placeholder$.png"
Square44x44Logo="$placeholder$.png"
BackgroundColor="transparent">
<uap:DefaultTile Square71x71Logo="$placeholder$.png" Wide310x150Logo="$placeholder$.png" Square310x310Logo="$placeholder$.png" />
<uap:SplashScreen Image="$placeholder$.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
</Package>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="AutoForge.Client.WinUI.app"/>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<!-- The combination of below two tags have the following effect:
1) Per-Monitor for >= Windows 10 Anniversary Update
2) System < Windows 10 Anniversary Update
-->
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
</assembly>

View File

@ -0,0 +1,8 @@
{
"profiles": {
"Windows Machine": {
"commandName": "Project",
"nativeDebugging": false
}
}
}

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="456" height="456" viewBox="0 0 456 456" version="1.1" xmlns="http://www.w3.org/2000/svg">
<rect x="0" y="0" width="456" height="456" fill="#512BD4" />
</svg>

After

Width:  |  Height:  |  Size: 228 B

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="456" height="456" viewBox="0 0 456 456" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<path d="m 105.50037,281.60863 c -2.70293,0 -5.00091,-0.90042 -6.893127,-2.70209 -1.892214,-1.84778 -2.837901,-4.04181 -2.837901,-6.58209 0,-2.58722 0.945687,-4.80389 2.837901,-6.65167 1.892217,-1.84778 4.190197,-2.77167 6.893127,-2.77167 2.74819,0 5.06798,0.92389 6.96019,2.77167 1.93749,1.84778 2.90581,4.06445 2.90581,6.65167 0,2.54028 -0.96832,4.73431 -2.90581,6.58209 -1.89221,1.80167 -4.212,2.70209 -6.96019,2.70209 z" style="fill:#ffffff;fill-rule:nonzero;stroke-width:0.838376" />
<path d="M 213.56111,280.08446 H 195.99044 L 149.69953,207.0544 c -1.17121,-1.84778 -2.14037,-3.76515 -2.90581,-5.75126 h -0.40578 c 0.36051,2.12528 0.54076,6.67515 0.54076,13.6496 v 65.13172 h -15.54349 v -99.36009 h 18.71925 l 44.7374,71.29798 c 1.89222,2.95695 3.1087,4.98917 3.64945,6.09751 h 0.26996 c -0.45021,-2.6325 -0.67573,-7.09015 -0.67573,-13.37293 v -64.02256 h 15.47557 z" style="fill:#ffffff;fill-rule:nonzero;stroke-width:0.838376" />
<path d="m 289.25134,280.08446 h -54.40052 v -99.36009 h 52.23835 v 13.99669 h -36.15411 v 28.13085 h 33.31621 v 13.9271 h -33.31621 v 29.37835 h 38.31628 z" style="fill:#ffffff;fill-rule:nonzero;stroke-width:0.838376" />
<path d="M 366.56466,194.72106 H 338.7222 v 85.3634 h -16.08423 v -85.3634 h -27.77455 v -13.99669 h 71.70124 z" style="fill:#ffffff;fill-rule:nonzero;stroke-width:0.838376" />
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,15 @@
Any raw assets you want to be deployed with your application can be placed in
this directory (and child directories). Deployment of the asset to your application
is automatically handled by the following `MauiAsset` Build Action within your `.csproj`.
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
These files will be deployed with your package and will be accessible using Essentials:
async Task LoadMauiAsset()
{
using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
using var reader = new StreamReader(stream);
var contents = reader.ReadToEnd();
}

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="456" height="456" viewBox="0 0 456 456" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<path d="m 105.50037,281.60863 c -2.70293,0 -5.00091,-0.90042 -6.893127,-2.70209 -1.892214,-1.84778 -2.837901,-4.04181 -2.837901,-6.58209 0,-2.58722 0.945687,-4.80389 2.837901,-6.65167 1.892217,-1.84778 4.190197,-2.77167 6.893127,-2.77167 2.74819,0 5.06798,0.92389 6.96019,2.77167 1.93749,1.84778 2.90581,4.06445 2.90581,6.65167 0,2.54028 -0.96832,4.73431 -2.90581,6.58209 -1.89221,1.80167 -4.212,2.70209 -6.96019,2.70209 z" style="fill:#ffffff;fill-rule:nonzero;stroke-width:0.838376" />
<path d="M 213.56111,280.08446 H 195.99044 L 149.69953,207.0544 c -1.17121,-1.84778 -2.14037,-3.76515 -2.90581,-5.75126 h -0.40578 c 0.36051,2.12528 0.54076,6.67515 0.54076,13.6496 v 65.13172 h -15.54349 v -99.36009 h 18.71925 l 44.7374,71.29798 c 1.89222,2.95695 3.1087,4.98917 3.64945,6.09751 h 0.26996 c -0.45021,-2.6325 -0.67573,-7.09015 -0.67573,-13.37293 v -64.02256 h 15.47557 z" style="fill:#ffffff;fill-rule:nonzero;stroke-width:0.838376" />
<path d="m 289.25134,280.08446 h -54.40052 v -99.36009 h 52.23835 v 13.99669 h -36.15411 v 28.13085 h 33.31621 v 13.9271 h -33.31621 v 29.37835 h 38.31628 z" style="fill:#ffffff;fill-rule:nonzero;stroke-width:0.838376" />
<path d="M 366.56466,194.72106 H 338.7222 v 85.3634 h -16.08423 v -85.3634 h -27.77455 v -13.99669 h 71.70124 z" style="fill:#ffffff;fill-rule:nonzero;stroke-width:0.838376" />
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
<title>AutoForge</title>
<base href="/" />
<link rel="stylesheet" href="AutoForge.Client.styles.css" />
<link rel="stylesheet" href="_content/AutoForge.UI/app.css" />
<link rel="icon" href="data:,">
</head>
<body>
<div id="app">Loading AutoForge...</div>
<div id="blazor-error-ui" data-nosnippet>
An unhandled error has occurred.
<a href="." class="reload">Reload</a>
<span class="dismiss">🗙</span>
</div>
<script src="_framework/blazor.webview.js" autostart="false"></script>
</body>
</html>

View File

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,15 @@
<div class="@CssClass" role="status" aria-live="polite" aria-atomic="true" data-tone="@ToneName">
@Message
</div>
@code {
[Parameter, EditorRequired]
public string Message { get; set; } = string.Empty;
[Parameter]
public StatusNoticeTone Tone { get; set; } = StatusNoticeTone.Information;
private string ToneName => Tone.ToString().ToLowerInvariant();
private string CssClass => $"status-notice status-notice--{ToneName}";
}

View File

@ -0,0 +1,25 @@
.status-notice {
border: 1px solid currentColor;
border-radius: 0.375rem;
padding: 0.75rem 1rem;
}
.status-notice--information {
color: #174a73;
background: #eaf4fb;
}
.status-notice--success {
color: #205b35;
background: #eaf6ed;
}
.status-notice--warning {
color: #684d00;
background: #fff7db;
}
.status-notice--error {
color: #7c2525;
background: #fdecec;
}

View File

@ -0,0 +1,9 @@
namespace AutoForge.Components;
public enum StatusNoticeTone
{
Information,
Success,
Warning,
Error
}

View File

@ -0,0 +1,2 @@
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Components

View File

@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,28 @@
namespace AutoForge.Core.ExecutionTargets;
public sealed class ExecutionTargetDescriptor
{
public ExecutionTargetDescriptor(string providerIdentifier, ExecutionTargetKind kind)
{
ArgumentException.ThrowIfNullOrWhiteSpace(providerIdentifier);
if (providerIdentifier != providerIdentifier.Trim())
{
throw new ArgumentException(
"Provider identifiers must not contain leading or trailing whitespace.",
nameof(providerIdentifier));
}
if (!Enum.IsDefined(kind))
{
throw new ArgumentOutOfRangeException(nameof(kind), kind, "Specify a defined execution-target kind.");
}
ProviderIdentifier = providerIdentifier;
Kind = kind;
}
public string ProviderIdentifier { get; }
public ExecutionTargetKind Kind { get; }
}

View File

@ -0,0 +1,8 @@
namespace AutoForge.Core.ExecutionTargets;
public enum ExecutionTargetKind
{
Simulation = 1,
RecordedReplay = 2,
PhysicalHardware = 3
}

View File

@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AutoForge.Components\AutoForge.Components.csproj" />
<ProjectReference Include="..\AutoForge.Application\AutoForge.Application.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,41 @@
@page "/execution-targets"
@inject ExecutionTargetSelectionViewModel Selection
<PageTitle>Execution-target selection - AutoForge</PageTitle>
<h1>Select execution-target metadata</h1>
<p>
Enter both values explicitly. Resolution checks registered metadata only;
selection does not connect to a vehicle, execute an operation or grant write approval.
</p>
<StatusNotice Tone="@Selection.StatusTone" Message="@Selection.StatusMessage" />
<form class="selection-form" @onsubmit="Submit" @onsubmit:preventDefault>
<label for="provider-identifier">Provider identifier</label>
<input id="provider-identifier" name="providerIdentifier" autocomplete="off"
@bind="Selection.ProviderIdentifier" />
<label for="target-kind">Execution-target kind</label>
<select id="target-kind" name="targetKind" @bind="Selection.SelectedKind">
<option value="">Choose a target kind</option>
<option value="@ExecutionTargetKind.Simulation">Simulation</option>
<option value="@ExecutionTargetKind.RecordedReplay">Recorded replay</option>
<option value="@ExecutionTargetKind.PhysicalHardware">Physical hardware</option>
</select>
<button type="submit">Resolve metadata</button>
</form>
@if (Selection.SelectedDescriptor is { } descriptor)
{
<p class="selection-result" data-provider="@descriptor.ProviderIdentifier"
data-kind="@descriptor.Kind">
Resolved registered metadata for @descriptor.ProviderIdentifier (@descriptor.Kind).
No connection or operation was performed.
</p>
}
@code {
private void Submit() => Selection.Select();
}

View File

@ -0,0 +1,30 @@
.selection-form {
display: grid;
gap: 0.75rem;
margin-top: 1.5rem;
max-width: 32rem;
}
.selection-form input,
.selection-form select {
border: 1px solid #66788a;
border-radius: 0.25rem;
font: inherit;
padding: 0.6rem;
}
.selection-form button {
background: #14283f;
border: 0;
border-radius: 0.25rem;
color: #fff;
cursor: pointer;
font: inherit;
justify-self: start;
margin-top: 0.5rem;
padding: 0.65rem 1rem;
}
.selection-result {
margin-top: 1rem;
}

View File

@ -0,0 +1,62 @@
using AutoForge.Application.ExecutionTargets;
using AutoForge.Components;
using AutoForge.Core.ExecutionTargets;
namespace AutoForge.UI.Features.ExecutionTargets.SelectExecutionTarget;
public sealed class ExecutionTargetSelectionViewModel(IExecutionTargetResolver resolver)
{
public string ProviderIdentifier { get; set; } = string.Empty;
public ExecutionTargetKind? SelectedKind { get; set; }
public ExecutionTargetDescriptor? SelectedDescriptor { get; private set; }
public bool HasAttemptedSelection { get; private set; }
public StatusNoticeTone StatusTone { get; private set; } = StatusNoticeTone.Warning;
public string StatusMessage { get; private set; } =
"No provider metadata is registered. Choose an explicit provider identifier and target kind; selection will fail until a provider is configured. No connection is attempted.";
public void Select()
{
SelectedDescriptor = null;
HasAttemptedSelection = true;
if (string.IsNullOrWhiteSpace(ProviderIdentifier))
{
SetFailure("Enter an explicit provider identifier.");
return;
}
if (SelectedKind is null)
{
SetFailure("Choose an explicit execution-target kind.");
return;
}
try
{
var selection = new ExecutionTargetDescriptor(ProviderIdentifier, SelectedKind.Value);
SelectedDescriptor = resolver.Resolve(selection);
StatusTone = StatusNoticeTone.Success;
StatusMessage =
$"Metadata selected: {SelectedDescriptor.ProviderIdentifier} ({SelectedDescriptor.Kind}). This does not connect to a vehicle or authorize an operation.";
}
catch (TargetSelectionException exception)
{
SetFailure(exception.Message);
}
catch (ArgumentException exception)
{
SetFailure(exception.Message);
}
}
private void SetFailure(string message)
{
StatusTone = StatusNoticeTone.Error;
StatusMessage = message;
}
}

View File

@ -0,0 +1,15 @@
using AutoForge.UI.Features.ExecutionTargets.SelectExecutionTarget;
using Microsoft.Extensions.DependencyInjection;
namespace AutoForge.UI;
public static class ServiceCollectionExtensions
{
public static IServiceCollection AddAutoForgeUi(this IServiceCollection services)
{
ArgumentNullException.ThrowIfNull(services);
services.AddScoped<ExecutionTargetSelectionViewModel>();
return services;
}
}

View File

@ -0,0 +1,14 @@
@page "/"
<PageTitle>AutoForge</PageTitle>
<h1>AutoForge foundation</h1>
<p>
The application shell is ready for future, independently testable feature slices.
No vehicle, driver, model, backend or cloud service is required to start.
</p>
<StatusNotice Tone="StatusNoticeTone.Information"
Message="Implemented today: explicit execution-target metadata selection. Simulation, diagnostics and hardware operations are not implemented." />
<p>
<a href="/execution-targets">Review execution-target selection</a>
</p>

View File

@ -0,0 +1,5 @@
<PageTitle>Page not found - AutoForge</PageTitle>
<h1>Page not found</h1>
<StatusNotice Tone="StatusNoticeTone.Warning"
Message="That AutoForge page does not exist. Use the navigation links to return to a supported page." />

View File

@ -0,0 +1,19 @@
@inherits LayoutComponentBase
<div class="app-shell">
<header class="site-header">
<a class="brand" href="/">AutoForge</a>
<nav aria-label="Main navigation">
<NavLink href="/" Match="NavLinkMatch.All">Home</NavLink>
<NavLink href="/execution-targets">Target selection</NavLink>
</nav>
</header>
<main id="main-content">
@Body
</main>
<footer>
Target selection is metadata only; it does not connect to a vehicle or authorize an operation.
</footer>
</div>

View File

@ -0,0 +1,51 @@
.app-shell {
display: flex;
min-height: 100vh;
flex-direction: column;
}
.site-header {
align-items: center;
background: #14283f;
color: #fff;
display: flex;
gap: 2rem;
padding: 1rem clamp(1rem, 5vw, 4rem);
}
.brand {
color: inherit;
font-size: 1.25rem;
font-weight: 700;
text-decoration: none;
}
nav {
display: flex;
gap: 1rem;
}
nav a {
color: #d6e4f2;
text-decoration: none;
}
nav a.active {
color: #fff;
text-decoration: underline;
text-underline-offset: 0.25rem;
}
main {
flex: 1;
margin: 0 auto;
max-width: 64rem;
padding: 2rem clamp(1rem, 5vw, 4rem);
width: 100%;
}
footer {
border-top: 1px solid #d5dce4;
color: #384b5f;
padding: 1rem clamp(1rem, 5vw, 4rem);
}

View File

@ -0,0 +1,10 @@
<Router AppAssembly="@typeof(Routes).Assembly">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(Layout.MainLayout)" />
</Found>
<NotFound>
<LayoutView Layout="@typeof(Layout.MainLayout)">
<NotFoundPage />
</LayoutView>
</NotFound>
</Router>

View File

@ -0,0 +1,7 @@
@using Microsoft.AspNetCore.Components
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using AutoForge.Components
@using AutoForge.Core.ExecutionTargets
@using AutoForge.UI.Features.Foundation
@using AutoForge.UI.Features.ExecutionTargets.SelectExecutionTarget

View File

@ -0,0 +1,45 @@
:root {
color: #1d2b38;
font-family: "Segoe UI", Arial, sans-serif;
line-height: 1.5;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
}
#blazor-error-ui {
background: #fff3cd;
bottom: 0;
box-shadow: 0 -1px 2px rgb(0 0 0 / 20%);
box-sizing: border-box;
display: none;
left: 0;
padding: 0.75rem 1rem;
position: fixed;
width: 100%;
z-index: 1000;
}
#blazor-error-ui .dismiss {
cursor: pointer;
position: absolute;
right: 0.75rem;
top: 0.5rem;
}
a {
color: #155c91;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
outline: 3px solid #d69e00;
outline-offset: 2px;
}

11
src/AutoForge.slnx Normal file
View File

@ -0,0 +1,11 @@
<Solution>
<Folder Name="/tests/">
<Project Path="tests/AutoForge.IntegrationTests/AutoForge.IntegrationTests.csproj" />
<Project Path="tests/AutoForge.UnitTests/AutoForge.UnitTests.csproj" />
</Folder>
<Project Path="AutoForge.Application/AutoForge.Application.csproj" />
<Project Path="AutoForge.Client/AutoForge.Client.csproj" />
<Project Path="AutoForge.Components/AutoForge.Components.csproj" />
<Project Path="AutoForge.Core/AutoForge.Core.csproj" />
<Project Path="AutoForge.UI/AutoForge.UI.csproj" />
</Solution>

View File

@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\AutoForge.Core\AutoForge.Core.csproj" />
<ProjectReference Include="..\..\AutoForge.Application\AutoForge.Application.csproj" />
<ProjectReference Include="..\..\AutoForge.Components\AutoForge.Components.csproj" />
<ProjectReference Include="..\..\AutoForge.UI\AutoForge.UI.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,115 @@
using System.Xml.Linq;
namespace AutoForge.IntegrationTests;
public sealed class ProjectGraphTests
{
[Fact]
public void Solution_ContainsOnlyTheExpectedProjectsAndDependencies()
{
var root = FindRepositoryRoot();
var solutionPath = Path.Combine(root, "src", "AutoForge.slnx");
var solution = XDocument.Load(solutionPath);
var projectPaths = solution.Descendants()
.Where(element => element.Name.LocalName == "Project")
.Select(element => (string?)element.Attribute("Path"))
.Where(path => path is not null)
.Select(path => Path.GetFullPath(Path.Combine(Path.GetDirectoryName(solutionPath)!, path!)))
.ToArray();
Assert.Equal(7, projectPaths.Length);
var projects = projectPaths.ToDictionary(
path => Path.GetFileNameWithoutExtension(path),
LoadProject,
StringComparer.Ordinal);
Assert.Equal(
new[]
{
"AutoForge.Application",
"AutoForge.Client",
"AutoForge.Components",
"AutoForge.Core",
"AutoForge.IntegrationTests",
"AutoForge.UI",
"AutoForge.UnitTests"
},
projects.Keys.Order(StringComparer.Ordinal));
AssertReferences(projects, "AutoForge.Core");
AssertReferences(projects, "AutoForge.Application", "AutoForge.Core");
AssertReferences(projects, "AutoForge.Components");
AssertReferences(projects, "AutoForge.UI", "AutoForge.Application", "AutoForge.Components");
AssertReferences(projects, "AutoForge.Client", "AutoForge.Application", "AutoForge.UI");
AssertReferences(
projects,
"AutoForge.UnitTests",
"AutoForge.Application",
"AutoForge.Components",
"AutoForge.Core");
AssertReferences(
projects,
"AutoForge.IntegrationTests",
"AutoForge.Application",
"AutoForge.Components",
"AutoForge.Core",
"AutoForge.UI");
var executables = projects
.Where(pair => GetProperty(pair.Value, "OutputType") == "Exe")
.Select(pair => pair.Key)
.ToArray();
Assert.Equal(["AutoForge.Client"], executables);
Assert.Equal("net10.0-windows10.0.26100.0", GetProperty(projects["AutoForge.Client"], "TargetFramework"));
Assert.Equal("true", GetProperty(projects["AutoForge.Client"], "UseMaui"));
Assert.Null(GetProperty(projects["AutoForge.Client"], "IsTestProject"));
Assert.Equal("net10.0", GetProperty(projects["AutoForge.UI"], "TargetFramework"));
Assert.Equal("net10.0", GetProperty(projects["AutoForge.Components"], "TargetFramework"));
}
private static string FindRepositoryRoot()
{
for (var directory = new DirectoryInfo(AppContext.BaseDirectory);
directory is not null;
directory = directory.Parent)
{
if (File.Exists(Path.Combine(directory.FullName, "src", "AutoForge.slnx")))
{
return directory.FullName;
}
}
throw new DirectoryNotFoundException("Could not locate the AutoForge solution from the test output directory.");
}
private static XDocument LoadProject(string projectPath) => XDocument.Load(projectPath);
private static void AssertReferences(
IReadOnlyDictionary<string, XDocument> projects,
string projectName,
params string[] expectedReferences)
{
var document = projects[projectName];
var projectPath = Path.Combine(
FindRepositoryRoot(),
"src",
projectName switch
{
"AutoForge.UnitTests" or "AutoForge.IntegrationTests" =>
Path.Combine("tests", projectName, $"{projectName}.csproj"),
_ => Path.Combine(projectName, $"{projectName}.csproj")
});
var actualReferences = document.Descendants()
.Where(element => element.Name.LocalName == "ProjectReference")
.Select(element => Path.GetFileNameWithoutExtension(
Path.GetFullPath(Path.Combine(Path.GetDirectoryName(projectPath)!, (string)element.Attribute("Include")!))))
.Order(StringComparer.Ordinal)
.ToArray();
Assert.Equal(expectedReferences.Order(StringComparer.Ordinal), actualReferences);
}
private static string? GetProperty(XDocument project, string propertyName) =>
project.Descendants().FirstOrDefault(element => element.Name.LocalName == propertyName)?.Value;
}

View File

@ -0,0 +1,191 @@
using AutoForge.Application.ExecutionTargets;
using AutoForge.Core.ExecutionTargets;
using Microsoft.Extensions.DependencyInjection;
namespace AutoForge.IntegrationTests;
public sealed class TargetSelectionCompositionTests
{
[Theory]
[InlineData("synthetic.simulation", ExecutionTargetKind.Simulation)]
[InlineData("synthetic.replay", ExecutionTargetKind.RecordedReplay)]
[InlineData("synthetic.physical-metadata", ExecutionTargetKind.PhysicalHardware)]
public void Composition_ResolvesExactExplicitSyntheticMetadata(string identifier, ExecutionTargetKind kind)
{
ExecutionTargetDescriptor[] registrations =
[
new("synthetic.simulation", ExecutionTargetKind.Simulation),
new("synthetic.replay", ExecutionTargetKind.RecordedReplay),
new("synthetic.physical-metadata", ExecutionTargetKind.PhysicalHardware)
];
var services = new ServiceCollection();
services.AddAutoForgeTargetSelection(registrations);
using var provider = services.BuildServiceProvider(new ServiceProviderOptions { ValidateOnBuild = true });
var resolver = provider.GetRequiredService<IExecutionTargetResolver>();
var result = resolver.Resolve(new ExecutionTargetDescriptor(identifier.ToUpperInvariant(), kind));
Assert.Same(registrations.Single(descriptor => descriptor.ProviderIdentifier == identifier), result);
Assert.Equal(identifier, result.ProviderIdentifier);
Assert.Equal(kind, result.Kind);
}
[Theory]
[InlineData(ExecutionTargetKind.Simulation)]
[InlineData(ExecutionTargetKind.RecordedReplay)]
[InlineData(ExecutionTargetKind.PhysicalHardware)]
public void Composition_EmptyProductionLikeRegistryIsUnavailable(ExecutionTargetKind kind)
{
var services = new ServiceCollection();
services.AddAutoForgeTargetSelection([]);
using var provider = services.BuildServiceProvider();
var resolver = provider.GetRequiredService<IExecutionTargetResolver>();
var exception = Assert.Throws<TargetSelectionException>(() => resolver.Resolve(
new ExecutionTargetDescriptor("synthetic.absent", kind)));
Assert.Equal(TargetSelectionFailure.ProviderNotRegistered, exception.Failure);
Assert.Contains("not registered", exception.Message);
}
[Theory]
[InlineData(ExecutionTargetKind.Simulation, ExecutionTargetKind.PhysicalHardware)]
[InlineData(ExecutionTargetKind.PhysicalHardware, ExecutionTargetKind.Simulation)]
[InlineData(ExecutionTargetKind.RecordedReplay, ExecutionTargetKind.PhysicalHardware)]
public void Composition_MismatchDoesNotSelectOtherProvider(
ExecutionTargetKind registeredKind,
ExecutionTargetKind requestedKind)
{
var services = new ServiceCollection();
services.AddAutoForgeTargetSelection(
[
new("synthetic.selected", registeredKind),
new("synthetic.other", requestedKind)
]);
using var provider = services.BuildServiceProvider();
var resolver = provider.GetRequiredService<IExecutionTargetResolver>();
var exception = Assert.Throws<TargetSelectionException>(() => resolver.Resolve(
new ExecutionTargetDescriptor("synthetic.selected", requestedKind)));
Assert.Equal(TargetSelectionFailure.KindMismatch, exception.Failure);
Assert.Contains("no fallback", exception.Message);
}
[Theory]
[InlineData(ExecutionTargetKind.Simulation)]
[InlineData(ExecutionTargetKind.PhysicalHardware)]
public void Composition_DuplicatesFailAtRegistrationBeforeContainerBuild(ExecutionTargetKind duplicateKind)
{
var services = new ServiceCollection();
var exception = Assert.Throws<TargetSelectionException>(() => services.AddAutoForgeTargetSelection(
[
new("synthetic.provider", ExecutionTargetKind.Simulation),
new("SYNTHETIC.PROVIDER", duplicateKind)
]));
Assert.Equal(TargetSelectionFailure.DuplicateProviderIdentifier, exception.Failure);
Assert.Empty(services);
}
[Fact]
public void Composition_CallerMutationBeforeContainerBuildCannotChangeRegistry()
{
var original = new ExecutionTargetDescriptor("synthetic.selected", ExecutionTargetKind.Simulation);
List<ExecutionTargetDescriptor> registrations = [original];
var services = new ServiceCollection();
services.AddAutoForgeTargetSelection(registrations);
registrations.Clear();
registrations.Add(new("synthetic.selected", ExecutionTargetKind.PhysicalHardware));
registrations.Add(new("SYNTHETIC.SELECTED", ExecutionTargetKind.RecordedReplay));
using var provider = services.BuildServiceProvider();
var resolver = provider.GetRequiredService<IExecutionTargetResolver>();
Assert.Same(original, resolver.Resolve(
new ExecutionTargetDescriptor("synthetic.selected", ExecutionTargetKind.Simulation)));
var exception = Assert.Throws<TargetSelectionException>(() => resolver.Resolve(
new ExecutionTargetDescriptor("synthetic.selected", ExecutionTargetKind.PhysicalHardware)));
Assert.Equal(TargetSelectionFailure.KindMismatch, exception.Failure);
}
[Fact]
public void Composition_RejectsRepeatedSetupRatherThanSilentlyReplacingResolver()
{
var original = new ExecutionTargetDescriptor("synthetic.original", ExecutionTargetKind.Simulation);
var services = new ServiceCollection();
services.AddAutoForgeTargetSelection([original]);
var exception = Assert.Throws<InvalidOperationException>(() => services.AddAutoForgeTargetSelection([]));
Assert.Contains("single registration call", exception.Message);
using var provider = services.BuildServiceProvider();
var resolver = provider.GetRequiredService<IExecutionTargetResolver>();
Assert.Same(original, resolver.Resolve(
new ExecutionTargetDescriptor("synthetic.original", ExecutionTargetKind.Simulation)));
}
[Fact]
public void Composition_RejectsMissingSelectionThroughResolvedService()
{
var services = new ServiceCollection();
services.AddAutoForgeTargetSelection([]);
using var provider = services.BuildServiceProvider();
var resolver = provider.GetRequiredService<IExecutionTargetResolver>();
var exception = Assert.Throws<ArgumentNullException>(() => resolver.Resolve(null!));
Assert.Equal("selection", exception.ParamName);
}
[Theory]
[InlineData("")]
[InlineData(" \t")]
public void Composition_RejectsInvalidIdentifierAtSelectionBoundary(string identifier)
{
var services = new ServiceCollection();
services.AddAutoForgeTargetSelection([]);
using var provider = services.BuildServiceProvider();
var resolver = provider.GetRequiredService<IExecutionTargetResolver>();
var exception = Assert.Throws<ArgumentException>(() => resolver.Resolve(
new ExecutionTargetDescriptor(identifier, ExecutionTargetKind.Simulation)));
Assert.Equal("providerIdentifier", exception.ParamName);
}
[Fact]
public void Composition_RejectsUndefinedKindAtSelectionBoundary()
{
var services = new ServiceCollection();
services.AddAutoForgeTargetSelection([]);
using var provider = services.BuildServiceProvider();
var resolver = provider.GetRequiredService<IExecutionTargetResolver>();
var exception = Assert.Throws<ArgumentOutOfRangeException>(() => resolver.Resolve(
new ExecutionTargetDescriptor("synthetic.invalid", default)));
Assert.Equal("kind", exception.ParamName);
}
[Fact]
public void Composition_RejectsNullRegistrationsWithoutAddingServices()
{
var services = new ServiceCollection();
var exception = Assert.Throws<ArgumentNullException>(() => services.AddAutoForgeTargetSelection(null!));
Assert.Equal("registrations", exception.ParamName);
Assert.Empty(services);
}
[Fact]
public void Composition_RejectsNullServiceCollection()
{
var exception = Assert.Throws<ArgumentNullException>(() =>
ServiceCollectionExtensions.AddAutoForgeTargetSelection(null!, []));
Assert.Equal("services", exception.ParamName);
}
}

View File

@ -0,0 +1,189 @@
using AutoForge.Application.ExecutionTargets;
using AutoForge.Core.ExecutionTargets;
using AutoForge.UI;
using AutoForge.UI.Features.ExecutionTargets.SelectExecutionTarget;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Routing;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace AutoForge.IntegrationTests;
public sealed class UiCompositionTests
{
[Fact]
public async Task Routes_HomePageUsesReusableStatusNoticeAndExplainsCurrentScope()
{
using var provider = CreateProvider([], "http://localhost/");
var html = await RenderRoutesAsync(provider);
Assert.Contains("<h1>AutoForge foundation</h1>", html);
Assert.Contains("Review execution-target selection", html);
Assert.Contains("status-notice--information", html);
Assert.Contains("Simulation, diagnostics and hardware operations are not implemented.", html);
Assert.Contains("Target selection is metadata only", html);
}
[Fact]
public async Task Routes_SelectionPageResolvesSyntheticMetadataThroughRealApplicationService()
{
var expected = new ExecutionTargetDescriptor(
"synthetic.simulation",
ExecutionTargetKind.Simulation);
using var provider = CreateProvider([expected], "http://localhost/execution-targets");
var selection = provider.GetRequiredService<ExecutionTargetSelectionViewModel>();
selection.ProviderIdentifier = "SYNTHETIC.SIMULATION";
selection.SelectedKind = ExecutionTargetKind.Simulation;
selection.Select();
var html = await RenderRoutesAsync(provider);
Assert.Contains("Select execution-target metadata", html);
Assert.Contains("status-notice--success", html);
Assert.Contains("data-provider=\"synthetic.simulation\"", html);
Assert.Contains("data-kind=\"Simulation\"", html);
Assert.Contains("Resolved registered metadata for synthetic.simulation (Simulation)", html);
Assert.Contains("does not connect to a vehicle or authorize an operation", html);
Assert.DoesNotContain("connected", html, StringComparison.OrdinalIgnoreCase);
Assert.DoesNotContain("write-approved", html, StringComparison.OrdinalIgnoreCase);
Assert.Same(expected, selection.SelectedDescriptor);
}
[Fact]
public async Task Routes_EmptyRegistryAndUnknownProviderRemainVisibleWithoutFallback()
{
using var provider = CreateProvider([], "http://localhost/execution-targets");
var selection = provider.GetRequiredService<ExecutionTargetSelectionViewModel>();
selection.ProviderIdentifier = "synthetic.absent";
selection.SelectedKind = ExecutionTargetKind.PhysicalHardware;
selection.Select();
var html = await RenderRoutesAsync(provider);
Assert.Contains("status-notice--error", html);
Assert.Contains("Provider &#x27;synthetic.absent&#x27; is not registered.", html);
Assert.Null(selection.SelectedDescriptor);
Assert.Contains("does not connect to a vehicle, execute an operation or grant write approval", html);
}
[Fact]
public async Task Routes_RejectsMissingOrInvalidExplicitInputsInRenderedState()
{
using var provider = CreateProvider(
[new ExecutionTargetDescriptor("synthetic.simulation", ExecutionTargetKind.Simulation)],
"http://localhost/execution-targets");
var selection = provider.GetRequiredService<ExecutionTargetSelectionViewModel>();
selection.ProviderIdentifier = " ";
selection.SelectedKind = ExecutionTargetKind.Simulation;
selection.Select();
var blankIdentifierHtml = await RenderRoutesAsync(provider);
Assert.Contains("Enter an explicit provider identifier.", blankIdentifierHtml);
Assert.Null(selection.SelectedDescriptor);
selection.ProviderIdentifier = "synthetic.simulation";
selection.SelectedKind = null;
selection.Select();
var missingKindHtml = await RenderRoutesAsync(provider);
Assert.Contains("Choose an explicit execution-target kind.", missingKindHtml);
Assert.Null(selection.SelectedDescriptor);
selection.ProviderIdentifier = "synthetic.simulation ";
selection.SelectedKind = ExecutionTargetKind.Simulation;
selection.Select();
var invalidIdentifierHtml = await RenderRoutesAsync(provider);
Assert.Contains("status-notice--error", invalidIdentifierHtml);
Assert.Null(selection.SelectedDescriptor);
}
[Fact]
public async Task Routes_RejectsProviderKindMismatchAndDoesNotFallback()
{
using var provider = CreateProvider(
[
new ExecutionTargetDescriptor("synthetic.selected", ExecutionTargetKind.Simulation),
new ExecutionTargetDescriptor("synthetic.other", ExecutionTargetKind.PhysicalHardware)
],
"http://localhost/execution-targets");
var selection = provider.GetRequiredService<ExecutionTargetSelectionViewModel>();
selection.ProviderIdentifier = "synthetic.selected";
selection.SelectedKind = ExecutionTargetKind.PhysicalHardware;
selection.Select();
var html = await RenderRoutesAsync(provider);
Assert.Contains("Provider &#x27;synthetic.selected&#x27; is registered for Simulation", html);
Assert.Contains("not the requested PhysicalHardware", html);
Assert.Contains("no fallback is allowed", html);
Assert.DoesNotContain("data-provider=", html);
Assert.Null(selection.SelectedDescriptor);
}
[Fact]
public async Task Routes_UnknownLocationShowsExplicitNotFoundPageAndNavigation()
{
using var provider = CreateProvider([], "http://localhost/not-a-route");
var html = await RenderRoutesAsync(provider);
Assert.Contains("<h1>Page not found</h1>", html);
Assert.Contains("That AutoForge page does not exist.", html);
Assert.Contains("aria-label=\"Main navigation\"", html);
Assert.Contains("href=\"/execution-targets\"", html);
}
private static ServiceProvider CreateProvider(
IEnumerable<ExecutionTargetDescriptor> registrations,
string uri)
{
var services = new ServiceCollection();
services.AddLogging();
services.AddAutoForgeTargetSelection(registrations);
services.AddAutoForgeUi();
services.AddSingleton<NavigationManager>(new TestNavigationManager(uri));
services.AddSingleton<INavigationInterception, TestNavigationInterception>();
services.AddSingleton<IScrollToLocationHash, TestScrollToLocationHash>();
return services.BuildServiceProvider();
}
private static async Task<string> RenderRoutesAsync(IServiceProvider services)
{
await using var renderer = new HtmlRenderer(
services,
services.GetRequiredService<ILoggerFactory>());
return await renderer.Dispatcher.InvokeAsync(async () =>
{
var component = await renderer.RenderComponentAsync<AutoForge.UI.Routes>();
return component.ToHtmlString();
});
}
private sealed class TestNavigationManager : NavigationManager
{
public TestNavigationManager(string uri)
{
Initialize("http://localhost/", uri);
}
protected override void NavigateToCore(string uri, bool forceLoad)
{
Uri = ToAbsoluteUri(uri).ToString();
NotifyLocationChanged(forceLoad);
}
}
private sealed class TestNavigationInterception : INavigationInterception
{
public Task EnableNavigationInterceptionAsync() => Task.CompletedTask;
}
private sealed class TestScrollToLocationHash : IScrollToLocationHash
{
public Task RefreshScrollPositionForHash(string locationAbsolute) => Task.CompletedTask;
}
}

View File

@ -0,0 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<ProjectReference Include="..\..\AutoForge.Components\AutoForge.Components.csproj" />
<ProjectReference Include="..\..\AutoForge.Core\AutoForge.Core.csproj" />
<ProjectReference Include="..\..\AutoForge.Application\AutoForge.Application.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,55 @@
using AutoForge.Core.ExecutionTargets;
namespace AutoForge.UnitTests;
public sealed class ExecutionTargetDescriptorTests
{
[Theory]
[InlineData(ExecutionTargetKind.Simulation)]
[InlineData(ExecutionTargetKind.RecordedReplay)]
[InlineData(ExecutionTargetKind.PhysicalHardware)]
public void Constructor_PreservesExplicitIdentifierAndKind(ExecutionTargetKind kind)
{
var descriptor = new ExecutionTargetDescriptor("Synthetic.Provider", kind);
Assert.Equal("Synthetic.Provider", descriptor.ProviderIdentifier);
Assert.Equal(kind, descriptor.Kind);
}
[Fact]
public void Constructor_RejectsNullIdentifier()
{
var exception = Assert.Throws<ArgumentNullException>(
() => new ExecutionTargetDescriptor(null!, ExecutionTargetKind.Simulation));
Assert.Equal("providerIdentifier", exception.ParamName);
}
[Theory]
[InlineData("")]
[InlineData(" ")]
[InlineData("\t\r\n")]
[InlineData(" synthetic.simulation")]
[InlineData("synthetic.simulation ")]
public void Constructor_RejectsBlankOrPaddedIdentifier(string identifier)
{
var exception = Assert.Throws<ArgumentException>(
() => new ExecutionTargetDescriptor(identifier, ExecutionTargetKind.Simulation));
Assert.Equal("providerIdentifier", exception.ParamName);
}
[Theory]
[InlineData(-1)]
[InlineData(0)]
[InlineData(4)]
[InlineData(int.MaxValue)]
public void Constructor_RejectsUndefinedKind(int kind)
{
var exception = Assert.Throws<ArgumentOutOfRangeException>(
() => new ExecutionTargetDescriptor("synthetic.provider", (ExecutionTargetKind)kind));
Assert.Equal("kind", exception.ParamName);
Assert.Contains("defined execution-target kind", exception.Message);
}
}

View File

@ -0,0 +1,168 @@
using AutoForge.Application.ExecutionTargets;
using AutoForge.Core.ExecutionTargets;
namespace AutoForge.UnitTests;
public sealed class ExecutionTargetResolverTests
{
[Theory]
[InlineData(ExecutionTargetKind.Simulation)]
[InlineData(ExecutionTargetKind.RecordedReplay)]
[InlineData(ExecutionTargetKind.PhysicalHardware)]
public void Resolve_ReturnsExactRegisteredDescriptor(ExecutionTargetKind kind)
{
var registered = new ExecutionTargetDescriptor("synthetic.provider", kind);
var resolver = new ExecutionTargetResolver([registered]);
var result = resolver.Resolve(new ExecutionTargetDescriptor("synthetic.provider", kind));
Assert.Same(registered, result);
Assert.Equal(kind, result.Kind);
}
[Fact]
public void Resolve_UsesOrdinalCaseInsensitiveIdentifiers()
{
var registered = new ExecutionTargetDescriptor("SYNTHETIC.provider", ExecutionTargetKind.Simulation);
var resolver = new ExecutionTargetResolver([registered]);
var result = resolver.Resolve(
new ExecutionTargetDescriptor("synthetic.PROVIDER", ExecutionTargetKind.Simulation));
Assert.Same(registered, result);
Assert.Equal("SYNTHETIC.provider", result.ProviderIdentifier);
}
[Fact]
public void Resolve_DoesNotUseCultureSensitiveIdentifierComparison()
{
var registered = new ExecutionTargetDescriptor("synthetic.file", ExecutionTargetKind.Simulation);
var resolver = new ExecutionTargetResolver([registered]);
var exception = Assert.Throws<TargetSelectionException>(() => resolver.Resolve(
new ExecutionTargetDescriptor("synthetic.f\u0131le", ExecutionTargetKind.Simulation)));
Assert.Equal(TargetSelectionFailure.ProviderNotRegistered, exception.Failure);
}
[Fact]
public void Resolve_RejectsMissingSelection()
{
var resolver = new ExecutionTargetResolver([]);
var exception = Assert.Throws<ArgumentNullException>(() => resolver.Resolve(null!));
Assert.Equal("selection", exception.ParamName);
}
[Theory]
[InlineData(ExecutionTargetKind.Simulation)]
[InlineData(ExecutionTargetKind.RecordedReplay)]
[InlineData(ExecutionTargetKind.PhysicalHardware)]
public void Resolve_EmptyRegistryReportsNotRegistered(ExecutionTargetKind kind)
{
var resolver = new ExecutionTargetResolver([]);
var exception = Assert.Throws<TargetSelectionException>(() => resolver.Resolve(
new ExecutionTargetDescriptor("synthetic.absent", kind)));
Assert.Equal(TargetSelectionFailure.ProviderNotRegistered, exception.Failure);
Assert.Contains("synthetic.absent", exception.Message);
Assert.Contains("not registered", exception.Message);
}
[Fact]
public void Resolve_UnknownIdentifierDoesNotSelectAnotherProviderOfSameKind()
{
var resolver = new ExecutionTargetResolver(
[new ExecutionTargetDescriptor("synthetic.registered", ExecutionTargetKind.Simulation)]);
var exception = Assert.Throws<TargetSelectionException>(() => resolver.Resolve(
new ExecutionTargetDescriptor("synthetic.unknown", ExecutionTargetKind.Simulation)));
Assert.Equal(TargetSelectionFailure.ProviderNotRegistered, exception.Failure);
}
[Theory]
[InlineData(ExecutionTargetKind.Simulation, ExecutionTargetKind.RecordedReplay)]
[InlineData(ExecutionTargetKind.Simulation, ExecutionTargetKind.PhysicalHardware)]
[InlineData(ExecutionTargetKind.RecordedReplay, ExecutionTargetKind.Simulation)]
[InlineData(ExecutionTargetKind.RecordedReplay, ExecutionTargetKind.PhysicalHardware)]
[InlineData(ExecutionTargetKind.PhysicalHardware, ExecutionTargetKind.Simulation)]
[InlineData(ExecutionTargetKind.PhysicalHardware, ExecutionTargetKind.RecordedReplay)]
public void Resolve_RejectsEveryKindMismatchWithoutFallback(
ExecutionTargetKind registeredKind,
ExecutionTargetKind requestedKind)
{
var resolver = new ExecutionTargetResolver(
[
new ExecutionTargetDescriptor("synthetic.selected", registeredKind),
new ExecutionTargetDescriptor("synthetic.other", requestedKind)
]);
var exception = Assert.Throws<TargetSelectionException>(() => resolver.Resolve(
new ExecutionTargetDescriptor("synthetic.selected", requestedKind)));
Assert.Equal(TargetSelectionFailure.KindMismatch, exception.Failure);
Assert.Contains(registeredKind.ToString(), exception.Message);
Assert.Contains(requestedKind.ToString(), exception.Message);
Assert.Contains("no fallback", exception.Message);
}
[Theory]
[InlineData("synthetic.provider", ExecutionTargetKind.Simulation)]
[InlineData("SYNTHETIC.PROVIDER", ExecutionTargetKind.Simulation)]
[InlineData("Synthetic.Provider", ExecutionTargetKind.PhysicalHardware)]
public void Constructor_RejectsDuplicateIdentifiersRegardlessOfKind(
string duplicateIdentifier,
ExecutionTargetKind duplicateKind)
{
var exception = Assert.Throws<TargetSelectionException>(() => new ExecutionTargetResolver(
[
new ExecutionTargetDescriptor("synthetic.provider", ExecutionTargetKind.Simulation),
new ExecutionTargetDescriptor(duplicateIdentifier, duplicateKind)
]));
Assert.Equal(TargetSelectionFailure.DuplicateProviderIdentifier, exception.Failure);
Assert.Contains("unique identifiers", exception.Message);
}
[Fact]
public void Constructor_SnapshotsCallerCollection()
{
var original = new ExecutionTargetDescriptor("synthetic.original", ExecutionTargetKind.Simulation);
var replacement = new ExecutionTargetDescriptor("synthetic.original", ExecutionTargetKind.PhysicalHardware);
List<ExecutionTargetDescriptor> registrations = [original];
var resolver = new ExecutionTargetResolver(registrations);
registrations.Clear();
registrations.Add(replacement);
registrations.Add(replacement);
registrations.Add(new ExecutionTargetDescriptor("synthetic.later", ExecutionTargetKind.RecordedReplay));
Assert.Same(original, resolver.Resolve(
new ExecutionTargetDescriptor("synthetic.original", ExecutionTargetKind.Simulation)));
var mismatch = Assert.Throws<TargetSelectionException>(() => resolver.Resolve(replacement));
Assert.Equal(TargetSelectionFailure.KindMismatch, mismatch.Failure);
var unknown = Assert.Throws<TargetSelectionException>(() => resolver.Resolve(
new ExecutionTargetDescriptor("synthetic.later", ExecutionTargetKind.RecordedReplay)));
Assert.Equal(TargetSelectionFailure.ProviderNotRegistered, unknown.Failure);
}
[Fact]
public void Constructor_RejectsNullRegistrations()
{
var exception = Assert.Throws<ArgumentNullException>(() => new ExecutionTargetResolver(null!));
Assert.Equal("registrations", exception.ParamName);
}
[Fact]
public void Constructor_RejectsNullDescriptor()
{
var exception = Assert.Throws<ArgumentException>(() => new ExecutionTargetResolver([null!]));
Assert.Equal("registrations", exception.ParamName);
Assert.Contains("null descriptors", exception.Message);
}
}

View File

@ -0,0 +1,45 @@
using AutoForge.Components;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace AutoForge.UnitTests;
public sealed class StatusNoticeRenderingTests
{
[Theory]
[InlineData(StatusNoticeTone.Information, "information")]
[InlineData(StatusNoticeTone.Success, "success")]
[InlineData(StatusNoticeTone.Warning, "warning")]
[InlineData(StatusNoticeTone.Error, "error")]
public async Task Render_ExposesToneAndEncodesUntrustedMessage(
StatusNoticeTone tone,
string expectedTone)
{
var services = new ServiceCollection().AddLogging();
using var provider = services.BuildServiceProvider();
await using var renderer = new HtmlRenderer(
provider,
provider.GetRequiredService<ILoggerFactory>());
var html = await renderer.Dispatcher.InvokeAsync(async () =>
{
var component = await renderer.RenderComponentAsync<StatusNotice>(
ParameterView.FromDictionary(new Dictionary<string, object?>
{
[nameof(StatusNotice.Message)] = "Provider <script>alert('unsafe')</script> & unavailable",
[nameof(StatusNotice.Tone)] = tone
}));
return component.ToHtmlString();
});
Assert.Contains("role=\"status\"", html);
Assert.Contains("aria-live=\"polite\"", html);
Assert.Contains($"data-tone=\"{expectedTone}\"", html);
Assert.Contains($"status-notice--{expectedTone}", html);
Assert.Contains("Provider &lt;script&gt;alert(&#x27;unsafe&#x27;)&lt;/script&gt; &amp; unavailable", html);
Assert.DoesNotContain("<script>", html);
}
}