feat(policy): persist gate evaluation queue, snapshots, orchestrator jobs
Policy Engine: moves gate evaluation, snapshots, orchestrator job tracking,
and ledger export from in-memory state to Postgres-backed stores.
- New persistence migrations 007 (runtime state), 008 (snapshot artifact
identity), 009 (orchestrator jobs).
- New repositories: PolicyEngineSnapshotRepository,
PolicyEngineLedgerExportRepository, PolicyEngineOrchestratorJobRepository,
WorkerResultRepository.
- Gateway services: GateEvaluationJobDispatchService,
GateEvaluationJobStatusService, GateEvaluationJobWorker,
SchedulerBackedGateEvaluationQueue (plus Unsupported fallback),
GateTargetSnapshotMaterializer, PersistedKnowledgeSnapshotStore,
GateBaselineBootstrapper, PolicyGateEvaluationJobExecutor.
- New endpoints: GateJobEndpoints for job status + dispatch.
- Worker host: PolicyOrchestratorJobWorkerHost to drain the persistent queue.
- PersistedOrchestratorStores + DeltaSnapshotServiceAdapter swap in the
persistent implementations via DI.
Tests: PersistedDeltaRuntimeTests, PolicyEngineGateTargetSnapshotRuntimeTests,
PolicyEngineRegistryWebhookRuntimeTests, PostgresLedgerExportStoreTests,
PostgresSnapshotStoreTests, PolicyGatewayPersistedDeltaRuntimeTests,
RegistryWebhookQueueRuntimeTests. Archives the old S001 demo seed.
Docs: policy API + architecture pages updated.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>