Skip to content

feat: onboard PostgreSQL schemas with baseline verification - #1327

Open
aparajon wants to merge 4 commits into
armand/local-runtime-registrationfrom
armand/postgres-onboard
Open

feat: onboard PostgreSQL schemas with baseline verification#1327
aparajon wants to merge 4 commits into
armand/local-runtime-registrationfrom
armand/postgres-onboard

Conversation

@aparajon

@aparajon aparajon commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Why

schemabot onboard rejects PostgreSQL after pulling its schema. This blocks the same verified import workflow that MySQL and Vitess already use.

What

Allow PostgreSQL through the existing import path. Keep table DDL and indexes intact, write the engine into the schema configuration, and verify a no-change baseline by default.

Before: PostgreSQL -> pull -> unsupported engine
After:  PostgreSQL -> pull -> schema files -> plan -> verified baseline

How

The existing writer and plan verification handle PostgreSQL without a separate workflow. The local-runtime integration now exercises CLI onboarding against both MySQL and PostgreSQL.

Risk

Import writes local files and verifies a plan; it does not apply changes. Existing overwrite protection and verification failures still apply.

Bigger picture

Builds on #1326. This lets future interactive and agent-driven setup share the same verified import path for both engines.

Generated with Codex

Copilot AI lite review requested due to automatic review settings September 7, 2026 05:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The updated integration test reuses a fixed-deadline context after running onboarding, which can cause flaky Stop/Status failures due to context deadline exhaustion.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Enables schemabot onboard to accept PostgreSQL databases through the existing import + verification workflow, so PostgreSQL can be onboarded into declarative schema files and then baseline-verified via a no-change plan (matching the MySQL/Vitess experience).

Changes:

  • Allow PostgreSQL database type in buildOnboardWritePlan (previously rejected).
  • Add a unit test to ensure PostgreSQL pull output (quoted identifiers + index statements) is written verbatim and the generated schemabot.yaml type is postgres.
  • Extend the local-runtime integration test to run schemabot onboard and assert the default “verified baseline” behavior for both MySQL and PostgreSQL.
File summaries
File Description
pkg/cmd/commands/onboard.go Permits postgres as a supported type for generating the onboarding write plan.
pkg/cmd/commands/onboard_test.go Adds coverage for PostgreSQL onboarding write output (config + .sql contents).
integration/localruntime/supervisor_test.go Exercises the CLI onboarding + baseline verification flow for both engines in local runtime.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread integration/localruntime/supervisor_test.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants