Files
lmxopcua/docs/ui-consistency/evidence/ot13-equipment-caller/verification.md
T

12 KiB
Raw Blame History

OT13 — Equipment caller ownership and field inventory

Frozen scope

Production scope is only Components/Pages/Uns/EquipmentPage.razor under the AdminUI project, SHA256 08c745a03d5787410513dee234c1b9f5fb9f53316a0db274d245a61ef4f8b66c. Own test: Pages/EquipmentCallerPresentationTests.cs. Source/test hashes and contract comparisons are in source-boundaries.json; served shared assets are in runtime-assets.json.

The shared Uns/DeleteConfirmationWiringTests.cs refinement was coordinated by method: this worker updated only the Equipment destructive-action method; gateway owned the ScriptEdit method. Existing three danger-button/no-direct-delete/brace-depth assertions were retained. Root committed the complete shared file as e411f89f6; it is excluded from this worker commit.

Behavior and consistency

  • Route identity: each equipment/creation context owns a generation. A replacement retires modal/confirmation/read contexts, clears stale data and resets its own busy state. Same-context parameter passes preserve drafts. Edit-to-edit navigation retains the selected tab and loads only that tab for the new equipment; inactive child lists stay lazy. Create mode starts on Details and preserves the optional parent-line default.
  • Fields: fifteen editable Details controls and the disabled system EquipmentId have scoped IDs and associated visible labels. Existing EquipmentId/Name/ZTag hints are persistent and linked. Required Name/MachineCode/UNS-line and existing nullable-short Year parser errors are linked; Year has a human display name and visible parser message, with no new range rule. Validation exposes its contextual error then focuses the input without scrolling away, guarded against a newer form/route. Reference overrides use visible row+column accessible names, scoped IDs, persistent clear-override help and the scoped error. All models/defaults/annotations remain exact.
  • Details write: capture all fifteen scalar payload fields, loaded target, create/edit mode and copied RowVersion before awaiting. A retired form's submit cannot replay a later presentation. Only a current create redirects; confirmed creation without a returned ID explicitly directs the operator back to UNS and disables replay.
  • Child callers: AddReference, VirtualTag and ScriptedAlarm receive additive page/modal Targets and render-local saved/cancel callbacks. Edit DTO and script-option loads stage local results and check route/request identity after each await. A stale callback cannot read or close B; an A callback already awaiting its view reload cannot install A data or close a newly opened B dialog. Current open-load exceptions retain the existing page-boundary contract; retired open errors are ignored.
  • Confirmation: the existing RawConfirmDialog remains outside every tab. Its target and action are captured by page+confirmation identity. A retained old confirm cannot consume the mutable operation for a new row, and one operation cannot dispatch twice. Reference remove keeps its captured reference/version; virtual-tag/alarm deletes retain the original fresh DTO/RowVersion read before delete, with another ownership check before dispatch. No new endpoints or service methods were introduced.
  • Busy ownership: a dispatched A write continues once after navigation. B becomes usable independently; A success/failure/exception cannot clear B's pending state, reload B or replace its errors. Reset and four finalizers are bound to the current route generation.
  • Confirmed write, failed read: retain last-good form/rows, distinguish saved changes from view failure, block repeat mutations for that surface and offer only a read-only view retry. Retry never invokes a write/confirmation. Controls persist through loading, repeated failure and completed outcome with enforced single-flight/aria-disabled states. Completed outcomes remain focusable but inactive, avoiding removal of the user's focused control. No imperative refocus steals a newer deliberate focus choice. Initial page-read recovery follows the same persistent-control approach.

The form payload order, DTO-to-form map, annotations/defaults, service API set, routes, ConfigEditor policy, create redirect, reference RawPath abbreviation/full tooltip and domain contracts are checked against baseline b3f6001f3bf8fd0b2c177fb43f31e204638d0544. EquipmentInput/IUnsTreeService/EquipmentChildRows bytes are unchanged. Existing null/empty override semantics, delete pre-read/version semantics and domain validation remain backend-owned. No shared JS, Monaco, services, models, CSS or package versions were edited.

Verification and retained observations

red.trx/red.log contain 13 actual behavior/association failures before implementation: retired saved/cancel callbacks, mutable confirmation consumption, late equipment/edit reads, payload ownership, fields and confirmed-write refresh failure. An earlier unrelated ScriptEdit compile collision is retained separately. The source-guard syntax refinement accompanies actual callback regressions; its literals alone do not certify runtime.

green.trx/green.log: 57/57, zero skipped — 29 new cases and 28 existing domain/source cases, including all three shared wiring tests. Coverage includes lazy reads, same-route draft preservation, callbacks already reloading, pre-dispatch retirement of both delete types, override read-only retry, retired form submit, Year parsing, create redirect/no-ID recovery and independent A/B writes across three old outcomes. The initial create helper incorrectly tried to pass a query-supplied property as an ordinary bUnit parameter; it now chooses the actual line control. A temporary AngleSharp reference-equality assertion was unsuitable for bUnit's rebuilt DOM snapshots; the final unit verifies stable outcome ID/single-flight and the real browser verifies same actual DOM node and focus. Original failed harness logs/TRX remain.

All test discovery/execution used the authorized private-SQL runner and separate repo-anchored artifacts. Selected domain fixtures are synthetic/InMemory, with no SQL collection cases selected; discovery never used the default shared LAN endpoint. SDK 10.0.403, bunit 2.7.2, EF InMemory 10.0.7 and Theme 1.0.1 remain unchanged. Parent/primary own the later full project suite.

