Files
Agent-System/deploy/postgres/archive/pre-goose/2026-09-09-uq-context-memory-chunk-hash.sql
T
weichenandCursor 265f09c1f2 fix(server): cache health probes, surface SSE marshal errors, fail closed on missing duties
Health checks reuse a two-second snapshot and bound the schema query. Task SSE writes an error frame when an event cannot be encoded. ResolveDocTask errors when the frozen plan has no duty row, while explicit none-duties stay zero. Drop the unwired semantic-summary replace env, record the intentional dev versus release model split, document the test/main cutover path, and archive pre-goose SQL.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-19 09:16:18 +00:00

15 lines
506 B
SQL

-- 修复 IndexApprovedDocument: ON CONFLICT (chunk_hash) 需要唯一约束
DELETE FROM context_memory_chunks a
USING context_memory_chunks b
WHERE a.chunk_hash IS NOT NULL
AND a.chunk_hash <> ''
AND a.chunk_hash = b.chunk_hash
AND a.id > b.id;
UPDATE context_memory_chunks
SET chunk_hash = 'legacy_empty_' || id::text
WHERE chunk_hash IS NULL OR chunk_hash = '';
DROP INDEX IF EXISTS idx_mem_chunks_hash;
CREATE UNIQUE INDEX IF NOT EXISTS uq_mem_chunks_hash ON context_memory_chunks(chunk_hash);