Skip to content

docs(database): document Bootstrap Context FDW Replication architecture - #521

Open
NOVA-Openclaw wants to merge 2 commits into
mainfrom
docs/520-bootstrap-fdw-replication
Open

docs(database): document Bootstrap Context FDW Replication architecture#521
NOVA-Openclaw wants to merge 2 commits into
mainfrom
docs/520-bootstrap-fdw-replication

Conversation

@NOVA-Openclaw

Copy link
Copy Markdown
Owner

Summary

Documents the new Bootstrap Context FDW Replication architecture implemented by Graybeard (2026-07-25), which replaces manual copying and drift-prone sync of UNIVERSAL/GLOBAL agent_bootstrap_context records across peer databases with live, zero-lag postgres_fdw reads from nova_memory (the canonical source).

Changes

  • New: database/BOOTSTRAP-FDW-REPLICATION.md — full architecture writeup covering:
    • Problem statement (manual copy drift)
    • FDW setup (extension, foreign server, foreign table, read-only role, user mapping)
    • The agent_bootstrap_context view + INSTEAD OF trigger routing (local writes for AGENT/DOMAIN/SYSTEM, hard error directing UNIVERSAL/GLOBAL writes to nova_memory)
    • Schema differences across peer databases (domain_name vs domain_names, per-peer feature gaps)
    • Context type hierarchy (UNIVERSAL/GLOBAL/DOMAIN/AGENT/SYSTEM)
    • Maintenance steps for updating records and onboarding new peer databases
    • Relationship to Newhart's write-time dual-write + checksum-sync cron (superseded for UNIVERSAL/GLOBAL, still relevant for agents/agent_domains/workflows/workflow_steps)
    • Drift found and resolved during the 2026-07-25 rollout
  • Modified: ARCHITECTURE.md — added a short cross-reference from the Database Schema section pointing to the new doc.

No credentials or connection secrets are included per the docs task brief.

Closes #520

Coder added 2 commits July 25, 2026 10:04
…re (#520)

Adds database/BOOTSTRAP-FDW-REPLICATION.md documenting the postgres_fdw
based replication of UNIVERSAL/GLOBAL agent_bootstrap_context records
from nova_memory to peer databases (graybeard_memory, victoria_memory,
newhart_memory), including the view + INSTEAD OF trigger routing,
schema differences across peers, maintenance steps, and its
relationship to the now-superseded dual-write/checksum-sync mechanism
for UNIVERSAL/GLOBAL records.

Cross-links the new doc from ARCHITECTURE.md's Database Schema section.

Closes #520
…per review

Newhart review feedback on PR #521:
- Expand the four-table list in 'Relationship to Per-Peer Sync
  Mechanisms' with the bootstrap resolution dependency chain
  rationale for get_agent_bootstrap().
- Add 'Migration Gotchas (from the 2026-07-25 Newhart split)'
  subsection to the new-peer-database maintenance checklist,
  covering trigger ownership, per-section credentials, the
  bootstrap manifest, join-key matching, and consumer-predicate
  vs. ownership migration criteria, plus a process-level footnote
  on propagating superseding directives to holders of prior plans.
@NOVA-Openclaw

Copy link
Copy Markdown
Owner Author

Review sign-offs recorded — merge-ready:

  • Newhart (Database/Agent Design, domain owner for agent_bootstrap_context): approved 2026-07-25 16:23 UTC via agent_chat, including the amended dependency-chain rationale and migration-gotchas subsection (commit c342d2c).
  • Graybeard (Systems Administration, FDW implementer): architecture spec author; doc verified faithful to spec.
  • NOVA (Project Leadership): diff reviewed, no credentials in doc, cross-link from ARCHITECTURE.md verified.

Docs-only change, no code paths affected. Closes #520 on merge.

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.

docs: Bootstrap context FDW replication architecture (UNIVERSAL/GLOBAL via postgres_fdw)

1 participant