Phase: Fix embedding dimension mismatch (768 → 2560)

phase-pal-e-docs-5a-embedding-dimension-fix Phase

phase
Goal: Fix vector dimension mismatch so embedding worker can store qwen3-embedding:4b output (2560-dim) in pgvector column.
Owner: Dev agent
Repo: forgejo_admin/pal-e-docs
Depends on: phase-pal-e-docs-activate-semantic-search (parent — worker is deployed but erroring)

Problem

The blocks.embedding column is vector(768) but qwen3-embedding:4b now produces 2560-dim vectors. The model was likely updated upstream since Phase 6a verification. Worker logs show: expected 768 dimensions, not 2560. All blocks are marked as error status.

Fix

  • Alembic migration: ALTER TABLE blocks ALTER COLUMN embedding TYPE vector(2560)
  • Update any code/config that hardcodes 768 (search for 768 in models, schemas, tests)
  • Reset errored blocks back to pending: UPDATE blocks SET embedding_status = 'pending' WHERE embedding_status = 'error'
  • Verify worker starts processing successfully after deploy
  • phase-pal-e-docs-activate-semantic-search — parent phase
  • plan-pal-e-docs — grandparent plan