Damus
JeffG · 3w
Building high quality software on decentralized protocols is the hardest of hard modes. If you’re out there building on hard mode I want to follow you. Tell me about your project. πŸ‘‡
Alan profile picture
## Summary of Your Open Brain Thoughts (15 total, 3/20-3/21/2026)

### 🎯 Current Status: White Noise / MLS Integration **COMPLETE**

The Marmot ingest service is now fully operational with end-to-end success confirmed:
- Receives and processes Welcome gift wraps
- Joins MLS groups with dual engine support (legacy + upstream)
- Decrypts messages via upstream fallback
- Successfully stores thoughts to Supabase

---

### πŸ“Š Project History & Vision

**Open Brain Origins:** A privacy-first personal knowledge system built on self-hosted infrastructure (Supabase, pgvector, MinIO) with private AI processing via Maple-Proxy. Goal: create a self-hosted memory system that AI assistants can use without third-party ownership of personal context.

**The Sovereign Shift:** Moved from Slack-first capture to sovereign messaging because Slack conflicted with ownership, privacy, and anti-platform goals. Marmot + White Noise now provide the intended replacement: Nostr relays for distribution, MLS for encrypted groups, Open Brain as the storage layer.

---

### πŸ”§ Technical Blockers Resolved (7 Major Issues)

1. **Subscription filter fix** – Split Nostr filters to prevent AND-ing issues
2. **Welcome replay dedupe** – By gift-wrap and welcome IDs
3. **Removed unsafe e-tag fallback** – No longer used for group identity
4. **Synthetic group IDs** – Derived from Welcome content hashes
5. **Broad kind 445 discovery** – Time-bounded lookback for synthetic groups
6. **Synthetic-to-authoritative aliasing** – With sender-prefixed heuristic
7. **Upstream MLS decryption** – Via dual-fallback mode with 3 critical bug fixes

---

### πŸ› Critical Bugs Fixed (2026-03-20)

- **mls-engine.ts**: State hydration results now properly returned
- **handleGiftWrap**: Now registers BOTH synthetic and upstream group IDs immediately
- **aliasSyntheticGroupToObservedGroupId**: Extended to handle upstream engine group ID aliasing for Android's evolved group IDs

---

### βš™οΈ Configuration & Deployment

Helm charts updated with:
- `mlsEngineMode: dual-fallback`
- `upstreamAdapterOptionsJson` with bootstrapKeyPackage and requestMaxWaitMs
- Cross-namespace DNS fixed using FQDN `supabase-kong.supabase:8000`
- Kubernetes namespace isolation (`namespace: marmot`)

---

### πŸš€ Future Priorities (3 Tiers)

**Priority 1 – State Persistence:**
- Persist activeGroups/alias state to Supabase
- Restore on startup
- Define replay/rejoin recovery strategy

**Priority 2 – Operational Improvements:**
- Reduce log noise
- Add structured metrics
- Group-to-name reconciliation
- Deeper MLS integration tests

**Priority 3 – Optional:**
- Service extraction only if scaling/isolation needs require it

---

### πŸ› οΈ Developer Tooling

- **`scripts/capture-open-brain-context.mjs`** – Reusable script to persist project context via MCP capture_thought tool
- **`scripts/query-open-brain.mjs`** – Query stored thoughts via command line
- Documentation refreshed: AGENT.md, README, PLAN-marmot-openbrain.md, plus specialized guides (MIPS, DEBUG, WHITENOISE_ANDROID)

---

### πŸ“ˆ Healthy White Noise Progression

```
Welcome gift wrap β†’ Synthetic join β†’ Broad kind 445 discovery
β†’ h-tag observed β†’ Alias/rebind β†’ Group match: YES
β†’ MLS decryption β†’ Thought stored
```

---

### πŸ’‘ Key Decisions

- **Service boundaries:** Continuing inside `services/marmot-ingest` rather than splitting into a separate service – protocol depth was the real blocker, not abstraction layers
- **Dual-fallback mode:** Enabled by default for maximum compatibility with both legacy and upstream MLS engines