chore: add send file sandbox evidence package

This commit is contained in:
zhaoyilun
2026-07-11 00:08:56 +08:00
parent fab0f0f5c0
commit 7db022469c
6 changed files with 843 additions and 6 deletions

View File

@@ -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: R8 send-file idempotency and audit hardening.
- Next active round: R9 send-file upload evidence package.
- Last completed round: R9 send-file upload evidence package.
- Next active round: R10 receive-file download resolver v2 diagnostic.
R6g send audit and idempotency replay diagnostics is complete:
@@ -315,3 +315,14 @@ R8 send-file idempotency and audit hardening is complete:
- Production file upload remains blocked with `production_send_enabled=false` and `real_send_attempted=false`.
- Verification passed: focused send-file tests, `go test ./...`, `go build ./cmd/isphere-mcp`, `scripts\verify-go-mcp.ps1`, and `go run ./cmd/isphere-capability-smoke`.
- Next node: R9 send-file upload evidence package.
R9 send-file upload evidence package is complete:
- Added `scripts\package-send-file-sandbox-gate.ps1` to build `runs\send-file-sandbox-gate-package.zip`.
- Added `scripts\verify-send-file-sandbox-gate-package.ps1` to assert package contents and required operator markers.
- Added `scripts\validate-returned-send-file-sandbox-package.ps1` to validate returned online/internal sandbox file-send evidence.
- Added `docs\source-discovery\2026-07-10-send-file-sandbox-gate.md`.
- Package includes read-only live probe recorder, `capability\isphere-capability-smoke.exe`, `FILE-SEND-INPUTS.template.json`, `CREATE-FILE-RETURN-ZIP.ps1`, and `RUN-FILE-RECORDING-SUITE.bat`.
- Local verification generated and validated `runs\send-file-sandbox-gate-package.zip`; no production file upload connector was enabled.
- Verification passed: git diff --check, scripts\verify-send-file-sandbox-gate-package.ps1, go test ./..., go build ./cmd/isphere-mcp, and scripts\verify-go-mcp.ps1.
- Next node: R10 receive-file download resolver v2 diagnostic.

View File

@@ -0,0 +1,68 @@
# 2026-07-10 R9 Send-file sandbox evidence gate
## Decision
Local development still cannot log in to iSphere/IMPlatformClient, so real file upload must not be enabled from local-only evidence.
R9 prepares a one-pass online/internal sandbox package for collecting the missing evidence. The package is intentionally operator-driven:
- it does not click, type, upload, hook, inject, or send automatically;
- the operator manually sends exactly one approved sandbox file;
- before/after read-only recorder output and completed operator fields are returned for validation;
- production `isphere_send_file` remains blocked until the returned package passes validation.
## Package
Builder:
```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\package-send-file-sandbox-gate.ps1
```
Verifier:
```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\verify-send-file-sandbox-gate-package.ps1
```
Expected generated zip:
```text
runs\send-file-sandbox-gate-package.zip
```
## Returned-package validator
Use this after an online/internal sandbox operator returns a zip:
```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\validate-returned-send-file-sandbox-package.ps1 -ZipPath <returned-zip> -Strict
```
The validator checks only sanitized booleans/counts/metadata:
- target fields are present;
- `ISPHERE_SEND_FILE_ALLOWED_DIR` is recorded;
- `sandbox_file_path`, `file_sha256`, `file_size_bytes`, and `idempotency_key` are present;
- before and after recorder output exists;
- operator timestamps are present;
- file upload/sent-record evidence is present;
- duplicate second file send was not attempted;
- `production_file_send_enabled=false`.
## Current status
No returned R9 package has been reviewed in this repository state.
`isphere_send_file` remains preview/idempotency/audit only:
- `send_file_preview_tool_present=true`
- `send_file_duplicate_detected=true`
- `send_file_conflict_blocked=true`
- `send_file_production_enabled=false`
## Next decision
If a returned package passes `strict_file_gate_pass`, the next implementation round may design a gated file-upload connector path.
If no returned package is available, keep file sending at preview only and continue local-safe rounds.

View File

@@ -651,7 +651,7 @@ git push gitea main
- WinHelper recorder executable and dependencies
- Capability smoke executable if already built
- [ ] **Step 1: Build verifier first**
- [x] **Step 1: Build verifier first**
```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\verify-send-file-sandbox-gate-package.ps1
@@ -659,15 +659,15 @@ powershell -NoProfile -ExecutionPolicy Bypass -File scripts\verify-send-file-san
Expected before implementation: FAIL because package builder does not exist.
- [ ] **Step 2: Implement package builder**
- [x] **Step 2: Implement package builder**
The builder outputs `runs/send-file-sandbox-gate-package.zip` and includes only executables/scripts/docs needed by an online operator.
- [ ] **Step 3: Implement returned-package validator**
- [x] **Step 3: Implement returned-package validator**
Validator requires file send attempt timestamps, before/after recorder output, file SHA256, observed upload/sent status, and duplicate-send confirmation.
- [ ] **Step 4: Verify and commit**
- [x] **Step 4: Verify and commit**
```powershell
git diff --check
@@ -682,6 +682,16 @@ git push gitea main
**Acceptance gate:** 用户可以把一个包带到可登录环境采集发文件证据。
**R9 Result:**
- Added `scripts/package-send-file-sandbox-gate.ps1`, which builds `runs/send-file-sandbox-gate-package.zip`.
- Added `scripts/verify-send-file-sandbox-gate-package.ps1`; the first run failed before the builder existed, then passed after implementation.
- Added `scripts/validate-returned-send-file-sandbox-package.ps1` for future returned online/internal sandbox packages.
- Added `docs/source-discovery/2026-07-10-send-file-sandbox-gate.md`.
- The package includes recorder binaries, capability smoke executable, `FILE-SEND-INPUTS.template.json`, operator instructions, `CREATE-FILE-RETURN-ZIP.ps1`, and `RUN-FILE-RECORDING-SUITE.bat`.
- Local verifier generated and validated the package; production `isphere_send_file` remains blocked.
- Returned-package validator was checked with a temporary strict-pass fixture.
---
### R10: Receive-file download resolver v2 diagnostic