Skip to content

docs: reflect shared core-postgres migration (v1.0.2) - #6

Merged
amtiYo merged 1 commit into
mainfrom
docs/core-db-refresh
Jul 4, 2026
Merged

docs: reflect shared core-postgres migration (v1.0.2)#6
amtiYo merged 1 commit into
mainfrom
docs/core-db-refresh

Conversation

@amtiYo

@amtiYo amtiYo commented Jul 4, 2026

Copy link
Copy Markdown
Member

Documentation-only update reflecting the completed database consolidation (branchy is live on the shared core-postgres as of v1.0.2). No application code, migrations, Dockerfiles, or compose service logic changed.

What changed

  • README.md — "How It Works" now describes the branchy schema (subscriptions, outbox, OAuth/runtime state) plus delegated identity in the shared core schema (core.person/core.chat, upserted via core.touch); Quick Start notes the bundled compose seeds a local core schema; the DATABASE_URL config row documents search_path=branchy.
  • docs/architecture.md — durable-state paragraph names the shared core-postgres, the branchy schema, FK-into-core identity, and the local core-init.sql seed; a new Decisions bullet covers the single pool, search_path=branchy, schema-qualified core.touch, and the retired branchy-postgres.
  • AGENTS.md — Project Shape and Migrations notes refined to describe the branchy/core split, search_path=branchy, core.touch, and the local seed; warns against recreating the dropped telegram_users/telegram_chats tables.
  • .env.example — clarifying comment above DATABASE_URL explaining the schema layout and options=-csearch_path%3Dbranchy.

The durable Postgres outbox / reliable-delivery messaging is preserved (the outbox is a branchy table). Release notes are not duplicated — CHANGELOG.md (v1.0.2 / v1.0.3) remains the source of truth.

Verification

Every DB claim was checked against the repo: migrations/001_init.sql header + FKs into core.*, internal/db/db.go (SELECT core.touch(...)), deploy/core-init.sql, docker-compose.yml (options=-csearch_path%3Dbranchy), internal/config/config.go (single DATABASE_URL, no CORE_DATABASE_URL), and the CHANGELOG. The production role name branchy_core is not present in the repo (deploy-time credential) — it is stated per the migration authoritative context, not verifiable from source.

🤖 Generated with Claude Code

Update README, docs/architecture.md, AGENTS.md, and .env.example comments so
they describe the post-consolidation database topology: Branchy stores its
durable state in a `branchy` schema and delegates Telegram identity/presence to
a shared `core` schema (`core.person`/`core.chat`) via `core.touch`. In
production this lives in the shared `core-postgres`, reached on a single pool
with `search_path=branchy`; local `docker compose` seeds a minimal `core` schema
(deploy/core-init.sql) so migrations boot. The durable Postgres outbox messaging
is unchanged (the outbox is a `branchy` table). Docs-only; no code changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GAeQtwgsRecG7D3Lc6RVuV
@amtiYo
amtiYo marked this pull request as ready for review July 4, 2026 20:10
@amtiYo
amtiYo merged commit 891450e into main Jul 4, 2026
6 checks passed
@amtiYo
amtiYo deleted the docs/core-db-refresh branch July 4, 2026 20:10
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.

1 participant