feat: add receive file download preview contract

This commit is contained in:
zhaoyilun
2026-07-11 00:31:33 +08:00
parent 6164703a9a
commit 57db83d36c
6 changed files with 314 additions and 22 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: `R10a returned send-sent record diagnostic intake complete`; next R11 receive-file download preview contract.
Current loop: `R11 receive-file download preview contract complete`; next R12 receive-message reconciliation helper.
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: R10a returned send-sent record diagnostic intake.
- Next active round: R11 receive-file download preview contract.
- Last completed round: R11 receive-file download preview contract.
- Next active round: R12 receive-message reconciliation helper.
R6g send audit and idempotency replay diagnostics is complete:
@@ -344,3 +344,13 @@ R10a returned send-sent record diagnostic intake is complete:
- Both packages also report `exact_content_seen_after=false`, `content_sha256_seen_after=false`, `after_offline_blocked=true`, `strict_send_record_pass=false`, and `production_send_unlock_recommended=false`.
- Decision: production `isphere_send_message` remains blocked; the packages are useful manual evidence but not enough to open the send gate.
- Next node: R11 receive-file download preview contract.
R11 receive-file download preview contract is complete:
- Added `file_ref` to `isphere_receive_files` download args and introduced a download resolver boundary for tests/future mapping.
- `mode="download"` with `preview=true` now returns structured content instead of a generic tool error.
- Without an accepted mapping, response is `ok=false`, `download_status="blocked"`, and `blocked_reason_code="file_cache_mapping_missing"`.
- With an injected fixture mapping, response is `ok=true`, `download_status="planned"`, `mapping_source`, and `matched_score`.
- 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.