feat: add receive message reconciliation helper

This commit is contained in:
zhaoyilun
2026-07-11 00:38:06 +08:00
parent 57db83d36c
commit d94d0a318a
6 changed files with 252 additions and 8 deletions

View File

@@ -59,7 +59,7 @@ N13/N14/N15 are pre-business validation results. They can help identify UI eleme
## Current loop
Current loop: `R11 receive-file download preview contract complete`; next R12 receive-message reconciliation helper.
Current loop: `R12 receive-message reconciliation helper complete`; next R13 business goals smoke.
Active continuous execution plan: `docs/superpowers/plans/2026-07-10-r6f-r14-continuous-execution-plan.md`.
@@ -240,8 +240,8 @@ Continuous execution plan R6f-R14 is approved and execution has started:
- Plan file: `docs/superpowers/plans/2026-07-10-r6f-r14-continuous-execution-plan.md`.
- Scope: 15 ordered rounds covering send-message connector/gate hardening, send-file preview/idempotency/package, receive-file download preview, receive-message reconciliation, end-to-end business smoke, and release-candidate report.
- Execution rule after approval: one round at a time, status-card update, verification, commit, push, then continue automatically until an evidence-only blocker requires user action.
- Last completed round: R11 receive-file download preview contract.
- Next active round: R12 receive-message reconciliation helper.
- Last completed round: R12 receive-message reconciliation helper.
- Next active round: R13 business goals smoke.
R6g send audit and idempotency replay diagnostics is complete:
@@ -354,3 +354,13 @@ R11 receive-file download preview contract is complete:
- Both paths keep `file_contents_read=false`, `file_copied=false`, `real_download_attempted=false`, and `raw_paths_returned=false`; real file copy remains blocked.
- `scripts\verify-go-mcp.ps1` now asserts `receive_file_download_preview_blocked=true`.
- Next node: R12 receive-message reconciliation helper.
R12 receive-message reconciliation helper is complete:
- Added `internal/isphere/message_reconciliation.go` and `internal/isphere/message_reconciliation_test.go`.
- Strong match uses exact non-empty `message_id`; medium match uses same `conversation_id`, same `sender_id`, and timestamp within 3000 ms.
- Auto merge is recommended only when all records are strong matches with no unmatched or medium-only rows.
- Added `scripts\verify-receive-source-reconciliation.ps1 -UseFixture`, which outputs sanitized counts/booleans only.
- Fixture output: `strong_matches=1`, `medium_matches=1`, `unmatched_left=1`, `unmatched_right=1`, `auto_merge_recommended=false`, and `exact_fixture_auto_merge_recommended=true`.
- Default `isphere_receive_messages` routing is unchanged; `msglib_readonly` remains explicit only.
- Next node: R13 business goals smoke.