You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Server: push configuration as composed components - #5235
Finishes SS-5 Phase B from the 2026-11-15 server architecture review: push configuration becomes a set of composed components instead of code inside ConfigurationNodeManager.
Based on master; #5230 (shared FileType handle table and composed certificate push) is merged.
The split of ConfigurationNodeManager from DiagnosticsNodeManager is now in its own stacked PR, #5238, on top of this one.
Changes
ServerPushConfiguration (internal) owns the push state and implements the explicit IServerPushContext. That state covers certificate groups and stores, transaction coordination, pending regenerated keys and the key generator.
Components:
ServerCertificatePush (now top-level): certificate methods and slot bookkeeping.
PushConfigurationApplyChanges: ApplyChanges, CancelChanges, ResetToServerDefaults and the deferred post-ApplyChanges effects.
PushConfigurationTrustMaterial: the §7.10.9 TrustList effects and the trust-material enforcement pump.
ManagedApplicationPush: the managed application's effects.
KeyCredentialPushBinder.
Admin checks touched here go through IServerAuthorizationPolicy.
ApplicationConfigurationPushBinding composes only the push engine instead of a whole ConfigurationNodeManager for each managed application.
Tests use internal accessors instead of reflecting on private members.
Verification (net10, local)
After the rebase onto master: the Server tests filtered to Configuration|TrustList|Push|Certificate|AliasNames|FileType passed (1368), and the GDS tests filtered to Push|TrustList passed (803).
Before the rebase:
Opc.Ua.Server.Tests, full suite: 12571 passed, 7 skipped, 8 failed. The 8 are the known local symlink-permission tests (FileLinks*, LinkedDirectory*, Recursive*, *RootAncestor*), which need elevated rights on Windows.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Critical routing and lookup regressions make core nodes unresolvable, misdirect reference cleanup to diagnostics, and hide existing configuration nodes from server-wide lookups.
Completes SS-5 Phase B on top of #5230 by extracting push configuration into composed components and separating configuration from diagnostics node ownership.
Changes:
Introduces a shared push engine with certificate, transaction, trust-material, and managed-application components.
Separates configuration and diagnostics managers, updating factories, routing, lifecycle integration, and the reference server.
Updates tests and documentation for the new ownership boundaries and internal accessors.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Configuration inherits a factory mode that can cause numeric ID collisions with diagnostics or leave infrastructure nodes without IDs; explicitly selecting String mode is needed.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The fallback still creates a default diagnostics manager when a custom ConfigurationNodeManager already implements IDiagnosticsNodeManager, bypassing its custom diagnostics implementation.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Preserve diagnostics manager implementations on subclasses
A custom ConfigurationNodeManager subclass can also implement IDiagnosticsNodeManager, in which case returning null from CreateDiagnosticsNodeManager() is documented to retain that combined manager. This condition still creates a default diagnostics manager for that subclass, so the diagnostics slot bypasses its custom implementation. Restrict the fallback to configuration managers that do not already implement IDiagnosticsNodeManager.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human assessment is needed to evaluate the caller-managed locking dependencies created by sharing a synchronization root between apply/rotation and trust-material components.
romanett
changed the title
Server: push configuration as composed components; split ConfigurationNodeManager from DiagnosticsNodeManager (SS-5)
Server: push configuration as composed components; split ConfigurationNodeManager from DiagnosticsNodeManager
Dec 2, 2026
romanett
changed the title
Server: push configuration as composed components; split ConfigurationNodeManager from DiagnosticsNodeManager
Server: push configuration as composed components (SS-5 phase B)
Dec 2, 2026
romanett
changed the title
Server: push configuration as composed components (SS-5 phase B)
Server: push configuration as composed components
Dec 2, 2026
…-5 phase B)
Push configuration is no longer implemented by ConfigurationNodeManager. A new
internal ServerPushConfiguration engine owns the push state (certificate groups
and stores, coordinator, pending key store, key generator, ApplyChanges lock,
shutdown lifetime) and composes the push components, which reach that state
through the explicit internal IServerPushContext:
- ServerCertificatePush (now top-level; validation helpers moved into it)
- PushConfigurationApplyChanges (ApplyChanges, CancelChanges,
ResetToServerDefaults, deferred effects, rotation collector)
- PushConfigurationTrustMaterial (7.10.9 TrustList effects, enforcement pump)
- ManagedApplicationPush (managed ApplicationConfiguration attachments)
- KeyCredentialPushBinder (KeyCredentialConfiguration folder binding)
ConfigurationNodeManager still derives from DiagnosticsNodeManager because it
is the server's diagnostics node manager; it now only hosts the nodes and
delegates. The public API and protected virtuals are unchanged.
ApplicationConfigurationPushBinding composes only the push engine instead of a
whole ConfigurationNodeManager per managed application. Without a hosting node
manager, a namespace-less PushPermissionOwner scopes the SecurityAdmin grants.
Tests use internal engine accessors instead of reflecting on CNM fields.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
❌ Patch coverage is 84.88982% with 144 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.89%. Comparing base (6410207) to head (ef2acf4). ⚠️ Report is 2 commits behind head on master.
…nd rejection
Adds direct tests for the binder extracted from ConfigurationNodeManager:
null arguments, replacing a passive KeyCredentialConfiguration object with
the typed folder, rejecting a non-object node, and the address-space
fallback when the host does not own the folder.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…its delete (#5243)
## Problem
`NodeManagerLifecycleTests.RetiredDrainRestoresNotificationsForLateMonitoredItemAsync`
fails on master (6410207, 2efcebe) every time it runs alone, and it
failed in CI shard `test-linux-net11.0 (12/19)` on #5235.
`DeleteMonitoredItems` for the data item returns
`BadMonitoredItemIdInvalid` instead of Good while a Replace of its
NodeManager commits.
## Root cause
This is a product race, not a stale test expectation. Tracing showed
this order:
1. `Subscription.DeleteMonitoredItemsCoreAsync` removes the item and
unbinds it (`IsRemoved = true`).
2. `NodeManagerServiceDispatcher` groups the item by
`monitoredItem.NodeManager` (the retiring manager), and the owner reads
`ManagerHandle`. Neither read takes a lock.
3. The Replace commit (`MonitoredItemTransition.AdoptAsync` →
`ReleaseSourceAsync`) takes the retiring manager's monitored-item
semaphore first. It releases the source registration and clears the
binding (`NodeManager = null`).
4. The delete then gets the semaphore. `RemoveRegistration` finds no
registration and returns `BadMonitoredItemIdInvalid`.
The handoff itself stays consistent. `AdoptAsync` sees `IsRemoved` and
skips adoption, or releases a replacement registration it already made.
So nothing leaks; only the status code is wrong. Whether the delete or
the release gets the semaphore first depends on timing. That is why the
test fails alone but has passed in some fixture runs and with extra
tracing. It depends on timing, not on test order.
## Fix
`DeleteMonitoredItems` now dispatches to each owner through
`DeleteMonitoredItemsFromOwnerAsync`. After the owner returns, an item
it was offered counts as deleted (Good) when all of these hold:
- the owner left it unprocessed or reported `BadMonitoredItemIdInvalid`,
- the item is removed (`IMonitoredItemGenerationBinding.IsRemoved`),
- its `NodeManager` is no longer that owner (released or adopted during
the delete).
An item that still names its owner but is missing there keeps
`BadMonitoredItemIdInvalid`.
## Tests
- New deterministic `MasterNodeManagerDeterministicTests` cases:
- `DeleteMonitoredItemsAsyncSourceReleasedDuringDeleteReturnsGoodAsync`
(owner processed / unprocessed). Both fail without the fix.
-
`DeleteMonitoredItemsAsyncItemMissingAtUnchangedOwnerReturnsBadMonitoredItemIdInvalidAsync`
(negative case).
- `RetiredDrainRestoresNotificationsForLateMonitoredItemAsync` alone:
3/3 pass (was 3/3 fail).
- Full `NodeManagerLifecycleTests` fixture: 774/774 pass (net10.0).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
## Summary
`RefreshLockStateAsyncDoesNotBlockOnAsyncNotifications` failed on
`test-linux-net11.0 (3/19)` in #5235 (`Expected True but was False` for
`refreshPending`, LockingServicesExtensionsTests.cs:273). That PR does
not touch Di; the flake is in the test.
The test read `refresh.IsCompleted` only after
`release.TrySetResult(true)`. `release` uses
`RunContinuationsAsynchronously`, so the held notification can finish on
the thread pool before that read, and the "pending while the
notification is held" flag comes out false.
- Sample `IsCompleted` while the notification is still held, before
releasing it.
- Apply the same fix to the sibling
`InitLockAsyncDoesNotBlockOnAsyncNotifications`, which had the same
read-after-release pattern.
Test-only change; no product code touched.
## Testing
- `Opc.Ua.Di.Tests` (net10.0): 612/612 passed.
- The two fixed tests: 20 repeated runs, all passed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finishes SS-5 Phase B from the 2026-11-15 server architecture review: push configuration becomes a set of composed components instead of code inside
ConfigurationNodeManager.Based on master; #5230 (shared FileType handle table and composed certificate push) is merged.
The split of
ConfigurationNodeManagerfromDiagnosticsNodeManageris now in its own stacked PR, #5238, on top of this one.Changes
ServerPushConfiguration(internal) owns the push state and implements the explicitIServerPushContext. That state covers certificate groups and stores, transaction coordination, pending regenerated keys and the key generator.ServerCertificatePush(now top-level): certificate methods and slot bookkeeping.PushConfigurationApplyChanges:ApplyChanges,CancelChanges,ResetToServerDefaultsand the deferred post-ApplyChangeseffects.PushConfigurationTrustMaterial: the §7.10.9 TrustList effects and the trust-material enforcement pump.ManagedApplicationPush: the managed application's effects.KeyCredentialPushBinder.IServerAuthorizationPolicy.ApplicationConfigurationPushBindingcomposes only the push engine instead of a wholeConfigurationNodeManagerfor each managed application.Verification (net10, local)
Configuration|TrustList|Push|Certificate|AliasNames|FileTypepassed (1368), and the GDS tests filtered toPush|TrustListpassed (803).Opc.Ua.Server.Tests, full suite: 12571 passed, 7 skipped, 8 failed. The 8 are the known local symlink-permission tests (FileLinks*,LinkedDirectory*,Recursive*,*RootAncestor*), which need elevated rights on Windows.Opc.Ua.Gds.Tests(Push|TrustList|ProvisionableDeviceResources): 807 passed.Opc.Ua.Serverhas 0 errors and 0 warnings.🤖 Generated with Claude Code