Skip to content

Finish RLS SQL Server guard and migration CLI docs#56

Open
MelbourneDeveloper wants to merge 1 commit intomainfrom
rls-sqlserver-guard
Open

Finish RLS SQL Server guard and migration CLI docs#56
MelbourneDeveloper wants to merge 1 commit intomainfrom
rls-sqlserver-guard

Conversation

@MelbourneDeveloper
Copy link
Copy Markdown
Collaborator

TLDR

Adds a fail-closed SQL Server RLS guard to DataProviderMigrate and consolidates the migration CLI contract into the main migration spec.

What Was Added?

  • Added DataProviderMigrateRlsUnsupportedTests covering SQL Server RLS migration attempts.
  • Added [MIG-CLI] sections to docs/specs/migration-spec.md for commands, YAML-only input, schema export workflow, migrations assembly rules, build integration, build order, and forbidden CLI patterns.

What Was Changed or Deleted?

  • DataProviderMigrate now detects sqlserver/mssql providers with rowLevelSecurity YAML and exits with MIG-E-RLS-MSSQL-UNSUPPORTED before falling through to generic provider handling.
  • Marked the RLS plan complete, including Postgres E2E, SQL Server unsupported guard, README docs, and CI verification.
  • Deleted the standalone docs/specs/migration-cli-spec.md after moving its contract into docs/specs/migration-spec.md.
  • Updated README/spec links to point at the consolidated migration spec and the current DataProviderMigrate command shape.

How Do The Automated Tests Prove It Works?

  • DataProviderMigrateRlsUnsupportedTests.Migrate_SqlServerProviderWithRlsSchema_ReturnsCanonicalUnsupportedError proves SQL Server RLS YAML returns exit code 1 with MIG-E-RLS-MSSQL-UNSUPPORTED and the missing package detail.
  • Focused RLS run passed: dotnet test Migration/Nimblesite.DataProvider.Migration.Tests/Nimblesite.DataProvider.Migration.Tests.csproj --filter "FullyQualifiedName~Rls|FullyQualifiedName~RLS" -> 159 passed.
  • Full make ci passed after installing the local Playwright Chromium runtime required by Reporting integration tests.
  • Migration test slice in CI passed 498 tests, including PostgresRlsE2ETests and PostgresRlsNapShapeTests, with migration coverage above threshold.

Spec / Doc Changes

  • Consolidated the migration CLI spec into docs/specs/migration-spec.md under [MIG-CLI] IDs.
  • Removed the obsolete standalone migration CLI spec file.
  • Updated DataProvider, Migration, and Reporting docs to reference DataProviderMigrate and the consolidated migration spec.
  • Completed docs/plans/RLS-PLAN.md.

Breaking Changes

  • None

Add the SQL Server RLS unsupported CLI guard and regression test. Mark the RLS plan complete and consolidate the migration CLI spec into the migration spec.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant