wip: doctor/cli/docs/api to vector db consolidation; api hardening for descriptions, tenant, and scopes; migrations and conversions of all DALs to EF v10
This commit is contained in:
@@ -19,8 +19,8 @@ AirGap manages sealed knowledge snapshot export and import for offline/air-gappe
|
||||
**Libraries:**
|
||||
- `StellaOps.AirGap.Policy` - Staleness policy evaluation
|
||||
- `StellaOps.AirGap.Time` - Time anchor validation and trust
|
||||
- `StellaOps.AirGap.Storage.Postgres` - PostgreSQL storage for snapshots
|
||||
- `StellaOps.AirGap.Storage.Postgres.Tests` - Storage integration tests
|
||||
- `StellaOps.AirGap.Persistence` - PostgreSQL persistence (EF Core v10)
|
||||
- `StellaOps.AirGap.Persistence.Tests` - Persistence integration tests
|
||||
|
||||
## Configuration
|
||||
|
||||
@@ -33,6 +33,45 @@ Key settings:
|
||||
- PostgreSQL connection (schema: `airgap`)
|
||||
- Export/import paths and validation rules
|
||||
|
||||
## EF Core Persistence Workflow
|
||||
|
||||
AirGap persistence now uses EF Core v10 models generated from the module migration schema.
|
||||
|
||||
Scaffold baseline context/models:
|
||||
|
||||
```bash
|
||||
dotnet ef dbcontext scaffold \
|
||||
"Host=...;Port=...;Database=...;Username=...;Password=..." \
|
||||
Npgsql.EntityFrameworkCore.PostgreSQL \
|
||||
--project src/AirGap/__Libraries/StellaOps.AirGap.Persistence/StellaOps.AirGap.Persistence.csproj \
|
||||
--startup-project src/AirGap/__Libraries/StellaOps.AirGap.Persistence/StellaOps.AirGap.Persistence.csproj \
|
||||
--schema airgap \
|
||||
--table state \
|
||||
--table bundle_versions \
|
||||
--table bundle_version_history \
|
||||
--context-dir EfCore/Context \
|
||||
--context AirGapDbContext \
|
||||
--output-dir EfCore/Models \
|
||||
--namespace StellaOps.AirGap.Persistence.EfCore.Models \
|
||||
--context-namespace StellaOps.AirGap.Persistence.EfCore.Context \
|
||||
--use-database-names
|
||||
```
|
||||
|
||||
Regenerate compiled model artifacts after model updates:
|
||||
|
||||
```bash
|
||||
dotnet ef dbcontext optimize \
|
||||
--project src/AirGap/__Libraries/StellaOps.AirGap.Persistence/StellaOps.AirGap.Persistence.csproj \
|
||||
--startup-project src/AirGap/__Libraries/StellaOps.AirGap.Persistence/StellaOps.AirGap.Persistence.csproj \
|
||||
--context AirGapDbContext \
|
||||
--output-dir EfCore/CompiledModels \
|
||||
--namespace StellaOps.AirGap.Persistence.EfCore.CompiledModels
|
||||
```
|
||||
|
||||
Runtime behavior:
|
||||
- The static compiled model is used explicitly for the default `airgap` schema path.
|
||||
- Non-default schemas (for integration fixtures) use runtime model construction to preserve schema isolation.
|
||||
|
||||
## Bundle manifest (v2) additions
|
||||
|
||||
- `canonicalManifestHash`: sha256 of canonical JSON for deterministic verification.
|
||||
|
||||
@@ -82,6 +82,16 @@ Determinism requirements:
|
||||
- Use ordinal comparisons for keys and stable serialization settings for JSON responses.
|
||||
- Never infer state from wall-clock behavior other than the injected `TimeProvider`.
|
||||
|
||||
## Persistence backend
|
||||
|
||||
Controller state persistence is implemented in `src/AirGap/__Libraries/StellaOps.AirGap.Persistence` using EF Core v10.
|
||||
|
||||
- `PostgresAirGapStateStore` and `PostgresBundleVersionStore` use EF queries/updates with deterministic ordering guarantees preserved from the previous SQL paths.
|
||||
- `AirGapDbContextFactory` explicitly binds `AirGapDbContextModel.Instance` for the default `airgap` schema.
|
||||
- Integration fixtures that provision per-run schemas intentionally use runtime model mapping (no automatic compiled-model discovery) so table resolution stays schema-isolated.
|
||||
|
||||
Regeneration commands are documented in `docs/modules/airgap/README.md` under `EF Core Persistence Workflow`.
|
||||
|
||||
## Telemetry
|
||||
|
||||
The controller emits:
|
||||
@@ -97,4 +107,3 @@ The controller emits:
|
||||
- `docs/modules/airgap/guides/staleness-and-time.md`
|
||||
- `docs/modules/airgap/guides/time-api.md`
|
||||
- `docs/modules/airgap/guides/importer.md`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user