# M3 Completion Test Protocol
**Phase 3: State Continuity - Manual Verification**
## Infrastructure Status
✅ **Task 3.1:** Conversation State Store
- SQLite database created: `data/conversations.db`
- Schema verified: conversation_id, identity, intent_history, permissions, timestamps
- CRUD operations implemented
✅ **Task 3.2:** WHO Dimension Tracking
- Identity persists in `identity` column (JSON)
- Includes: toolName, version, capabilities
✅ **Task 3.3:** WHAT Dimension Tracking
- Intent history persists in `intent_history` column (JSON)
- Includes: action, alignment, timestamp
✅ **Task 3.4:** HOW Dimension Tracking
- Permissions persist in `permissions` column (JSON)
- Includes: level, scope, grantedAt
## Manual Test Protocol
### Test 1: Conversation Creation & Persistence
**Steps:**
1. Restart Claude Desktop (to connect to new MCP server with persistence)
2. Make MCP tool call: `identity`
3. Expected: Tool responds with identity
4. Run: `node test-m3-persistence.cjs`
5. Expected: Phase 2 shows conversation persisted with WHO dimension
**Witness:** `conversation_id='default'` exists in database with populated identity
---
### Test 2: Intent History Persistence
**Steps:**
1. Make MCP tool call: `greet`
2. Make MCP tool call: `echo`
3. Run: `node test-m3-persistence.cjs`
4. Expected: Phase 2 shows 3+ actions in intent_history (identity, greet, echo)
**Witness:** WHAT dimension shows multiple actions with timestamps
---
### Test 3: Permission Persistence
**Steps:**
1. Make MCP tool call: `write-file`
2. Expected: "Approval required"
3. Make MCP tool call: `approve:write-file`
4. Expected: "Approval granted"
5. Run: `node test-m3-persistence.cjs`
6. Expected: Phase 2 shows permission grant (level 2, scope write-file)
**Witness:** HOW dimension shows permission grant persisted
---
### Test 4: State Restoration After Restart
**Steps:**
1. Complete Test 3 (permission granted)
2. Stop MCP server: Kill process
3. Start MCP server: `npm start` in background
4. Make MCP tool call: `write-file` again
5. Expected: **NO approval required** (permission persists)
6. Expected: File write executes immediately
**Witness:** Same conversation_id across restart = permissions + history preserved
**M3 SACRED TRUTH VERIFIED:** Tools remember who they're talking to, what was agreed, and what permissions were granted. No amnesia.
---
## Automated Verification
Run after completing manual tests:
```bash
node test-m3-persistence.cjs
```
Expected output:
```
✅ Phase 1: PASS (Schema)
✅ Phase 2: PASS (Persistence with WHO/WHAT/HOW populated)
⚠️ Phase 3: MANUAL (Requires restart test)
```
---
## Completion Criteria
- [x] Task 3.1: SQLite conversation store created
- [x] Task 3.2: WHO dimension (identity) tracking
- [x] Task 3.3: WHAT dimension (intent history) tracking
- [x] Task 3.4: HOW dimension (permissions) tracking
- [ ] **Manual Test 1:** Conversation creation verified
- [ ] **Manual Test 2:** Intent history verified
- [ ] **Manual Test 3:** Permission persistence verified
- [ ] **Manual Test 4:** State restoration after restart verified
**M3 COMPLETE when all manual tests pass.**