AutoForge/prompts/Step-05A.md

16 KiB

Step-05A - Complete and verify the assigned live dashboard

STEP IDENTIFIER

Step-05A, corrective completion of existing Step-05 R-01 through R-05. Step-05 is NOT ACCEPTED. Step-04/04A/04B remain accepted. This is the sole active assignment; Step-06 is blocked and not assigned.

STEP TITLE

Make the configured numeric/bar dashboard usable, session-owned and truthfully verified through the existing static and dynamic workflows.

OBJECTIVE

Finish Step-05, not a larger dashboard. Its ten frozen cases and seven acceptance criteria remain unchanged. The basic add/edit/remove editor, both host integrations, controlled tests, docs and native smoke were already required; they cannot be reclassified as future UX or optional verification.

Read STATE.md, the original assignment, preserved Step-05 report and WORKER-QUALITY-GATE.md. Execute only this correction, write prompts/Step-05A-Report.md, and STOP.

ARCHITECTURAL CONTEXT

Keep the current nine-project .NET 10 modular monolith, sole native MAUI Client, pure Components RCL, UI-owned features and Application/Diagnostics boundary. No new project, package, host, physics/wire/schema/clock redesign or persistence. All source/tests stay under src, tests under src/tests.

The existing Application feed, validation and generic gauge can be retained where correct. Use actual DiagnosticSession/ports and v1/v2 providers, not an engine oracle, mock dashboard service or role-based signal defaults. Prefer narrow ownership/lifetime wiring over a generic resource framework.

CURRENT IMPLEMENTATION STATE

The report records a zero-warning/error Release build and 126 unit + 81 integration passes (207 total). These are the unchanged baseline tests, not new dashboard behavior tests. Native smoke was explicitly NOT EXECUTED.

All dashboard code and tracked wiring changes were source-reviewed. No dashboard test references or README/technical-document updates exist. Compilation artifacts exist, but do not establish C-01..C-10 coverage. The orchestrator did not run application builds/tests or reproduce the findings.

Reinspect the current worktree before editing and preserve existing work, assignments, reports and accepted behavior. Evidence locations below refer to the reviewed source, not a required new file layout.

REQUIRED IMPLEMENTATION

R-01 - Complete the assigned real configured host workflow

Evidence: DiagnosticPageViewModel calls ReplaceDefinitions before StartAsync, but a fresh feed's known bindings are empty. Reading signals first therefore generates definitions which fail validation before acquisition can start. Starting without prior reads produces an empty dashboard with no editor. Only Numeric defaults are generated.

DiagnosticsPage has no add/edit/remove/hide controls, disables Start for every non-null snapshot (including Stopped), and is not notified to render background snapshot changes. The simulation host has no dashboard integration.

Required existing outcomes: C-01/C-04/C-10 and required UI section, AC-01/AC-04.

  • Provide the assigned small reusable panel/editor in both existing workflows: label/kind, explicit module/signal/unit, finite range/precision, add/edit/remove and simple visibility. No layout designer or persistence.
  • Obtain binding choices from actual identity-verified reads by this session's feed. Make first Start work with or without prior unrelated manual reads. Do not bypass validation, seed fake feed metadata or infer bindings from roles.
  • Keep invalid updates atomic/visible and preserve valid configuration/monitoring. Empty/hidden dashboards remain valid while acquisition continues.
  • Enable Start/retry/Stop from actual lifecycle state. A stopped same-source feed can restart once with its valid definitions; a failed action cannot disable recovery permanently.
  • Notify/render new snapshots on the renderer dispatcher with safe subscription cleanup. Prove a later poll updates the mounted UI without a user click or remount. Widget subscription disposal must not own/stop acquisition.

R-02 - Bind exactly one acquisition owner to the actual session lifetime

Evidence: factory creates a new independent feed for every Create(session). Its private token does not follow session closure. The host stops but never disposes/clears the old feed or callback on reset/close, then reuses that old session-bound instance after a new source is opened. Owning-scope cleanup is missing.

Required existing outcomes: C-05/C-06/C-07, AC-02.

  • Repeated acquisition of a feed for one session must share one owner or reject duplicate ownership before mutation. Keep repeated Start idempotent.
  • Stop cancels and drains; Start during drain rejects before mutation, and retry after cleanup starts once. No gate may block cleanup that needs that gate.
  • Direct session disposal/reset, host source replacement and owning feature/scope disposal must cancel/drain acquisition, including while waiting for the next poll or a pending response. Actual session lifetime matters, not just buttons.
  • Detach old callbacks, release/clear the old owner and bind a new source only to its real session. Discard delayed old-generation publications; never carry old values into new profile/provider/session/config/run context.
  • Preserve acquisition when individual widgets hide/unmount or definitions become empty; release only their subscriptions. Explicit Stop/source lifetime still ends it. Keep changes narrowly focused on these existing ownership contracts.

