Commit Graph

3102 Commits

Author SHA1 Message Date
Joseph Doherty d495494074 fix(management): purge terminal PendingSecuredWrites rows on the list sweep after a retention window (review 2026-10-21 08/G3) 2026-10-22 09:32:14 -04:00
Joseph Doherty baab6ac78e fix(management): ListInstances pages, site-scopes and prefix-searches in SQL (review 2026-10-21 08/P2) 2026-10-22 09:32:14 -04:00
Joseph Doherty b0c863c6a1 fix(management): single-flight large /management bodies at the HTTP edge (409 IMPORT_IN_PROGRESS) and parse the command off the request stream (review 2026-10-21 05/M2) 2026-10-22 09:32:14 -04:00
Joseph Doherty 72f96bdbcb fix(management): compile an API method once per save — CompileForPublish replaces the validate pre-pass (review 2026-10-21 05/M1) 2026-10-22 09:32:14 -04:00
Joseph Doherty 36d57f11b3 fix(management): validate site gRPC addresses on create/update (review 2026-10-21 03/R-1) 2026-10-22 09:32:14 -04:00
Joseph Doherty a9f9ea1c9d test(host): transport fake answers the ReconcileSiteCall wrapper (review 2026-10-21 03/P-1b integration) 2026-10-22 09:15:51 -04:00
Joseph Doherty 6f6534ac7e fix(site-runtime): artifact-apply watchdog + queued-apply failure on stop, boot-skip site event, enable revert, batch Ask slack (review 2026-10-21 lane A L1-L4)
L1: an artifact apply holding the slot past 10 min (ctor-overridable) logs an
Error site event naming it without releasing the slot; PostStop answers
queued applies Failed. L2: a boot-batch instance whose actor cannot be created
emits an Error site event and leaves the deployed set. L3: a failed enable
reverts the committed is_enabled (generation-bumped both ends). L4: the routed
SetAttributes batch Ask is the 30 s per-write bound plus 10 s mailbox slack.
2026-10-22 09:10:26 -04:00
Joseph Doherty 099b2221d6 fix(dcl): ASCII-only connection actor names, guarded ActorOf, and gate rejection of colliding connection names (review 2026-10-21 lane A M2)
ConnectionActorNames.Sanitize (shared by the DCL manager and the site deploy
gate) keeps ASCII letters/digits and -_.*+:@&=,!~';() only. The manager fails a
connection whose sanitised name is invalid or already used (Error + site
event) instead of restarting; DeployCompileValidator rejects a config whose
connection names collide after sanitising.
2026-10-22 09:10:26 -04:00
Joseph Doherty 3c11510c52 fix(site-runtime): seed republished overrides into Script Actors without firing scripts; alarms still evaluate (review 2026-10-21 01/SR-U1, decision M1)
HandleOverridesLoaded now sends children a site-local AttributeValueSeed
(stream still gets the AttributeValueChanged). ScriptActor updates its
snapshot, Conditional truth value and Expression last result (seed-only eval,
never fires); AlarmActor evaluates it as a normal change.
2026-10-22 09:10:26 -04:00
Joseph Doherty 999653a6b9 perf(site-runtime): warm the next startup batch during the stagger delay and compile a batch's distinct units in parallel (review 2026-10-21 01/SR-P3)
DeployCompileValidator.WarmCompileCache dedupes script bodies/trigger
expressions across a batch and compiles them with Parallel.ForEach (half the
cores). CreateInstanceActorBatch starts the next batch's warm as it arms the
stagger timer; creation order and delay are unchanged. The warm's parsed
configs are reused at creation.
2026-10-22 09:10:26 -04:00
Joseph Doherty dde22a3dd1 perf(site-runtime): deserialize a deploy's flattened config once and hand the parsed object down (review 2026-10-21 01/SR-P5)
The deploy compile warm parses once off-thread; the parsed FlattenedConfiguration
rides DeployCompileWarmed to the gate (new Validate(FlattenedConfiguration)
overload), the redeploy buffer, CreateInstanceActor's DCL ensure and a new
InstanceActor constructor overload. Stored-row paths parse once inside
CreateInstanceActor; an unparseable stored row still fails init via S6.
2026-10-22 09:10:26 -04:00
Joseph Doherty 960c35060c perf(site-runtime): instance reconcile sweep reads metadata only and fetches config_json just for the instances it repairs (review 2026-10-21 01/SR-P1)
Adds SiteStorageService.GetAllDeployedConfigMetadataAsync. The sweep decides
from the projection, then fetches single rows for its starts/restarts off-
thread and re-validates them (generation guard, revision match, pipeline/
running guards), releasing the per-revision claim of any repair that does
not act. Boot load unchanged.
2026-10-22 09:10:26 -04:00
Joseph Doherty c782744b07 perf(site-runtime): batch Route.To().GetAttributes/SetAttributes into one Instance Actor message (review 2026-10-21 01/SR-P4)
One Ask per attribute became one site-local InstanceGet/SetAttributesRequest
answered in a single pass, keeping the per-attribute GetAttributeResponse /
SetStaticAttributeResponse outcomes. The single-write path is refactored to a
Task<SetStaticAttributeResponse> outcome shared by both paths; static writes
and rejections still reply synchronously.
2026-10-22 09:10:26 -04:00
Joseph Doherty 35ffd025c3 fix(site-runtime): serialise DeployArtifactsCommand applies per site so an overlapping apply cannot delete a live artifact (review 2026-10-21 01/SR-C2)
Each apply upserts its full set then deletes everything else, off the actor
thread; two overlapping commands interleaved and deleted artifacts central
never removed. The Deployment Manager now runs one apply at a time, queuing
the rest in arrival order; the slot is released by a self-message that lands
behind the apply's own DCL push.
2026-10-22 09:10:26 -04:00
Joseph Doherty e765700eac fix(site-runtime): republish loaded static overrides to children/stream and answer pending waits on stop (review 2026-10-21 01/SR-U1, 01/SR-M3)
SR-U1: children are created before the async override load lands, so their
trigger snapshots kept the deploy default forever after a restart/failover/
enable/sweep start. HandleOverridesLoaded now republishes every changed value
through PublishAndNotifyChildren(evaluateWaiters:false), and skips attributes
a static write touched before the load (newer than the stored row).
SR-M3: PostStop cancels each WaitForAttribute timeout and replies
'instance stopped' instead of leaving scripts to time out and timeouts to
dead-letter.
2026-10-22 09:10:26 -04:00
Joseph Doherty f5090fcd9e fix(site-runtime): reject invalid runtime actor names at the site gate and never let ActorOf escalate to the Deployment Manager (review 2026-10-21 01/SR-C1)
An instance unique name Akka refuses as a path element (space, '#', '/',
non-ASCII) made Context.ActorOf throw on the singleton's own thread; the
default Restart stopped every Instance Actor on the site. DeployCompileValidator
now checks the instance + script/alarm/native-source actor names with
ActorPath.IsValidPathElement (the Commons ActorNameRules mirror is stricter
than Akka for " ( ), pinned by a parity sweep), CreateInstanceActor catches
InvalidActorNameException and every caller reports it, and the Instance Actor
skips a refused child name like a compile failure.
2026-10-22 09:10:26 -04:00
Joseph Doherty b5cebf9fa6 fix(host): bind ConfigAuditOptions with ValidateOnStart on central (review 2026-10-21 08/G1 purge wiring) 2026-10-22 09:01:50 -04:00
Joseph Doherty c55128d83d docs(centralui): 2026-10-21 review hardening (review 2026-10-21 07, 04/C4) 2026-10-22 09:00:49 -04:00
Joseph Doherty 614aade610 fix(centralui): diagnose cache keyed on editor context; surface blocking-wait advisory as Monaco warning (review 2026-10-21 07/C-1, lane F) 2026-10-22 09:00:49 -04:00
Joseph Doherty 5c8f6ff7aa fix(centralui): bound script-analysis payload/concurrency; bound Test Run needs Deployer, site scope and audit row (review 2026-10-21 07/P-4, 07/C-2) 2026-10-22 09:00:49 -04:00
Joseph Doherty 6644cf917d fix(centralui): Topology live tick behind PollGate, refresh no longer unmounts tree (review 2026-10-21 07/P-2) 2026-10-22 09:00:49 -04:00
Joseph Doherty c429fb374b perf(centralui): load template stubs/analysis projections instead of the full tracked graph (review 2026-10-21 07/P-1, 08/P1) 2026-10-22 09:00:49 -04:00
Joseph Doherty 0ebfafa98b fix(centralui): safe-invoke fire-and-forget calls in AlarmSummary and TreeView (review 2026-10-21 07/M-4) 2026-10-22 09:00:49 -04:00
Joseph Doherty 420e934eb0 fix(centralui): cap retained event-log rows; hint keyword search 7-day window (review 2026-10-21 07/M-3, lane D follow-up) 2026-10-22 09:00:49 -04:00
Joseph Doherty b032d7fe48 fix(centralui): bound FlowDebugService script cache (review 2026-10-21 07/M-2) 2026-10-22 09:00:49 -04:00
Joseph Doherty bd0f87e523 fix(centralui): dispose ConfigurationAuditLog browser-time module (review 2026-10-21 07/M-1) 2026-10-22 09:00:49 -04:00
Joseph Doherty 0bd856552c fix(centralui): short negative TTL after a faulted pending-updates flight (review 2026-10-21 04/C4) 2026-10-22 09:00:49 -04:00
Joseph Doherty d36f360d35 fix(centralui): SessionExpiry skips redirect after dispose (review 2026-10-21 07/C-3) 2026-10-22 09:00:49 -04:00
Joseph Doherty 1e3765ba6e fix(host): NodeOptions-bound ports, central ESG cache TTL, hosted warm-up wiring; document AllowSingleNodeCluster as validation-only (review 2026-10-21 08/O5, 08/O4, 05/U3) 2026-10-22 09:00:49 -04:00
Joseph Doherty fa73ddb453 fix(inbound): background active-node-only method warm-up service (review 2026-10-21 05/U3) 2026-10-22 09:00:49 -04:00
Joseph Doherty 4921ebb0c8 fix(host): distinguish secret-store fault from missing PSK secret (review 2026-10-21 05/U2) 2026-10-22 09:00:49 -04:00
Joseph Doherty 12f815a7ea fix(esg): short-TTL definition cache for central lookups (review 2026-10-21 05/P2) 2026-10-22 09:00:49 -04:00
Joseph Doherty ee8be8001e fix(esg): JSON-serialise non-scalar GET/DELETE query parameters (review 2026-10-21 05/O2) 2026-10-22 09:00:49 -04:00
Joseph Doherty e93af5a21f fix(inbound): single-use nonce on relay provenance proofs (review 2026-10-21 05/O1) 2026-10-22 09:00:49 -04:00
Joseph Doherty 26baa5a170 fix(inbound): in-memory request buffering; relaying standby skips audit capture (review 2026-10-21 05/M4) 2026-10-22 09:00:49 -04:00
Joseph Doherty 6c9dfaf700 fix(inbound): prune expired ApiMethodCache entries; pin exact-name scopes (review 2026-10-21 05/M3) 2026-10-22 09:00:49 -04:00
Joseph Doherty d7e87c0688 fix(inbound): single-flight method compile so concurrent first callers share one assembly (review 2026-10-21 05/M1) 2026-10-22 09:00:49 -04:00
Joseph Doherty 37c25db2f1 fix(site-runtime): batch native-alarm deletes into the coalesced flush transaction; docs for scripts/cache/scheduler (review 2026-10-21 01/SR-P2) 2026-10-22 09:00:49 -04:00
Joseph Doherty 010d2ea438 fix(site-runtime): ConfigureAwait(false) on remaining script helper awaits (review 2026-10-21 01/SR-U2) 2026-10-22 09:00:49 -04:00
Joseph Doherty 4ff26a0614 fix(site-runtime): rate-limit shed Warning logs per script/alarm (review 2026-10-21 01/SR-P6) 2026-10-22 09:00:48 -04:00
Joseph Doherty 7541a38762 fix(site-runtime): reuse exited detached worker slots in script scheduler (review 2026-10-21 01/SR-M1) 2026-10-22 09:00:48 -04:00
Joseph Doherty 96cab3f3d7 fix(site-runtime): compile cache eviction counter+warning, configurable bound, never cache faulted compiles (review 2026-10-21 01/SR-M2) 2026-10-22 09:00:48 -04:00
Joseph Doherty b0a08bb63b fix(auditlog): explicit permanent rejections on the ingest ack (IngestAck.rejected_event_ids, field 2) with a dedicated counter; reconciler ignores transient faults for abandonment; persist the served high-water mark; prune only on a non-empty enumeration (review 2026-10-21 06/PERF-1, 06/IMPL-1 adversarial follow-up) 2026-10-22 09:00:48 -04:00
Joseph Doherty 38167bca88 fix(auditlog): prune per-site reconciliation state and pull-channel caches for sites absent from the enumeration; bound the abandoned-id set (review 2026-10-21 06/MEM-2) 2026-10-22 09:00:48 -04:00
Joseph Doherty 9e7e19c3c1 fix(auditlog): reconciliation pull serves only unacked rows (PushAbandoned/Rejected push-exit states), central pages within a tick with set-based inserts; refused push rows leave the queue after N attempts (review 2026-10-21 06/PERF-1, 06/COR-3, 06/IMPL-1) 2026-10-22 09:00:48 -04:00
Joseph Doherty 1da5d0bac4 fix(auditlog): page the site audit purge, bound incremental_vacuum per page, fail fast instead of parking writers on a full queue (review 2026-10-21 06/MEM-1) 2026-10-22 09:00:48 -04:00
Joseph Doherty 268b55e350 fix(auditlog): do not log a graceful-stop OperationCanceledException at Error in the telemetry drains (review 2026-10-21 06/COR-2) 2026-10-22 09:00:48 -04:00
Joseph Doherty 15496575bc fix(communication): release the _activeStreams slot when relay ActorOf throws (review 2026-10-21 03/M-2) 2026-10-22 09:00:48 -04:00
Joseph Doherty dd60e236bd fix(communication): ReconcileSite threads the gRPC call's cancellation into central reconcile work (review 2026-10-21 03/P-1b) 2026-10-22 09:00:48 -04:00
Joseph Doherty 429ccb8d90 fix(communication): failback probe sentinel uses an illegal actor name so it can never match a real instance (review 2026-10-21 03/P-2 follow-up) 2026-10-22 09:00:48 -04:00