feat: close send message production gate behavior

This commit is contained in:
zhaoyilun
2026-07-10 21:01:04 +08:00
parent 41b4b5b7d2
commit 6781c75f84
4 changed files with 74 additions and 7 deletions

View File

@@ -479,19 +479,19 @@ git push gitea main
- If `r6d_gate_pass=false`: add regression tests proving production remains blocked with `gate_reason_code="send_evidence_missing"`.
- If `r6d_gate_pass=true`: add tests that production can only run through an injected connector with `ISPHERE_SEND_PRODUCTION_ENABLED=1`, evidence gate pass, and idempotency key present.
- [ ] **Step 1: Write default-blocked regression test**
- [x] **Step 1: Write default-blocked regression test**
Add `TestISphereSendMessageProductionGateBlockedWithoutStrictEvidence`, asserting `ok=false`, `send_status="blocked"`, `gate_reason_code` is not empty, `production_send_enabled=false`, and `real_send_attempted=false`.
- [ ] **Step 2: Write gated fake-production test if strict v2 passed**
- [x] **Step 2: Write gated fake-production test if strict v2 passed**
Add `TestISphereSendMessageProductionRequiresEvidenceAndConnector`. If strict v2 did not pass, keep this test skipped with explicit skip reason: `strict v2 send evidence not present in this repository state`.
- [ ] **Step 3: Update verification smoke**
- [x] **Step 3: Update verification smoke**
`verify-go-mcp.ps1` must continue printing `production_send_enabled=false` on the default path unless strict evidence and env gate are configured.
- [ ] **Step 4: Verify and commit**
- [x] **Step 4: Verify and commit**
```powershell
git diff --check
@@ -506,6 +506,13 @@ git push gitea main
**Acceptance gate:** No ambiguous state remains: send-message is either gated by validated evidence or explicitly blocked with a machine-readable reason.
**R6l Result:**
- R6k found `strict_v2_pass=false`, so R6l used the blocked branch.
- Added `TestISphereSendMessageProductionGateBlockedWithoutStrictEvidence`, proving production remains blocked with `gate_reason_code="send_evidence_missing"` when `ISPHERE_SEND_PRODUCTION_ENABLED=1` but strict evidence is missing.
- Added `TestISphereSendMessageProductionRequiresEvidenceAndConnector` as an explicit skipped test with reason `strict v2 send evidence not present in this repository state`.
- Standard MCP smoke continues to report `production_send_enabled=false`.
---
### R7: `isphere_send_file` preview tool