R-03 - Keep failure, unit, range and sample context truthful

Evidence: owner failure sets feed Error, but the gauge projection can still publish cached positive data as Good. StopOwnerAsync rethrows a faulted owner; the host awaits Stop before closing/resetting the session, so that error can prevent actual source cleanup.

Known bindings retain their first unit, while later samples are not checked against the configured unit before display. The UI drops RangeState and most sample/source context, hiding low/high and current-sample timing.

Required existing outcomes: C-02/C-03/C-08/C-09, AC-01/AC-02/AC-03.

  • A failed cycle or terminal owner error must not label retained readings live/ Good. With prior valid data show Stale plus reason and actual sample time; without it show Error/--. Stopped and Pending are explicit; successful recovery restores the correct quality/range state.
  • Surface the original error without skipping owner/session cleanup or masking it with cleanup failures. Preserve close/reset and subsequent source recovery. No broad catch that converts a failure into success.
  • If a signal disappears or its binding metadata/unit changes, show an explicit invalid/unavailable state, never a new unit's number under the old unit label.
  • Propagate exact range status independently of quality; preserve actual numeric values while clamping bar geometry only. Retain explicit Uncertain/Unknown.
  • Display actual source/module/signal/unit/origin, session/profile/provider and available dynamics run/config/model time. Distinguish diagnostic request time from model time and per-module captures; do not invent simultaneous samples.

R-04 - Make the generic renderers visible, safe and accessible

Evidence: LiveDashboardGauge uses empty bar divs with width but no height/styles. Null percent becomes 0 and NaN is not rejected. A data-state attribute/color alone does not display the missing range/source information.

Required existing outcomes: C-01..C-04 and component section, AC-01/AC-04.

  • A good 850 rpm sample over 0..1000 must show 850 rpm and a visible 85% bar; real numeric zero stays zero. Give the bar real bounded geometry/styles.
  • Missing/unknown/invalid data displays -- and reason, with no fabricated current zero bar. Safely handle invalid public presentation parameters and prevent NaN/infinite/invalid CSS geometry or rendering exceptions.
  • Show low/high while retaining -10/1100 actual values and 0/100% geometry. Show quality/stale/error/stopped state text and accessible value/state descriptions, not color alone. Keep source/time text in the composed UI.
  • Keep controls generic with no AutoForge project dependency. One component supporting both modes is acceptable; separate files are not required.

R-05 - Execute the already-assigned validation and correct the evidence

Required existing outcomes: C-01..C-10, AC-05/AC-06/AC-07 and shared gate.

  • Add meaningful dashboard validation/component/feed/real-DI/rendered tests. Existing baseline passes are preservation evidence only.
  • Execute the original native static/dynamic smoke on a supported MAUI host. A true environment restriction is BLOCKED/NOT EXECUTED, not PASS or out of scope. Do not change host or install/alter SDK/workloads to bypass it.
  • Update the required README/index/architecture/build guide and dashboard usage/ contracts, including Step-04 acceptance and Step-05 pending review.
  • Preserve the original report unchanged. The corrective report must distinguish source inspection, named executed assertions, controlled fault tests and actual native observations; acknowledge the original evidence limitations.

FILES OR PROJECTS EXPECTED TO CHANGE

Existing Application dashboard/session-lifetime code, pure gauge rendering/style, UI shared panel/editor/host view models, Client DI only if needed, focused tests and required README/technical docs. Under prompts, create only Step-05A-Report.md; do not change this assignment, original assignments/reports, ROADMAP, STATE, shared gate or protected instructions.

INTERFACE AND DEPENDENCY REQUIREMENTS

Preserve the nine-project graph and one Client, typed explicit errors, verified identity/service gates, wire/profile/config contracts, static v1/dynamic v2, verified clear, partial discovery and physics/model-time independence. No direct engine access, fake zero/source, hardware, new dependency or fallback. No workload/system update/restore/repair/rollback is authorized.

TESTING REQUIREMENTS

Before fixes, add/run regressions for reproducible existing failures, recording actual inputs/assertions/results, not compile failures or invented observations. For missing functionality, record the missing behavior honestly and then test the completed real path. Map all original C-01..C-10 to named executed tests.

