test(live): prove Write2 applies a value via supervisory advise on DEV (#212)
On the DEV gateway (wonder-app-vd03, 2b13564e), Write2 after
AdviseSupervisory applied the value to MESReceiver_025.MoveInBatchID
(0 -> 212212, OnWriteComplete Ok), and the value was restored to 0. After a
plain Advise, the same Write2 got SecurityError/1008, which is exactly what
the windev run saw. So that refusal came from the plain advise. It does not
show that windev has no writable attribute.
- Client.Tests: add the opt-in LiveGatewayWrite2Tests (gated by
LiveGatewayWriteFact: endpoint, key file and write item env vars). It runs
supervisory advise -> Write2 -> readback -> restore. The value test passed
live on vd03. The timestamp-parity test needs a second opt-in; it fails on
a non-UTC host until #228 is fixed.
- IntegrationTests: the windev Write2 smoke now uses AdviseSupervisory and
restores the original value. It has not been re-run on windev.
- GatewayTesting.md: document the env vars. code-reviews IntegrationTests-033:
correct the "no writable attribute" limit.
The run also found that the Write2 timestamp is read as host-local time
(stored +5 h on the UTC-5 box); filed as #228.
Claude-Session: https://claude.ai/code/session_01GT67ACmpMR7b9LGRPLijMi
This commit is contained in:
@@ -716,3 +716,5 @@ The prior `DashboardAuthenticator` ctor took `IOptions<GatewayOptions>`, so the
|
||||
**Resolution:** 2026-06-16: requires a live MXAccess rig + provider state not available on this dev box; add the AddItem2/Write2 parity assertions when running on the MXAccess host. → #212
|
||||
|
||||
2026-11-12: Resolved. `AddItem2` has worker-level live coverage (`Worker.Tests/MxAccess/MxAccessLiveComCreationTests.cs`); `Write2` is covered by `WorkerLiveMxAccessSmokeTests.GatewaySession_WithLiveWorker_Write2ValueWithTimestampToAdvisedItem` (`9c6ac0cd`), run live on windev at `04a40f2c` (x86 Release worker, item `TestChildObject.TestInt`) and PASSED, alone and with the rest of the class (10/10, `WriteSecured` excluded). `Write2` replied `ProtocolStatusCode.Ok`, hresult `0`, kind `Write2`, and MXAccess raised a matching `OnWriteComplete`. The MXAccess status on that completion was `success=0 category=SecurityError detail=1008`: the item's Galaxy security refuses an unauthenticated write, and `Write2` carries no user id. Plain `Write` got the identical refusal in the same run, and the value stayed at 7004 with an unchanged source timestamp. So the live run proves `Write2` reaches the COM call and comes back with a real provider status, not an `InvalidRequest` short-circuit. It does not prove that a value plus timestamp is *applied*, because the rig has no free-access integer test attribute. → #212 (closed)
|
||||
|
||||
2026-11-12 (later), correction: the "no free-access attribute on the rig" limit was wrong, or at least unproven. The windev test used a **plain** `Advise`, and MXAccess refuses a user-id-0 write on a plainly advised item with exactly that `SecurityError/1008`. On the DEV gateway (wonder-app-vd03, `2b13564e`), `MESReceiver_025.MoveInBatchID` (Int32, Z28062) behaved the same way: after `AdviseSupervisory`, `Write2` **applied** the value (`0` → `212212`, OnWriteComplete `Ok`/`RespondingAutomationObject`, then restored to `0`), and after a plain `Advise` the same `Write2` got `SecurityError/1008` and nothing changed. The value-applied proof is now the opt-in `clients/dotnet/ZB.MOM.WW.MxGateway.Client.Tests/LiveGatewayWrite2Tests.cs` (env vars in `docs/GatewayTesting.md`, "Live gateway write"). The windev test now uses `AdviseSupervisory` and restores the original value. It has **not** been re-run on windev since that change. The same run found that the timestamp is stored shifted by the host's UTC offset (sent `01:33:00Z`, stored `06:33:00Z` on the UTC-5 box) → #228.
|
||||
|
||||
Reference in New Issue
Block a user