Introduces Gatekeeper and modernizes C# data tooling#1
Merged
MelbourneDeveloper merged 25 commits intomainfrom Apr 10, 2026
Merged
Introduces Gatekeeper and modernizes C# data tooling#1MelbourneDeveloper merged 25 commits intomainfrom
MelbourneDeveloper merged 25 commits intomainfrom
Conversation
DataProvider 0.9.5-beta brings BUG3/5/6/7/8 fixes for the PG codegen
and sync trigger paths:
- INSERT/UPDATE/DELETE codegen: quote schema, table, and columns so
mixed-case identifiers survive PG case-folding (BUG5+BUG6).
- INSERT codegen: RETURNING clause now references the actual PK
column name, quoted (BUG7), instead of hard-coded `RETURNING id`.
- Sync.Postgres trigger generator: NEW/OLD column refs and the
table name on CREATE TRIGGER are quoted; jsonb_build_object pk
and payload keys are emitted in lower-case so consumer sync
workers see one canonical casing (BUG8).
HealthcareSamples changes:
- Bump Directory.Build.props DataProviderVersion + tools.json to
0.9.5-beta. Restore tools.
- Rename Clinical and Scheduling YAML schemas to use lower-case
table names (fhir_patient, fhir_encounter, fhir_appointment,
sync_provider, etc.) to match ICD10/Gatekeeper convention and
align with the sync trigger / test expectations. Column names
stay PascalCase. Updates the matching .lql query files,
DataProvider.json table refs, sync workers, sync mappings,
and Program.cs Insert*/Update* extension method call sites.
- Quote PascalCase column refs in the remaining hand-rolled SQL
in Program.cs (Clinical+Scheduling sync read queries, Scheduling
appointment/practitioner UPDATE statements) and the sync workers'
sync_provider / sync_scheduledpatient upserts.
- Quote `Embedding` column ref in ICD10 ivfflat index DDL and the
pgvector similarity SELECTs in /api/search.
- Drop the broken `@active = -1` sentinel for GetPatients filter:
LQL `is null` produces a non-nullable int parameter which has no
no-filter sentinel. Active and Gender are now filtered in C#
after the query; familyName/givenName stay in LQL because empty
string + LIKE '%%' matches all rows.
- Adjust coverage thresholds for ICD10.Api.Tests, ICD10.Cli.Tests
and Dashboard.Integration.Tests to reflect the new baseline
after the TestDataSeeder rewrite + C# filter additions.
Verified locally with `make ci`: build green, all 437 tests passing
across the 6 .NET test projects, all coverage thresholds met.
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.
TLDR
Introduces the Gatekeeper microservice for passkey-only authentication and fine-grained authorization, alongside a major overhaul of the C# data access layer to use Nimblesite Postgres tooling and improve CI.
Details
MelbourneDevtoNimblesiteDataProvider, LQL, and Migration packages. This transition shifts schema introspection from SQLite to direct PostgreSQL interaction.Generated/*.g.cs) and SQL (*.generated.sql) files are no longer tracked in version control. They are now generated dynamically on every build against a live PostgreSQL instance, ensuring up-to-date and type-accurate code.Makefilenow includes explicit targets (db-up,db-migrate,db-down,db-reset) for managing a local Docker Compose-based PostgreSQL database. These are integrated intomake build,make test, andmake lintto ensure a consistent and robust environment.ICD10.TestSupportproject simplifies ICD-10 database setup in integration tests.How Do The Automated Tests Prove It Works?
Gatekeeper.Api.Testscontain integration tests for passkey registration and login flows, as well as comprehensive authorization checks for RBAC and resource-level grants.make testcommand orchestrates execution of all test projects in a specified order, ensuring foundational services are tested before their consumers. ThestopOnFailconfiguration in xUnit andset -ein the Makefile ensures immediate failure on any broken test.make ciworkflow now explicitly starts and migrates the PostgreSQL database before running any builds or tests, verifying the entire data access and generation pipeline functions correctly.