161 lines
12 KiB
Markdown
161 lines
12 KiB
Markdown
```
|
|
# Step-07A worker report
|
|
|
|
## Status
|
|
|
|
COMPLETE — Step-07A worker execution and verification are complete. Manual
|
|
orchestrator review remains pending. Step-07 remains NOT ACCEPTED; Step-08
|
|
remains blocked and was not started.
|
|
|
|
## Contract and implementation
|
|
|
|
Step-07A corrected the original Step-07 R-01 through R-04 without expanding
|
|
the archive format or changing the recorder design:
|
|
|
|
- R-01: permitted an actual empty `TransportOutcome.Response` while preserving
|
|
its trace representation as `ProtocolError` with null response bytes; applied
|
|
only the source-approved case-insensitive identity comparisons for response
|
|
envelopes and module identities.
|
|
- R-02: validates signal association before dereference and reuses the shared
|
|
pure v2 signal-shape validator for known IDs, exact units/JSON kinds, finite
|
|
values and duplicate IDs. Negative model time is rejected; v1 opaque,
|
|
nullable and non-numeric values remain supported.
|
|
- R-03: removes stopped, failed, limit-stopped and source-closed captures from
|
|
the diagnostic session lifetime list and session ownership map while keeping
|
|
current stopped samples available for save/inspection. The controlled
|
|
Stop-drain regression releases its observer barrier in `finally`.
|
|
- R-04: distinguishes a legitimate missing first-use directory from invalid
|
|
roots/listing failures and preserves actual panel save errors by refreshing
|
|
only after explicit save success.
|
|
|
|
Production changes are in [ProviderContracts.cs](../src/AutoForge.Diagnostics/ProviderContracts.cs),
|
|
[SyntheticDynamicSignalContract.cs](../src/AutoForge.Diagnostics/SyntheticDynamicSignalContract.cs),
|
|
[SyntheticDiagnosticProtocolClient.cs](../src/AutoForge.Diagnostics/SyntheticDiagnosticProtocolClient.cs),
|
|
[DiagnosticSessionService.cs](../src/AutoForge.Application/Features/Vehicles/Diagnostics/DiagnosticSessionService.cs),
|
|
[SessionTelemetryCapture.cs](../src/AutoForge.Application/Features/Vehicles/Telemetry/Recording/SessionTelemetryCapture.cs),
|
|
[TelemetryArchiveCodec.cs](../src/AutoForge.Application/Features/Vehicles/Telemetry/Recording/TelemetryArchiveCodec.cs),
|
|
[FileTelemetryArchiveStore.cs](../src/AutoForge.Application/Features/Vehicles/Telemetry/Recording/FileTelemetryArchiveStore.cs),
|
|
[TelemetryRecordingWorkspace.cs](../src/AutoForge.Application/Features/Vehicles/Telemetry/Recording/TelemetryRecordingWorkspace.cs),
|
|
and [TelemetryRecordingPanel.razor](../src/AutoForge.UI/Features/Vehicles/Telemetry/Recording/TelemetryRecordingPanel.razor).
|
|
Regression coverage is in
|
|
[TelemetryRecordingIntegrationTests.cs](../src/tests/AutoForge.IntegrationTests/TelemetryRecordingIntegrationTests.cs).
|
|
|
|
## Frozen corrective matrix and acceptance mapping
|
|
|
|
| Requirement | Evidence and result |
|
|
|---|---|
|
|
| R-01 / C-01 | Pre-fix the transport constructor rejected empty `Response` payloads. Post-fix `CaptureRecordsActualPositiveNegativeTimeoutNoResponseCancellationAndMalformedReplyBytes` exercises real observations; the empty reply stays `ProtocolError` with null response bytes and round-trips through save/new-store load without fabricated bytes or successful signals. PASSED. |
|
|
| R-01 / C-02 | Pre-fix case-variant source-approved envelope/module identities failed archive association validation. `CaptureArchive_AcceptsCaseInsensitiveProtocolAssociations` exercises the real positive source response and archive round trip, retaining original bytes and spellings; exact request, signal ID, unit, protocol token and dynamics identities remain exact. PASSED. |
|
|
| R-02 / C-03 | Pre-fix a positive signal read with null snapshot escaped as `NullReferenceException`. `ArchiveWithPositiveSignalReadAndNullSnapshot_IsRejectedAsTypedInvalidArchive` now verifies typed `InvalidArchive` and that prior workspace inspection remains unchanged. PASSED. |
|
|
| R-02 / C-04 | `DynamicArchive_RejectsCoherentEditsThatViolateTheV2SignalContract` updates raw and decoded values coherently and recalculates encoded-byte bookkeeping for wrong unit/JSON kind, unknown/duplicate IDs and negative model time; the source contract is not weakened. PASSED. |
|
|
| R-02 / C-05 | Existing v1 nullable/non-numeric/opaque/Unknown handling, valid v1/v2 readbacks, malformed-reply evidence, exact source/context association and workspace inspection preservation remain covered by recording integration tests. PASSED. |
|
|
| R-03 / C-06 | `StoppedCapture_IsRemovedFromSessionLifetimeResources`, `CaptureFailure_ReleasesSessionLifetimeRegistration`, the count/byte-limit assertions, discard/replacement, and source-close tests check registration/ownership deterministically while stopped unsaved data remains inspectable/saveable and close draining remains intact. PASSED. |
|
|
| R-03 / C-07 | `CaptureOwnership_RejectsCompetingOwnerAndStopDrainsAcceptedCallbackBeforeReturning` releases the controlled observer barrier in `finally` before observer disposal/drain. PASSED. |
|
|
| R-04 / C-08 | `FileArchive_CancellationAndFilesystemFailureAreTypedAndLeaveNoPublishedArchive` and storage listing assertions verify an existing-file root/list failures are typed while a missing first-use directory remains empty. No permissions were changed. PASSED. |
|
|
| R-04 / C-09 | Pre-fix actual panel event evidence: `ActualPanelSaveFailure_RemainsVisibleAndSuccessfulRetryRefreshesCatalogue` failed because the collision error was replaced by a malformed-archive catalogue error after refresh. Post-fix it verifies the collision error remains rendered, the capture stays unsaved, the existing file is unchanged, and retry succeeds and refreshes. PASSED. |
|
|
| C-10 | The 303-test Step-07 baseline (179 unit + 124 integration) remains represented; seven additional focused integration cases yield 179 unit + 131 integration (310 total). Existing limits and source/model behavior pass, along with full Release and native workflow checks. PASSED. |
|
|
| AC-01 | Actual pre-fix R-01 reproductions and post-fix real protocol/file round trips for empty response and case-variant identities. PASSED. |
|
|
| AC-02 | Typed null-snapshot rejection, coherent v2 semantic negatives, and preserved valid v1/v2 cases. PASSED. |
|
|
| AC-03 | Deterministic owner registration checks for normal stop, failure/limit stop, discard/replacement and source close; barrier cleanup in `finally`. PASSED. |
|
|
| AC-04 | Typed store/workspace outcomes, invalid-root behavior and actual panel error/retry rendering. PASSED. |
|
|
| AC-05 | 303 prior cases plus seven integration cases, exact configured limits, nine-project Release build, full test suite and native baseline. PASSED. |
|
|
| AC-06 | Frozen matrix, documentation, post-green self-review, protected-file/history check, this report and stop-before-Step-08. PASSED. |
|
|
|
|
## Actual pre-fix results
|
|
|
|
The focused recording selection before correction ran 23 tests: 17 passed and
|
|
6 failed (exit code 1). Observed behavioral failures were:
|
|
|
|
- Empty `TransportOutcome.Response` was rejected by the transport constructor
|
|
with `ArgumentException`, preventing the actual empty-reply trace from being
|
|
recorded and archived.
|
|
- Source-accepted case-variant response/module identities were rejected by
|
|
archive validation.
|
|
- A positive `read.signals` with null `signalSnapshot` escaped as
|
|
`NullReferenceException`.
|
|
- A stopped capture remained registered in the open diagnostic session
|
|
(observed resource count 1 where 0 was required).
|
|
- A storage root that was an existing file returned an empty catalogue rather
|
|
than a typed failure.
|
|
- The actual panel save collision path refreshed the catalogue after the
|
|
workspace had recorded the save error, replacing the visible collision
|
|
message with a malformed-archive message.
|
|
|
|
The actual panel event was separately rerun before correction using:
|
|
|
|
`dotnet test .\src\tests\AutoForge.IntegrationTests\AutoForge.IntegrationTests.csproj --configuration Release --filter "FullyQualifiedName~ActualPanelSaveFailure_RemainsVisibleAndSuccessfulRetryRefreshesCatalogue"`
|
|
|
|
It failed as expected (1 failed, exit code 1): the rendered/workspace error
|
|
did not contain the collision message after the real handler refreshed the
|
|
catalogue. This was behavioral evidence, not a compilation failure.
|
|
|
|
## Post-fix commands and results
|
|
|
|
Commands ran sequentially after focused validation:
|
|
|
|
| Command | Exit | Result |
|
|
|---|---:|---|
|
|
| `dotnet test .\src\tests\AutoForge.IntegrationTests\AutoForge.IntegrationTests.csproj --configuration Release --filter "FullyQualifiedName~TelemetryRecordingIntegrationTests"` | 0 | 26 passed, 0 failed, 0 skipped. |
|
|
| `dotnet build .\src\AutoForge.slnx --configuration Release --no-restore` | 0 | All nine projects, including Windows Client; 0 warnings, 0 errors. MAUI XAML source-generation notice was informational. |
|
|
| `dotnet test .\src\AutoForge.slnx --configuration Release --no-build` | 0 | Unit: 179 passed. Integration: 131 passed. Total: 310 passed, 0 failed, 0 skipped. |
|
|
|
|
The focused final run includes actual source observations, coherent archive
|
|
mutations, registration-release tests, the actual panel handler/render
|
|
collision and retry test, and the 4,096-operation, 16 MiB observation, 1 MiB
|
|
header and 32 MiB archive boundaries. JSON depth remains 128. No limits were
|
|
raised.
|
|
|
|
## Native versus controlled evidence
|
|
|
|
The rebuilt Windows Client was exercised using its local WebView2 DevTools
|
|
endpoint:
|
|
|
|
- Static v1 captured seven actual operations. It was stopped and saved, the
|
|
source was closed, and after app restart the archive loaded with its raw
|
|
request/response bytes and decoded source signals.
|
|
- Dynamics v2 was paused at model step 7 / 0.7 seconds. With gauges hidden, it
|
|
captured four actual `read.signals` operations. It was stopped and saved,
|
|
the source was closed, and after restart the archive loaded with raw bytes
|
|
and decoded signal/model context.
|
|
- Metric/Road preferences remained unchanged. Native captures were
|
|
`034e287ae82e4e14aa4d55e78581cbf1` (static) and
|
|
`69def5834cf742ce9fa729dd4bea1b16` (dynamics). Those exact task-generated
|
|
archive files and temporary WebView2/profile directories were removed
|
|
after closing the Client and DevTools listener.
|
|
|
|
Native evidence covers the normal record/stop/save/restart/load/source-close
|
|
flow. Filesystem failures, malformed coherent archives and controlled
|
|
lifetime/barrier cases were tested through the actual store, codec, session,
|
|
workspace and panel integration paths; no native storage-fault injection is
|
|
claimed. In this environment the `LOCALAPPDATA` override did not redirect
|
|
MAUI `FileSystem.AppDataDirectory`; only exact task-owned captures were
|
|
removed, with no reset of app data or modification of preferences.
|
|
|
|
## Documentation, self-review and preservation
|
|
|
|
Updated [README.md](../README.md), [docs/README.md](../docs/README.md),
|
|
[docs/architecture.md](../docs/architecture.md),
|
|
[docs/telemetry-archive-v1.md](../docs/telemetry-archive-v1.md), and
|
|
[docs/build-and-test.md](../docs/build-and-test.md). They describe exact
|
|
source identity rules, v1/v2 archive validation, empty-response representation,
|
|
bounded capture ownership, typed catalogue failures, successful-save-only
|
|
refresh, the corrected build/test evidence and the native/controlled boundary.
|
|
The historical Step-07 results remain unchanged.
|
|
|
|
Post-green self-review traced the actual transport-to-trace-to-capture-to-codec
|
|
path, the store/workspace/panel save and refresh path, session close and owner
|
|
unregistration, failure/limit cleanup, and controlled Stop drain. Validation
|
|
occurs before archive publication/inspection; invalid data does not replace
|
|
prior inspection; errors remain explicit; stopped in-memory snapshots remain
|
|
available when required. Rejected save does not mark the capture saved or
|
|
overwrite an existing file. Success refreshes as before. No additional issue
|
|
was found in this review.
|
|
|
|
The 303 baseline cases, all nine projects, public source/profile/configuration
|
|
contracts and fixed capture/archive limits were preserved. No package,
|
|
workload, system or project was added or changed. Protected assignment/state/
|
|
roadmap/gate/history files were unchanged. Only the requested new report was
|
|
added under `prompts`; no staging, commit, push, orchestration edit or Step-08
|
|
work was performed. Stop here for manual review.
|
|
```
|