memory: Phase A3 — drop agent_memories table + remove MEMORY_V2_CUTOVER shim #1792

Closed
opened 2026-05-24 09:13:21 +00:00 by hongming · 1 comment
Owner

Summary

Phase A3 of the v1→v2 memory migration: drop the agent_memories table and all code that references it. Closes the v1→v2 migration completely.

Gating

  • Phase A2 (#1791) completed: every active tenant has migrated rows from agent_memories into the v2 plugin.
  • 30-day soak window with zero v1-vs-v2 divergence incidents (no "agent says wrote, UI shows nothing" tickets, no v2-plugin downtime forcing fallback discussions).
  • No remaining code references agent_memories (verified via grep -r agent_memories workspace-server/).

Scope

  1. Migration to drop agent_memories table on every tenant DB (post-Phase A2 confirmation).
  2. Remove all dead-code references that survived A1: any column reads, struct definitions, test fixtures pinning the legacy shape.
  3. Remove the MEMORY_V2_CUTOVER env var deprecation shim from entrypoint-tenant.sh (the elif "$MEMORY_V2_CUTOVER" = "true" branch added in #1747) — only MEMORY_PLUGIN_URL should be left.
  4. Update controlplane ec2.go:2232 to drop the redundant MEMORY_V2_CUTOVER='true' line.

Earliest viable ship date

Phase A2 completion + 30 days. Realistically: ~30 days from when A2 ships, which itself is gated on operator availability. Don't pre-schedule; track via [#1791 closed] + calendar check.

Acceptance

  • agent_memories table no longer exists on any tenant DB.
  • grep -r agent_memories workspace-server/ docs/ returns zero hits (except historical comments referencing the migration).
  • MEMORY_V2_CUTOVER env var is gone from entrypoint-tenant.sh, controlplane ec2.go, and any documentation.
  • One full test cycle of every memory-related E2E test green.

Discovered during

Same as #1791 — multi-PR memory-system migration 2026-05-24.

## Summary Phase A3 of the v1→v2 memory migration: drop the `agent_memories` table and all code that references it. Closes the v1→v2 migration completely. ## Gating - [ ] Phase A2 (#1791) completed: every active tenant has migrated rows from `agent_memories` into the v2 plugin. - [ ] 30-day soak window with zero v1-vs-v2 divergence incidents (no "agent says wrote, UI shows nothing" tickets, no v2-plugin downtime forcing fallback discussions). - [ ] No remaining code references `agent_memories` (verified via `grep -r agent_memories workspace-server/`). ## Scope 1. Migration to drop `agent_memories` table on every tenant DB (post-Phase A2 confirmation). 2. Remove all dead-code references that survived A1: any column reads, struct definitions, test fixtures pinning the legacy shape. 3. Remove the `MEMORY_V2_CUTOVER` env var deprecation shim from `entrypoint-tenant.sh` (the `elif "$MEMORY_V2_CUTOVER" = "true"` branch added in #1747) — only `MEMORY_PLUGIN_URL` should be left. 4. Update controlplane `ec2.go:2232` to drop the redundant `MEMORY_V2_CUTOVER='true'` line. ## Earliest viable ship date Phase A2 completion + 30 days. Realistically: ~30 days from when A2 ships, which itself is gated on operator availability. Don't pre-schedule; track via [#1791 closed] + calendar check. ## Acceptance - [ ] `agent_memories` table no longer exists on any tenant DB. - [ ] `grep -r agent_memories workspace-server/ docs/` returns zero hits (except historical comments referencing the migration). - [ ] `MEMORY_V2_CUTOVER` env var is gone from `entrypoint-tenant.sh`, controlplane `ec2.go`, and any documentation. - [ ] One full test cycle of every memory-related E2E test green. ## Discovered during Same as #1791 — multi-PR memory-system migration 2026-05-24.
Author
Owner

Phase A3 complete — closing

PR #1809 merged as 4a610ca3c434. Image staging-4a610ca deployed to all 4 production tenants via RedeployTenant.

End-to-end verification on production (2026-05-24):

Tenant agent_memories (v1) memory_plugin (v2) Status
agents-team GONE 2,519 (grew +714 since A2 backfill)
hongming GONE 144
chloe-dong GONE 1
reno-stars GONE 102

agents-team continued to receive 200s from POST /workspaces/.../memories during the recycle — writes land in memory_plugin.memory_records. The 714-row growth on agents-team between A2 backfill (~10:30Z) and A3 deploy (~22:25Z) confirms that all interim writes went to v2.

The full v1→v2 memory migration (A1 → A2 → A3) is complete:

  • A1 (#1747): killed the v1 SQL fallback in MCP write paths
  • A2 (#1791#1794, #1795, #1796, #1798): migrated HTTP POST /memories writer to plugin + backfilled all 2,052 historical rows
  • A3 (this issue → #1809): dropped the v1 table + retired all legacy v1 surfaces

agent_memories no longer exists anywhere. v2 plugin is the only memory backend.

Closes

Closes #1792. Memory v1→v2 migration complete.

## Phase A3 complete — closing PR #1809 merged as `4a610ca3c434`. Image `staging-4a610ca` deployed to all 4 production tenants via `RedeployTenant`. End-to-end verification on production (2026-05-24): | Tenant | agent_memories (v1) | memory_plugin (v2) | Status | |---|---|---|---| | agents-team | **GONE** | 2,519 (grew +714 since A2 backfill) | ✅ | | hongming | **GONE** | 144 | ✅ | | chloe-dong | **GONE** | 1 | ✅ | | reno-stars | **GONE** | 102 | ✅ | agents-team continued to receive 200s from POST `/workspaces/.../memories` during the recycle — writes land in `memory_plugin.memory_records`. The 714-row growth on agents-team between A2 backfill (~10:30Z) and A3 deploy (~22:25Z) confirms that all interim writes went to v2. The full v1→v2 memory migration (A1 → A2 → A3) is complete: - **A1 (#1747)**: killed the v1 SQL fallback in MCP write paths - **A2 (#1791 → #1794, #1795, #1796, #1798)**: migrated HTTP POST /memories writer to plugin + backfilled all 2,052 historical rows - **A3 (this issue → #1809)**: dropped the v1 table + retired all legacy v1 surfaces `agent_memories` no longer exists anywhere. v2 plugin is the only memory backend. ### Closes Closes #1792. Memory v1→v2 migration complete.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#1792