Files
ScadaBridge/docs/deployment/deployment-records/2026-11-15-wonder-app-vd03-061432c8.md
T
Joseph Doherty 50a5291b64 deploy(#143): DEV vd03 + QA vq03/vq04 to 061432c8 — hash chain removed (migration 65), #116 QA site-pair drills
DEV: ~48 s site / ~29 s central outage; QA: pair stop/start, ~2m40s site / ~1m37s central.
Chain schema + chainer role gone, env key removed, all gates pass on both tiers.
#116 QA site drills (all reactors idle): kill → takeover +7.7 s; stop-and-hold →
[leader-auto-down] DOWNING +27.2 s, takeover +27.4 s, recovery restored byte-identical.

Claude-Session: https://claude.ai/code/session_01GT67AFKC45MBz1wPZnVbX8
2026-11-15 19:36:04 -05:00

5.4 KiB
Raw Blame History

2026-11-15: DEV (wonder-app-vd03) 8e32f353 → 061432c8, migration 64 → 65, audit hash chain removed (ScadaBridge#143)

Owner go (2026-11-15): "yes 143, with the 116 dependent on idle". IT security asked for the AuditLog hash chain to be removed. The pack is docs/deployment/deploy-prep/2026-11-15-143/.

Build: main @ 061432c8, ProductVersion 1.0.0+061432c8c4299505a45d4cf396c3d62139865080.

  • Host and CLI were published self-contained win-x64 from a clean detached worktree: 1056 app files and 224 cli files.
  • The zip is 130 414 127 B, SHA-256 b6e85ecc24186af8b658fa6f1e38f080588ea5f78dd856a4356e696897ff4095.
  • Pins: LocalDb 0.3.8, Theme 1.0.1.

Delta: 25 commits. See the pack: the hash-chain, head-export and two-login removal (3dea146c), #141, #105, and the UI-consistency / Theme 1.0.x work. There is one migration, 20261115221558_RemoveAuditLogHashChain. The script migrate-64-to-65.idempotent.sql has SHA-256 a16a150d…98f7a7, is identical to docs/plans/sql/RemoveAuditLogHashChain.sql once comments are stripped, and was run with SET XACT_ABORT ON and sqlcmd -I -b.

Transport: one deploy script over winrm (deploy scope, owner-authorized), dev-deploy.ps1 in E:\ApiInstall\_stage-sb-061432c8\. Staging went over SMB, and the gates were checked over HTTP and with the CLI from the Mac. The on-box notes are E:\ApiInstall\ScadaBridge\_DEPLOY-NOTES-061432c8-20261115T191258.txt.

Not touched: QA (see its own record), OtOpcUa, mxaccessgw, HistorianGateway, Overview, the OTel collector. Nothing was deployed to any instance.

Preflight (in the script, before anything changed)

Check Result
Live build 8e32f353
Staged build 061432c8 Host + CLI
Schema 64 migrations; ChainSeq (8) / RowHash (32) present, both chain tables, 2 chain indexes, roles _chainer, _purger, _writer; AuditLog 2 853 rows
Central env 13 entries; retired key present: AuditLog__HashChain__Enabled (= true)
appsettings A6B6CF05…, 3382DD83…, 3E7AD9A4… (unchanged since 11-13)
Health / baseline central and site ready/active 200; Z28062 270 attrs, Good 144, 8 alarms

Window

Step Local (EST)
reg export of both service keys; backup E:\ApiInstall\ScadaBridge-backups\ScadaBridge_pre-061432c8_20261115T191258.bak (131 757 056 B, COPY_ONLY, CHECKSUM, COMPRESSION, VERIFYONLY ok); appsettings kept in _appsettings-keep-20261115T191258 19:13:11 → 19:13:14
Stop Site, then Central; no Host.exe left 19:13:14 → 19:13:35
Migrate 64 → 65 19:13:35 (< 1 s)
failureflag 1 re-asserted; app/cli → *.bak.20261115T191258; new build in; appsettings restored (hash match) 19:13:35 → 19:13:41
Central env: AuditLog__HashChain__Enabled removed, 13 → 12 entries; the other 12 byte-identical (digest-checked) 19:13:41
Central ready, then Site ready 19:13:53 / 19:14:02

Downtime: the site data path was down for about 48 s (19:13:14 → 19:14:02) and the central API for about 29 s (19:13:25 → 19:13:54).

Gates (all pass)

Gate Result
Build Host + CLI 1.0.0+061432c8…
Schema 65 migrations; ChainSeq, RowHash, AuditLogChainHead, AuditLogChainTombstone, IX_AuditLog_ChainSeq, IX_AuditLog_Unchained and scadabridge_audit_chainer all absent; scadabridge_audit_purger + _writer present; 2 853 rows kept
Health ready/active 200/200 (central :8085, site :8084). Central checks: database, akka-cluster, required-singletons, bundle-signing-policy Healthy (audit-chain-head-export gone). Site checks: akka-cluster, localdb Healthy
Retired-key warning 0 in scadabridge-central-20261115.log, because the env is clean
AuditLog new rows after the start: 2 InboundAuthFailure from central-a (the bogus-key probes)
Inbound API bogus X-API-Key → 401 ×2
MxGateway / instances MxGateway Connected, 810/810 resolved, good 398 / bad 412 (= baseline); Z28062 Good 144 / 270, 8 alarms (= baseline); 5 deployed instances
CLI audit group: query, export, tree, backfill-source-node, archive; no verify-chain / verify-heads
OTLP box collector logs.jsonl carries service.version 1.0.0+061432c8… (79 records at check time)
Overview :5320 6/6 Up; ScadaBridge central Active/Up, leader chip, 4/4 checks
Recovery both services FAILURE_ACTIONS_ON_NONCRASH_FAILURES: TRUE
Pending updates 1 stale instance: Z28061, expected. Its machine moved to QA, and it was left on the old #52 body on purpose (#142 closed)

The env block still has ScadaBridge__Database__MachineDataDb, which has been unused since its removal on 2026-10-22. It is harmless and was not touched.

Rollback

Schema 65 cannot run under 8e32f353, so a rollback is binaries plus a DB restore:

  1. Stop Site, then Central.
  2. RESTORE DATABASE [ScadaBridge] FROM DISK = N'E:\ApiInstall\ScadaBridge-backups\ScadaBridge_pre-061432c8_20261115T191258.bak' WITH REPLACE, CHECKSUM (single-user first).
  3. app/cli ← *.bak.20261115T191258.
  4. reg import E:\ApiInstall\_stage-sb-061432c8\_envbak-ScadaBridge-Central-20261115T191258.reg, which puts AuditLog__HashChain__Enabled=true back.
  5. Start Central, then Site.

The restore loses every DB write since 19:13. The *.bak.20261115T191258 and _appsettings-keep-20261115T191258 folders can go once the build has soaked.