# Hosted OpenBrain Execution Tracker

This tracker is the live companion to the hosted migration checklist.
Use it to mark progress as each step is completed.

## Current status summary

| Area | Status | Notes |
|---|---|---|
| Local bridge (`openbrain-bridge`) | completed | Live in Hermes profile `5-5` |
| Hosted Supabase/OpenBrain backend | pending | Not yet provisioned |
| Hosted credentials | pending | Need project access details |
| MCP cutover | pending | Will happen after hosted verification |
| Rollback path | ready | Local bridge remains the safety rail |

## Hosted credentials needed

These are the likely access items required to build the hosted backend.
If your eventual hosted setup differs, this list can be edited.

### Suggested source of truth

Keep these in a local, uncommitted `.env` file somewhere in your workspace or project directory.
The tracker should reference the env var names, not the secret values themselves.

### Credentials received (check off once present in `.env`)

- [ ] `SUPABASE_URL`
- [ ] `SUPABASE_ANON_KEY`
- [ ] `SUPABASE_SERVICE_ROLE_KEY` or equivalent admin secret
- [ ] `DATABASE_URL` for the hosted Supabase PostgreSQL database, or a direct DB password if your migration tooling needs it
- [ ] `OPENBRAIN_MCP_URL` or hosted MCP endpoint URL
- [ ] `OPENBRAIN_MCP_TOKEN` or bearer token
- [ ] `OPENBRAIN_BASE_SCHEMA` export or path, if using a schema file
- [ ] `OPENAI_API_KEY` or `OPENROUTER_API_KEY` if the hosted backend creates embeddings
- [ ] `SUPABASE_JWT_SECRET` if auth/token verification is part of the hosted design

### Notes

- A local `.env` file is fine for this stage.
- Do not commit the file.
- Once the vars exist, we can load them into the hosted setup scripts or Hermes profile as needed.

### Quick glossary

- `SUPABASE_URL` — the hosted Supabase project URL.
- `SUPABASE_ANON_KEY` — public/client key for the project.
- `SUPABASE_SERVICE_ROLE_KEY` — admin key for migrations/imports.
- `DATABASE_URL` — the hosted Postgres connection string.
- `OPENBRAIN_MCP_URL` — remote MCP endpoint for the hosted memory layer.
- `OPENBRAIN_MCP_TOKEN` — auth token for that MCP endpoint.
- `OPENBRAIN_BASE_SCHEMA` — path or export for the base OpenBrain schema.
- `OPENAI_API_KEY` / `OPENROUTER_API_KEY` — embedding provider key, if needed.
- `SUPABASE_JWT_SECRET` — only if auth/token verification is part of the design.

## Phase tracker

### Phase 1 — Create the hosted backend

| Item | Status | Evidence / Notes |
|---|---|---|
| Create the Supabase project | pending | Awaiting credentials |
| Confirm PostgreSQL + pgvector support | pending | To verify after project creation |
| Create or import the OpenBrain base schema | pending | Use hosted migration checklist |
| Verify the canonical `thoughts` table exists | pending | |
| Confirm storage of content, embedding, metadata, timestamps | pending | |

### Phase 2 — Apply Bert-specific metadata discipline

| Item | Status | Evidence / Notes |
|---|---|---|
| Apply metadata indexes | pending | `docs/openbrain-bert-supabase-extension.sql` |
| Create/confirm `bert_memory_candidates` | pending | |
| Create/confirm `bert_approved_memories` | pending | |
| Confirm metadata key support | pending | See checklist |
| Confirm dedup strategy | pending | |

### Phase 3 — Import approved memory first

| Item | Status | Evidence / Notes |
|---|---|---|
| Import approved memory set | pending | Source: `approved-memory/install-batch-proposed.jsonl` |
| Preserve provenance | pending | Must carry source paths / chunk IDs |
| Keep source-only evidence out of default durable memory | pending | |
| Validate imported row count | pending | |
| Confirm approved items render correctly | pending | |

### Phase 4 — Expose the MCP contract

| Item | Status | Evidence / Notes |
|---|---|---|
| Expose hosted MCP access layer | pending | |
| Preserve tool names or create thin aliases | pending | |
| Verify supported tools | pending | status/search/list/get/source/review |
| Confirm Hermes can discover hosted tools | pending | |

### Phase 5 — Cut Hermes over cleanly

| Item | Status | Evidence / Notes |
|---|---|---|
| Add hosted backend as second server or replacement | pending | |
| Keep local bridge intact during verification | ready | Do not remove until verified |
| Switch Hermes transport to hosted endpoint | pending | |
| Confirm active profile points at hosted endpoint | pending | |
| Document the exact repointing step | in_progress | Migration docs already drafted |

### Phase 6 — Verify retrieval quality

| Item | Status | Evidence / Notes |
|---|---|---|
| Search known writing-voice item | pending | |
| Search known Barely, But Here item | pending | |
| Search known AI Systems Assessment item | pending | |
| Confirm provenance displayed correctly | pending | |
| Confirm approved vs source-only boundaries | pending | |
| Confirm sensitivity handling | pending | |
| Compare against local bridge reference | pending | |

### Phase 7 — Rollback safety

| Item | Status | Evidence / Notes |
|---|---|---|
| Keep local bridge config intact | ready | `openbrain-bridge` is live now |
| Preserve archive index and reviewed artifacts | ready | Source of truth remains local |
| Repoint Hermes back if hosted backend misbehaves | ready | |
| Verify rollback restores previous state | pending | |

### Phase 8 — Document the repeatable process

| Item | Status | Evidence / Notes |
|---|---|---|
| Record final hosted setup steps | in_progress | This tracker is part of that record |
| Record repointing step | in_progress | |
| Record rollback step | in_progress | |
| Record predicted vs actual tuning | in_progress | Use pre/post status docs |
| Record first-week maintenance cadence | in_progress | See maintenance schedule |
| Capture metrics, assessment, suggestions | in_progress | See report template |
| Update registry / project ledger | completed | `docs/project-registry.md` |

## Evidence links

- `docs/openbrain-hosted-migration-path.md`
- `docs/openbrain-hosted-migration-manifest.json`
- `docs/hosted-openbrain-supabase-implementation-checklist.md`
- `docs/current-memory-status-pre-install.md`
- `docs/current-memory-status-post-install.md`
- `docs/openbrain-hermes-install-path.md`
- `mcp/openbrain_bridge.py`
- `.venv-openbrain/`

## Notes for future repeats

- Keep the local bridge until the hosted backend is verified.
- Treat the checklist as the authoritative order of operations.
- If the backend changes tool names, add thin aliases instead of changing the workflow.
- Log what was expected to need tuning versus what actually needed tuning.
- Use the maintenance report template to make the data useful for decisions, not just measurements.
