Skip to content

ADR-0036: a bounded design-time command subset

Status: accepted. FS-18 passes 182 tooling unit cases, 15 live tooling cases, actual EF CLI discovery, an actual read-only status process and offline package-only consumer checks. See the command contract and retained acceptance output (maintainer-local record).

GraphBridge is a non-relational EF provider. Support dotnet ef dbcontext list/info through an application's public IDesignTimeDbContextFactory<TContext>. Do not register relational IMigrator, relational scaffolding or a second model authority to make unrelated EF commands appear supported. The pinned EF 10.0.12 source explicitly reserves connection-info fields for relational providers; the tested CLI discovers GraphBridge correctly while reporting that boundary.

Optional GraphBridge.Tooling.DesignTime.GraphMigrationCommands hosts list, preview ID and status ID inside an application with a trusted, finite declared catalog. These are companion application commands, not additions to the dotnet ef parser. Reuse immutable typed migration plans and existing read-only validation; no assembly scanning, initialization, apply, recovery or automatic model diff is introduced. Catalog and preview never create a context. Status creates and asynchronously disposes one fresh context; the application owns any borrowed driver. The sample factory/context explicitly owns its lazy driver and supports both disposal paths because EF discovery disposes synchronously.

Output is versioned JSON. Parameter values require explicit --include-values; errors omit exception messages and status reports owner presence without its recovery token. This is not a blanket redaction of user-authored schema names or descriptive text. Exact catalog IDs and option shapes reject before transport. Cancellation and failure return distinct nonzero codes; readiness issues return 3. Status is a point-in-time observation, not an apply lock, complete history or validation of every subsequent step.

The fourth sample serves both EF metadata discovery and graph-plan inspection without adding a fourth model-authoring workflow. Offline metadata creation reads no live credentials. Live status requires explicit process configuration. An actual restore conflict between EF Design's default Roslyn 5.0 workspaces and optional tooling's 5.9 compiler was resolved through private sample workspace pins at 5.9.0; the runtime provider gains no EF Design dependency.

Acceptance uses actual pinned CLI processes, not only factory unit tests. The independent package consumer has no project references, uses an isolated cache and verifies loaded DLL bytes against the new packages. Its commands were offline; live journal/status behavior was checked separately against an owned disposable Community fixture. Snapshot tests observe no node/constraint changes from status. Actual unsupported migrations list --no-connect returns the expected missing-IMigrator error; the documentation explains EF's generic diagnostic instead of claiming broader support. Future command expansion remains FUT-17.