feat: add file cache mapping diagnostic

This commit is contained in:
zhaoyilun
2026-07-10 09:52:34 +08:00
parent ea38346ce3
commit 5578f0bda7
6 changed files with 687 additions and 3 deletions

View File

@@ -29,7 +29,7 @@
| Search groups | Registered MCP tool; deterministic exact-match ranking and case-insensitive de-duplication across groupchat/conference candidates and optional copied-DB MsgLib display enrichment. | Optional member count, owner refs, and nested/group hierarchy remain future enrichment, not a core search blocker. | complete for core search; optional enrichment later |
| Receive messages | PacketReader source works; copied `MsgLib.db` explicit receive works with `source_preference="msglib_readonly"`; R1 precheck says default should remain PacketReader until a future reconciliation helper is implemented. | Future reconciliation helper, source confidence scoring, pagination policy. | future receive helper after R2/R3 |
| Send messages | Contract exists; no validated write connector. | Need connector discovery, preview-only path, idempotency and audit before production send. | R5 then R6 |
| Receive files | List mode exists from message-derived file metadata; R3 precheck confirms cache/download mapping is still unvalidated. | Need sanitized cache mapping diagnostic before output-dir download behavior. | R3b then R4 if validated |
| Receive files | List mode exists from message-derived file metadata; R3/R3b confirm DB file metadata exists but current cache/archive evidence does not map to local files. | R4 download is blocked until better cache evidence or a UI/client download connector is available. | blocked; continue R5 |
| Send files | Contract exists; no validated upload/send connector. | Depends on send-message connector plus upload/file-transfer evidence. | R7 then R8 |
## Node Sequence
@@ -259,6 +259,15 @@ powershell -NoProfile -ExecutionPolicy Bypass -File scripts\verify-go-mcp.ps1
**Stop condition:**
- If no unique/repeatable cache mapping exists, do not implement R4 download mode.
**R3b Result:**
- Added `scripts/verify-file-cache-mapping.ps1` and `scripts/test-verify-file-cache-mapping.ps1`.
- Created `docs/source-discovery/2026-07-10-file-cache-mapping-diagnostic.md`.
- Real sanitized diagnostic checked 166 `TD_ReceiveFileRecord` rows and 11 ignored cache/archive candidates.
- Match counts were all zero: filename-only, filename+size, unique filename+size, and source-id-to-hash-dir.
- Safety booleans stayed false for raw paths, file contents, file paths returned, raw rows, and message body printing.
- Decision: R4 remains blocked; continue the broader roadmap at R5 send-message connector discovery.
---
### R4: Receive-file download implementation