Repository navigation
feat(integrations): read company Postgres data from patches - #218
Conversation
Astra reviewReviewed StandardsNo merge-blocking method or YAGNI findings. Spec[P2][Intent] Preserve fixture parity for arrays of domainsOperations.ts:283–290, together with Mapping.ts:165–173. #202 requires “domains resolved” and “the fixture layer answers the same CREATE DOMAIN public.positive AS integer CHECK (VALUE > 0);
CREATE TABLE public.items (id integer PRIMARY KEY, "values" public.positive[] NOT NULL);Discovery includes this relation without exclusions and records the array as Reproduced: an isolated PGlite database containing the source DDL → actual discovery → shared Fix: make the shared type mapping and drift guard agree on resolved array-element types, preserving production drift detection. Add coverage that takes an actual discovered domain-array snapshot through the fixture and relation handler; separate discovery and fixture tests miss this boundary. Verification: eight focused offline suites passed, 46 tests. The isolated cross-surface reproduction above exposes behavior those suites do not cover. No repository files changed. Summary: Standards: 0 blockers. Spec: 1 blocker — a supported domain-array relation cannot be read through its local typed surface. |
Code review — PR 218 vs #202Reviewed #202’s intent is not “a Postgres driver.” It is: a published version can run constrained reads through a declared company connection, through the snapshot that version named, with a generated relation client, a local PGlite fixture that shares the same handlers, and an admin recent-calls list. The admitted-at-merge bar is that That bar is met. The method is mostly the one #180 asked for. The misses are: Dev reimplements execution instead of swapping the source; a timed-out local fixture stays dead; a few surfaces still say this work has not landed. Standards(a) Documented standards
(b) Judgement (smells; not hard)
Namespace imports, Spec(a) Missing / partial
(b) Scope creep
(c) Implemented but wrong
Otherwise the Done-when set is actually tested: INSERT/side-effect MethodThey followed the spec’s handler-sharing method, not “swap only the source.”
Where the method is too big: Dev reimplements the read-only protocol, bounds, and extended-protocol collection inside an Verdict: reshape the Execution/Dev split. Keep the handler seam, Mapping, node-pg, the killable worker, and the 0006 rewrite. Extract one statement runner so Dev only swaps transport. Do not drop the worker (WASM cannot meet the 15s deadline on-thread) and do not switch to YAGNIThe PR works. It is also a second system around the first. Delete without failing #202:
Query OID allowlists ( Tests are mostly one case per Done-when, which is the right shape. Slop is Surfaces
Summary
Method is keep-and-reshape, not reject. The beautiful version of this PR is the same Reviewed with Grok 4.6. |
|
Reviewed Astra and Grok against the implementation. The three requested merge blockers are fixed in Fixed
Kept as-is, with reasons
Verification: Latest-commit CI: all seven reported checks passed on |
d43350b to
74627cf
Compare
…tures Implements #202: bounded native execution, pinned metadata, generated clients and PGlite fixtures, with attributed runtime logs and recent calls.
27de001 to
791da59
Compare
Patch repos need matching tooling and browser types, but the CLI was a separate package and release discovery did not provide an installable artifact. Ship the CLI, config builders and browser client together as the private `patchy` package. The instance serves its immutable tarball with verified SHA-512 integrity, and shared release checks reject outdated tooling without disrupting pending publish recovery. Rename mirrors, ADRs and the skill lock follow the package. **Stacked on #218 (`sdk/202-postgres`).** This PR targets that branch and contains only the #203 implementation; merge after its dependency. Closes #203. ## Verification - Full offline suite: 604 tests passed across 68 files. - Packed CLI real-server end-to-end flow passed. - After review corrections: typecheck, lint, formatting and 69 focused CLI/release tests passed. - Standards and spec reviews completed; findings addressed. Implemented with OpenAI GPT-6 Astra (`openai-codex/gpt-6-astra`) in the Oh My Pi harness.
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 lintpnpm typecheckpnpm test— 572 tests across 62 filesThe unmerged
0006_runtime_baselinegains 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.