[archreview R2-11 Phase C] Flip runtime driver parsers to strict (typo'd enum -> BadNodeIdUnknown) #457

Closed
opened 2026-07-15 08:01:43 -04:00 by dohertj2 · 1 comment
Owner

Status: deliberately-deferred behavior change (recorded, not shipped). R2-11 Parts 1+2 shipped (consolidated TagConfigIntent.Parse, shared strict-capable TagConfigJson readers, Inspect() warnings, deploy-gate Deployment:TagConfigValidationMode = Warn default | Error opt-in).

What's left (Phase C): flip the runtime driver parsers to strict so a typo'd enum surfaces BadNodeIdUnknown instead of a silently wrong-width Good. This is a genuine behavior change and is intentionally gated on operational rollout: land it only after fleets have run Deployment:TagConfigValidationMode=Error clean, so no deployed config breaks on the flip.

Source of record: archreview/plans/STATUS.md §"Deferred behavior-change follow-up" + the R2-11 row.

Acceptance:

  • Confirm representative fleets deploy clean under TagConfigValidationMode=Error.
  • Flip runtime parsers to strict; typo'd enum -> BadNodeIdUnknown; add regression coverage across the 6 typed drivers.
**Status:** deliberately-deferred behavior change (recorded, not shipped). R2-11 Parts 1+2 shipped (consolidated `TagConfigIntent.Parse`, shared strict-capable `TagConfigJson` readers, `Inspect()` warnings, deploy-gate `Deployment:TagConfigValidationMode` = **Warn default | Error opt-in**). **What's left (Phase C):** flip the *runtime* driver parsers to **strict** so a typo'd enum surfaces `BadNodeIdUnknown` instead of a silently wrong-width `Good`. This is a genuine behavior change and is intentionally gated on operational rollout: land it only **after fleets have run `Deployment:TagConfigValidationMode=Error` clean**, so no deployed config breaks on the flip. **Source of record:** `archreview/plans/STATUS.md` §"Deferred behavior-change follow-up" + the R2-11 row. **Acceptance:** - [ ] Confirm representative fleets deploy clean under `TagConfigValidationMode=Error`. - [ ] Flip runtime parsers to strict; typo'd enum -> `BadNodeIdUnknown`; add regression coverage across the 6 typed drivers.
Author
Owner

Shipped in #465 (master c417502d).

Item 2 (flip + regression) — DONE. New TagConfigJson.TryReadEnumStrict; all six equipment-tag parsers switched to it. A typo'd enum -> TryParse false -> EquipmentTagRefResolver.TryResolve false -> BadNodeIdUnknown. Coverage: six *EquipmentTagParserStrictnessTests inverted (Freeze_typo_* -> Typo_*_rejects_the_tag + Valid_*_still_parses), a TryReadEnumStrict matrix, and a driver-level end-to-end proof driving the real AbCipDriver.ReadAsync (Driver_read_of_a_typod_dataType_ref_surfaces_BadNodeIdUnknown). Modbus flips all three enum fields; the rest flip dataType.

Item 1 (fleets deploy clean under Error mode) — operator rollout step, not code. The Deployment:TagConfigValidationMode=Error deploy gate is unchanged and unit-proven (AdminOperationsActorTagConfigGateTests): under Error it folds any typo'd-enum warning into deploy rejects. So a real fleet that deploys clean under Error has, by construction, no typo'd enums and is safe on this flip. Running production fleets in Error mode is the operator's pre-flight; it can't be exercised from the dev environment (the docker-dev seed is Galaxy-only/stubbed, i.e. not representative). The golden parity corpus carries no typo'd enums, so the flip is a no-op there.

Closing as code-complete; the operational rollout remains the standing recommendation before enabling this on a fleet that has never run Error mode.

Shipped in #465 (master `c417502d`). **Item 2 (flip + regression) — DONE.** New `TagConfigJson.TryReadEnumStrict`; all six equipment-tag parsers switched to it. A typo'd enum -> `TryParse` false -> `EquipmentTagRefResolver.TryResolve` false -> **`BadNodeIdUnknown`**. Coverage: six `*EquipmentTagParserStrictnessTests` inverted (`Freeze_typo_*` -> `Typo_*_rejects_the_tag` + `Valid_*_still_parses`), a `TryReadEnumStrict` matrix, and a driver-level end-to-end proof driving the real `AbCipDriver.ReadAsync` (`Driver_read_of_a_typod_dataType_ref_surfaces_BadNodeIdUnknown`). Modbus flips all three enum fields; the rest flip `dataType`. **Item 1 (fleets deploy clean under `Error` mode) — operator rollout step, not code.** The `Deployment:TagConfigValidationMode=Error` deploy gate is unchanged and unit-proven (`AdminOperationsActorTagConfigGateTests`): under `Error` it folds any typo'd-enum warning into deploy rejects. So a real fleet that deploys clean under `Error` has, by construction, no typo'd enums and is safe on this flip. Running production fleets in `Error` mode is the operator's pre-flight; it can't be exercised from the dev environment (the docker-dev seed is Galaxy-only/stubbed, i.e. not representative). The golden parity corpus carries no typo'd enums, so the flip is a no-op there. Closing as code-complete; the operational rollout remains the standing recommendation before enabling this on a fleet that has never run `Error` mode.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#457