Commit Graph

1807 Commits

Author SHA1 Message Date
Joseph Doherty 5117fa97b9 test(docker): failover drill script — SIGKILL the active central node, assert Traefik recovery 2026-07-08 17:05:31 -04:00
Joseph Doherty 1f1dbd916d docs(host): REQ-HOST-6 documents the hand-rolled HOCON bootstrap; drop unused Akka.Hosting packages 2026-07-08 16:59:19 -04:00
Joseph Doherty 48e97fee01 feat(host): exit process on unexpected ActorSystem termination — completes the down-if-alone recovery loop
WhenTerminated watchdog calls IHostApplicationLifetime.StopApplication() when
the ActorSystem dies outside StopAsync (SBR self-down + run-coordinated-shutdown-when-down),
so the service supervisor restarts the node as a fresh incarnation. Optional
ctor param keeps every existing construction site compiling.

Plan's deploy/wonder-app-vd03/install.ps1 service-recovery-actions edit is
skipped: that production deploy artifact is not tracked in this repo (Task 16
skipped its appsettings.Central.json for the same reason).
2026-07-08 16:56:24 -04:00
Joseph Doherty dea69842d5 fix(host): rate-limit dead-letter warnings (10/min + suppression summary); metric counting unchanged 2026-07-08 16:52:25 -04:00
Joseph Doherty 3ce21734b8 fix(docker): 30s stop_grace_period so graceful redeploys aren't SIGKILLed mid-CoordinatedShutdown 2026-07-08 16:40:17 -04:00
Joseph Doherty ce66e194a8 feat(cluster): AllowSingleNodeCluster flag — single-seed installs drop the phantom seed
Validator lowers the seed-count floor to 1 when AllowSingleNodeCluster is set,
otherwise still requires 2 and points operators at the flag. The plan's
deploy/wonder-app-vd03/appsettings.Central.json edit is skipped: that production
deploy artifact is not tracked in this repo (only its deployment record doc is).
2026-07-08 16:39:12 -04:00
Joseph Doherty 0e3c1df1a7 fix(host): dev site seed no longer targets the metrics port; validator rejects seed-vs-MetricsPort 2026-07-08 16:37:43 -04:00
Joseph Doherty d962c77bb7 fix(health): evict deleted sites from the aggregator on the periodic site refresh 2026-07-08 16:27:38 -04:00
Joseph Doherty 87c7255912 feat(ui): health dashboard shows metrics-stale badge and offline-since timestamp 2026-07-08 16:23:43 -04:00
Joseph Doherty c73b7faa11 feat(health): metrics-stale signal + status-transition timestamps; spec now matches heartbeat-liveness code 2026-07-08 16:21:30 -04:00
Joseph Doherty 15d91d760f docs(archreview): sync PLAN-01 tracker + tasks.json — Wave 1 T2,T5–T12 done (12/23) 2026-07-08 16:14:46 -04:00
Joseph Doherty 6300d6d399 fix(health): acked SendAsync transport — report-loss counter restore is live, not dead code 2026-07-08 16:12:48 -04:00
Joseph Doherty 17af376a8e feat(comm): ack site health reports end-to-end (SiteHealthReportAck, additive contract) 2026-07-08 16:09:08 -04:00
Joseph Doherty f7b9d342e4 refactor(host): central singletons via CentralSingletonRegistrar — outbox/audit-ingest gain drain tasks 2026-07-08 16:05:52 -04:00
Joseph Doherty c255ec31c9 feat(host): CentralSingletonRegistrar — canonical singleton manager+proxy+drain helper 2026-07-08 15:59:01 -04:00
Joseph Doherty 7138d47630 test(cluster): restarted original node stays standby — oldest-member active semantics proven (graceful-leave variant per 2-node keep-oldest gap) 2026-07-08 15:57:45 -04:00
Joseph Doherty f164f62a8b fix(cluster): give cluster-leave phase a 15s timeout so 10s singleton drains can complete 2026-07-08 15:55:06 -04:00
Joseph Doherty ff89e3145c fix(host): /health/active = oldest member + DB reachable — partition-safe Traefik routing 2026-07-08 15:51:56 -04:00
Joseph Doherty da6d5ae12c fix(host): unify active-node on oldest-member semantics — purge/self-report/labels now track the singleton host 2026-07-08 15:48:07 -04:00
Joseph Doherty 6320be9954 feat(host): ClusterActivityEvaluator — oldest-member (singleton-host) active-node definition 2026-07-08 15:43:13 -04:00
Joseph Doherty 6b5c70dd19 docs(archreview): reconcile master tracker + tasks.json with P0 completion (10 tasks done) and SBR follow-up 2026-07-08 15:37:41 -04:00
Joseph Doherty 3f8e18c6f7 docs(archreview): mark all six P0 items delivered in the master tracker 2026-07-08 15:18:55 -04:00
Joseph Doherty 099728f05a fix(transport): wire template inheritance edges on bundle import (C3) — derived templates no longer land as roots 2026-07-08 15:17:47 -04:00
Joseph Doherty 6ff90702f0 docs(archreview): register active-node-crash SBR gap found during P0 (keep-oldest 2-node limitation) 2026-07-08 15:11:03 -04:00
Joseph Doherty b8d91dcc5b test(cluster): prove SBR downs a hard-crashed node and the oldest survivor keeps its singleton
Rewritten from the plan's oldest-crash scenario: empirically, 2-node keep-oldest downs
the non-oldest partition, so a hard crash of the OLDEST makes the younger survivor down
itself (total cluster loss) — the survivable case is a crash of the younger node. The
member-removal assertion has teeth (impossible under the pre-fix NoDowning default).
See the test's XML doc for the active/oldest-node-crash gap.
2026-07-08 15:06:54 -04:00
Joseph Doherty e3a6603c74 test(cluster): add TwoNodeClusterFixture — real two-node in-process cluster rig from production HOCON 2026-07-08 14:58:34 -04:00
Joseph Doherty f91e75bfe4 fix(communication): guard per-site ClusterClient creation; add real-factory address-edit lifecycle test 2026-07-08 14:57:13 -04:00
Joseph Doherty 75cbac4478 fix(communication): generation-suffixed, sanitized ClusterClient actor names to prevent recreate name collision 2026-07-08 14:55:05 -04:00
Joseph Doherty 7231c2044b feat(host): fail-fast DisableLogin environment guard at composition root 2026-07-08 14:52:00 -04:00
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