77 lines
10 KiB
Markdown
77 lines
10 KiB
Markdown
```
|
|
# Step-05B Worker Report
|
|
|
|
Identifier: Step-05B
|
|
Title: Independent range status and decisive dashboard tests
|
|
Status: COMPLETE — assigned worker implementation and verification passed; pending manual review. Step-05 and Step-05A remain NOT ACCEPTED pending orchestrator review.
|
|
|
|
## Summary and files
|
|
|
|
Corrected the Uncertain-value projection so range status is computed independently of signal quality. Added decisive real-provider/rendered assertions for low/high, in-range and exact-bound Uncertain values; expanded invalid-definition and finite-percent boundary coverage; and made controlled Stop-drain cleanup failure-safe. The dashboard feature, session ownership, providers, hosts, public contracts, schemas, protocols and lifecycle model were otherwise left unchanged.
|
|
|
|
Files changed:
|
|
|
|
- `src/AutoForge.Application/Features/Vehicles/Telemetry/LiveDashboard/LiveDashboardAcquisition.cs` — Uncertain finite readings now pass the existing shared `GetRangeState` result into the gauge projection.
|
|
- `src/tests/AutoForge.IntegrationTests/LiveDashboardAcquisitionTests.cs` — real-provider range/render assertions, full independent invalid-definition vectors, unchanged snapshot checks, and owned-session cleanup.
|
|
- `src/tests/AutoForge.UnitTests/LiveDashboardGaugeRenderingTests.cs` — isolated invalid-percent geometry inputs with a Good finite numeric presentation and a measurable visible 85% control.
|
|
- `docs/build-and-test.md` — appended the Step-05B pre-fix, focused/full test, and final native recheck evidence without rewriting Step-05A history.
|
|
- `prompts/Step-05B-Report.md` — this report; the only new prompt file.
|
|
|
|
## Actual pre-fix reproduction
|
|
|
|
Before changing the projection, ran:
|
|
|
|
`dotnet test .\src\tests\AutoForge.IntegrationTests\AutoForge.IntegrationTests.csproj --configuration Release --no-restore --filter FullyQualifiedName~RealStaticReadsPreserveRangeQualityFailureAndRecoveryStates`
|
|
|
|
Exit code 1; the real static-provider/rewrite-transport regression failed on the actual finite Uncertain -10 rpm response: expected `OutOfRangeLow`, actual `null`. This was a behavioral assertion failure, not a compilation failure. After the fix, the same test passed with rendered numeric and bar states.
|
|
|
|
## Corrective matrix and evidence
|
|
|
|
| ID | Input / precondition | Executed assertion and result |
|
|
|---|---|---|
|
|
| C-01 | Real finite Uncertain -10 and 1100 rpm against 0..1000 | `RealStaticReadsPreserveRangeQualityFailureAndRecoveryStates` asserts exact numeric values, `Uncertain` quality, independent low/high `RangeState`, and 0%/100% bar projection. Its rendered panel asserts the same range and quality separately on both numeric and bar gauge cards; bar accessibility reports 0/100. Passed after fix. |
|
|
| C-02 | Uncertain in-range and exact minimum/maximum; existing Good/Stale/Stopped behavior | The same real-provider test asserts Uncertain 100 has Good range status and Uncertain values exactly 0 and 1000 have no low/high status (`RangeState.Good`) with 0%/100% geometry. It also checks stale and stopped last-known 850 rpm remain range-Good, while existing Good/out-of-range behavior remains intact. Passed. |
|
|
| C-03 | Start with one valid definition and a Running feed; reject each invalid vector | `InvalidDefinitionReplacementIsAtomicAndEnforcesZeroToEightLimit` tests NaN and positive/negative infinity in bounds; equal, reversed and finite-span-overflow ranges; precision -1/4; undefined kind; blank/padded/case-duplicate gauge IDs; blank/padded labels; blank/padded/unknown module and signal IDs; blank and nonmatching exact unit. Every rejection is typed and asserts the exact prior snapshot object, definitions, source identity and Running feed remain unchanged. Empty and eight definitions are accepted; the ninth is rejected with the same prior snapshot, source and feed. Passed. |
|
|
| C-04 | Good state and real numeric text `850 rpm`, changing only Percent | `BarGauge_GoodNumericValueWithInvalidPercentDoesNotRenderGeometry` separately tests null, NaN, positive infinity and negative infinity; each has no meter, no zero-width fallback, no invalid CSS value, and still displays 850 rpm/Good. The valid control `BarGauge_RendersFiniteProjectionStateAndSafeText` asserts visible `width: 85%` and accessible `aria-valuenow=85`. Passed. |
|
|
| C-05 | Assertion/command failure while controlled Stop cancellation is held | `StopDrainRejectsStartWithoutMutationAndAllowsRetryAfterCleanup` now releases the controlled cancellation barrier and disposes the session in `finally`, while preserving the rejection during drain and successful retry assertions. The other new session tests use async session disposal for failure paths; the pending-response barrier test already releases its barrier and disposes both sessions in `finally`. Passed. |
|
|
|
|
## Existing criteria mapping
|
|
|
|
| Criterion | Evidence |
|
|
|---|---|
|
|
| AC-01 | Pre-fix real-provider failure recorded above. Post-fix C-01/C-02 prove numeric, range, quality, geometry, and rendered accessibility are independent and correct. |
|
|
| AC-02 | C-03 executes the assigned invalid boundaries one at a time and proves exact atomic preservation; C-04 isolates the finite-number guard from Unknown/missing values and verifies the valid visible 85% control. |
|
|
| AC-03 | C-05 `finally` cleanup releases the scheduler barrier, drains the owner and disposes the source even if assertions fail; existing controlled reject/retry behavior remains asserted. |
|
|
| AC-04 | Complete nine-project Release build and 225-case Release regression suite passed. The exact rebuilt native Client configured and read gauges through actual static-v1 and dynamics-v2 sessions; native evidence and its limits follow. |
|
|
| AC-05 | Only the assigned Application projection, focused tests, directly related build/test documentation, and this report changed. Assignments, State/Roadmap, shared gate, prior reports and protected files are unchanged. No future feature was implemented. |
|
|
|
|
## Commands and outcomes
|
|
|
|
- Pre-fix regression command shown above: exit 1, expected behavior failure (`OutOfRangeLow` vs null).
|
|
- `dotnet test .\src\tests\AutoForge.UnitTests\AutoForge.UnitTests.csproj --configuration Release --no-restore --filter FullyQualifiedName~LiveDashboardGaugeRenderingTests` — exit 0; 8 passed, 0 failed, 0 skipped.
|
|
- `dotnet test .\src\tests\AutoForge.IntegrationTests\AutoForge.IntegrationTests.csproj --configuration Release --no-restore --filter "FullyQualifiedName~RealStaticReadsPreserveRangeQualityFailureAndRecoveryStates|FullyQualifiedName~InvalidDefinitionReplacementIsAtomicAndEnforcesZeroToEightLimit|FullyQualifiedName~StopDrainRejectsStartWithoutMutationAndAllowsRetryAfterCleanup"` — exit 0; 3 passed, 0 failed, 0 skipped.
|
|
- `dotnet build .\src\AutoForge.slnx --configuration Release --no-restore` — exit 0; Core, Diagnostics, Components, Simulation, Application, UI, UnitTests, IntegrationTests and Client built successfully; 0 warnings, 0 errors. The MAUI XAML SourceGen notice was informational.
|
|
- `dotnet test .\src\AutoForge.slnx --configuration Release --no-build` — exit 0; UnitTests 134 passed and IntegrationTests 91 passed; 225 total, 0 failed, 0 skipped. The previous 224 cases were preserved; the new percent-null theory case accounts for the one additional case.
|
|
- `git diff --check` — passed; only the existing documentation LF-to-CRLF conversion notice was emitted.
|
|
|
|
## Native versus controlled evidence
|
|
|
|
The final native recheck ran the exact Release Client with an isolated WebView2 user-data folder. On `/diagnostics`, the editor bound a horizontal bar to the actual `module.engine.primary / synthetic.engine.speed` static-v1 signal and rendered 850 rpm from `SYNTHETIC_STATIC`. On `/simulation`, it bound a numeric gauge to the actual `module.engine.primary / engine.speed` dynamics-v2 signal and rendered 260 rpm from `SYNTHETIC_DYNAMIC`, with logical request tick, model step 1 / 0.1 seconds, configuration fingerprint and `dynamics-run-000002`. The dynamics model was paused. Both actual sessions were closed and their panels removed.
|
|
|
|
The native run validates that the existing configured dashboard baseline still works on both providers. It did not inject Uncertain samples or malformed definitions into the native UI; those specific vectors are asserted through the real static provider/rewrite transport and rendered component/integration tests. Native runtime: .NET SDK 10.0.402 and .NET 10.0.13; MAUI workload 10.0.403, `maui-windows` manifest 10.0.110; Windows SDK target 10.0.26100.0; WebView2 Runtime 156.0.4314.50. The exact native Client/WebView2 processes and port 9351 were verified stopped; the isolated task profile was removed. A separate pre-existing default WebView2 profile discovered during an initial smoke attempt was left untouched.
|
|
|
|
No package restore/install, SDK/workload modification, system update, staging, commit, push or destructive Git action occurred.
|
|
|
|
## Documentation and source-path self-review
|
|
|
|
`docs/build-and-test.md` now records the actual red pre-fix assertion, post-fix focused vectors, full suite counts and final native observations. Existing live-dashboard documentation already describes range/quality independence and exact-unit behavior, so no unrelated guide rewrite was needed. Imperial/metric preferences and conversion remain future, unassigned scope.
|
|
|
|
Reviewed the changed source path from finite-value/quality classification through the shared range helper, gauge projection and numeric/bar panel consumers. The range helper is reached only after finite numeric validation, uses strict below/above comparisons (so exact bounds remain Good range status), and does not change `Uncertain` source quality or raw numeric values. Rejected definitions still validate before snapshot mutation; assertions confirm the exact old snapshot and feed/source context survive. The invalid-percent test holds all presentation parameters constant except Percent, while the 85% control checks actual accessible geometry. Stop cleanup releases its cancellation barrier before awaiting session disposal. Focused tests and the complete build/test suite were rerun after the self-review assertions.
|
|
|
|
## Preservation review and stop point
|
|
|
|
The worktree was clean before this assignment. No pre-existing changes were present to overwrite. No assignment, historical report, `prompts/STATE.md`, `prompts/ROADMAP.md`, shared gate or protected instruction was edited. Only the four listed implementation/test/documentation paths and this new report are changed.
|
|
|
|
Worker implementation and assigned verification are COMPLETE. Step-05 and Step-05A remain NOT ACCEPTED until manual orchestrator review. Stop here; no next step or automatic handoff was performed.
|
|
```
|