Area Required meaningful assertions from the existing contract
Startup/editor/UI First Start with/without prior reads; both hosts; add/edit numeric/bar, reject invalid edit atomically, zero/eight/too-many gauges, mounted background update, Stop/restart and hide/remove/unmount
Ownership Same session obtained twice; duplicate Start; Start during controlled Stop drain; retry; direct session close/reset/scope disposal while scheduler/read waits; new-source/late-old-result isolation
Failure/source Good -> read failure -> recovery; no prior sample; terminal scheduler/owner error -> stale/error plus successful cleanup; stopped/pending states; runtime missing/unit change; exact source/model/diagnostic context
Presentation 850/85%/rpm and true zero; -10/1100 with low/high and 0/100% geometry; null/non-numeric/unknown/uncertain/non-finite parameters; safe text, visible bar and accessible descriptions
Real acquisition Per-module wire read counts with shared gauges and no/hidden widgets; actual static v1 and dynamics v2, paused model step/time unchanged; rerenders add no reads

Use the existing rewriting transport/real providers and a controlled dashboard scheduler/barriers, not sleeps, probabilistic timing or a mock feature service. Release barriers in finally and dispose acquired resources on test failures.

Run focused cases, then sequential full checks:

  • dotnet build .\src\AutoForge.slnx --configuration Release --no-restore
  • dotnet test .\src\AutoForge.slnx --configuration Release --no-build

Preserve all 207 baseline cases (126 unit/81 integration) plus meaningful new coverage. Map intentional UI assertion changes without deleting safety checks. Do not install/restore dependencies absent a real missing-dependency failure.

Complete the original native smoke: configure actual numeric/bar static values, range/error/hide/stop/restart; repeat on dynamics with updates, pause/step and monitoring not advancing physics; reset/close/new source and old routes. If blocked, record exact host/environment failure and remaining checks. Do not declare the assignment COMPLETE while an acceptance check remains unexecuted.

DOCUMENTATION REQUIREMENTS

Meet original Step-05 documentation requirements using actual behavior: limits, binding/identifier/unit rules, cycle-based freshness, owner/lifetime/subscription rules, exact v1/v2 context, usage and reproducible verification. Do not claim persistence, charts, conversions, hardware or unexecuted native support.

ACCEPTANCE CRITERIA

Original Step-05 C-01..C-10 and AC-01..AC-07 remain the acceptance contract. This is their consolidated corrective mapping, not additional product scope.

ID Corrective completion Original mapping
AC-01 R-01: usable configured static/dynamic host, correct first Start/Stop/restart and background rendering C-01/C-04/C-10, AC-01/AC-04
AC-02 R-02: one session owner, controlled drain, real lifetime cleanup and old-generation isolation, independent widgets C-05/C-06/C-07, AC-02
AC-03 R-03: truthful failures/quality/unit/range/context and reliable close/reset after owner fault C-02/C-03/C-08/C-09, AC-01/AC-02/AC-03
AC-04 R-04: exact visible numeric/bar projection, safe invalid/missing inputs and accessible states C-01..C-04, AC-01/AC-04
AC-05 Named meaningful tests cover all original cases; 207 baseline preserved; full nine-project Release build/tests and required native smoke executed AC-05
AC-06 Original docs updated; case/command/self-review evidence accurate, no unsupported PASS or deferred assigned feature AC-06
AC-07 All history/protection/manual rules preserved; single fenced corrective report saved and worker stops AC-07

OUT-OF-SCOPE WORK

No charts, drag/drop, layout designer, dashboard persistence/schema, unit conversion or new freshness/rate settings, recording/replay, physics/protocol/ clock redesign, extra host/project/package, AI, hardware or unrelated cleanup. No next step, orchestration/shared-gate edit, agent invocation/automatic handoff, staging/commit/push or destructive Git action.

REPORTING REQUIREMENTS

Save only prompts/Step-05A-Report.md, entirely inside exactly one plain triple-backtick fence, no language tag/outside content/nested fences. Include identifier/title/status; implemented functions/files/interfaces; R-01..R-05 and original C-01..C-10/AC-01..AC-07 mapping; named tests and actual pre/post observations; exact commands/exits/warnings/per-project counts; native versus controlled evidence; docs/README; source-path self-review after the first green run; limitations/deviations/blockers and preservation review.

COMPLETE requires all assigned checks. Otherwise use INCOMPLETE/BLOCKED and identify the precise unmet criterion; source inspection and 207 baseline passes cannot substitute for dashboard/native assertions. Fix self-review findings within this assignment before handoff. Save and STOP for manual review.