Repository navigation
Complete native PostgreSQL and SQLite repositories - #129
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
atom-docs | 5258e58 | Commit Preview URL Branch Preview URL |
Oct 12 2026, 07:48 PM |
arvindh123
marked this pull request as ready for review
September 30, 2026 22:50
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
arvindh123
force-pushed
the
codex/complete-db-repositories
branch
from
October 6, 2026 14:00
772d541 to
e000a17
Compare
Completes #126, including shared SQL cleanup, current-main OAuth integration, security dependency updates, and API contract parity. Signed consolidation of PR #129 at d709c25. File contents are unchanged from that CI-validated tree. Original development history is preserved on codex/pr129-before-signing.
arvindh123
force-pushed
the
codex/complete-db-repositories
branch
from
October 12, 2026 19:45
d709c25 to
5258e58
Compare
Contributor
Review and test summaryReview
Tests run locally
|
Compare grant conditions structurally so whitespace in an empty JSON object cannot hide an authorized tenant. Add a regression that also keeps conditional grants excluded. Use a zero fallback for SQLite authority expiry metrics to match PostgreSQL null handling.
felixgateru
approved these changes
Oct 13, 2026
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.
Closes #126. Completes the PostgreSQL/SQLite repository migration started in #119 in this single follow-up PR.
All production database operations now use typed domain operations and private native PostgreSQL/SQLite adapters. Business validation, authorization evaluation, transaction orchestration, cache barriers, and audit/outbox behavior stay shared. The runtime SQL translator and generic query compatibility API are removed; test fixtures supply explicit SQL for each backend.
Port identity, credentials/session/email/OAuth/signing-key storage, tenants, authorization/guardrails/listings, PKI, bootstrap, audit/outbox, cleanup, custom endpoints, and runtime queries.
Reuse one canonical grant expansion and scope/ceiling implementation per backend. Preserve caller-owned transactions, tenant/entity lock ordering, SQLite writer coordination, and PKI retry savepoints.
Fix nullable resource sorting in both directions with deterministic pagination. Add regressions for actual resource/outbox rollback, nested savepoint recovery, JSON semantic parity, and resource/entity revisions.
Preserve PostgreSQL refresh replay revocation under concurrent exchange and post-commit audit writes: use an entity guard compatible with audit foreign-key locks, with a deterministic regression.
Enforce the native storage boundary and migration pairing/schema parity. Preserve applied migrations and public API contracts. Update developer guidance and the persistent, single-process SQLite quick start.
The environment example includes a PostgreSQL host URL and port, SQLite URL alternatives, pool options, and admin/encryption guidance, with the current Make/Compose limitations explained. Both URL examples parse with Atom's dotenvy parser; Docker Compose configuration validation also passes.
Review follow-up fixes share credential-ceiling interpretation and identical certificate-profile/signing-key SQL while keeping backend-specific execution private. Test fixtures can share genuinely identical SQL without bringing back runtime translation. The latest main-branch OAuth changes are preserved on both native adapters, including browser-bound exchange codes and verified-email responses. API documentation and regression tests now cover Apple's POST callback and nullable OAuth email responses.
Security dependency updates align both package manifests and workspace overrides on sharp 0.35.5, with regenerated frozen lockfiles. UI and docs production audits pass under their existing policies; no audit exceptions were added. The docs audit still reports pre-existing advisories covered by its existing exception policy, so a passing audit is not a claim of zero advisories.
The follow-up review fixes compare SQLite tenant grant conditions as JSON rather than text and add a zero fallback to authority expiry metrics. The new tenant regression failed on the original
{ }comparison and passes after the fix, while actual conditional grants remain excluded. The expiry fallback is defensive: existing completed-material constraints already prevent active/retiring authorities from having NULL expiry dates.Validation on final signed head
a921ed8354614b4c8094d6f6c11f36b4bb832392:Rust CI passed formatting, Clippy, database-boundary/schema-parity enforcement, full included unit/integration suites on fresh PostgreSQL databases and SQLite files, PKCS#11 backup recovery, and the real PKI smoke test.
API/contract CI passed OpenAPI validation, protobuf lint/generated docs, runtime-backed HTTP contracts, GraphQL schema comparison, frozen contracts/migrations, and contract-gate regressions.
Frontend CI passed UI and docs lint, tests, production builds, and audits.
Local follow-up verification passed all 13 SQLite tenant-listing tests, Rust formatting/Clippy, and the database-boundary/schema-parity check. The new regression exercises compact and whitespace-formatted empty JSON, plus a nonempty condition that must continue to fail closed. The API CI job passed after retrying a compiler-download failure caused by a GitHub API rate limit; no code change was needed for that retry.
Additional live API smoke validation (2026-10-13) on
a921ed8: started real servers against isolated PostgreSQL 18.4 and persistent SQLite databases; verified admin/user logins, tenant/user/resource creation, role assignment enabling resource reads, immediate revocation using the same user token, and preservation of an unrelated grant. Restarted both servers and verified persisted data, role state, pre-restart sessions, unchanged signing keys, fresh logins, and new writes. SQLite also rejected a second process opening the same database. For PostgreSQL upgrade coverage, created representative data with main775a326, copied it with pg_dump/pg_restore, then started and restarted the PR server against the restored copy: all six migration checksums, existing sessions, signing keys, records, and grant/revocation decisions were preserved. These were live HTTP/GraphQL tests with generated data, not browser UI testing or a production database snapshot.The repository requires verified signatures and linear history. The baseline consolidation and this follow-up commit are GitHub-signed. The original development history is preserved on codex/pr129-before-signing. No repository protection rules were changed.
Coverage limits are explicit: the two live AMQP suites (
m27_live_amqp_delivery,m28_amqp_mtls_local_principal) compile but were not executed because their external broker/mTLS setup is not provisioned, matching existing CI exclusions. PostgreSQL lock-observation cases (three object-coordination cases, two entity-authorization cases, and the audit foreign-key lock regression), the process-replacement test, and synthetic PKI serial-collision injection remain PostgreSQL-specific. SQLite is covered by its writer/ownership, concurrent mutation, restart, and shared savepoint regressions; these PostgreSQL-specific skips are not claimed as SQLite passes. SoftHSM backup recovery is verified on PostgreSQL; the provider path runs on both backends.SQLite-to-PostgreSQL data transfer is outside this issue: changing
DATABASE_URLselects a backend and does not move existing data. No applied migrations are changed.