From caa7649febbdb197bdc450357e9cafde51f415a2 Mon Sep 17 00:00:00 2001 From: zhaoyilun Date: Sat, 11 Jul 2026 00:42:45 +0800 Subject: [PATCH] test: add end-to-end business goals smoke --- docs/current-status-card.md | 15 ++- docs/go-mcp-runbook.md | 25 +++- .../2026-07-10-business-goals-smoke.md | 30 +++++ ...07-10-r6f-r14-continuous-execution-plan.md | 14 ++- scripts/verify-business-goals-smoke.ps1 | 118 ++++++++++++++++++ 5 files changed, 195 insertions(+), 7 deletions(-) create mode 100644 docs/reports/2026-07-10-business-goals-smoke.md create mode 100644 scripts/verify-business-goals-smoke.ps1 diff --git a/docs/current-status-card.md b/docs/current-status-card.md index 5ef43e8..ab2183c 100644 --- a/docs/current-status-card.md +++ b/docs/current-status-card.md @@ -59,7 +59,7 @@ N13/N14/N15 are pre-business validation results. They can help identify UI eleme ## Current loop -Current loop: `R12 receive-message reconciliation helper complete`; next R13 business goals smoke. +Current loop: `R13 business goals smoke complete`; next R14 release-candidate report. 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: R12 receive-message reconciliation helper. -- Next active round: R13 business goals smoke. +- Last completed round: R13 business goals smoke. +- Next active round: R14 release-candidate report. R6g send audit and idempotency replay diagnostics is complete: @@ -364,3 +364,12 @@ R12 receive-message reconciliation helper is complete: - 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. + +R13 business goals smoke is complete: + +- Added `scripts\verify-business-goals-smoke.ps1`. +- Added `docs\reports\2026-07-10-business-goals-smoke.md`. +- Smoke result: contacts/search groups/receive messages/file list/send preview/send-file preview are ready. +- Smoke result: production send, real file download, and production file upload remain blocked. +- Output blockers: `send_message_production_missing_strict_machine_sent_record_evidence`, `receive_files_download_missing_real_cache_mapping_and_copy_gate`, and `send_file_production_missing_upload_connector_and_returned_file_send_evidence`. +- Next node: R14 release-candidate report. diff --git a/docs/go-mcp-runbook.md b/docs/go-mcp-runbook.md index 9480de5..934e146 100644 --- a/docs/go-mcp-runbook.md +++ b/docs/go-mcp-runbook.md @@ -527,7 +527,30 @@ Expected final JSON includes: This package includes `isphere-capability-smoke.exe` and `runs\win-helper\ISphereWinHelper.exe`. It verifies the ten-tool MCP surface, fixture-backed receive/search/file-list behavior, send preview, send-file preview, and the production-send/file-upload blocks. It does not log in, click, type, upload, hook, inject, or send. -## 16. Troubleshooting +## 16. Business goals smoke + +Run the business-facing smoke when you need a single status line for the four goals: + +```powershell +powershell -NoProfile -ExecutionPolicy Bypass -File scripts erify-business-goals-smoke.ps1 +``` + +It reuses `scripts erify-go-mcp.ps1`, writes `docs/reports/2026-07-10-business-goals-smoke.md`, and prints these key fields: + +- `search_contacts_ready` +- `search_groups_ready` +- `receive_messages_ready` +- `send_message_preview_ready` +- `send_message_production_ready` +- `receive_files_list_ready` +- `receive_files_download_ready` +- `send_file_preview_ready` +- `send_file_production_ready` +- `remaining_business_blockers` + +Current expected production blockers are real send-message, real file download, and real file upload. + +## 17. Troubleshooting - If C# helper build fails, run `scripts\build-win-helper.ps1` directly and check for missing .NET Framework reference assemblies. - If `win_helper_version` fails, rerun `powershell -NoProfile -ExecutionPolicy Bypass -File scripts\verify-win-helper.ps1` first. diff --git a/docs/reports/2026-07-10-business-goals-smoke.md b/docs/reports/2026-07-10-business-goals-smoke.md new file mode 100644 index 0000000..cffde25 --- /dev/null +++ b/docs/reports/2026-07-10-business-goals-smoke.md @@ -0,0 +1,30 @@ +# Business Goals Smoke - 2026-07-10 + +## 业务目标状态 + +| 目标 | 当前状态 | 说明 | +| --- | --- | --- | +| 搜索联系人 | 可用 | MCP smoke 证明配置化 fixture 下可返回联系人候选。 | +| 搜索群组 | 可用 | MCP smoke 证明配置化 fixture 下可返回群组候选。 | +| 收消息 | 基础可用 | PacketReader/log-backed 默认路线和显式 MsgLib 路线已存在;R12 增加对账辅助但未改变默认路由。 | +| 发消息 | preview 可用,生产阻断 | isphere_send_message 可规划发送并做审计/idempotency;两个 returned sent-record 包仍未给出机器可验证 sent-record。 | +| 收文件 | list 可用,download 阻断 | isphere_receive_files 可列文件,download preview 返回机器可读阻断原因;真实下载缺少 cache mapping 和 copy gate。 | +| 发文件 | preview 可用,生产阻断 | isphere_send_file 可做 allowed-dir 文件 SHA256/size preview;真实上传缺少返回包/上传连接器证据。 | + +## Smoke 输出摘要 + +```json +{"search_contacts_ready":true,"search_groups_ready":true,"receive_messages_ready":true,"send_message_preview_ready":true,"send_message_production_ready":false,"receive_files_list_ready":true,"receive_files_download_ready":false,"receive_files_download_preview_blocked":true,"send_file_preview_ready":true,"send_file_production_ready":false} +``` + +## 剩余业务阻断 + +- 发消息生产:缺少严格机器 sent-record/content-hash after 证据。 +- 收文件下载:缺少真实 cache mapping 和 copy gate。 +- 发文件生产:缺少 upload connector 和 returned file-send evidence。 + +## 结论 + +数字员工现在可使用:搜索联系人、搜索群组、收消息基础读取、收文件列表、发消息 preview、发文件 preview。 + +数字员工还不能使用:生产发消息、真实下载文件、生产发文件。 diff --git a/docs/superpowers/plans/2026-07-10-r6f-r14-continuous-execution-plan.md b/docs/superpowers/plans/2026-07-10-r6f-r14-continuous-execution-plan.md index aefb818..10af2d2 100644 --- a/docs/superpowers/plans/2026-07-10-r6f-r14-continuous-execution-plan.md +++ b/docs/superpowers/plans/2026-07-10-r6f-r14-continuous-execution-plan.md @@ -917,7 +917,7 @@ git push gitea main - `send_file_production_ready` - `remaining_business_blockers` -- [ ] **Step 1: Implement fixture-backed smoke** +- [x] **Step 1: Implement fixture-backed smoke** The script starts `cmd/isphere-mcp` with temp fixture env and calls MCP requests using the same pattern as `verify-go-mcp.ps1`. @@ -937,11 +937,11 @@ receive_files_download_ready=false unless R10 accepted mapping exists send_file_production_ready=false unless file sandbox evidence passed ``` -- [ ] **Step 3: Create report** +- [x] **Step 3: Create report** `docs/reports/2026-07-10-business-goals-smoke.md` summarizes the current business state in plain Chinese. -- [ ] **Step 4: Verify and commit** +- [x] **Step 4: Verify and commit** ```powershell git diff --check @@ -956,6 +956,14 @@ git push gitea main **Acceptance gate:** 业务目标完成度可以用脚本输出,而不是口头判断。 + +**R13 Result:** + +- Added `scripts/verify-business-goals-smoke.ps1`. +- Added `docs/reports/2026-07-10-business-goals-smoke.md`. +- Business-ready true: contact search, group search, receive messages, receive file list, send-message preview, send-file preview. +- Business-ready false: production send message, receive file download, production send file. + --- ### R14: Operator packaging, runbook, and release-candidate report diff --git a/scripts/verify-business-goals-smoke.ps1 b/scripts/verify-business-goals-smoke.ps1 new file mode 100644 index 0000000..f4a36ed --- /dev/null +++ b/scripts/verify-business-goals-smoke.ps1 @@ -0,0 +1,118 @@ +param( + [string]$ReportPath = "" +) + +$ErrorActionPreference = "Stop" +Set-StrictMode -Version Latest + +$repo = (Resolve-Path -LiteralPath (Join-Path $PSScriptRoot "..")).Path +if ([string]::IsNullOrWhiteSpace($ReportPath)) { + $ReportPath = Join-Path $repo "docs\reports\2026-07-10-business-goals-smoke.md" +} + +Push-Location $repo +try { + $verifyOutput = & powershell -NoProfile -ExecutionPolicy Bypass -File (Join-Path $repo "scripts\verify-go-mcp.ps1") + if ($LASTEXITCODE -ne 0) { + $verifyOutput | ForEach-Object { Write-Host $_ } + throw "verify-go-mcp.ps1 failed with exit code $LASTEXITCODE" + } + $jsonLine = @($verifyOutput | Where-Object { + $trimmed = ([string]$_).Trim() + $trimmed.StartsWith("{") -and $trimmed.EndsWith("}") + }) | Select-Object -Last 1 + if (-not $jsonLine) { + throw "verify-go-mcp.ps1 did not emit JSON summary" + } + $mcp = $jsonLine | ConvertFrom-Json + + $searchContactsReady = ([int]$mcp.configured_contact_count -ge 1) + $searchGroupsReady = ([int]$mcp.configured_group_count -ge 1) + $receiveMessagesReady = ([int]$mcp.configured_receive_message_count -ge 1) + $sendMessagePreviewReady = ([bool]$mcp.send_preview_tool_present) + $sendMessageProductionReady = ([bool]$mcp.production_send_enabled) + $receiveFilesListReady = ([int]$mcp.configured_file_count -ge 1) + $receiveFilesDownloadReady = $false + $receiveFilesDownloadPreviewBlocked = ([bool]$mcp.receive_file_download_preview_blocked) + $sendFilePreviewReady = ([bool]$mcp.send_file_preview_tool_present) + $sendFileProductionReady = ([bool]$mcp.send_file_production_enabled) + + $blockers = New-Object System.Collections.Generic.List[string] + if (-not $sendMessageProductionReady) { $blockers.Add("send_message_production_missing_strict_machine_sent_record_evidence") } + if (-not $receiveFilesDownloadReady) { $blockers.Add("receive_files_download_missing_real_cache_mapping_and_copy_gate") } + if (-not $sendFileProductionReady) { $blockers.Add("send_file_production_missing_upload_connector_and_returned_file_send_evidence") } + + $summaryJsonBlock = [ordered]@{ + search_contacts_ready = $searchContactsReady + search_groups_ready = $searchGroupsReady + receive_messages_ready = $receiveMessagesReady + send_message_preview_ready = $sendMessagePreviewReady + send_message_production_ready = $sendMessageProductionReady + receive_files_list_ready = $receiveFilesListReady + receive_files_download_ready = $receiveFilesDownloadReady + receive_files_download_preview_blocked = $receiveFilesDownloadPreviewBlocked + send_file_preview_ready = $sendFilePreviewReady + send_file_production_ready = $sendFileProductionReady + } | ConvertTo-Json -Depth 4 -Compress + + $reportLines = @( + "# Business Goals Smoke - 2026-07-10", + "", + "## 业务目标状态", + "", + "| 目标 | 当前状态 | 说明 |", + "| --- | --- | --- |", + "| 搜索联系人 | 可用 | MCP smoke 证明配置化 fixture 下可返回联系人候选。 |", + "| 搜索群组 | 可用 | MCP smoke 证明配置化 fixture 下可返回群组候选。 |", + "| 收消息 | 基础可用 | PacketReader/log-backed 默认路线和显式 MsgLib 路线已存在;R12 增加对账辅助但未改变默认路由。 |", + "| 发消息 | preview 可用,生产阻断 | isphere_send_message 可规划发送并做审计/idempotency;两个 returned sent-record 包仍未给出机器可验证 sent-record。 |", + "| 收文件 | list 可用,download 阻断 | isphere_receive_files 可列文件,download preview 返回机器可读阻断原因;真实下载缺少 cache mapping 和 copy gate。 |", + "| 发文件 | preview 可用,生产阻断 | isphere_send_file 可做 allowed-dir 文件 SHA256/size preview;真实上传缺少返回包/上传连接器证据。 |", + "", + "## Smoke 输出摘要", + "", + '```json', + $summaryJsonBlock, + '```', + "", + "## 剩余业务阻断", + "", + "- 发消息生产:缺少严格机器 sent-record/content-hash after 证据。", + "- 收文件下载:缺少真实 cache mapping 和 copy gate。", + "- 发文件生产:缺少 upload connector 和 returned file-send evidence。", + "", + "## 结论", + "", + "数字员工现在可使用:搜索联系人、搜索群组、收消息基础读取、收文件列表、发消息 preview、发文件 preview。", + "", + "数字员工还不能使用:生产发消息、真实下载文件、生产发文件。" + ) + $report = $reportLines -join "`n" + + $parent = Split-Path -Parent $ReportPath + if (-not [string]::IsNullOrWhiteSpace($parent)) { + New-Item -ItemType Directory -Force -Path $parent | Out-Null + } + $utf8NoBom = New-Object System.Text.UTF8Encoding($false) + [System.IO.File]::WriteAllText($ReportPath, ($report + "`n"), $utf8NoBom) + + [ordered]@{ + ok = $true + verification = "business_goals_smoke" + search_contacts_ready = $searchContactsReady + search_groups_ready = $searchGroupsReady + receive_messages_ready = $receiveMessagesReady + send_message_preview_ready = $sendMessagePreviewReady + send_message_production_ready = $sendMessageProductionReady + receive_files_list_ready = $receiveFilesListReady + receive_files_download_ready = $receiveFilesDownloadReady + receive_files_download_preview_blocked = $receiveFilesDownloadPreviewBlocked + send_file_preview_ready = $sendFilePreviewReady + send_file_production_ready = $sendFileProductionReady + remaining_business_blockers = @($blockers) + report_path = "docs/reports/2026-07-10-business-goals-smoke.md" + } | ConvertTo-Json -Depth 6 -Compress +} +finally { + Pop-Location +}