Migration hard-fail + post-apply integrity verifier; RLS SQL Server guard; LQL docs#58
Merged
Conversation
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.
CI was failing on Linux because extension.ts coverage came in at 38.6% vs the 39% threshold, while local macOS measured 39.24%. Same code, same tests, different platforms — the gap is environmental instrumentation noise, not a real coverage difference. Add deterministic tests that invoke the three registered commands (lql.formatDocument, lql.validateDocument, lql.showCompiledSql) with both an active LQL editor and no active editor, and a test that calls the exported deactivate() function via the extension's compiled module. Every CI platform now exercises these branches the same way. Local now measures 44.93%, threshold ratcheted 39 -> 44. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The auto-ratchet bumped Lql/lql-lsp-rust threshold to 95% based on macOS-local tarpaulin (llvm-cov backend). Linux CI uses tarpaulin's ptrace backend which credits ~6 percentage points fewer lines for the same code, so Linux measured 83% on the previous run and would still fall short of 95% even after the new tests landed. Set the floor to 89% (above the user-required 89% baseline) so both platforms clear the gate. With the new postgres-container, unreachable-endpoint, and command-body tests in 6ae1237, Linux should land comfortably above 89%. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Tarpaulin on Linux uses ptrace which only credits coverage for lines executed in the test process itself — integration tests that spawn the lql-lsp binary as a subprocess produce zero coverage credit on Linux. That's why the AI dispatch arms in initialized() (lines 247-308) stayed uncovered on Linux even after adding integration tests that exercised them via initializationOptions. Refactor the match arm into a pure build_ai_provider() helper that takes &AiConfig and returns the provider + log message. The helper is now unit-testable inside the binary's own #[cfg(test)] module, so its lines get credited on every platform. Five new tests cover the test, test_slow, ollama, unknown-provider, and saturating-add edge cases. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SchemaIntegrityVerifierand wire it intoDataProviderMigrateso every run (including the "no operations needed" path) verifies the live DB matches the YAML and exits non-zero with a per-mismatch summary if it doesn't.ContinueOnError=true, individual op failures used to be downgraded to warnings while the runner still returnedOk— closes the matching gap so any failed op rolls back the transaction and returnsError.MIG-E-RLS-MSSQL-UNSUPPORTEDwhen a schema with RLS targets SQL Server, sinceNimblesite.DataProvider.Migration.SqlServerdoes not exist yet.fix-bug,submit-pr,spec-check,upgrade-packages,ci-prep,code-dedup,website-audit) and Makefile, cleaned up rule files.Test plan
dotnet test Migration/Nimblesite.DataProvider.Migration.Tests— 499/499 passMigrationRunnerHardFailTests— proves runner returnsErrorwhen any op fails withContinueOnError=trueDataProviderMigrateIntegrityTests— proves CLI exits 1 withSCHEMA INTEGRITY CHECK FAILEDwhen live DB drifts from YAML (column nullability + missing composite unique constraint)SchemaIntegrityVerifierTests+SchemaIntegrityVerifierFunctionDriftTests— direct verifier coverageDataProviderMigrateRlsUnsupportedTests— proves SQL Server + RLS exits 1 with the documented error code🤖 Generated with Claude Code