Skip to content

Persist Brain corpus for nightly synthesis - #1392

Merged
mrubens merged 2 commits into
developfrom
codex/filesystem-brain
Aug 16, 2026
Merged

Persist Brain corpus for nightly synthesis#1392
mrubens merged 2 commits into
developfrom
codex/filesystem-brain

Conversation

@mrubens

@mrubens mrubens commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

What changed

  • persist the Brain's Markdown corpus under /data/brain
  • configure gbrain's built-in synthesis and pattern phases to use that corpus
  • keep Postgres as the search index, extracted-fact store, and durable job backend
  • perform a clean one-time cutover by recreating only the isolated gbrain database and corpus, then relying on Roomote's existing client reprovisioning and collector backfill
  • install Git in the gbrain image for its filesystem maintenance phases
  • update public and Coolify operator documentation

Why

The Postgres-backed Brain had no configured filesystem corpus. Nightly maintenance could run database-only phases, but gbrain skipped synthesis and other filesystem phases because it had no Brain directory to read or write.

This gives gbrain the on-disk corpus its built-in maintenance expects without adding another database or a Roomote-specific synthesis implementation.

Impact

The first boot with this storage layout intentionally reinitializes an existing Postgres-only Brain. Roomote detects the missing scoped clients, resets its ingestion checkpoints, and repopulates completed tasks and connected integration sources. Later restarts preserve the corpus and database.

Validation

  • sh -n .docker/gbrain/entrypoint.sh
  • built the gbrain Docker image
  • booted it against a real Postgres/pgvector container and verified the layout initializes once across restarts
  • wrote a page through gbrain and verified the Markdown file appeared under /data/brain
  • mise exec -- pnpm --filter @roomote/docs check
  • mise exec -- pnpm deployment:validate
  • git diff --check

@roomote-community

roomote-community Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

No new code issues found. See task

  • Cutover can repeat after interrupted initialization (.docker/gbrain/entrypoint.sh:74).

Reviewed 8ede28f

Comment thread .docker/gbrain/entrypoint.sh
@mrubens
mrubens marked this pull request as ready for review August 16, 2026 05:33
@mrubens
mrubens merged commit 8229c76 into develop Aug 16, 2026
18 checks passed
@mrubens
mrubens deleted the codex/filesystem-brain branch August 16, 2026 05:33
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