Repository navigation
feat(integrations): connect company Postgres databases - #217
Conversation
Astra reviewReviewed StandardsNo merge-blocking method or YAGNI findings. Reviewed the Effect service boundaries, credential/network isolation, persistence and locking, and reuse of the existing session and page shell conventions. The definition and credential-free dev layer are explicitly requested; deferred Postgres operations remain unavailable. SpecNo merge-blocking intent findings. Connection administration and its reverse states, credential protection, immutable discovery revisions, and publish-time connection/revision checks match this ticket's scope. Reviewed the affected wire/CLI, migration wiring, pages, dev keyring, vocabulary/product docs and package-layout surfaces. No new company-database caller is introduced. Operations, generation and fixtures remain deferred as specified. Verification run:
Verification was offline and isolated; no live-source or browser verification was performed. Summary: Standards: 0 blockers, worst: none. Spec: 0 blockers, worst: none. |
Code review — PR 217 vs #201Reviewed #201’s intent is the definition helper, company Postgres connections, encrypted credentials, connect flow, immutable discovery, admin pages, and publish binding. Ticket 9 owns operations, generated clients, and fixtures. “Admitted at merge” is a declaring publish that resolves and then sits inert. That split is what landed. StandardsEffect services ( No UI consistency findings. No hard ADR-0002 / 0003 / 0004 / 0009 breaches.
const references =
yield* sql`SELECT 1 FROM patch_versions v JOIN patches p ON p.id = v.patch_id
WHERE p.company_id = ${input.companyId} AND EXISTS (
SELECT 1 FROM jsonb_each(v.manifest->'uses') AS declaration
WHERE declaration.value->>'kind' = 'postgres' AND declaration.value->>'id' = ${input.id}Ask Patches whether any version declares the connection.
import { ConnectionStore } from "../../integrations/src/index.js";Add a devDependency and import the package name.
SpecIntent of #201 is the definition, company connections, credentials, connect flow, discovery, and publish binding — not Postgres operations, generated clients, or fixtures.
Covered: type-level Method and YAGNIThe live path is the right size: one The plugin shell is not load-bearing. Smaller YAGNI:
Do not split Surfaces and security (short)Hit-every-surface is mostly done (wire, CLI Credential/network: no secret leak, no decrypt-on-read, no DNS-rebinding SSRF found. Resolve → refuse any non-public A/AAAA → connect to that IP; lookup again on every inspect/test. Standards: 4 findings, worst is unused |
|
Reviewed both PR-comment reviews: Astra and Grok. Fixes are in d43350b; df56d39's page polish is preserved. Fixed
Kept as is, with reasons
Astra reported no blockers; no additional changes were necessary for that review. Verification
|
d871930 to
c3f8943
Compare
Status is a shell pill, timestamps read as minutes in UTC, the detail page lists its facts in a two-column grid, breadcrumbs link both levels, completed actions get a green notice, and the company-wide access note sits with the credentials field it is about on connect and retarget. Co-Authored-By: Claude Fable 5.1 <[email protected]>
d43350b to
74627cf
Compare
Patches can declare company Postgres connections, but cannot yet read from them. This adds bounded, read-only Postgres operations using each published version's pinned schema and the connection's live credentials. Generated typed clients and native PGlite fixtures share the same handlers and type mapping. Attributed runtime calls appear in the admin's recent-calls view. **Stacked on #217 (`sdk/201-integrations`).** This PR targets that branch; the earlier runtime, primitive and connection-management work belongs to the parent stack. ### Validation - `pnpm lint` - `pnpm typecheck` - `pnpm test` — 572 tests across 62 files - Native Postgres execution regressions, generated-client/PGlite smoke, and desktop/mobile connections-page checks - Standards and Spec self-review findings resolved The unmerged `0006_runtime_baseline` gains the call outcome field and recent-calls index without a new migration ID. Existing disposable dev databases need a reset. Closes #202. Implemented with GPT-6 Astra in Oh My Pi.
Company admins have no way to connect Postgres databases or publish patches bound to their discovered schemas.
Adds secure company connections with encrypted credentials, verified TLS and public-address checks, immutable schema discovery, and publish-time connection/revision checks. The company pages cover the full administration lifecycle. Postgres operations remain deferred to ticket 9.
Stacked on #216 (
sdk/200-shared-tables); this PR targets that branch. Includes the page polish indf56d39. Uses migration0007_integrations_baseline, after the runtime baseline.Closes #201.
Verified on the complete branch, including the page polish:
pnpm test(540 tests),pnpm typecheck, andpnpm lint.Implementation and PR prepared with GPT-6 Astra in Oh My Pi; page polish contributed with Claude Fable 5.1.