Commit Graph

11 Commits

Author SHA1 Message Date
James bec54e9754 pop-sync: main + main_ca updates
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 12:11:08 -04:00
James 5cf089a58e Multi-project update: import system, edition system, web UI, CLI, website, POP sync
Vault: importer refactor with mapping-driven parsers, auth.js login flow,
edition system enhancements (commercial features), agent UI fixes,
mTLS improvements, schema and handler updates.

CLI: cvt protocol updates, keystore changes, JS bridge additions.

Website (clavitor.ai): expanded main.go with new routes/templates,
admin panel with Paddle checkout and credentials API.

POP sync: mTLS CA support, command examples.

Marketing: pricing architecture doc.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 06:40:40 -04:00
James 7fca22b130 Replication v2: Active-Passive with Async Sync (Commercial Only)
Implements Johan's design:
- Primary POP (e.g., Calgary) replicates writes to Backup POP (e.g., Zurich)
- Backup serves READ-ONLY traffic when primary fails
- Same wire format preserved for replication
- Async, non-blocking replication with queue + retry

Database Schema:
- Added replication_dirty BOOLEAN column to entries table
- Index idx_entries_dirty for fast dirty entry lookup
- EntryMarkDirty() - mark entry needing replication
- EntryMarkReplicated() - clear dirty flag on ACK
- EntryListDirty() - get pending entries (fast path)

Commercial-Only Files:
- edition/replication.go - core replication queue/worker
- edition/backup_mode.go - backup mode detection, write rejection
- edition/commercial.go - wire up IsBackupMode, IsBackupRequest

Backup Mode:
- CLAVITOR_BACKUP_MODE env var sets backup mode
- BackupModeMiddleware rejects writes with 503
- X-Primary-Location header tells client where primary is
- IsBackupMode() and IsBackupRequest() edition functions

Community:
- No replication functionality (privacy-first, single-node)
- IsBackupMode() always returns false
- StartReplication() is no-op

Documentation:
- SPEC-replication.md - full design specification
2026-04-02 00:50:20 -04:00
James f5f852fe40 rebrand: rename vault1984 references to clavitor in Makefile and pop-sync (C-005) 2026-03-29 07:16:12 -04:00
James 35c9e106b5 chore: auto-commit uncommitted changes 2026-03-28 06:01:23 -04:00
James fc9f49bf18 chore: auto-commit uncommitted changes 2026-03-27 06:03:32 -04:00
James 27c26c03b3 chore: auto-commit uncommitted changes 2026-03-26 18:03:10 -04:00
James 14b6079a61 chore: auto-commit uncommitted changes 2026-03-26 12:01:24 -04:00
James 0922dde30a chore: auto-commit uncommitted changes 2026-03-26 06:03:15 -04:00
James cb7c7c51ce chore: auto-commit uncommitted changes 2026-03-26 00:01:24 -04:00
James 55699985ae chore: auto-commit uncommitted changes 2026-03-25 06:04:04 -04:00