Skip to content

Replace Atlas CE with Ptah Compat to plan the full Rebase schema - #84

Draft
denisvmedia wants to merge 10 commits into
rebasepro:mainfrom
denisvmedia:feat/ptah-native-migrations
Draft

denisvmedia wants to merge 10 commits into
rebasepro:mainfrom
denisvmedia:feat/ptah-native-migrations

Conversation

@denisvmedia

@denisvmedia denisvmedia commented Nov 13, 2026 •

Copy link
Copy Markdown

Why

Rebase previously kept policies, functions, search and vector objects,
triggers, and views outside the schema it gave Atlas CE. Ordinary
db generate and db push could therefore miss changes to objects Rebase
already declares.

What changed

  • Use Ptah Compat in the existing database commands and generate one desired
    schema from Rebase's declarations. The ordinary plan includes policies,
    Rebase's SQL functions, search and vector indexes, triggers, and declared
    views.
  • Give the planner a positive list of Rebase-owned objects and protect
    unrelated objects, auth provisioning, and migration revisions.
  • Keep SQL migration files, atlas.sum, and revision records. Existing
    projects switch packages when upgraded to Rebase 0.34.0 or its canaries.
  • Remove the sidecar append/apply path for objects that Ptah now plans.
    Boot and recovery still use their generated SQL.
  • Document the planner environment variables in the configuration reference.

The broader site documentation is in draft PR #86.

Review by commit

Read the Commits tab from oldest to newest:

  1. a44daafa — install Ptah Compat in packages, templates, and the lockfile.
  2. 711df61f — render the complete declared SQL and update its fixtures.
  3. 1a11af35 — select Rebase-managed objects and protect unmanaged children.
  4. 6a3fa4c6 — prepare Compat arguments, URLs, and migration postprocessing.
  5. c8f8234e — switch ordinary generation and push to Ptah plans.
  6. 5a3c9d4d — diagnose the executable through pnpm's isolated layout.
  7. b29b7e44 — migrate existing projects at the Rebase 0.34.0 boundary.
  8. e47a2d19 — cover migration, push, and scaffold behavior.
  9. 33cc7967 — avoid a planning database for db migrate.
  10. 322284ca — document setup and planner scope.

Verification

On head 322284ca with published @stokaro/ptah-compat@0.30.0:

  • Frozen pnpm install, monorepo build, TypeScript typecheck, template check,
    strict documentation check, and all 14 post-build gates passed.
  • CLI unit tests passed 4,349 tests (34 skipped). PostgreSQL driver unit
    tests passed 5,452/5,452.
  • The managed PGlite integration file passed 12/12 tests, including repeated
    migration generation and db push after search, vector, trigger, policy,
    and view changes.
  • The focused real-socket client suite passed 8/8 with host socket access.

Before the history rewrite, PostgreSQL 18 with pgvector completed the initial
and follow-up migration flow. Repeated generation and push converged, and
unrelated objects and migration revisions remained intact. Subsequent
functional edits only changed managed db migrate scratch startup.

For a shared PostgreSQL dev server, migration replay requires an explicit
PTAH_TRUST_REPLAY_SQL=1 choice. Rebase marks only its managed PGlite dev
server disposable.

Remaining validation

  • GitHub CI
    is action_required until a rebasepro/rebase administrator approves
    the fork run.
  • The full local quality script could not complete Docker-dependent checks:
    the configured remote Docker hosts cannot mount this Mac's temporary
    fixtures or publish test container ports to the local process. Its harness
    history check points at an incomplete temporary primary Git checkout. The
    client socket timeout seen in the sandbox passed when rerun with host
    socket access.

Closes #82.

@denisvmedia
denisvmedia marked this pull request as draft November 13, 2026 20:28
@denisvmedia
denisvmedia force-pushed the feat/ptah-native-migrations branch from 953ce07 to e182d57 Compare November 14, 2026 07:05
@denisvmedia denisvmedia changed the title Replace Atlas migration engine with Ptah Replace Atlas binary with Ptah compatibility mode Nov 14, 2026
@denisvmedia
denisvmedia force-pushed the feat/ptah-native-migrations branch from e182d57 to ac3365a Compare November 14, 2026 07:12
@denisvmedia denisvmedia changed the title Replace Atlas binary with Ptah compatibility mode Replace Atlas CE with Ptah Compat to plan the full Rebase schema Nov 15, 2026
@denisvmedia
denisvmedia force-pushed the feat/ptah-native-migrations branch from 177f473 to f835eaf Compare November 16, 2026 14:59
@denisvmedia
denisvmedia force-pushed the feat/ptah-native-migrations branch 3 times, most recently from 63bcb50 to 06c0405 Compare November 17, 2026 21:57
@denisvmedia
denisvmedia force-pushed the feat/ptah-native-migrations branch from 00399b2 to 322284c Compare November 18, 2026 12:13

This branch has not been deployed

No deployments
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.

Sidecar PostgreSQL objects are absent from one schema drift plan

1 participant