{
  "at": "2026-09-08T17:04:26.891Z",
  "disclosure": "Controlled JSON-RPC client test over stdio, not a live customer CRM. The operator step is simulated by the test harness; production approval must be isolated from model-controlled file access.",
  "checks": [
    "MCP initialization and three discoverable tools",
    "Three synthetic records read",
    "Proposal does not mutate",
    "Write without operator approval denied",
    "Model-supplied confirmation rejected",
    "Approved write changes exact record",
    "Approval cannot be replayed",
    "Missing record returns a tool error",
    "Changed record invalidates stale proposal",
    "Connector exits cleanly"
  ],
  "events": [
    {
      "direction": "request",
      "message": {
        "jsonrpc": "2.0",
        "id": 1,
        "method": "initialize",
        "params": {
          "protocolVersion": "2025-06-18",
          "capabilities": {},
          "clientInfo": {
            "name": "ofek-local-test",
            "version": "1"
          }
        }
      }
    },
    {
      "direction": "response",
      "message": {
        "jsonrpc": "2.0",
        "id": 1,
        "result": {
          "protocolVersion": "2025-06-18",
          "capabilities": {
            "tools": {}
          },
          "serverInfo": {
            "name": "ofek-synthetic-crm",
            "version": "1.0.0"
          }
        }
      }
    },
    {
      "direction": "request",
      "message": {
        "jsonrpc": "2.0",
        "id": 2,
        "method": "tools/list",
        "params": {}
      }
    },
    {
      "direction": "response",
      "message": {
        "jsonrpc": "2.0",
        "id": 2,
        "result": {
          "tools": [
            {
              "name": "list_records",
              "description": "Read three synthetic CRM records. No external data.",
              "inputSchema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "annotations": {
                "readOnlyHint": true
              }
            },
            {
              "name": "propose_status",
              "description": "Prepare a status change; this does not modify the record.",
              "inputSchema": {
                "type": "object",
                "properties": {
                  "recordId": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "new",
                      "contacted"
                    ]
                  }
                },
                "required": [
                  "recordId",
                  "status"
                ],
                "additionalProperties": false
              }
            },
            {
              "name": "apply_approved_status",
              "description": "Apply an existing proposal only when the separate operator approval file contains its ID. The model cannot approve a proposal through these tools.",
              "inputSchema": {
                "type": "object",
                "properties": {
                  "proposalId": {
                    "type": "string"
                  }
                },
                "required": [
                  "proposalId"
                ],
                "additionalProperties": false
              }
            }
          ]
        }
      }
    },
    {
      "direction": "request",
      "message": {
        "jsonrpc": "2.0",
        "id": 3,
        "method": "tools/call",
        "params": {
          "name": "list_records",
          "arguments": {}
        }
      }
    },
    {
      "direction": "response",
      "message": {
        "jsonrpc": "2.0",
        "id": 3,
        "result": {
          "content": [
            {
              "type": "text",
              "text": "[{\"id\":\"R1\",\"name\":\"נועה — תרגול\",\"status\":\"new\",\"version\":1},{\"id\":\"R2\",\"name\":\"אמיר — תרגול\",\"status\":\"new\",\"version\":1},{\"id\":\"R3\",\"name\":\"דנה — תרגול\",\"status\":\"contacted\",\"version\":1}]"
            }
          ],
          "isError": false
        }
      }
    },
    {
      "direction": "request",
      "message": {
        "jsonrpc": "2.0",
        "id": 4,
        "method": "tools/call",
        "params": {
          "name": "propose_status",
          "arguments": {
            "recordId": "R1",
            "status": "contacted"
          }
        }
      }
    },
    {
      "direction": "response",
      "message": {
        "jsonrpc": "2.0",
        "id": 4,
        "result": {
          "content": [
            {
              "type": "text",
              "text": "{\"id\":\"2898319d-b79e-4204-8a87-4ad233b2868b\",\"recordId\":\"R1\",\"from\":\"new\",\"to\":\"contacted\",\"expectedVersion\":1,\"requiresOperatorApproval\":true}"
            }
          ],
          "isError": false
        }
      }
    },
    {
      "direction": "request",
      "message": {
        "jsonrpc": "2.0",
        "id": 5,
        "method": "tools/call",
        "params": {
          "name": "list_records",
          "arguments": {}
        }
      }
    },
    {
      "direction": "response",
      "message": {
        "jsonrpc": "2.0",
        "id": 5,
        "result": {
          "content": [
            {
              "type": "text",
              "text": "[{\"id\":\"R1\",\"name\":\"נועה — תרגול\",\"status\":\"new\",\"version\":1},{\"id\":\"R2\",\"name\":\"אמיר — תרגול\",\"status\":\"new\",\"version\":1},{\"id\":\"R3\",\"name\":\"דנה — תרגול\",\"status\":\"contacted\",\"version\":1}]"
            }
          ],
          "isError": false
        }
      }
    },
    {
      "direction": "request",
      "message": {
        "jsonrpc": "2.0",
        "id": 6,
        "method": "tools/call",
        "params": {
          "name": "apply_approved_status",
          "arguments": {
            "proposalId": "2898319d-b79e-4204-8a87-4ad233b2868b"
          }
        }
      }
    },
    {
      "direction": "response",
      "message": {
        "jsonrpc": "2.0",
        "id": 6,
        "result": {
          "content": [
            {
              "type": "text",
              "text": "{\"error\":\"Explicit operator approval required\"}"
            }
          ],
          "isError": true
        }
      }
    },
    {
      "direction": "request",
      "message": {
        "jsonrpc": "2.0",
        "id": 7,
        "method": "tools/call",
        "params": {
          "name": "apply_approved_status",
          "arguments": {
            "proposalId": "2898319d-b79e-4204-8a87-4ad233b2868b",
            "confirmed": true
          }
        }
      }
    },
    {
      "direction": "response",
      "message": {
        "jsonrpc": "2.0",
        "id": 7,
        "result": {
          "content": [
            {
              "type": "text",
              "text": "{\"error\":\"Unexpected arguments; approval cannot be supplied by the model\"}"
            }
          ],
          "isError": true
        }
      }
    },
    {
      "direction": "operator",
      "action": "Fixture test harness writes explicit approval for the reviewed proposal",
      "proposal": {
        "id": "2898319d-b79e-4204-8a87-4ad233b2868b",
        "recordId": "R1",
        "from": "new",
        "to": "contacted",
        "expectedVersion": 1,
        "requiresOperatorApproval": true
      }
    },
    {
      "direction": "request",
      "message": {
        "jsonrpc": "2.0",
        "id": 8,
        "method": "tools/call",
        "params": {
          "name": "apply_approved_status",
          "arguments": {
            "proposalId": "2898319d-b79e-4204-8a87-4ad233b2868b"
          }
        }
      }
    },
    {
      "direction": "response",
      "message": {
        "jsonrpc": "2.0",
        "id": 8,
        "result": {
          "content": [
            {
              "type": "text",
              "text": "{\"applied\":true,\"record\":{\"id\":\"R1\",\"name\":\"נועה — תרגול\",\"status\":\"contacted\",\"version\":2}}"
            }
          ],
          "isError": false
        }
      }
    },
    {
      "direction": "request",
      "message": {
        "jsonrpc": "2.0",
        "id": 9,
        "method": "tools/call",
        "params": {
          "name": "apply_approved_status",
          "arguments": {
            "proposalId": "2898319d-b79e-4204-8a87-4ad233b2868b"
          }
        }
      }
    },
    {
      "direction": "response",
      "message": {
        "jsonrpc": "2.0",
        "id": 9,
        "result": {
          "content": [
            {
              "type": "text",
              "text": "{\"error\":\"Approval already consumed\"}"
            }
          ],
          "isError": true
        }
      }
    },
    {
      "direction": "request",
      "message": {
        "jsonrpc": "2.0",
        "id": 10,
        "method": "tools/call",
        "params": {
          "name": "propose_status",
          "arguments": {
            "recordId": "missing",
            "status": "contacted"
          }
        }
      }
    },
    {
      "direction": "response",
      "message": {
        "jsonrpc": "2.0",
        "id": 10,
        "result": {
          "content": [
            {
              "type": "text",
              "text": "{\"error\":\"Invalid record or status\"}"
            }
          ],
          "isError": true
        }
      }
    },
    {
      "direction": "request",
      "message": {
        "jsonrpc": "2.0",
        "id": 11,
        "method": "tools/call",
        "params": {
          "name": "propose_status",
          "arguments": {
            "recordId": "R2",
            "status": "contacted"
          }
        }
      }
    },
    {
      "direction": "response",
      "message": {
        "jsonrpc": "2.0",
        "id": 11,
        "result": {
          "content": [
            {
              "type": "text",
              "text": "{\"id\":\"7b3342d6-7546-48f4-9be2-8320d55097ad\",\"recordId\":\"R2\",\"from\":\"new\",\"to\":\"contacted\",\"expectedVersion\":1,\"requiresOperatorApproval\":true}"
            }
          ],
          "isError": false
        }
      }
    },
    {
      "direction": "request",
      "message": {
        "jsonrpc": "2.0",
        "id": 12,
        "method": "tools/call",
        "params": {
          "name": "propose_status",
          "arguments": {
            "recordId": "R2",
            "status": "contacted"
          }
        }
      }
    },
    {
      "direction": "response",
      "message": {
        "jsonrpc": "2.0",
        "id": 12,
        "result": {
          "content": [
            {
              "type": "text",
              "text": "{\"id\":\"890b2f74-1df6-4af8-80ba-7d5f0fd54a62\",\"recordId\":\"R2\",\"from\":\"new\",\"to\":\"contacted\",\"expectedVersion\":1,\"requiresOperatorApproval\":true}"
            }
          ],
          "isError": false
        }
      }
    },
    {
      "direction": "request",
      "message": {
        "jsonrpc": "2.0",
        "id": 13,
        "method": "tools/call",
        "params": {
          "name": "apply_approved_status",
          "arguments": {
            "proposalId": "890b2f74-1df6-4af8-80ba-7d5f0fd54a62"
          }
        }
      }
    },
    {
      "direction": "response",
      "message": {
        "jsonrpc": "2.0",
        "id": 13,
        "result": {
          "content": [
            {
              "type": "text",
              "text": "{\"applied\":true,\"record\":{\"id\":\"R2\",\"name\":\"אמיר — תרגול\",\"status\":\"contacted\",\"version\":2}}"
            }
          ],
          "isError": false
        }
      }
    },
    {
      "direction": "request",
      "message": {
        "jsonrpc": "2.0",
        "id": 14,
        "method": "tools/call",
        "params": {
          "name": "apply_approved_status",
          "arguments": {
            "proposalId": "7b3342d6-7546-48f4-9be2-8320d55097ad"
          }
        }
      }
    },
    {
      "direction": "response",
      "message": {
        "jsonrpc": "2.0",
        "id": 14,
        "result": {
          "content": [
            {
              "type": "text",
              "text": "{\"error\":\"Record changed; prepare a new proposal\"}"
            }
          ],
          "isError": true
        }
      }
    }
  ]
}