7.8 KiB
P07 wiring preparation — historical checklist
This checklist predates the production wiring. Program/Kestrel, shared actor/DI dependencies, local bundle loading, observed-role owners and deployed-scope activation have since been implemented in the P07 working tree. The sections below preserve the original obligations; they do not describe current missing files. Current verification and unresolved review findings are recorded in the execution ledger and Astra contract review. P07 remains in progress and has no final approval.
Shared local composition
Use actual IClusterRoleInfo.LocalNode.Value and ClusterId, plus one process boot incarnation. Register one DataWriteDispatchFence before DataPlaneAuthorityState and RedundancyRoleView resolve, so their optional constructor arguments use that same fence. Share TimeProvider.System registration, CatalogActivation, LocalCatalogCoordinator, hub, SourceSamplePublisher, DataOperationPolicy, DataCapabilitiesProvider, DataWriteRuntime, DriverWriteBounds and SubscriptionAcquisitionCapacity.
RedundancyRoleView currently exposes only primary verdict/generation (generation zero at startup). Need the actual Primary/Secondary/Unknown role alongside its existing verdict, published from the SAME DriverHostActor handler/fence; do not infer Secondary from arbitrary false, or invent an election. Unknown startup cannot advertise ready. Existing WarmRoleAuthority/PrimaryGate tests become applicable if modified.
Runtime ServiceCollectionExtensions currently passes NONE of SourceSamplePublisher, LocalCatalogCoordinator, DataWriteRuntime, SubscriptionAcquisitionCapacity or writeClock to DriverHostActor.Props. Add the actual shared instances, not disconnected singletons. Those optional Props parameters already exist. Root owns this file and Program.
LocalDataRuntimeComposition is now public and worker-owned: it receives an ACTUAL local host IActorRef and the shared dependencies; it owns the one demand registry/bridge/transport capacity and exposes Services/AcquisitionCapacity. Construct after host registration. A stable Host IDataConnectionFactory wrapper should lazily resolve this composition inside Create, so the startup window returns an honest Unavailable instead of failing gRPC service activation. DataWriteRuntime itself must exist before Host actor construction and can resolve its host lazily through ActorRegistry.
Dedicated ingress
Host options/auth/middleware, all six RPC implementations, private-buffer contextual binding and PreparedDataSubscription exist but are UNMAPPED. Extend the SAME Program Kestrel binding reconstruction block: adding a Listen call otherwise drops URLS/HTTP_PORTS UI bindings. Use dedicated HTTPS HTTP/2, configured certificate plus private key, explicit host and actual local port checks. Preserve mesh/UI binding behavior; reject conflicts. Current legacy block refuses to replay existing HTTPS bindings because certificate settings are not modeled. Do not silently disable an explicitly enabled data service or fall back to plaintext.
Map only when enabled, with AllowAnonymous metadata so AdminUI cookies do not intercept authenticated RPCs; actual API-key middleware/interceptor remains fail-closed. Put admission before routing/auth parsing so unauthorized/oversized/concurrent work is bounded before protobuf allocation. Configure per-service MaxReceiveMessageSize and MaxSendMessageSize. Real service execution sets NoCompress, since ASP.NET discovery passes null service and discards generated binder handler wrappers. Registered marshaller serializes privately and checks capture-bound authority immediately before real Complete(byte[]); this is buffer handoff, not client receipt.
Finish finite unary pre-parse lifetime in middleware (own linked RequestAborted/deadline through real HTTP completion). Execute currently retains its own timeout CTS until response cleanup and its marshaller guard rechecks that token after validation. Duplex initial capability timeout is separate; subscription uses actual context cancellation and P06 finite session/pre-Open lifetime. Prepared frame owns encoded bytes through actual Write completion; Runtime now binds PendingDelivery.Gate exactly once across the framework StartAsync window. Do not commit cursors/baselines/Ack effects inside the marshaller.
Deployed scope and local bundles
Central worker owns authoritative DataConnectionScopeVersion (exact PascalCase artifact root + DraftSnapshot property), bounded singleton row and sealing transaction. Lock before reading the validated draft; commit row + artifact before dispatch. No-op scope stable; A-to-B-to-A increments; empty removals positive; drift/pure composition read-only. Root still needs generated EF migration and model checks; never apply against shared SQL.
Runtime artifact parser and actual DriverHost/catalog path must publish validated deployed connection scope, including EMPTY/legacy cases, into a bounded latest-desired controller. Durable central version, never process epoch/time/hash ordering. Stale/missing version cannot overwrite an established floor or reactivate old imports. Desired scope must synchronously drain/deny prior manager epochs before asynchronous local store work; readiness only after floor/allowlist persisted. A newer desired scope must preempt old completion so it cannot enable old connections. Root must implement this seam; no callback currently exists.
Suggested controller/worker split (not yet finalized): synchronous desired generation + immediate manager drain, bounded latest-item background worker to persist credential/trust scopes and load restricted mounted bundles, then atomically enable only the still-current scope. Local origin catalog should fail closed during the allowlist durability barrier; missing individual outbound secrets/trust should mark THOSE imports AuthFailed, not pretend they are ready. Keep unrelated committed material when scope advances. Bundle removal alone is not revocation. Root must decide exact activation seam in LocalCatalogCoordinator/DriverHostActor without blocking actor callbacks or holding dispatch fence across I/O.
Credential worker APIs now require exact persisted ScopeVersion on each bundle/trust update. Scope generation allows safe retired-ID history reclamation. Security provider emits scoped retirement notifications and separately versioned trust fingerprints. Compose SecretChangeSignallingInvalidator with existing inner/Galaxy callbacks even if one consumer throws. Integrate actual local store/cipher/cache invalidator and a bounded atomic bundle reader/watch path. Check successful identical bundle replay/restart semantics: provisioner currently rejects complete same-version apply; mounted already-applied bundles must not break offline restart or silently accept changed same-version material. No secret upload endpoint or central bearer.
Trust material also needs a restricted local provisioning source (versioned per-consumer CA bundle or equivalent operator-mounted inputs), independent of credentials and scoped to current generation. Root options currently include only CredentialBundlePath and server certificate paths; trust bundle consumption is not wired. Trust rotation must retire channels/streams without replaying in-flight writes; rolling restart for server certificate rotation, no unsupported hot reload.
Validation still required
Add real Host service-dispatch/middleware regressions beyond the current capability fixture, finite deadline/cleanup and late serialized Read source proof, actual DI/role/actor composition tests, new scope parsing/stale/empty/durability tests, central transactional concurrency/fault/no-op tests, migration checks. Per-phase runner uses only applicable selectors; no full solution run yet. Real TLS/listener wire tests belong Host.IntegrationTests/P10. Docker/OPC UA CLI integration, scaling benchmarks and full solution/Astra final remain P10/P11/P12.