KB-65F3

OGV-2A — Minimal Evidence Before Cleanup

6 min read Revision 1
ogv-2aevidencecleanupvector-hygiene2026-05-07

OGV-2A — Minimal Evidence Before Cleanup

Date: 2026-05-07 Author: Opus (Claude Desktop) Status: GATE 1 — Evidence collected, ready for Gate 2


Method

  • API existence: get_document(document_id) cho từng item
  • Content: đọc trực tiếp qua API
  • Qdrant presence: search_knowledge() với query matching content — nếu item xuất hiện trong search results → Qdrant YES
  • Phân loại: dựa trên 10 phiên conversation history (S109–S192) + KB reports (OGV-0, OGV-P0, 20B series)
  • Timestamps: không truy cập PG trực tiếp từ Claude Desktop (cần agent SSH). Ước lượng dựa trên session timeline.

Evidence Table

# document_id API tồn tại Content summary Length Qdrant presence Loại Nguồn sinh Đề xuất
1 test/ogv-p0/1777811527-active YES "OGV P0 second doc kept active" x8 lần ~300 chars YES — top hit cho "OGV P0 test" B OGV-P0 test Phase 3 TEST-1 (S190, 03/05). Prompt yêu cầu tạo test doc nhưng cleanup chỉ ghi "xoá test docs sau khi PASS" — agent không thực hiện teardown DELETE
2 test/ogv-p0/1777811627-active YES "OGV P0 second doc kept active" x8 lần ~300 chars YES — top hit B Cùng nguồn #1 DELETE
3 test/ogv-p0/1777811733-active YES "OGV P0 second doc updated body content" x8 lần ~350 chars YES — top hit B Cùng nguồn #1, thêm tag [patched] — là doc được update trong TEST-7 DELETE
4 inline-dde0b40d-4d95-4232-9179-4bfd20105cf2 YES Chỉ chứa file:///Users/nmhuyen/.gemini/tmp/web-test/tool-outputs/session-2781fb64.../mcp_agent-data_get_document_for_rewrite_1773930499195_0.txt ~170 chars YES — hit khi search "gemini tmp" B Gemini CLI session tạo inline doc khi gọi get_document_for_rewrite. Write path API không validate content DELETE
5 test-file-creation.md YES "test content" ~12 chars Likely YES (short content, có thể ghost nếu dưới threshold) B Test tạo file thời S109-S114 để verify API upload DELETE
6 test/conn-audit-moved YES Empty (chỉ có title header) ~20 chars Likely ghost (empty body) B Artifact di chuyển từ S170 audit. Content rỗng = stub DELETE
7 test/f1-moved YES Empty (chỉ có title header) ~10 chars Likely ghost (empty body) B Tương tự #6 DELETE
8 knowledge/test/phase2-api-check YES "phase2 api test" ~15 chars YES — hit trong search B Test API từ thời S109 DELETE
9 mission-count-verify-report YES Report S111, 3737 chars, PR #491, COMPLETE ~3700 chars YES — hit khi search "mission count" C Report hợp lệ từ S111 (2026-03-12), lưu sai path (root thay vì knowledge/current-state/reports/) MOVEknowledge/current-state/reports/legacy-misplaced/
10 mission-registry-pg-report YES Report S108, 673 chars, PR #490, COMPLETE ~670 chars YES — hit khi search "registry PG" C Report hợp lệ từ S108 (2026-03-12), lưu sai path MOVEknowledge/current-state/reports/legacy-misplaced/

Local path files (GPT flag)

document_id API tồn tại Qdrant presence Đánh giá
/Users/nmhuyen/Documents/Manual Deploy/web-test/hien-phap-full.md NO — get_document trả "not found" Không xuất hiện trong search Có thể đã bị xóa hoặc chỉ tồn tại trong list_documents metadata. NO-OP — không cần hành động
/Users/nmhuyen/Documents/Manual Deploy/web-test/test-absolute.md Chưa kiểm (likely NO) Không xuất hiện trong search Tương tự trên. NO-OP

Tổng kết phân loại

Loại Số lượng Hành động
A (rác mới sau cleanup) 0
B (tồn dư bị bỏ sót) 8 DELETE
C (giá trị, sai path) 2 MOVE
D (stale vector payload) 0

Root cause cho từng nhóm

Nhóm OGV test (#1-3): Prompt OGV-P0 Fix v0.2 (S190) Phase 3 tạo test docs tại test/ogv-p0/*. Bước cuối ghi "Cleanup test data: Sau test PASS, xoá test docs." nhưng agent không thực hiện. Root cause = thiếu bước teardown bắt buộc trong prompt + không có enforcement tự động.

Inline orphan (#4): Gemini CLI gọi get_document_for_rewrite → hệ thống tạo inline document chứa đường dẫn temp file local. Root cause = API upload không validate content chứa local file path.

Legacy test files (#5-8): Artifacts từ phiên S109-S114 (tháng 3/2026) khi đang build Agent Data API. Cleanup lúc đó tập trung vào vector orphan (TD-131 = 137 orphan) mà bỏ sót test docs trong KB.

Misplaced reports (#9-10): Reports hợp lệ từ S108/S111 nhưng upload vào root path thay vì knowledge/current-state/reports/. Lỗi path convention thời đầu, trước khi có chuẩn folder structure.


Xác nhận

  • Không có item nào thuộc Category A (sinh mới sau cleanup 05/05)
  • 47 orphan vectors đã được fix bởi OGV-P0 (listener guard + trigger semantic DELETE)
  • 1.175 context-pack đã purge sạch (20B-P3 report: count=0)
  • Rác hiện tại = tồn dư bị bỏ sót bởi các cleanup trước đó

OGV-2A Evidence | 2026-05-07 | Gate 1 PASS | Ready for Gate 2

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/reports/ogv-2a-minimal-evidence-before-cleanup-2026-05-07.md