Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Newest first. `Unreleased` is what is on `main` and not yet tagged.

## Unreleased

**Before upgrading.** Four things change for an existing deployment:
**Before upgrading.** Five things change for an existing deployment:
- A hosted computer's browser is now headed by default. It uses a little more memory than headless
did; set `COMPUTER_BROWSER_MODE=headless` (Helm: `computers.browserMode: headless`) to keep the old
behaviour.
Expand All @@ -29,6 +29,11 @@ Newest first. `Unreleased` is what is on `main` and not yet tagged.
`OPENBOT_MEMORY_SOURCE_DEFAULTS=false` and `OPENBOT_PROACTIVE_DEFAULTS=false` (Helm: `config.memory.*`)
prevent it.

- Migration `0056_bot_scoped_memory_dedupe` rebuilds the Bot-memory dedupe index per Bot. A fact
one Bot remembered used to be swallowed as a duplicate when a second Bot formed it, leaving the
second Bot unable to recall it; each Bot now keeps its own row. The migration only rebuilds an
index and keeps every row.

### Fewer "Verify you are human" pages

Sites behind Cloudflare challenged a Bot's browser on sight, and opening one could restart the
Expand Down
2 changes: 2 additions & 0 deletions server/drizzle/0056_bot_scoped_memory_dedupe.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DROP INDEX "personal_memories_formed_digest_idx";--> statement-breakpoint

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Stage the dedupe index change across releases

During a Helm upgrade, a new content digest routed to an old server replica will fail after this drop: the chart runs migrations as a pre-upgrade hook while old replicas still serve (charts/openbot/templates/migrations/job.yaml:24-26), and those replicas issue ON CONFLICT (owner_user_id, import_digest) .... PostgreSQL cannot infer that conflict target from the replacement three-column index, so the insert errors instead of saving the memory; an atomic rollback leaves every rolled-back replica incompatible because the DB migration is not reverted. Stage the conflict/index change across releases so the old target remains valid until old replicas are gone.

Useful? React with 👍 / 👎.

CREATE UNIQUE INDEX "personal_memories_formed_digest_idx" ON "personal_memories" USING btree ("owner_user_id","formed_by_agent_id","import_digest") WHERE "personal_memories"."formed_by" = 'bot';
Loading