Saving the DHCP relay card checks the circuit and remote IDs against the stored settings, not the startup values #62

Closed
opened 2026-10-31 12:41:59 -04:00 by claude · 0 comments
Owner
  • Draft: BUG-45
  • Priority: low (a bad stored ID forces the operator to patch both IDs at once)
  • Agent: coder
  • Depends on: none
  • Decisions: none

Why

DhcpSettingsController combines a patched ID with relayOptions.Value for the other one (src/dotnet/src/Ninlil.Web/Controllers/DhcpSettingsController.cs:464-491, relayOptions.Value at :479,482). relayOptions is the startup IOptions, so two patches before a restart validate against stale values.

What changes

  • Read the current stored settings (as the other cards do since B10, IOptionsMonitor.CurrentValue or the runtime settings store) for the unpatched field.
  • Check the ra-protocol card for the same pattern (b6-design.md:250) and fix it the same way.

Acceptance

  • Red Web test: patch the circuit ID, then patch the remote ID alone before a restart. The second check uses the first patch (fails on HEAD).
  • dotnet test src/dotnet/tests/Ninlil.Web.Tests passes. No snapshot change.

Source

b6-design.md:252, :250; u-design.md:221; d-design.md:393 (B6-5). Absorbs REL-24 (DEDUPE.md).

- **Draft:** BUG-45 - **Priority:** low (a bad stored ID forces the operator to patch both IDs at once) - **Agent:** coder - **Depends on:** none - **Decisions:** none ### Why `DhcpSettingsController` combines a patched ID with `relayOptions.Value` for the other one (`src/dotnet/src/Ninlil.Web/Controllers/DhcpSettingsController.cs:464-491`, `relayOptions.Value` at `:479,482`). `relayOptions` is the startup `IOptions`, so two patches before a restart validate against stale values. ### What changes - Read the current stored settings (as the other cards do since B10, `IOptionsMonitor.CurrentValue` or the runtime settings store) for the unpatched field. - Check the `ra-protocol` card for the same pattern (`b6-design.md:250`) and fix it the same way. ### Acceptance - [ ] Red Web test: patch the circuit ID, then patch the remote ID alone before a restart. The second check uses the first patch (fails on HEAD). - [ ] `dotnet test src/dotnet/tests/Ninlil.Web.Tests` passes. No snapshot change. ### Source `b6-design.md:252`, `:250`; `u-design.md:221`; `d-design.md:393` (B6-5). Absorbs REL-24 (DEDUPE.md).
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lantea-one/ninlil#62
No description provided.