Phase 0: scaffold, dbconn layer, PG 14-18 harness, governance - #3
Merged
Conversation
Kong CLI stubs, pgx pool with bounded session timeouts, retry classification, targeted blocker termination, testcontainers harness, plus TCB.md/AGENTS.md so agents know the trusted-core boundary from the first commit.
… in AGENTS.md Mirror spirit's TLS model: embed the AWS RDS global CA bundle, detect *.rds.amazonaws.com endpoints (anchored against subdomain spoofing), default them to verify-full with no plaintext fallback, and honor an explicit sslmode while injecting the RDS roots when verification is requested without a bundle.
…hestrator integration; rename TCB.md to SAFETY.md Ten engine-facing docs move in from the research corpus (design, principles, invariants, TCB model, DDL/version/change-capture references) with descriptive filenames, rewritten cross-links, and a sanitization pass — no company-internal references. The broader research set stays internal. architecture.md is the one-screen codebase map; schemabot-integration.md is the single home for the orchestrator story (everywhere else says "the orchestrator" and points there); SAFETY.md is the generic contributor-facing name for the critical-core partition.
…ecision 5) It already does the hard parts of the declarative front-end (server-canonicalized desired state via a temp database, dependency-ordered plans, hazard annotations, plan validation) and declares shadow-table rewrites out of scope — exactly where our copy-and-swap starts. Recorded as an open decision: wrap it behind the SchemaDiff seam vs build on pg_query_go; adopt its hazard taxonomy and plan-validation idea either way.
Kong-embedded DBFlags (URL/CA/timeouts, env-backed) give every database command the same bounded session defaults; fmt stays offline. Grammar construction is pinned by a test so a bad tag fails in CI, not at first use.
Pool sizing/lifecycle (min/max conns, lifetime+jitter, idle, healthcheck), bounded connect timeout, QueryExecMode for transaction-pooling proxies, statement tracing via tracelog->slog, and a BeforeConnect hook as the RDS IAM-token seam — zero values keep pgx defaults (decisions, not options). Pool config construction is now a pure function so every option's wiring is unit-tested without a server.
Anything not native-safe is refused with a structured verdict (SchemaBot sees ExecutionModeBlocked), never delegated to an external tool. pg-osc stays as studied reference material only; in-house copy-and-swap arrives in Phases 4-7.
Prepares the repo for publication under block/pg-sprite (OSPO prototype path). README carries a prominent not-ready-for-any-use warning; external contributions are explicitly not accepted yet. Community-standard files (CoC, security, governance) inherit from block/.github org defaults.
Reconciles local OSS scaffolding with the generated Block template: keep seeded LICENSE (Block, Inc. copyright) and renovate.json verbatim; clean placeholder cruft from CODEOWNERS and the issue-template config; add Code of Conduct; move CONTRIBUTING to repo root.
Reconciles the generated Block OSS template (LICENSE, CODEOWNERS, GOVERNANCE, issue templates, renovate) with the pg-sprite Phase 0 codebase and design docs. Template placeholders cleaned up; Block, Inc. LICENSE copyright kept verbatim from the seeded repo.
Kiran01bm
force-pushed
the
kiran01bm/p0-foundations
branch
from
August 5, 2026 09:10
0dcf1c5 to
d68151a
Compare
The action's default binary is built with an older Go than the module targets and cannot load the v2 config; SHA-pinning also satisfies the semgrep and zizmor unpinned-action checks.
Kiran01bm
marked this pull request as ready for review
August 5, 2026 09:35
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
aparajon
approved these changes
Aug 5, 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.
Summary
Phase 0 foundations for pg-sprite: the repo scaffold, the connection layer, the design-doc baseline, and OSS governance. First PR of the foundation stack (see the stack overview in the top PR).
What
migrate/diff/fmt/lint/statuscommand tree with shared DB flags.pkg/dbconn: pgx/v5 pool behind aConfigseam — boundedlock_timeout/statement_timeouton every session, retries, RDS/Aurora auto-TLS via an embedded global CA bundle.internal/testutil).SAFETY.md), TCB model, orchestrator-integration seam.Why
Everything later (planner, executors) builds on a connection layer with bounded sessions and a safety-partitioned repo layout; landing it separately keeps each subsequent phase PR reviewable on its own terms.