browser-results.json/browser.log: 3 final scenes /156 checks, desktop 1440px, phone 390px and actual browser 200% (720 CSS px/DPR2). The actual Equipment page composes actual child wrappers and RawConfirm, with a synthetic IUnsTreeService and refusal-only operational adapters. It checks all Details names/descriptions, validation, confirmed-update/read-failure recovery, submitted target/version/Year, reference override and safe remove/cancel, retained last-good rows/read-only retry, actual AddReference picker save, late A edit versus B create, composed virtual create with failed refresh and a saved B alarm callback already reading while new A opens. Each scene dispatches exactly six synthetic writes; no fleet, PLC, real ConfigDb or issue writes occur. No page errors, external hosts or forbidden IUns requests were observed. The DOM hidden antiforgery field and Playwright's fieldset matcher needed harness corrections; final checks use interactive controls and actual inherited input disabling, not a weakened product assertion.

Peer review identified two additional concrete gaps after the first matrix:

  • busy-route-before.json records the old composed candidate keeping B disabled until A completes. The repaired busy-route-after.json/log adds 3 actual two-write scenes: old A success/failure/exception while independent B is pending; exactly two writes and no B unlock until B's own outcome.
  • retry-focus-before.json/png records actual BODY focus with document.hasFocus=true during/after view retry and page retry. retry-focus-after.json/log adds 6 observed stages proving persistent same-node focus during read/failure/success, duplicate-Enter read suppression and preservation of deliberate Back-to-UNS focus. No speech-output behavior is claimed.

canary-build.log: zero warnings/errors. runtime-assets.json proves served dialog JS equals frozen 071148e9 / SHA256 7f63bd6c5181d0b70edc2e87e086fab4dfba96adabd7a19737f9b3b4f18296d5, and served Monaco JS equals source from the accepted lifecycle handoff. Fixture controllers only change synthetic targets/release synthetic completions. The unused export context is EF InMemory. Refusal-only raw/browser/admin adapters cannot reach operational backends.

The first real-200% Playwright recovery raster was blank; a first CDP capture was taken before focus scrolling settled. These are preserved as *-playwright-blank.png and *-cdp-first.png, not called product defects. Final viewport-captures.json and six screenshots use direct Page.captureScreenshot with fromSurface:true,captureBeyondViewport:false, after fonts and actual recovery bounds/two paint frames. The accepted real200 recovery button is at 403.15–430.61 CSS px inside 450px viewport; modal header/footer bounds and no document overflow are recorded separately from raster capture. Capture-only repetition does not inflate functional scene counts.

Reproduce

From repository root, using the currently authorized owned SQL state file (not a shared/default server):

python3 infra/tools/ui-consistency/with_private_sql.py --state "$OWNED_SQL_STATE" -- dotnet test tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/ZB.MOM.WW.OtOpcUa.AdminUI.Tests.csproj --artifacts-path "$PWD/artifacts/ui-equipment-caller-tests" --filter 'FullyQualifiedName~EquipmentCallerPresentationTests|FullyQualifiedName~DeleteConfirmationWiringTests|FullyQualifiedName~UnsTreeServiceEquipmentTests|FullyQualifiedName~UnsTreeServiceEquipmentPickContextTests|FullyQualifiedName~UnsTreeServiceEquipmentChildRowsTests|FullyQualifiedName~UnsTreeServiceReferenceTests' --logger 'trx;LogFileName=green.trx' --results-directory docs/ui-consistency/evidence/ot13-equipment-caller
python3 docs/ui-consistency/evidence/ot13-equipment-caller/check-boundaries.py
dotnet build docs/ui-consistency/evidence/ot13-equipment-caller/canary/EquipmentCallerCanary.csproj --artifacts-path "$PWD/artifacts/ui-equipment-caller-canary"
dotnet artifacts/ui-equipment-caller-canary/bin/EquipmentCallerCanary/debug/EquipmentCallerCanary.dll --urls http://127.0.0.1:0

Pass the observed owned origin to browser.py, busy-route-confirm.py, retry-focus-confirm.py and viewport-capture.py. Browser zoom uses the existing disposable Chromium extension helper, never CSS zoom or a user profile. No credentials/state file contents are recorded. The before-focus probe is intentionally for the prior candidate and should not be treated as a pass script on the corrected source.

Limits and disposition

These are bounded Chromium/component tests, not a deployment or certification of every app role, every deletion success at every width, shared-picker lifecycle, ScriptEdit, other callers or all OT13/OT14 behavior. Create redirects are verified with the actual component/FakeNavigationManager; production router/query-string integration is not claimed by the fixture parameter controller. Actual virtual/alarm pre-dispatch retirement is unit-tested; current business delete behavior is additionally covered by unchanged domain tests and source review. The shared wrappers retain their separately reviewed internal busy behavior; this slice's independent busy proof is page-level Details A/B. Operational backend adapters refuse, and all fixture mutations are synthetic. VoiceOver testing is explicitly excluded by user instruction; automated accessibility-tree/naming, keyboard and focus checks remain covered. No VoiceOver blocker or speech-output claim is attached.

The primary owns remaining caller integration, full route/field inventory and OT14; root owns ledgers and the shared wiring commit. Cleanup of only this owned fixture is recorded separately.