test: add receive display msglib smoke

This commit is contained in:
zhaoyilun
2026-07-10 08:24:08 +08:00
parent 298482c25d
commit 07d127c44a
5 changed files with 225 additions and 17 deletions

View File

@@ -2482,17 +2482,56 @@ Receive-message display-name enrichment result:
- Optional smoke may internally use real enriched IDs but should print only booleans/counts/source refs.
- Do not print entity values, message bodies, file paths, or raw rows.
- [ ] **Step 1: Add optional receive display smoke**
- [x] **Step 1: Add optional receive display smoke**
Use real MsgLib-enriched contact/group metadata internally to construct a synthetic encrypted PacketReader fixture and assert display fields are populated.
Extended `scripts/verify-msglib-mcp-enrichment.ps1` so it internally selects real MsgLib contact/group display metadata, constructs a synthetic encrypted PacketReader fixture, starts MCP with both MsgLib and packet-log env, and asserts `sender_name` plus `conversation.display_name` are populated. The final JSON prints only counts, booleans, and `msglib:<source_table>` refs.
- [ ] **Step 2: Run full and optional verification**
- [x] **Step 2: Run full and optional verification**
Run standard gate plus optional smoke with copied DB env.
Verified RED first: after adding the new PowerShell assertions, the old script failed with `receive display smoke should be true`. Verified GREEN with copied DB env: `receive_display_smoke=true`, `receive_message_count=2`, `receive_sender_name_populated=true`, `receive_conversation_display_populated=true`, `printed_entity_values=false`, `message_bodies_returned=false`, `file_paths_returned=false`, and `raw_rows_returned=false`.
- [ ] **Step 3: Update docs and commit**
- [x] **Step 3: Update docs and commit**
Record sanitized evidence and next loop.
Updated status, capability matrix, sidecar contract, and this plan. Commit/push are handled after the verification gate.
---
## Loop C33 Result
Optional real receive-message display smoke result:
- `scripts/verify-msglib-mcp-enrichment.ps1` now covers both search enrichment and receive-message display enrichment.
- The smoke internally uses real copied-DB MsgLib contact/group metadata to build a synthetic encrypted PacketReader fixture, then verifies MCP receive output populates `sender_name` and `conversation.display_name`.
- Printed evidence remains sanitized: counts, booleans, and `msglib:<source_table>` refs only.
- It does not print entity values, JIDs, message bodies, file paths, or raw rows.
---
## Loop C34: MsgLib enrichment operator runbook and setup smoke
**Goal:** Make the optional MsgLib enrichment path operator-usable by documenting the required environment variables, verification commands, safe output expectations, and fallback behavior when MsgLib env is absent.
**Planned files:**
- Modify: `docs/go-mcp-runbook.md`.
- Modify: `docs/current-status-card.md`, `docs/source-discovery/capability-source-matrix.md`, and this plan.
- Optionally modify verification scripts only if the runbook reveals a setup gap.
**Planned behavior:**
- Standard MCP verification stays deterministic and clears MsgLib env.
- Optional MsgLib enrichment remains opt-in through `ISPHERE_MSGLIB_SIDECAR_EXE`, `ISPHERE_MSGLIB_SQLITE_DLL`, and `ISPHERE_MSGLIB_DB`.
- Operator-facing docs must explain expected sanitized evidence and no-value output boundaries.
- [ ] **Step 1: Audit current runbook for MsgLib setup gaps**
Review `docs/go-mcp-runbook.md` against the C27-C33 implementation and note missing operator steps.
- [ ] **Step 2: Add operator setup and verification section**
Document build, env config, default deterministic verification, optional copied-DB smoke, and expected sanitized output.
- [ ] **Step 3: Run verification and update next loop**
Run the full gate, record C34 outcome, and choose the next business slice.
---