KB-535D
GPT Review — OGV P0 Fix Prompt
3 min read Revision 1
gpt-reviewogv-p0soft-deletevector-resurrectionagent-fixlegacy-vector
GPT Review — OGV P0 Fix Prompt
Date: 2026-05-03
Verdict
OGV P0 Fix Prompt is directionally correct and may proceed after one mandatory safety tightening pass. It correctly treats P0-1/P0-2/P0-3 as one end-to-end semantic-delete bug across API → PG trigger → listener → Qdrant.
Must-fix before dispatch
- Remove or soften the instruction to run
git add -A && git commitbefore any patch. A pre-fix snapshot should be read-only/non-invasive if possible: recordgit status,git rev-parse HEAD, and archive/copy changed files. Commit only if repository policy explicitly allows and User approves. - Do not require creating a test document in production without a stricter test namespace and cleanup rule. Use a clearly isolated path such as
test/ogv-p0/..., and ensure test docs are cleaned after PASS. If production test document creation is not approved, use staging or a dry-run/unit test harness. - Avoid forcing
docker restartunless code reload requires it. Agent must first determine service reload behavior and choose the least disruptive reload. Restart is allowed only if necessary and explicitly reported. - Add a smoke test for API search/RAG after patch: normal KB search must still return expected results from
production_documents. - Clarify that cleanup of the 47 known orphan vectors must be performed only after backup and after prevention patch PASS. The cleanup method must be dry-run/list-first, then delete exactly the approved orphan IDs.
- Phase 4 must not use broad filter deletes without reviewed ID list. Deleting by
deleted_at/status indirectly is forbidden; delete only vectors whosedocument_idis in the approved orphan list. - Trigger patch must preserve existing skip filters for comments/registries/empty/too-short documents.
- Listener patch must be idempotent: missing PG row, deleted row, or deleted status all route to vector delete/no-op; active row routes to upsert.
- Report must include before/after counts for all three classes: orphan bug, ghost bug, correct-behavior ghost.
Dispatch condition
After Opus applies the tightening above, dispatch is approved. No further architecture discussion is needed.
Next directive to Opus
Produce OGV-P0 Fix Prompt v0.2 with the nine refinements above, then present the final prompt for dispatch. Do not execute directly.