feat: add send message preview contract
This commit is contained in:
@@ -28,9 +28,9 @@
|
||||
| Search contacts | Registered MCP tool; deterministic exact-match ranking and case-insensitive de-duplication across log/JID candidates and optional copied-DB MsgLib display enrichment. | Optional richer fields such as department/title remain future enrichment, not a core search blocker. | complete for core search; optional enrichment later |
|
||||
| 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; R6a/C31 read-only preflight confirms B-route entrypoint metadata and A-route UIA/offline-state classifier support, but not production send. | Need preview/dry-run contract, idempotency/audit, dynamic observation, and one approved sandbox send before production. | next R6b B-route preview/dry-run contract |
|
||||
| Send messages | `isphere_send_message` preview/dry-run is registered; R6a confirms B-route entrypoint metadata and A-route UIA/offline-state classifier support. | Need dynamic observation and one approved sandbox send before production. | next R6c online sandbox-send evidence gate |
|
||||
| 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; R6a/C31 metadata confirms file-upload/offline-file/file-message candidates and A-route file menu classifier support. | Blocked behind send-message preview/dry-run plus upload/file-transfer dry-run and sandbox evidence. | wait for R6b, then file-send upload preflight |
|
||||
| Send files | Contract exists; R6a/C31 metadata confirms file-upload/offline-file/file-message candidates and A-route file menu classifier support. | Blocked behind send-message sandbox evidence plus upload/file-transfer dry-run. | wait for R6c, then file-send upload preflight |
|
||||
|
||||
## Node Sequence
|
||||
|
||||
@@ -439,11 +439,46 @@ powershell -NoProfile -ExecutionPolicy Bypass -File scripts\verify-go-mcp.ps1
|
||||
**Stop condition:**
|
||||
- If target refs cannot be represented without raw local evidence values, stop and add a target-ref design note before coding production-facing arguments.
|
||||
|
||||
**R6b Result:**
|
||||
|
||||
- Added preview-only `isphere_send_message` in `internal/tools/isphere_send_message.go`.
|
||||
- Registered the tool in `internal/mcpserver/server.go`.
|
||||
- Added TDD tests proving preview returns `send_status="planned"` with no raw content leak, production returns `send_status="blocked"` with no side effects, and content hash mismatch is rejected.
|
||||
- Updated `scripts/verify-go-mcp.ps1` to verify the 9-tool MCP surface, send preview behavior, and `production_send_enabled=false`.
|
||||
- Preview audit appends JSONL through `ISPHERE_SEND_AUDIT_PATH` or the default ignored `runs/send-audit/send-message-preview.jsonl` path. Audit stores content hash and idempotency-key hash, not raw body or raw key.
|
||||
- Decision: next node is R6c online sandbox-send evidence gate. Production send and send-file remain blocked.
|
||||
|
||||
---
|
||||
|
||||
### R6c: Online sandbox-send evidence gate
|
||||
|
||||
**Purpose:** Collect or prepare the minimum online sandbox evidence needed before enabling any production send path.
|
||||
|
||||
**Files:**
|
||||
- Create or modify: `docs/source-discovery/2026-07-10-send-sandbox-gate.md`
|
||||
- Modify optional recorder/helper scripts only if a non-mutating or operator-approved sandbox-send evidence package is required.
|
||||
- Modify docs: this roadmap, `docs/current-status-card.md`, and `docs/source-discovery/capability-source-matrix.md`.
|
||||
|
||||
**Evidence required:**
|
||||
- One explicit sandbox target only.
|
||||
- One content hash only.
|
||||
- One idempotency key only.
|
||||
- Observed success/ack or local sent-record evidence.
|
||||
- Duplicate retry with the same idempotency key is rejected locally.
|
||||
- Captured evidence contains method names, argument shape, IDs/hashes, status booleans, and refs only; no raw message body needs to be committed.
|
||||
|
||||
**Acceptance gate:**
|
||||
- A clear decision says whether production `isphere_send_message` can start, remains blocked, or needs a new online package.
|
||||
- No production send behavior is enabled by this node unless the evidence gate has passed.
|
||||
|
||||
**Stop condition:**
|
||||
- If the environment cannot log in or cannot use a sandbox target, stop and request a returned sandbox evidence package rather than implementing production send.
|
||||
|
||||
---
|
||||
|
||||
### R6: Send-message preview and production path
|
||||
|
||||
**Purpose:** Implement production `isphere_send_message` after R6b preview/dry-run exists and a later approved sandbox-send gate proves success/ack behavior.
|
||||
**Purpose:** Implement production `isphere_send_message` after R6c proves success/ack behavior.
|
||||
|
||||
**Files:**
|
||||
- Create or modify: `internal/tools/isphere_send_message.go`
|
||||
|
||||
Reference in New Issue
Block a user