The flattened config embeds each bound data connection's decrypted
protocol JSON, and PendingDeployments / DeployedConfigSnapshots stored
it verbatim - the credentials dp:protocol:v1 protects on DataConnections
sat in plaintext in two more tables and every backup.
- DeploymentConfigSecretConverter (own DP purpose, dp:config:v1: prefix)
on both ConfigurationJson columns: every write protected, reads accept
legacy plaintext so un-migrated rows keep working. Schema-only
contexts refuse the write.
- DeploymentConfigSecretUpgrade: one-time startup re-protect from
MigrationHelper (after the protocol upgrade). A startup backfill, not
an EF migration, because the Data Protection key ring is not reachable
from a SQL migration script. Plaintext-detecting (NOT LIKE prefix),
paged by Id, binary compare-and-swap (both centrals may run it),
idempotent, and not a startup gate (logged + retried next start).
- No EF model change (has-pending-model-changes: none); no migration.
Tests: SQLite round-trip (raw column has no secret, EF read equals
original) for both tables, legacy plaintext readable then re-protected
idempotently, schema-only write refused, and the upgrade on real SQL
Server. PendingDeploymentRepositoryIntegrationTests now supplies a key
ring.
Deploy gate: upgrade both central nodes together (old binaries cannot
read protected rows).
UI-7: Site Calls and the Notification report sent an unscoped query and
dropped other sites' rows client-side after paging - Site Calls pages
went short (Next disabled, own rows hidden), Notifications showed other
sites' counts and empty pages. New additive SourceSitesFilter on
SiteCallQueryRequest / NotificationOutboxQueryRequest (+ SourceSites /
SourceSiteIds on the repository filters; OPENJSON IN-list in the
SiteCalls keyset SQL, Contains in EF) carries the permitted identifiers;
an empty set matches nothing. Next is gated on the server page size.
UI-9: Secured Writes history paged over every status and filtered
terminal rows client-side. Additive ListSecuredWritesCommand.Statuses
reaches the repository query and count.
UI-10: Notification KPIs per-site table is narrowed to the caller's
sites (SiteScopeService.Resolve on the principal).
Tests: MSSQL mixed-site keyset/offset paging + count for both repos and
the secured-write status set; handler forwards Statuses; UI pages send
the permitted set (scoped) / none (system-wide); history requests the
terminal statuses; KPI per-site rows narrowed.
AlterColumn SystemArtifactDeploymentRecords.PerSiteStatus nvarchar(4000) ->
nvarchar(max), plus docs/plans/sql/WidenSystemArtifactPerSiteStatus.sql for
manual production application (not yet applied to QA/DEV). Kept in its own
commit so the integrator can regenerate it on merge.
PerSiteStatus carries one serialized SiteArtifactResult per site (~155 chars
for a clean site, more with error text). The 4000-char cap made Deploy
Artifacts over ~25 sites throw on the final save, after every site had applied,
so no site was stamped and every retry failed the same way. Mapping is now
nvarchar(max); the migration + SQL script follow in their own commit.
2.4 — ArtifactDiff:
- TRN-2: secret-bearing values (data-connection primary/backup config, DB
connection string, external-system auth, SMTP credentials, SMS token) are
compared by SHA-256 and reported value-free as <present> -> <changed>, so a
changed endpoint no longer reads Identical and is force-skipped.
- TRN-6: the instance diff resolves each existing binding's DataConnectionId to
its name and compares it (a rebind OPC1 -> OPC2 is Modified); State is no
longer compared (the import never carries a live state).
2.5 — BundleImporter / ManagementActor / Central UI:
- TRN-3: PreviewAsync takes an optional BundleNameMap (additive optional param);
under a MapToExisting redirect the connection/instance diffs, connection
auto-match and unresolved-connection blocker run against the mapped target.
The CLI import path passes its explicit --map-site/--map-connection redirects
to the preview before the blocker gate; the Central UI re-runs the preview
under the Map-step choices at Confirm. Apply binds a CreateNew site/connection
whose identifier/name already exists to that row instead of inserting a
duplicate the unique index rejects.
- TRN-7: connection, instance, instance-template and composition/base-template
lookups match exact spelling first, then case-insensitively.
- TRN-8: InstanceDto gains the additive AreaPath (root->leaf); the exporter
fills it and the importer resolves/creates areas level by level under their
real parent. A legacy leaf-only bundle with an ambiguous leaf resolves
deterministically and adds an ImportResult warning.
- TRN-9: Rename is rejected by ApplyAsync for Site, DataConnection,
SmtpConfiguration and SmsConfiguration (ImportRenameSupport); the UI does not
offer it there and the CLI rename policy falls back to Skip with a warning.
Also moves a doc comment misplaced by the 2.6 commit. Reflection round-trip
guard (RoundTripEquivalenceTests) re-run: green.
PermittedSiteIds / SiteId claims are numeric Site.Id values while
AuditLog.SourceSiteId holds the site identifier. /api/audit/query and
/export compared the two (a scoped query was always empty, an explicit
--site of one's own site was a 403), /api/audit/tree and Flow Debugger
Replay dropped every site-side node, and the Central UI Audit Log grid
applied no scope at all.
New Commons AuditSiteScope: translate permitted ids to identifiers
(Administrator / no claims = unscoped; unresolvable = fail closed) and
apply them to a filter (never an empty SourceSiteIds, which the
repository reads as unfiltered). Used by AuditEndpoints (query, export,
tree), FlowDebugRunner.ReplayAsync, and AuditLogQueryService (grid
QueryAsync - pushed into the query before paging - and the tree).
ApplySiteScope gains the Administrator exemption.
Tests: scoped query filters by identifier, own-site explicit filter
allowed and foreign one 403, admin with claims unscoped, tree/replay get
identifiers, UI grid scoped/out-of-scope/unscoped, tree per-call scope.
MGT-3: a Designer could read SMTP/SMS credentials, external-system auth,
DB connection strings and data-connection configuration through bundle
export, values the management API returns to no one. Both export
surfaces now resolve the selection (dependencies included) via the new
IBundleExporter.CountSecretsAsync / ExportSecretPolicy and require
Administrator when it carries any secret; a secret-free export stays a
Designer operation. The ExportBundle gate becomes any-of [Designer,
Administrator] - a deliberate change to the frozen authz matrix. A new
ManagementAuthorizationException maps to ManagementUnauthorized.
MGT-4: data-connection move replies with DataConnectionPublicShape like
its siblings (the audit after-state switched with task 1.4).
Tests: matrix entry, Designer+secrets refused (nothing exported), Admin
and secret-free Designer succeed, UI wizard refuses a Designer, policy
counts every SecretsBlock field, move reply carries no secret.
IAuditService.LogAsync only stages the row; every caller that audited
after its last SaveChangesAsync, outside the configuration-command
transaction, lost the row with the DI scope (rig: zero Disable/Enable/
Delete/DeployArtifacts rows, 16 Deploy rows for 62 deployments, one
Create/Instance row for ids up to 3876).
- New IAuditService.LogAndSaveAsync: stage + save, best-effort (logs and
swallows any failure incl. cancellation, detaches the unsaved row).
- DeploymentService (deploy/failed/reconciled/lifecycle + timeouts),
ArtifactDeploymentService (DeployArtifacts now before the best-effort
stamp, RetryArtifactDeployment, DeploySiteSecrets), InstanceService,
AreaService, SiteService: post-save LogAsync -> LogAndSaveAsync.
- ManagementActor: AuditAndSaveAsync for the non-configuration handlers
(API keys, shared schemas, ES methods, data-connection move); move now
audits the scrubbed public shape (MGT-4) so the fix does not start
writing protocol credentials into AuditLogEntries.
- HandleCreateInstance no longer stages a second Create row on top of
InstanceService's own.
Tests: real-context (SQLite) tests per family read the row back through
a second context - DeploymentService, ArtifactDeploymentService,
InstanceService, ManagementActor; each fails against the old code.
Test projects gain a ConfigurationDatabase + EF Sqlite reference.
TRN-4: the composition rewire skipped any bundle template with zero
compositions before the clear ran, so an Overwrite never removed the target's
slots although the preview reported the removals. It now skips only an
Add/Rename (nothing to clear).
TRN-5: a slot the bundle removes is deleted through
TemplateService.DeleteCompositionAsync, which cascades the slot-owned derived
template (no DB relationship on OwnerCompositionId, so the row-only delete
orphaned it and blocked deleting its base). A slot the bundle re-composes keeps
the row-only delete so a pre-#118 bundle that re-composes the slot onto its
derived template by name still resolves. Tests run the real importer against
an EF context and fail on the previous importer.
Alarm -> on-trigger script links went through one flatten-wide
'TemplateScript.Id -> canonical name' map. Slot-derived templates hold only
IsInherited placeholders, so every slot of a module composed twice resolved to
the base script row id and the LAST slot's canonical name won: pump 1's alarm
ran pump 2's script in pump 2's scope (TPL-1). A derived script override has a
different row id, so the base alarm's link resolved to null (TPL-2). And the
base pass over a nested slot overwrote a slot-level on-trigger override (TPL-5).
ResolveInheritedAlarms now looks the id up among the script rows of the
alarm's own chain, takes the row's NAME and path-qualifies it with the alarm's
prefix, carrying it on the ResolvedAlarm, so only the pass that actually adds
the alarm decides it. An id outside the alarm's chain keeps the old flatten-wide
fallback; a name with no resolved script is still nulled.
BY DESIGN this changes the revision hash of multi-slot compositions (and of
derived templates that override an alarm's on-trigger script, and nested slot
overrides): affected instances read Out of date once and redeploy with the
corrected on-trigger script.
3.1: seed values are flagged on TagValueReceived; a reconnect/resolution
re-seed for a tag that already delivered a live value in the current
adapter generation is dropped, an initial-subscribe seed is replaced by the
latest live value (a joining instance may have missed earlier live values).
3.8: the connection actor tells subscribers ConnectionQualityChanged(Good)
on re-entering Connected; InstanceActor's Good branch only resets the
Lever-1 backoff and no longer stamps bound attributes Good.
Decision 2.8: preserve-if-null on the server. UpdateSiteCommand,
UpdateDataConnectionCommand and UpdateApiMethodCommand fields (except the id)
are now nullable; the ManagementActor handlers apply only non-null values and
treat an empty string as 'clear this optional field'. The CLI update commands
no longer require --name/--protocol/--script and drop the --failover-retry-count
(3) and --timeout (30) defaults, so an omitted option travels as null instead of
overwriting the stored value (site update --name used to null both gRPC
addresses). The site gRPC-address validation now runs on the merged values.
Additive/compatible: the fields only became nullable, so an older CLI that
always sends every field still deserializes (pinned by a test) and now simply
updates every field as before. The Central UI full-entity forms send "" for a
field the operator cleared (description/addresses, removed backup endpoint,
cleared parameter/return definitions) so clearing keeps working.
TrustVerdictCache keyed on the code hash alone while the verdict also
depends on the analysis reference set (and its degraded-fallback mode).
The key is now (code SHA-256, degraded flag, base-reference fingerprint,
extra-reference digest), length-prefixed. File-backed extra references
are digested (path/size/mtime/kind/aliases/embed) so the Central UI run
gate's calls are cached under their own key; an extra reference with no
stable identity stays uncacheable.
The old extras test passed a PortableExecutableReference[] positionally,
which binds to the explicit-base overload, so it never exercised the
extras path; the tests now use the named argument.
AppDomain's assembly-loading members (ExecuteAssembly[ByName], Load,
CreateInstanceFrom[AndUnwrap], CreateInstanceAndUnwrap) were neither a
forbidden scope nor exact gateway names, so a script could load and run
an external assembly (even from a UNC path) in the host process. The
whole type is now a forbidden scope, like System.Environment and
System.GC. AppContext/Debugger were considered and left alone (no
assembly-load surface).
Tests: every AppDomain loading spelling (member access, ?., using static,
alias) is flagged; the ban is exact-type.
The reflection-gateway check ran only in VisitMemberAccessExpression, so
recv?.GetMethod(...) (a MemberBindingExpression) was never inspected and
Delegate.CreateDelegate turned the MethodInfo into a callable delegate:
one character defeated the trust gate on all four call sites.
- HardeningWalker gains VisitMemberBindingExpression with the same check.
- CreateDelegate joins ReflectionGatewayMembers.
- Pass 1 also flags a gateway-named framework member reached as a bare
identifier (using static System.Delegate / System.Type).
Tests: the review's probe script (compiles clean, now rejected, also on
the minimal fallback set), the ?. variant of every .-form rejection test,
every gateway member via ?., and legitimate ?. use stays clean.
BundleSecretEncryptor.Decrypt now refuses an iteration count outside
[MinPbkdf2Iterations, MaxPbkdf2Iterations] before PBKDF2 runs. The manifest
JSON path was already guarded by the EncryptionMetadata constructor (pinned by
a new test), but a record 'with' (or any non-ctor path) bypassed it and
derived with int.MaxValue iterations; the encryptor no longer relies on it.
Wire stays compatible: the scalar DateTime is a string either way and every
reader parses with RoundtripKind/invariant, which still accepts the old
invariant general form.
GetListByNameAsync now eager-loads Recipients, so the importer's Overwrite
Clear() removes the target's rows before the bundle's are re-added. Fixed in
the repository method (decision 2.1) so every caller gets the recipients.
Regression: target {A,B} + bundle {A,C} -> {A,C}, stable on re-import.
Mirror of mxaccessgw#237 (659bb831). DEV vd03 showed 229k context switches
in ZB.MOM.WW.ScadaBridge.Host at ~240 MxGateway events/s. Akka's default
dispatcher, gRPC/Kestrel and async continuations all run on the .NET thread
pool, so a trickle of small work items makes idle pool workers spin with
Sleep(0) (default limit 70) before parking.
- Host csproj: RuntimeHostConfigurationOption
System.Threading.ThreadPool.UnfairSemaphoreSpinLimit=10, written into
ZB.MOM.WW.ScadaBridge.Host.runtimeconfig.json (verified in the publish
output, which docker/Dockerfile copies into the image).
- RuntimeConfigTests pins the value in the built runtimeconfig.
- Component-Host.md: new "Runtime thread-pool settings" section (what, why,
override/revert via DOTNET_ThreadPool_UnfairSemaphoreSpinLimit).
Local synthetic trickle bench (macOS, ~185 chains/s): involuntary context
switches 17-28k -> 6-13k, CPU 430-560 -> 200-295 ms per 20 s. The vd03
before/after WPR measurement is pending the next vd03 deploy.
OtOpcUa now exposes conditions imported over gRPC data connections in the
namespace https://zb.com/otopcua/mapped/conditions. Their ConditionId is
an opaque c1. NodeId stable for the life of the connection, but their
SourceName (<anchor>/<placement path>) moves when the primary placement
mapping changes. ScadaBridge keyed every condition on
SourceName.ConditionName, so a mapping change read as one alarm clearing
and a new one raising.
- Event filter selects ConditionId (select clause 19: ConditionType,
empty browse path, AttributeId = NodeId).
- When the ConditionId (or SourceNode, which OtOpcUa sets to it) is in the
mapped/conditions namespace, the per-condition key is its durable
nsu=... string (index-proof across an OtOpcUa pair / upgrade). Every
other OPC UA condition keeps the SourceName.ConditionName key, so no
existing persisted row, MES script or operator view is re-keyed.
- The old SourceName.ConditionName text becomes an additive, display-only
DisplayName: NativeAlarmTransition -> AlarmStateChanged ->
AlarmStateUpdate.display_name (26) / DebugAlarmStateDto.display_name
(22) -> ScriptAlarm.DisplayName. Persisted in native_alarm_state
metadata_json (no column, no CDC trigger change); updates in place on
every transition under the fixed key. Protos regenerated.
- Alarm Summary and Debug View show DisplayName (key as tooltip) and
filter on it; site event log writes "label [key]".
- Upgrade: a pre-#147 row for an imported condition is retired by the
first completed refresh snapshot (one return-to-normal + drop), then the
condition continues under its ConditionId.
Tests: RealOpcUaImportedConditionKeyTests, OpcUaAlarmMapperTests,
NativeAlarmActorTests (DisplayName, rehydration, legacy-row retirement),
StreamRelayActorTests, SiteCommand golden sample, AlarmsAccessorTests,
DebugTreeBuilderTests; filter select-clause count 19 -> 20.
Docs: Component-DataConnectionLayer/Commons/Communication/SiteRuntime.
OtOpcUa now emits RefreshRequiredEventType (SourceNode = Server, no
condition fields) on an incomplete condition snapshot, a removed imported
condition, or a resync that leaves pre-failover EventIds answering
BadEventIdUnknown. RealOpcUaClient had no branch for it: the event fell
through HandleAlarmEvent as a phantom condition keyed "Server" and no
refresh was issued, so the mirror could hold stale / un-ackable state.
- HandleAlarmEvent recognises RefreshRequiredEventType, emits nothing, and
hands the item's handle to the new ConditionRefreshCoalescer.
- The coalescer runs off the SDK publish thread, debounces 500 ms so a
burst (one event per affected item) costs one refresh, never overlaps
refreshes (a request during an in-flight refresh is served by the next),
logs and swallows failures, and is cleared on disconnect.
- Execution: targeted ConditionRefresh2(eventSubscription, item) per asking
item; one subscription-wide ConditionRefresh when every live alarm item
asked, an item has no server id, or ConditionRefresh2 fails. The replay is
the usual RefreshStart/End frame, so NativeAlarmActor's snapshot swap
clears conditions the refreshed snapshot no longer lists.
- The server-side OfType WhereClause built from a condition filter now ORs
in OfType(RefreshRequiredEventType): the server queues RefreshRequired
through the item's filter, so a bare condition-type clause dropped it.
Tests: RealOpcUaRefreshRequiredTests (branch, no-session tolerance, burst
coalescing, no overlap, failure tolerance, Clear, framing intact);
RealOpcUaClientAlarmFilterTests updated for the added operand.
Component-DataConnectionLayer.md documents the behaviour.
The Test Run banner in TemplateScriptDialog and SharedScriptForm claimed
External, Database and Notify all fire for real ("real emails"). Notify
is SandboxNotifyTarget, which returns a random GUID and sends nothing.
The banner now says External/Database are real and Notify is simulated,
pointing at Flow Debugger on a deployed instance for a real send. The
sandbox Send also writes a [sandbox] ... not delivered line to the
console pane. Notify.Status is unchanged (reports Unknown). Tests pin
the banner wording and the console line; Component-CentralUI.md notes
the simulated Notify.
The semantic validator treated each comma-separated argument after the
script name as a positional parameter and required the count to equal the
declared ParameterDefinitions. The runtime has no positional form: both
calls take ONE parameters object that ScriptArgs.Normalize turns into a
name -> value dictionary, so every Scripts.CallShared("X", new { ... })
was rejected unless exactly one parameter was declared, blocking deploy.
Call sites are now found with a Roslyn script-mode syntax parse (named
arguments and a trailing CancellationToken handled; calls in comments or
strings ignored). The parameters argument is classified as:
- anonymous object: validated by name (ordinal) - missing required
parameter = error, undeclared member = warning, clear literal type
mismatch per member = error (same conservative inference as before);
- any other expression (variable, dictionary, call, null): not checked;
- absent: error only if the target declares required parameters.
Required-ness comes from the shared InboundApiSchema parser (JSON Schema
'required' list; legacy array entries required unless required:false).
Positional-argument tests replaced by by-name CallShared/CallScript tests;
Component-TemplateEngine.md updated.
SmtpConfiguration.MaxRetries/RetryDelay (and ConnectionTimeoutSeconds/
MaxConcurrentConnections) drive the outbox Email policy but had no write
path, so every row sat at 0/0 and was clamped with a Warning; DEV vd03 had
to be fixed by direct SQL.
- Update/CreateSmtpConfigCommand: four trailing additive nullable fields
(null = preserve on update / entity default on create; 0 = fallback).
- ManagementActor: preserve-if-null, negatives refused.
- CLI notification smtp create|update: --max-retries, --retry-delay-seconds,
--connection-timeout-seconds, --max-concurrent-connections (>= 0).
- Central UI /notifications/smtp: fields on the form + read-only panel;
new rows pre-fill 10 retries / 60 s.
- README + Component-NotificationService; tests for apply/preserve/reject.
ManagementAuthenticator — the only identity source for POST /management, the
audit REST endpoints and the debug-stream hub — now enforces "no role, no
login" the way #144 does for /auth/login and /auth/token:
- HTTP Basic: a bind whose groups map to zero roles, or whose role mapping
throws, answers the bad-password 401 AUTH_FAILED body and counts as a
LoginThrottle failure. RecordSuccess moved after the mapping, so a refusal
no longer clears earlier failures. Request cancellation still propagates.
- Bearer: a token with no role claim (minted before #144 shipped) gets the
invalid-token 401; no throttle, as for every bearer failure.
- Each refusal is logged at Warning (category ManagementAuthenticator) with
the request path, the username and the reason.
Before this, a zero-role Basic caller reached every command that
ManagementActor.GetRequiredRoles opens to any authenticated user.
DisableLogin is unchanged.
Tests: ManagementZeroRoleRefusalTests — zero roles / mapper throws / one role
over Basic and Bearer for /management (ListSites), /api/audit/query and the
debug-stream hub; every null-role command is unreachable by a zero-role
principal; throttle accounting. 47 of the 58 fail against the old
authenticator (the 11 that pass are the one-role/bypass regression guards).
Claude-Session: https://claude.ai/code/session_01GT67AFKC45MBz1wPZnVbX8
The mid-session refresh ended a session only when the directory returned no
groups (or the user was gone/disabled/ambiguous). A user still in some groups
but in no mapped one, or whose DB mappings were all revoked, kept a signed-in,
role-less session that could read the bare-[Authorize] pages. CookieSessionValidator
now rejects when the re-map yields zero roles, on ordinary and fail-closed paths.
A mapper fault keeps its existing policy (keep grants; fail closed when asked).
Docs: Component-Security "No role, no login" (incl. the HTTP Basic gap left as a
follow-up), Component-CentralUI, CLAUDE.md.
Claude-Session: https://claude.ai/code/session_01GT67AFKC45MBz1wPZnVbX8
A successful LDAP bind whose groups map to no ScadaBridge role, or whose role
mapping throws, is now refused at both sign-in endpoints exactly like a bad
password: the same redirect/401 body, no cookie, no token, and a login-throttle
failure (so the throttle is not an oracle). The reason is logged server-side at
Warning with the endpoint and username. Family standard: scadaproj NAM AD
cutover plan §3.2 (Phase A2, §2A).
Tests: zero roles, mapper throws, and one role for both endpoints, plus the
throttle accounting; RoutePolicyCoverageTests now notes that the two bare
[Authorize] pages rely on this rule.
Claude-Session: https://claude.ai/code/session_01GT67AFKC45MBz1wPZnVbX8
SplitBrainResolverStrategy now defaults to leader-auto-down (the in-repo
LeaderAutoDowningProvider, #106, with the #132 shut-out restart on). auto-down and
keep-oldest stay supported. Drilled on the docker rig, docker-env2 and the QA pair
(central + site, kill and stop-and-hold) before the flip.
- ClusterOptions default + validator/HOCON comments updated.
- Shipped Host appsettings.Central/Site.json and every docker/ and docker-env2/
node appsettings now say leader-auto-down. The leader-auto-down overlays are
kept as no-ops (drill records reference them); new docker-compose.auto-down.yml
overlays keep Akka AutoDowning available for comparison drills.
- Tests: default asserts leader-auto-down; new HOCON test for an unset strategy;
TwoNodeClusterFixture defaults to the production posture.
- Docs: CLAUDE.md, Component-ClusterInfrastructure, components/Host + Cluster,
README, failover procedures, Traefik, docker + env2 READMEs; register row 70 closed.
No deploy needed: DEV, QA and both rigs set the key explicitly.
Claude-Session: https://claude.ai/code/session_01GT67AFKC45MBz1wPZnVbX8
Component-AuditLog (Security & Tamper-Evidence now a removal note, archive format v2, config),
Component-CLI, Component-ManagementService, HighLevelReqs AL-11/AL-12, docs/components/CLI, the CLI
README, alog.md §11.4/§15 and CLAUDE.md. New production script docs/plans/sql/RemoveAuditLogHashChain.sql
(idempotent, from migration 64); AddAuditLogHashChain.sql marked superseded. Historical plans,
deployment records and deploy-prep packs are left as written.
Claude-Session: https://claude.ai/code/session_01GT67AFKC45MBz1wPZnVbX8
Owner decision 2026-11-15, at IT security's request, pending a family-wide general solution.
Removed: the chaining service, hasher, verifier, chain head/tombstone entities and store, the #139
chain-start cutoff, AuditLog:HashChain (incl. ChainBacklog and HeadExport with its File/Syslog sinks
and export service), the audit-chain-head-export health check, the VerifyAuditChain /
VerifyAuditChainHeads management commands and the `audit verify-chain` / `audit verify-heads` CLI
commands, and the two-login plumbing (AuditLog:MaintenanceConnectionString, AuditMaintenanceContext,
the keyed audit-maintenance repository/archive). Purge, archive, retention, partition roll-forward
and backfill-source-node all run on the runtime connection again, as before #107.
Parquet archive (#42) kept, chain-free: format v2 (ten stored columns, no tombstone file, manifest
without chain state), the switch guard is the row count only (51003 gone), verify = data-file size,
SHA-256 and row count, and superseded-stale cleanup proves coverage by EventId. Format-v1 archives
still list, verify and are cleaned up (their tombstone file too).
Migration RemoveAuditLogHashChain drops the chain indexes, the scadabridge_audit_chainer role
(members first), both chain tables, ChainSeq/RowHash and the purger's AuditMaintenanceGrants grants;
writer/purger roles stay. Down restores them. Every chain-column reference is EXEC-deferred for the
idempotent script (#126); FlipAuditLogClusteredKey's two chain index statements get the same
deferral, behaviour unchanged, so re-running the idempotent script on a migrated database works.
The partition-switch staging table adds the chain columns only when the live table has them, so the
new binary purges either schema. Deploy gate: old binaries map the chain columns, so the migration
ships with the new binaries, both centrals stopped.
A leftover AuditLog:HashChain section or MaintenanceConnectionString (DEV/QA still carry
AuditLog__HashChain__Enabled=true) is ignored with one startup warning (RetiredAuditSettingsWarning).
Claude-Session: https://claude.ai/code/session_01GT67AFKC45MBz1wPZnVbX8
QA Warm gate (lmxopcua#907, 2026-11-13): a graceful stop of the Warm Primary
reported ServiceLevel 0 for ~6 s - shorter than the 10 s degraded window - the
next unreadable sample cleared the streak, and the connection retried the stopped
node FailoverRetryCount times: Good on the peer after 66 s, peer Active in 0.2 s.
Two going-away triggers on top of #138, both still requiring a Healthy (>= 200),
higher level on the other endpoint and honouring the minimum dwell:
- ServiceLevel 0 (Part 4 Maintenance) probes the other endpoint at once instead
of waiting out the window - once per degraded streak, so a non-Healthy peer is
re-probed once per window, not every poll. Other Degraded levels (standby 90/50,
booting 1) still wait the window.
- A lost link whose session's last KNOWN ServiceLevel was < 200 (unreadable
samples don't overwrite it) probes the other endpoint before the first
reconnect attempt, holding the reconnect timer. Healthy -> switch and reconnect
at zero delay, the stopped node is never retried; otherwise the ordinary retry
cycle runs (less the probe's time). After only Healthy levels (250/240, Unset),
inside the dwell, or with the feature off: unchanged retry-then-failover.
Tests: DataConnectionGoingAwayFailoverTests (10 cases, each trigger and
non-trigger with positive controls, connect-order artifact assertions) and a real
in-process OPC UA server pair graceful-stop e2e on production defaults: 1.1 s
(lost-link trigger alone 12.1 s, neither 33.1 s -> fails the 10 s bound).
13 mutants, all killed. DCL tests 608/608 (3 full runs); solution 0 warnings.
Docs: Component-DataConnectionLayer, components/DataConnectionLayer.
Not deployed; QA live re-check pending.
Claude-Session: https://claude.ai/code/session_01GT67ACmpMR7b9LGRPLijMi
Removes the #96 compatibility path that the unified central-cache-invalidation
topic (#100 item 3, 153609ef; compat 3a31dd2d) carried for one release:
- CentralCacheInvalidationBus no longer publishes a bare SitePskInvalidated
on site-psk-invalidation; LegacySitePskTopic constant deleted.
- CentralCacheInvalidationSubscriber no longer subscribes to that topic or
handles a bare SitePskInvalidated; it applies envelopes only.
central-cache-invalidation behaviour is unchanged (one envelope per
invalidation, origin filtering, per-handler fault isolation).
Gate met: 8e32f353 (carries 153609ef and 3a31dd2d) runs on every central
node - DEV vd03 (record 581e25ca) and QA vq03/vq04 (record 8ba5d5d7).
Mixed-version / rolling-upgrade constraint: a central node built before
153609ef listens only on site-psk-invalidation and no longer receives PSK
invalidations from a newer peer (only its TTL and the site-rejection refresh
bound the staleness). Mixed pairs across that boundary are no longer
supported; central pairs are stopped and started together anyway.
Documented in Component-Host.md and Component-Communication.md.
Tests: the legacy publish/subscribe tests are replaced by
PskRotation_OnOneNode_ReachesThePeersCaches_ThroughTheUnifiedTopic (node A
publishes, node B's PSK cache and secret-resolver cache are invalidated, and
nothing else is published) and a bare-message-ignored test with an envelope
positive control. The two-node cluster test now asserts the PSK invalidation
arrives exactly once and the publisher applies nothing.
Claude-Session: https://claude.ai/code/session_01GT67ACmpMR7b9LGRPLijMi