Intermittent failure in a full Runtime.Tests run. Test timing, not a production defect: the held runner's stale mark is
armed only after its loop has unwound (no late Good can follow it) and fires 100 ms later, while MaxHold runs from the
hold itself. Measured with the thread pool saturated: stale mark ~1.9 s after the hold, MaxHold release at ~0.9 s, so
the release ended the hold first (stale skipped / removal seen by the 'not removed before MaxHold' check). Production
MaxHold is 5 min. With 5 s the ordering holds under that load (stale ~1.9 s, release ~5 s).
One command, run from the NEW build against a ConfigDb BEFORE its migrations, that names every row
the upgrade or the next deploy would refuse; exit 1 if any, 2 if unreachable / not v3.
- migration:* — row-naming twins of the constraint-adding migrations' pre-checks
(ConfigurationGapsIndexesAndRowVersions: duplicate NodeAcl / LdapGroupRoleMapping;
ScriptForeignKeysAndExternalIdUniqueness: NULL ScriptId, dangling VT/alarm scripts, duplicate
ZTag/SAPID, reservation rows). (#1021)
- deploy-gate — DeployGateRules, the gate's rule pass now extracted from AdminOperationsActor so
both run the same code: every DraftValidator rule incl. VirtualTagNameInvalid /
UnsEffectiveNameInvalid / *ScriptNotFound (#1015) and SqlNamedQueryInvalid (#1058), topology,
TagConfig inspection.
- script-gate — DeployScriptGate through RoslynDeployScriptChecker, plus every unused stored
script (Warning). (#1013)
An older schema is read through this build's model: tables a pending migration creates map to a
typed zero-row query, added columns are left out of the model (LegacySchemaTolerance). SNAPSHOT
read when allowed. Logic in ControlPlane/Preflight (Roslyn-free); the console shell binds Roslyn.
Real-SQL tests: an old-schema DB with every finding class (and nothing written), clean controls,
NULL ScriptId -> SnapshotUnreadable, non-v3 refused. docs/v2/upgrade-preflight.md records the dev
runs; production runs stay user-gated (wonder-box hold).
Follow-up of #973 (review 2026-12-02 A-1). New Cluster:Remoting section (AkkaRemotingOptions):
- UntrustedMode (default ON): akka.remote.untrusted-mode with trusted-selection-paths =
every path this code base reaches by ActorSelection across nodes, enumerated from the Akka
1.5.62 sources + src/: cluster core daemon + heartbeat receiver, remote-watcher, the DPS
mediator, /user/{s} + /user/{s}/{s} for each ControlPlane singleton, /user/driver-host.
Remote deployment and peer PoisonPill/Kill are dropped. Receive-side only, so a mixed
old/new pair keeps working through a rolling upgrade. Drops (Akka logs them at Debug)
become a Warning per path + otopcua.cluster.remoting.untrusted_drops.
AdditionalTrustedSelectionPaths / UntrustedMode=false are the escape hatches.
- Tls (default OFF): mutual TLS on the DotNetty transport (PFX or store cert, mutual auth
on by default, thumbprint pinning or chain validation, optional hostname check). Seeds and
the diagnostics selection follow the transport scheme (akka.ssl.tcp); the bootstrap guard
parses it. Validated at boot.
Proven on real clusters: pair formation, singleton via proxy + hand-over on leave, DPS, zero
drops; untrusted selection dropped (and delivered with the mode off); pinned TLS peers form,
an unpinned node cannot join; full two-node Host harness (deploys from both nodes,
diagnostics, node restart) with zero drops + positive control. Guards fail when a new
singleton or ActorSelection appears without its trusted path.
With Security:Acl:Enabled=false a revalidation pass over local Raw/UNS items is an unconditional allow; it still paid a
(session, ns, id) memo entry and the full Permits walk per item. Measured over 10k items: ~6.5-7 ms and ~1.4 MB per pass
-> ~0.5-1 ms and ~0.2 KB. IsLocalNodeUngated mirrors exactly what Permits concludes there and excludes the one wiring
where it differs (mapped resolver without the projected predicate). The same shortcut inside the per-request Permits was
measured and NOT taken: a 1,000-node flag-off Read stayed ~1.5-1.9 ms either way (SDK read dominates).
Co-Authored-By: Claude <noreply@anthropic.com>
U-8: a warm cached decision on a UNS node allocated 416-680 B/call ahead of the cache (live id-chain list, identifier
split, LINQ, segment array, string.Join key, DataCallerIdentity). Now 0 B: the live chain is cached per folder instance
(re-verified against the live ancestry every call), the generation hands out one segment array per path, the authorizer
keys its resolved cache keys on that array, reference variables key on their own identifier (scope = its split), and
the caller identity is built once per session identity.
R-25: ConfiguredProjectedInterestOwner re-ran discovery for an unresolvable configured reference every 1 s sweep forever;
a failed resolve now backs off 1 s doubling to 30 s (60 s unreachable: 61 discoveries -> 6). Publishing into the source hub
only for sources with interest is DECLINED: that cache answers a new subscription's first snapshot and projected Reads.
Restart comms latch (decided: keep): the nodes stay Bad across an operator Restart and the respawned incarnation must
re-publish them; the stopped child's PostStop announcement already re-latches and cancels the old audit. Pinned by test.
Co-Authored-By: Claude <noreply@anthropic.com>
Measured with GrpcDataWave3PerfTests (10k-item cohort, 100 source versions at 1k/s; numbers in the issue report).
- Core: MappedSubjectResolver.Resolve returns shared immutable resolutions (built once per subject) and compares
scope/ancestry by index (no MappedSubjectResolution + 2 enumerators per call, several calls per value);
DataOperationPolicy checks segments by index and builds its local scope key with one exact-length string.Create.
- Origin: LocalExportCatalog.TryResolve compares the view field by field instead of building 'view with { Address }'
(and LocalAddress no longer copies an exactly-spelled address); the frame Eligible check peeks the latest READY
version (PartitionedSampleHub.TryPeekReadyVersion) instead of retaining a second sample per value; TickAsync reuses
worker-owned lists (interest groups, changes via SourceInterestLease.TryReadChanges(into), delivery slice via
DeliveryScheduler.TakeSlice(into), due items) and the delivery index reuses one ready-list node per source.
- Consumer: PublishPacedAsync is a ValueTask; the cohort and RemoteSubscription walk frame items by index; renewal
prunes expired witnesses in place.
- MxAccess.SecuredWrites = Refuse (default, unchanged #991 local BadUserAccessDenied) |
ApiKeyIdentity. Opted in, a SecuredWrite runs as the calling key's own /api-keys Galaxy
identity (ResolveKeyIdentityAsync: no fallback account; anonymous / no identity / broken
identity refused before the wire): own plain-advised handle (apart from the raw path's
supervisory handle) -> AuthenticateUser every write -> WriteSecured(userId, 0), the sequence
mxaccessgw live-captured committing. Auth failure / user id 0 -> BadUserAccessDenied; password
only in the AuthenticateUser command, scrubbed from every log. Identity resolved once per batch.
- VerifiedWrite is refused in every mode: an OPC UA Write carries no verifier (MXAccess refuses
no verifier 1008 / self-verifier 8018), and a stored verifier would defeat the two-person rule.
- Caller plumbing: WriteCaller + optional ICallerAwareWritable (Core.Abstractions); node manager
passes principal + key id -> IOpcUaNodeWriteGateway caller overload (default drops it) ->
RouteNodeWrite.Caller -> WriteAttribute.Caller -> ICallerAwareWritable. The gRPC data-connection
write path carries no caller yet (secured writes refused there).
- AdminUI Galaxy form 'Secured writes' select (owned path); enum serialises as its name; factory
refuses an unknown value. Docs: Galaxy.md design + live-gate checklist. Not live-gated.
Root cause of the intermittent VirtualTagActorTimerTests coalesce failure (full suite only):
Akka's HashedWheelTimer does not skip ticks it missed while its thread was stalled (GC pause,
CPU starvation) - it delivers them all in one burst when it resumes. Measured with a parked
scheduler thread: a 600 ms stall => 12 ticks within the same millisecond. Ticks that fell due
during the gated run therefore landed just after the release, each a fresh evaluation, and broke
the post-release bound. In production the same burst multiplied every timer tag's script runs by
stall/interval after any stall.
VirtualTagActor now drops a tick that lands within half an interval of the last timer
evaluation (scheduler monotonic clock); the regular cadence is unaffected. New deterministic
test parks the scheduler thread for 600 ms with the release inside the stall: failed 3/3
before the fix, passes after, with a cadence positive control. The in-flight assertion
(Calls == 1 while gated) has no such mechanism - ticks during a run are dropped - and did not
fail in 3 full-suite + 12 class-scoped trx runs under load average ~490.
- AuditWriterActor: every buffer-full drop is added to OtOpcUaTelemetry.AuditDropped
(otopcua.audit.dropped{reason=buffer_full, actor}) — the count used to be readable only
through the actor's own property.
- scripts/install/tests/Test-ScmRestartAfterClusterExit.Windows.ps1: the windev manual gate
of 2026-12-03 as a script (qfailure restart action; failover/command trigger => non-zero exit,
7031, Running under a new pid; Stop-Service stays stopped; optional kill control). Parse-checked
with pwsh on macOS; must be run elevated on a Windows box hosting OtOpcUaHost.
Co-Authored-By: Claude <noreply@anthropic.com>
New DriverCapability.AcquisitionSubscribe (appended): RetryCount 0 in every tier and forced 0 by the parser, 30 s timeout
(outlasts the actor's 10 s acquisition timeout), breaker 5 (Tier C none). PendingAcquisition.Start routes through the
invoker keyed on the driver instance; an open breaker fails fast and the capacity reservation is released.
Co-Authored-By: Claude <noreply@anthropic.com>
The origin admitted MaxStreamsPerPrincipal (8) concurrent snapshots per PRINCIPAL, shared by every stream that principal
held. A consumer opens one stream per (connection, identity, publishing interval) and each cohort keeps up to 4 commands
or snapshots outstanding, so a third cohort's add was refused and its whole stream reset ('Snapshot admission
exhausted'). SubscriptionTransportCapacity.ForDataPlane (used by LocalDataRuntimeComposition) now gives each stream 8
slots (SnapshotSlotsPerStream) and sizes the principal and node caps so every admitted stream can hold all of them; the
snapshot byte budgets still bound memory. A session's background waiting-item recoveries may take at most half its
slots, so the peer's outstanding commands always find theirs. Capacities built without a per-session cap (tests) keep
the old per-principal behaviour.
DanglingReferenceSqlServerTests: the review's emptiness-check/add/delete race interleaved on two
real connections commits both and the deploy snapshot names the orphan; a consistent device+tag
commit landing mid-read (after Devices, before Tags) is invisible under the factory's SNAPSHOT
transaction, while the same interleave read READ COMMITTED produces exactly the false
DanglingReference (positive control).
ClusterNodeEditConcurrencySqlServerTests (bUnit on the AdminUI SQL fixture — InMemory generates no
rowversion and has no FKs): stale-token saves on NodeEdit/ClusterEdit are refused and the other
user's edit survives, current-token saves succeed, a deployed node deletes with its
NodeDeploymentState rows, a cluster with nodes is not deleted and the page says why.
One migration, ScriptForeignKeysAndExternalIdUniqueness:
- FK_VirtualTag_Script / FK_ScriptedAlarm_Script (Restrict) onto Script.ScriptId, which becomes
NOT NULL and an alternate key (unique constraint UX_Script_LogicalId replaces the index).
- UX_Equipment_ZTag / UX_Equipment_SAPID filtered UNIQUE indexes (blank = no identifier, the
deploy gate's reading) replace the non-unique IX_ ones.
- ExternalIdReservation + sp_ReleaseExternalIdReservation dropped (decision: retire — no writer
since the generation model; uniqueness is gate + indexes). The /reservations page, query,
ReservationKind, DraftSnapshot.ActiveReservations and the reservation pre-flight rule go too.
- A read-only pre-check THROWs 51049 naming every offending row class (NULL ScriptId, dangling
VirtualTag/ScriptedAlarm script, duplicated ZTag/SAPID, any reservation row) and changes
nothing; Down restores the previous shape.
Authoring mirrors so the constraints are never the first to say no: UnsTreeService refuses a
missing script for VirtualTag/ScriptedAlarm create/update, and a ZTag/SAPID another equipment
holds on create/update/import (owner named; import keeps the clean rows); values stored trimmed.
ScriptEdit maps a concurrent-bind FK refusal to a message. Migration pre-check, Down round-trip,
FK and index behaviour pinned against real SQL with positive controls.
#994 (R-9) taught the interest lease to tell its own sources' invalidation from a sibling's, but SnapshotLease still
compared the partition-wide control stamp, so any sibling invalidation, status barrier or plain lock contention reset
the snapshot and with it the stream. Each snapshot cursor now adopts a newer stamp once it proves none of ITS captured
sources moved (quiet version, invalidation version, binding/fence/gate retirement, same source state), read inside a
captured control window; an in-progress bracket is spun on briefly. Own-source invalidation, a partition-wide epoch bump,
a poisoned signal and history roll-off still reset.
Review 2026-12-02 K-1 option 4 (#971 follow-up). The ScriptWorker used to read, verify and
WRITE the PE cache with the key it received in Hello, and a verified image is loaded without
re-running the analyzer — so code that escaped inside a worker could sign an entry for any
script's source and persist across restarts and redeploys.
- Hello no longer carries pe_cache_dir / pe_cache_key (fields reserved).
- HostPeCache: the host verifies an entry under its host-only key and ships the image in
ScriptSource.pe_image; on a miss the worker compiles as before and, only after that compile
succeeded, the host queues its OWN compile (one background thread, de-duplicated) and writes
the signed entry. The worker loads a supplied image or compiles; it never opens the directory.
- Images go only to a worker whose Ready.pe_image_abi equals ScriptSandbox.ImageAbi (runtime +
pinned assembly names); pre-#1014 workers report none and just compile.
- Entry format v2: every worker-written (possibly forged) v1 entry is rejected and refilled.
- Scripting:Worker:PeCacheDir and the directory layout are unchanged.
Registration in the session's delivery index happened after the Open/Add acknowledgement had been queued as Good, so a
registration failure could only Stop() the whole session (every sibling item went with it). Items now register at
admission, before the ack is built; a refusal is the item's own LimitExceeded. Waiting-for-initial-data items register
at admission too (the index is keyed by source), so their later recovery can no longer reset the stream for capacity.
SubscriptionSessionLimits.DeliveryIndexCapacity is a test-only override of the index size.
#995 follow-up 1: OpcUaPublishActor still SHA-256'd every rebuild's artifact once on its pinned
thread (WithArtifactRevision). DriverHostActor already hashes the same bytes for its catalog
attempt, so it now stamps RebuildAddressSpace.ArtifactRevision at all three send sites (deploy
apply, boot-from-cache, bootstrap restore) from a per-blob ConditionalWeakTable memo (one hash
per blob instance, no lifetime extension). The publish actor's fallback hash stays for unstamped
senders and is observable through TestHooks.OnArtifactHashed.
#995 follow-up 2: DependencyMuxConsumerRegistrationGuardTests scans src for every
DependencyMuxActor.RegisterInterest sender; an unlisted one fails with the instruction to fold
its refs into DriverHostActor.ConsumerRefs, and each listed replay-opting consumer's composition
term must still appear in ConsumerRefs (mutation-checked). The historization recorder is the one
exempt, non-replay registrant.
#979 follow-up 1: write A then B, B refused first (node reverts to the pre-A value P), the
device confirms A afterwards. The revert closed the overlap window and A's success was dropped
as an outcome from a closed window, so the node showed P while the device held A until the
next driver publication. EquipmentVariableState.CloseWindowAfterRevert now keeps the window's
still-pending older attempts (bounded like the window, carried across later reverts above the
confirmed floor); a late success of one lands its tuple (LateConfirm) when nothing touched the
node since the revert, or becomes the confirmed tuple of a window opened since. A driver
publication or a newer owner's success discards them.
#979 follow-up 2 (dependents keep last value during operator Restart / config respawn): not a
defect - the stopped child's PostStop comms-loss fan (03/S15) reaches the dependency mux and
hands dependents BadNoCommunication until the new driver object publishes. Pinned by two new
DriverHostActorSourceRemovedTests (identical-value recovery); mutation-checked: removing the
PostStop ConnectivityChanged fails both.
H-6 remainder: ConfigPublishCoordinator runs the dispatch guard/seed (incl. the #977 superseded close) and the
Sealed/PartiallyFailed/TimedOut writes through RunDbWork - a pool-thread task whose outcome is applied on the actor
thread while a Busy behaviour stashes everything else. A failed write is rethrown when it reports back (same
restart-and-recover contract as before); recovery runs the same work inline (failure = failed load).
H-3 remainder: a transient Restart/Reconnect ConfigEdit audit failure is retried (1 s doubling, 30 s cap, 6 attempts);
a ConfigDb rejection (poison allowlist) is not.
Co-Authored-By: Claude <noreply@anthropic.com>
#1029: ModbusRtuFraming.ReadResponsePduAsync takes the request PDU and refuses a CRC-valid, right-unit reply whose
function code (exception frames included) or write-echo start address differs (new DesyncReason.ResponseMismatch).
Runtime.Tests e2e: a full rebuild with a kept real ModbusDriver (deadbanded tag, same device value) leaves no node at
BadWaitingForInitialData; falsified by removing the S-2 baseline clear. V3ArtifactSeeder gained driverConfigByDriver.
#1055 (Modbus half): the RTU transport's caller-cancel teardown now grants ONE redial even with AutoReconnect=false, so
an unsubscribe/probe cancel no longer leaves the transport dead until the 90 s watchdog re-init; a link fault still stays down.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
#1007: LocalDbStoreAndForwardSink.ReviveMaxAttemptsDeadLetters requeues only rows whose last_error is exactly the pre-#976 'max attempts (N) exceeded' (idempotent, replicates through LocalDb); driven by AlarmHistorian:ReviveMaxAttemptsDeadLetters for one restart. Runbook in docs/AlarmHistorian.md.
#1034: AlarmHistorian:StallThresholdHours (default 2, 0 disables) -> HistorianSinkStatus.Stalled/LastProgressUtc, transition logs, otopcua.alarm_historian.queue.* gauges, Degraded 'alarm-historian' readiness check.
Both touch the same sink/options/registration files, hence one commit.
A blank password box means 'keep the stored password' (#997 A-4) and is refused first time,
so an account whose password is genuinely empty could not be mapped. The /apikeys editor
now has an 'Empty password' checkbox (disables + clears the box) that calls the new
IApiKeyGalaxyAckIdentityService.SetWithEmptyPasswordAsync: writes an empty password secret
first, then the user, audited like any set. The driver already accepts an empty password.
- KeepAlivePingDelaySeconds / KeepAlivePingTimeoutSeconds get form fields and round-trip
through FromRecord/ToRecord (a 0 = no-pings opt-out used to reset to 15 on any save).
- Save overlays only the form-owned paths onto the stored JSON (DriverConfigJsonOverlay,
as AbCip/AbLegacy do), so a key the form does not model survives.
- Guard test: every leaf the record serialises is an owned path.
Root cause of the ~1-in-20 flake in GrpcDataCohortScaleTests.R2_a_cohort_above_1024_items_opens_on_one_origin_stream
(Opens = 2): a production race in the origin DataSubscriptionSession, not a fixture artifact.
The session's bounded outbound window (MaxPendingFrames) is shared by values, snapshot controls and command acks. The
snapshot pump leaves exactly one slot "for command acknowledgements", but a peer may have up to MaxCommands commands
in flight (the #994 projected cohort keeps 4 outstanding). When the reader was a few frames behind, an open/add's
snapshot filled the window, the next add's ack took the reserved slot, and the following ack's TryWrite failed;
EnqueueAsync then CloseWithReset("Pending control capacity exhausted.") the whole stream, and the cohort re-opened
all 1100 items on a second origin stream. Instrumented repro: the failing run's trace shows exactly that reset on the
1100-item cohort's first stream, then a second COHORT OPEN with epoch=2; the reset never appeared in passing runs.
Fix: EnqueueAsync (production callers all on the command worker) now awaits the window when it is full instead of
resetting — backpressure on the worker, never on the reader. A reader that never drains is still bounded by the ack
deadline, the session lifetime and the bounded command queue. The values cap (MaxPendingFrames - 2) still resets.
Regression: GrpcDataDeliveryWindowTests drives an 8-frame window with an unread open + 3 adds on a frozen clock; the
OutboundFullForTests seam proves an ack met a full window. Before the fix the stream ended with that reset; after it
every ack, SnapshotEnd and baseline arrives with no Reset.
Verified: GrpcDataCohortScaleTests + GrpcDataDeliveryWindowTests 30/30 consecutive passes (plus 30/30 instrumented
with zero "Pending control capacity" resets); full Runtime.Tests (Category!=SlowUnit) 2283 passed / 0 failed.
FleetDiagnosticsTargets.IsWellFormed used \d (any Unicode decimal digit, so
'host:٤٠٥٣' matched and int.Parse threw FormatException, crashing the page) and
$ (matches before a trailing '\n', which int.Parse then ignored, so
'host:4053\n' was 'well-formed' and could reach the akka.tcp address). Now
[0-9]{1,5}\z and int.TryParse(NumberStyles.None). Regression rows for trailing
newline, Arabic-Indic / full-width / mixed digits, and Resolve refusing them
without throwing (positive control kept); all failed first.
Co-Authored-By: Claude <noreply@anthropic.com>
AdminSessionRevalidator re-mapped the groups frozen into the cookie at sign-in,
so removing a user from a directory group changed nothing until
MaxSessionMinutes ended the session.
Bump ZB.MOM.WW.Auth.{Abstractions,Ldap,AspNetCore} 0.4.1 -> 0.5.0 (additive
ILdapGroupLookup; 0.4.2-0.4.4 changes only affect BindMode=User / API-key SQL
stores, unused here; solution builds clean). OtOpcUaLdapAuthService now
implements ILdapGroupLookup with the same Enabled / DevStubMode / insecure-
transport rules as sign-in, registered as the same singleton (a stub
ILdapAuthService gets a NotSupported lookup).
At each re-validation interval the revalidator looks the user up: Found ->
fresh groups replace the session's otopcua:group claims and are mapped;
UserNotFound / UserDisabled / AmbiguousUser / Found-with-no-groups -> reject;
DirectoryUnavailable (or a lookup fault) -> fail-soft on the last known groups
(still re-mapped), bounded by MaxSessionMinutes; NotSupported / ProviderDisabled
-> previous behaviour. Never queried under DisableLogin.
Tests (directory rows failed first): group removal / addition picked up after
the window, unchanged membership kept (positive control), four end-the-session
statuses, outage keeps the session until the absolute cap, DisableLogin issues
no lookup (control: one lookup otherwise); wrapper lookup rules + DI
registration. docs/security.md drops the 'no password-less lookup' claim.
Co-Authored-By: Claude <noreply@anthropic.com>
OpcUaPublishActor reported AddressSpaceRebuilt only after a real full rebuild, so the empty-plan repair of a degraded
composition, the #977 R-4 whole-composition re-ensure, and the re-diff after a degraded non-rebuild all reported a
clean non-rebuild. The degraded apply's own re-push had run while the node it failed to place was missing; the apply
that finally created it skipped the node's driver (fingerprint unchanged), so the node stayed
BadWaitingForInitialData until its value changed — forever for a constant.
- The publish actor now reports AddressSpaceRebuilt=true when the apply ran a repair pass (either branch) or when the
previous apply of any kind ended degraded (final outcome, completion + catalog included); DriverHostActor re-pushes
the deploy's skipped drivers on it. A clean apply after the repair reports false again.
- DriverLifecycle.md / rules note the widened signal.
Tests: DriverHostActorDegradedRepairReseedTests (REAL publish actor: degraded add, degraded rebuild + empty-plan
repair, degraded rebuild + R-4 repair; skip still works afterwards) and OpcUaPublishActorApplyOutcomeTests (outcome
on both repair branches + after a degraded non-rebuild, with clean-no-op controls) — all six failed before the fix.
Wave 3 of the 2026-12-02 review (docs/reviews/2026-12-02/01-runtime.md R-2/3/7/8/9/10/12/13/21/22/23/24,
02-opcuaserver.md U-10/11/12/13).
Consumer (ProjectedDataAccess cohort):
- R-2: a cohort's OpenSubscription declared a snapshot budget of 1 item, which the origin uses to size the stream's
handle table, so the 2nd item was refused LimitExceeded and the cohort re-opened in a loop (two projected items of
one interval broke each other). Opens/adds/removes are now batched (IDataSubscriptionCommandLimits, <=256 items,
bounded by estimated snapshot bytes) and paced (32 burst, 32/s, <=4 commands or snapshots outstanding).
- R-7: control events no longer share the bounded frame queue; a failed Remove can no longer Stop() the cohort.
- R-10: a local capacity refusal (TryPublishOrBackpressure -> CapacityExhausted) is retried for up to 2 s instead of
invalidating healthy evidence and retiring the route.
- R-13: RemoteSubscription mutates its handle/version tables in place; the cohort caches the source per binding and
drops the per-sample LINQ in EvidenceFor.
- R-8: only an unselectable endpoint arms the discovery backoff; a caller cancel is OperationCanceledException.
- R-24: the condition stream cancels and observes a pending frame read before disposing the enumerator.
Origin (DataSubscriptionSession / SamplePartition / SourceInterestLease):
- R-2 (found by the perf harness): the delivery index was sized MaxPendingFrames x 16 = 1024, so the 1025th item of a
stream stopped the session after its ack; it now covers MaxMonitoredItems.
- R-3: interest reads count only own-ticket matches (scan budget separate), re-queue a lagging tick, and catch up from
per-source last-change versions when the bounded history rolled off - no more "Source change history expired".
- R-9: a partition quiet bump resets a lease only when one of ITS sources was invalidated (per-source quiet version)
or its binding retired; partition-wide invalidation still resets all.
- R-12: the per-item publish verdict is memoised per (catalog instance, authority generation) for <=1 s; Commit
under the session lock re-checks identity only.
- R-21/R-22/R-23: registry prune is interval/capacity driven; a cleared history session refuses chunks; the snapshot
barrier is decided and armed under the same gate its release is decided under.
Node manager: U-10 projected live items indexed by node; U-11 anchor removal / root-leaf swap tombstone the anchor's
own monitored node; U-12 per-parent child count; U-13 per-condition verdict index.
Also: Issue934_r1_N1 test clears its metadata failure before ending the stream (test-only sequencing race,
reproduced with a 200 ms delay; production behaviour correct).
Perf (Category=Perf, OTOPCUA_GRPCDATA_PERF=1): 10k-item cohort opens in 3.3 s / 80 commands / 1 stream (before: never
opens); 100 source versions at 1k/s -> 11,036 item values in 569 ms.
The first #980 fix stayed quiet whenever ApplicationStopping was already cancelled. Akka.Hosting
1.5.62's AkkaHostedService hooks WhenTerminated earlier and, for ClusterLeavingReason /
ClusterDowningReason, sets Environment.ExitCode = -1 and calls StopApplication() BEFORE the
watchdog's continuation — so manual failover, endpoint step-down and auto-down all still ended in a
graceful stop (SERVICE_STOPPED, win32 exit 0 — SCM reads ServiceBase.ExitCode, not the -1) that
Windows SCM never restarts.
"Expected" is now decided from signals Akka.Hosting never produces: a host stop requested while
the ActorSystem still runs (SCM stop / Ctrl-C / GracefulClusterLeaveService), the watchdog's own
StopAsync before termination, or CoordinatedShutdown reason ClrExitReason. Everything else exits 1.
After an unexpected termination the watchdog's StopAsync holds host shutdown until the exit is
issued, so the service host cannot report SERVICE_STOPPED first. Registration moved to
AddOtOpcUaTerminationWatchdog (shared with tests).
Tests: TerminationWatchdogAkkaHostingTests — real AddAkka host + production cluster bootstrap +
GracefulClusterLeave: Leave(self)/Down(self) => exit 1 (both fail on the old logic); host StopAsync
and StopApplication-while-running => no exit. Live gate on windev SCM passed (7031 + restart; old
logic => Stopped, exit -1, no recovery; sc stop => clean stop).
In-flight ack writes were tracked by node only and ResetForNext (supersede + every terminal path) cleared the
parked-behind acks but not the in-flight set. With deployment A's ack write for node N still running, B
superseding A (or A closing at the deadline-deferral cap) and N acking B parked B's ack behind A's write; A's
stale completion then deleted it and B timed out naming N, though N applied it.
- In-flight writes are per deployment: ResetForNext clears _persisting; an ack parks only behind a write of the
SAME deployment; a completion removes only its own entry (reference match).
- The stale-completion branch starts a parked ack of the current deployment instead of dropping it.
- The deferral cap counts only current-deployment in-flight (and parked, newest-wins) acks; the deadline deferral
and its early re-fire, and the retry-tick guard, consider only the current deployment's writes.
Tests: ConfigPublishCoordinatorSupersededAckWriteTests — supersede and deferral-cap variants (both failed before
the fix) plus a positive control.
A RawPath segment may contain backslash, quote, braces, line breaks or non-ASCII text.
SubstituteEquipmentToken pasted it raw into a regular C# string literal, so a device named
de\qv failed to compile and x\vy silently read a different tag path (\v became a vertical tab).
The paste is now encoded (EscapeForRegularLiteral) and the <RefName> / dependency refs are
decoded (TryDecodeRegularLiteral), so GetTag receives the exact RawPath at both compose seams
and the mux subscribes to the real key. The path-literal regex is escape-aware. The Monaco
OTSCRIPT_EQUIPREF diagnostic and completion share the same scan/escape. The deploy gate's
SubstitutionPreservesCompilation is now a verified round trip, so its pinned device-name case
flips from rejected to accepted.