Commit Graph

1978 Commits

Author SHA1 Message Date
Joseph Doherty 74c295e37a feat(security): DisableLoginGuard refuses DisableLogin outside Development without explicit ack 2026-07-08 14:52:00 -04:00
Joseph Doherty c3a9e708a2 fix(cluster): enable SBR downing provider — automatic failover was inert for crashes/partitions 2026-07-08 14:48:18 -04:00
Joseph Doherty c2230b7171 build(slnx): add CLI.Tests to the solution — retire the silently-skipped-tests gotcha (arch-review 08 §2.4) 2026-07-08 14:46:28 -04:00
Joseph Doherty c0c89a4954 docs(archreview): add architecture-review fix plans (P0 initiative baseline) 2026-07-08 14:43:07 -04:00
Joseph Doherty b910f5ebcd docs(claude): note EF migrations --no-build empty-scaffold gotcha
`dotnet ef migrations add --no-build` scaffolds off the stale prebuilt DLL and
can emit an empty migration; build first and delete the empty Migrations files
if it happens (migrations remove needs a live DB). Placed next to the existing
EF migrations line in Code Organization.
2026-07-07 11:29:21 -04:00
Joseph Doherty 44db509eaf docs(claude): document test command + CLI.Tests slnx-exclusion gotcha
`dotnet test ZB.MOM.WW.ScadaBridge.slnx` silently skips
ZB.MOM.WW.ScadaBridge.CLI.Tests (the one test project not in the slnx), so a
green solution run can hide CLI tests that never compiled. Add the test
command and point at testing the CLI project directly.
2026-07-07 11:26:55 -04:00
Joseph Doherty bde883dfe3 docs(claude): frame scadaproj as the umbrella index + propagate-changes rule
Reconcile the Sister Projects section to mirror the peer repos
(MxAccessGateway/HistorianGateway): frame ~/Desktop/scadaproj as the parent
workspace whose CLAUDE.md is the canonical umbrella index that indexes this
repo, point there for the full family list + cross-project map, and add the
previously-missing peers (HistorianGateway, histsdk, scadaproj). Add the
reciprocal "propagate cross-repo changes to the umbrella index" Editing Rule
so an index-recorded fact change here updates the ScadaBridge entry in
../scadaproj/CLAUDE.md in the same change.
2026-07-07 11:11:54 -04:00
Joseph Doherty 9cff87fe85 docs(comments): strip internal task/milestone/bundle bookkeeping from code comments
Remove project bookkeeping citations from shipped code comments across the
solution: hyphenated task IDs (WP-14, StoreAndForward-025), milestone/task/
issue refs (M3, Task 4, Audit Log #23, #21), Bundle X task-bundle labels,
and C/D/K/S/T phase labels.

Comment text only — no code logic, string/log literals, or XML-doc structure
changed. Genuine descriptions are preserved (only the citation is stripped),
and technical lookalikes are retained (UTF-8, SHA-256, T00:00:00, M365,
UTC-5, pre-C4/pre-C5 schema versions). Flagged by the new CommentChecker
TaskReferenceInComment / TrackingReferenceInComment checks plus targeted
grep passes; full solution builds clean, append-only guard tests pass.
2026-07-07 11:03:26 -04:00
Joseph Doherty 67005ca4c0 fix(inbound-api): surface compile warning on non-compiling method save
CompileAndRegister only swaps the cached handler on a successful compile, so a
management (or DB) save of a non-compiling inbound script silently kept the
previously-registered handler serving — stale results, still HTTP 200 — while
UpdateApiMethod reported success. A broken save thus looked like a no-op, with
the real Roslyn error only in the central log.

Surface the diagnostics instead: a new CompileAndRegister(method, out errors)
overload reports the compile/trust-model errors (the bool overload is kept for
existing callers), and HandleCreate/UpdateApiMethod return them as a top-level
compileWarning on the management result (null when the script compiled). The
save still persists and the previously registered version keeps serving — the
warning just stops a non-compiling save from looking like a success.

- InboundScriptExecutor: Compile returns its diagnostics alongside the handler.
- ManagementActor: TryCompileAndDescribe + flat ApiMethodResult projection so
  compileWarning rides at the top level without polluting the ApiMethod POCO.
- Component-InboundAPI.md: document the non-fatal-but-surfaced contract.
- Tests: executor diagnostics + non-compiling-update-keeps-previous-handler,
  plus an end-to-end ManagementActor test asserting compileWarning is returned.
2026-06-30 10:44:18 -04:00
Joseph Doherty 73ce2e4d0f docs(secured-writes): mark plan tasks complete (build+tests+smoke) 2026-06-27 14:07:25 -04:00
Joseph Doherty c6a32e8fef test(central-ui): cover tree-select path for OnNodeSelected DataType 2026-06-27 13:48:58 -04:00
Joseph Doherty 63273fd0f8 feat(central-ui): tag selector + data-type auto-fill on Secured Writes 2026-06-27 13:38:52 -04:00
Joseph Doherty 1ad19e28f6 feat(central-ui): NodeBrowserDialog emits full node + optional ShowSearch
Fully suppress search UI (box + results panel) when ShowSearch=false, and
reset search state on ShowAsync so a reused dialog never shows stale results.
2026-06-27 13:36:50 -04:00
Joseph Doherty 265f115a1f feat(central-ui): add Galaxy-type to DataType mapper for secured writes 2026-06-27 13:27:32 -04:00
Joseph Doherty c4daf941d2 docs: secured-writes tag selector + MxGateway browse DataType 2026-06-27 13:24:26 -04:00
Joseph Doherty ce4d5f0639 feat(dcl): surface MxGateway attribute DataType through browse seam 2026-06-27 13:24:25 -04:00
Joseph Doherty 5076f0a277 docs(secured-writes): implementation plan + task persistence 2026-06-27 12:09:49 -04:00
Joseph Doherty 0bbe637370 docs(secured-writes): design — tag selector + data-type auto-fill from MxGateway browse 2026-06-27 12:04:12 -04:00
Joseph Doherty f8f01e0e5a docs(deployment): record 2026-06-27 wonder-app-vd03 upgrade + live config changes
- build 06f2df4f (notify-and-fetch deploy rework) + AddPendingDeployment migration
- CentralFetchBaseUrl config; notify-and-fetch verified end-to-end
- live ConfigDb: binding-completeness fixes (Z28061/Z28062) + CvdReactor
  DelmiaRecv->DelmiaReceiver template rename (config-as-data, not source)
2026-06-27 11:06:57 -04:00
Joseph Doherty 06f2df4f89 feat(deploy): wire periodic PendingDeployment purge + SQL Server same-id re-stage test
Notify-and-fetch follow-ups:

- PendingDeploymentPurgeActor: a central cluster singleton (not
  readiness-gated, best-effort) that sweeps expired PendingDeployment
  staging rows on CommunicationOptions.PendingDeploymentPurgeInterval
  (default 1h). Modeled on the kpi-history-recorder pattern: self-scheduling
  timer, per-tick DI scope -> IDeploymentManagerRepository, continue-on-error.
  Wired in AkkaHostedService.RegisterCentralActors (manager + proxy + drain);
  resolves the deferred TODO in DeploymentService. Correctness never depends
  on it (supersession bounds rows to <=1/instance; the fetch endpoint enforces
  the TTL), so it is deliberately absent from RequiredSingletonsHealthCheck.

- SQL Server integration test for StagePendingIfAbsentAsync re-staging an
  instance's OWN DeploymentId over an expired row against the real UNIQUE
  index on DeploymentId — confirms EF orders DELETE before INSERT in one
  SaveChanges (SQLite's constraint timing differs from SQL Server's). Plus
  a same-instance supersession variant on real SQL Server.

Tests: 2 TestKit actor tests + 2 SQL Server integration tests (both ran
green against the infra MSSQL container); 235 Communication + 15
PendingDeployment tests pass; Host builds 0 warnings.
2026-06-26 23:19:29 -04:00
Joseph Doherty d9f5fbb664 docs(known-issues): mark deploy-config frame-size bug RESOLVED via notify-and-fetch
The 128 KB Akka frame-size deploy trap is fixed and merged. Record the
resolution at the top of the writeup (notify-and-fetch on both the
central->site deploy hop and the site active->standby replication hop;
AskTimeout classification fix; startup reconciliation + topology perf fix),
link the design + plan docs, and note the live-smoke validation. The
diagnosis is retained as historical record.
2026-06-26 23:09:24 -04:00
Joseph Doherty f48a748f37 docs(deploy): record T18/T19 plan refinement + live-smoke fixes + task state 2026-06-26 17:35:07 -04:00
Joseph Doherty fd22f5ce0a fix(reconcile): expiry-aware pending staging — expired rows no longer block self-heal 2026-06-26 17:23:26 -04:00
Joseph Doherty 6538216b0c fix(reconcile): heal all concurrently-missing nodes — return existing pending token instead of omitting 2026-06-26 17:15:27 -04:00
Joseph Doherty 99254b71de perf(ui): topology page — staleness off the live loop + parallelized one-shot 2026-06-26 16:53:44 -04:00
Joseph Doherty eb59c4244f feat(site): per-node startup reconciliation actor (self-heal missing/stale configs) 2026-06-26 16:44:31 -04:00
Joseph Doherty 96192950a0 feat(reconcile): central handler — gap diff + fresh tokens + orphans 2026-06-26 16:20:17 -04:00
Joseph Doherty ec2aa2bbac feat(reconcile): site-reconcile messages + expected-set/stage-if-absent repo
- Commons: ReconcileSiteRequest / ReconcileSiteResponse / ReconcileGapItem
  message contracts (site→central ClusterClient on startup; central reply with
  gap fetch tokens + orphan list + base URL).
- Commons: ExpectedDeployment projection record (Commons/Types/Deployment/),
  lightweight join of DeployedConfigSnapshot + Instance (no ConfigJson).
- IDeploymentManagerRepository: GetExpectedDeploymentsForSiteAsync (inner-join
  query returning deployed set for a site, excluding snapshot-less instances) +
  StagePendingIfAbsentAsync (insert-if-absent, self-contained save, returns bool;
  does NOT supersede — an existing pending row signals in-flight delivery).
- DeploymentManagerRepository: implement both methods; StagePendingIfAbsent
  commits internally (matches PurgeExpiredPendingDeployments convention).
- ReconcileRepositoryTests: 4 tests covering expected-set filter/IsEnabled/
  cross-site isolation, empty-site, stage-absent (true + row retrievable),
  stage-present (false + existing row unchanged); all pass.
2026-06-26 16:04:12 -04:00
Joseph Doherty e5503857df docs(deploy): notify-and-fetch design + implementation plan + task state 2026-06-26 15:09:12 -04:00
Joseph Doherty 7c7989d176 test(deploy): integration coverage for notify-and-fetch HTTP seam (large config, supersession, token) 2026-06-26 14:48:18 -04:00
Joseph Doherty 556febd86f chore(deploy): CentralFetchBaseUrl appsettings + RUNBOOK
Populates ScadaBridge:Communication:CentralFetchBaseUrl in every central
appsettings for the notify-and-fetch deploy flow.  An empty value now
causes a fail-fast on deploy; this config prevents that regression.

- docker/: http://scadabridge-traefik  (in-network Traefik LB, port 80)
- docker-env2/: http://scadabridge-env2-traefik  (env2 Traefik LB, port 80)
- src/Host base: http://localhost:5000  (ASP.NET Core default for single-host dev)
- deploy/wonder-app-vd03: http://localhost:8085  (gitignored; edited in main repo)
  RUNBOOK Upgrading section updated with note on this setting.
2026-06-26 14:40:04 -04:00
Joseph Doherty 3e64959582 refactor(deploy): retire cross-cluster DeployInstanceCommand wire path (config now fetched) 2026-06-26 14:32:47 -04:00
Joseph Doherty 5c2db9fe70 feat(site): replicate config by id + standby fetch (kills the intra-site frame trap) 2026-06-26 14:23:20 -04:00
Joseph Doherty 631ce5bfce feat(site): DeploymentManagerActor fetches config then applies (notify-and-fetch) 2026-06-26 13:58:37 -04:00
Joseph Doherty 3955cb4f28 feat(site): route RefreshDeploymentCommand to deployment-manager proxy 2026-06-26 13:33:52 -04:00
Joseph Doherty caaa855362 feat(site): older-write guard for replicated config writes
Add StoreDeployedConfigIfNewerAsync to SiteStorageService — an atomic
conditional upsert using SQLite's ON CONFLICT … WHERE clause so the
standby node only overwrites a deployed_configurations row when the
incoming deployed_at is strictly newer. The active-node path
(StoreDeployedConfigAsync) stays unguarded. Four deterministic tests
cover: no-row insert, older-overwrites, newer-is-noop, equal-is-noop;
all seed rows with explicit DateTimeOffset values via direct SQL to
avoid wall-clock timing dependencies.
2026-06-26 13:29:21 -04:00
Joseph Doherty 7a085444e4 feat(site): HTTP deployment-config fetcher + DI + options 2026-06-26 13:24:14 -04:00
Joseph Doherty 298a9af59e fix(deploy): classify AskTimeoutException as a deploy timeout
Akka.Actor.AskTimeoutException does not derive from System.TimeoutException,
so the isTimeout check in DeployInstanceAsync's catch block missed it and
routed it to the generic "Deployment error:" branch. This broke the
DeploymentManager-006 reconciliation query (query-before-redeploy), which
keys off the "Communication failure:" prefix to detect a prior timeout-induced
failure. Add AskTimeoutException to the pattern; add a covering regression test.
2026-06-26 13:15:19 -04:00
Joseph Doherty 10f752df02 feat(deploy): stage pending config + send RefreshDeploymentCommand (notify-and-fetch) 2026-06-26 13:06:07 -04:00
Joseph Doherty 25f768f379 feat(deploy): RefreshDeploymentAsync send method
Add CommunicationService.RefreshDeploymentAsync — the typed send method
for the small notify-and-fetch wire message (RefreshDeploymentCommand).
Mirrors DeployInstanceAsync exactly: SiteEnvelope + Ask<DeploymentStatusResponse>
bounded by DeploymentTimeout. CentralCommunicationActor needs no change
(HandleSiteEnvelope is fully generic — all SiteEnvelope messages forward
to /user/site-communication without a per-type switch). Adds a parallel
routing test asserting the envelope reaches the site ClusterClient.
2026-06-26 12:42:46 -04:00
Joseph Doherty 381d26d1b1 feat(deploy): token-gated internal deployment-config fetch endpoint 2026-06-26 12:40:15 -04:00
Joseph Doherty a61865daa0 feat(deploy): fetch options + per-deployment token helper 2026-06-26 12:28:48 -04:00
Joseph Doherty 8cb512ac51 feat(deploy): add RefreshDeploymentCommand notify message 2026-06-26 12:26:33 -04:00
Joseph Doherty 290acfb1f0 feat(deploy): pending-deployment repository with supersession + purge 2026-06-26 12:25:30 -04:00
Joseph Doherty 81cb455f19 feat(deploy): add PendingDeployment entity + migration 2026-06-26 12:15:16 -04:00
Joseph Doherty b58f3aeb61 docs: list DelmiaNotifier (#27) in component tables (standalone external client tool) 2026-06-26 05:25:09 -04:00
Joseph Doherty 99ceb6677f docs(delmia-notifier): README + publish/AOT instructions 2026-06-26 05:19:24 -04:00
Joseph Doherty 3931fa2101 feat(delmia-notifier): Program wiring, YES/NO reporter, diagnostics log 2026-06-26 05:18:19 -04:00
Joseph Doherty 71f680d542 feat(delmia-notifier): HttpClient recipe sender with connect-failure classification 2026-06-26 05:15:17 -04:00
Joseph Doherty d26462ed8d feat(delmia-notifier): connect-failure-only failover loop 2026-06-26 05:13:58 -04:00