{
  "schemaVersion": 1,
  "fictional": true,
  "testedAt": "2026-11-15T20:40:51.945Z",
  "nodeVersion": "v24.22.2",
  "scope": "local_loopback_fixture_only",
  "authentication": "mock_demo_tokens",
  "fixtureSha256": "a137630be904b9a0cc03b5d980ad1c404a24c8fa4c98aec9888540167bea34d2",
  "summary": {
    "casesPerMode": 8,
    "beforeViolations": 4,
    "afterExpectationsMet": 8,
    "controlRequests": 2
  },
  "observations": [
    {
      "mode": "missing_authorisation",
      "caseId": "C01",
      "account": "viewerA",
      "resource": "invoiceA",
      "method": "GET",
      "expected": "allow",
      "requestPath": "/v1/invoices/invoiceA",
      "observed": {
        "status": 200,
        "body": {
          "id": "invoiceA",
          "tenant": "tenantA",
          "note": "fictional initial value"
        }
      },
      "expectationMet": true
    },
    {
      "mode": "missing_authorisation",
      "caseId": "C02",
      "account": "viewerA",
      "resource": "invoiceB",
      "method": "GET",
      "expected": "deny",
      "requestPath": "/v1/invoices/invoiceB",
      "observed": {
        "status": 200,
        "body": {
          "id": "invoiceB",
          "tenant": "tenantB",
          "note": "fictional initial value"
        }
      },
      "expectationMet": false
    },
    {
      "mode": "missing_authorisation",
      "caseId": "C03",
      "account": "viewerB",
      "resource": "invoiceB",
      "method": "GET",
      "expected": "allow",
      "requestPath": "/v1/invoices/invoiceB",
      "observed": {
        "status": 200,
        "body": {
          "id": "invoiceB",
          "tenant": "tenantB",
          "note": "fictional initial value"
        }
      },
      "expectationMet": true
    },
    {
      "mode": "missing_authorisation",
      "caseId": "C04",
      "account": "viewerB",
      "resource": "invoiceA",
      "method": "GET",
      "expected": "deny",
      "requestPath": "/v1/invoices/invoiceA",
      "observed": {
        "status": 200,
        "body": {
          "id": "invoiceA",
          "tenant": "tenantA",
          "note": "fictional initial value"
        }
      },
      "expectationMet": false
    },
    {
      "mode": "missing_authorisation",
      "caseId": "C05",
      "account": "editorA",
      "resource": "invoiceA",
      "method": "PATCH",
      "expected": "allow",
      "requestPath": "/v1/invoices/invoiceA",
      "observed": {
        "status": 200,
        "body": {
          "id": "invoiceA",
          "tenant": "tenantA",
          "note": "fictional update by editorA"
        }
      },
      "expectationMet": true
    },
    {
      "mode": "missing_authorisation",
      "caseId": "C06",
      "account": "viewerA",
      "resource": "invoiceA",
      "method": "PATCH",
      "expected": "deny",
      "requestPath": "/v1/invoices/invoiceA",
      "observed": {
        "status": 200,
        "body": {
          "id": "invoiceA",
          "tenant": "tenantA",
          "note": "fictional update by viewerA"
        }
      },
      "expectationMet": false
    },
    {
      "mode": "missing_authorisation",
      "caseId": "C07",
      "account": "adminA",
      "resource": "invoiceA",
      "method": "PATCH",
      "expected": "allow",
      "requestPath": "/v1/invoices/invoiceA",
      "observed": {
        "status": 200,
        "body": {
          "id": "invoiceA",
          "tenant": "tenantA",
          "note": "fictional update by adminA"
        }
      },
      "expectationMet": true
    },
    {
      "mode": "missing_authorisation",
      "caseId": "C08",
      "account": "adminA",
      "resource": "invoiceB",
      "method": "PATCH",
      "expected": "deny",
      "requestPath": "/v1/invoices/invoiceB",
      "observed": {
        "status": 200,
        "body": {
          "id": "invoiceB",
          "tenant": "tenantB",
          "note": "fictional update by adminA"
        }
      },
      "expectationMet": false
    },
    {
      "mode": "tenant_and_role_checked",
      "caseId": "C01",
      "account": "viewerA",
      "resource": "invoiceA",
      "method": "GET",
      "expected": "allow",
      "requestPath": "/v1/invoices/invoiceA",
      "observed": {
        "status": 200,
        "body": {
          "id": "invoiceA",
          "tenant": "tenantA",
          "note": "fictional initial value"
        }
      },
      "expectationMet": true
    },
    {
      "mode": "tenant_and_role_checked",
      "caseId": "C02",
      "account": "viewerA",
      "resource": "invoiceB",
      "method": "GET",
      "expected": "deny",
      "requestPath": "/v1/invoices/invoiceB",
      "observed": {
        "status": 403,
        "body": {
          "error": "forbidden"
        }
      },
      "expectationMet": true
    },
    {
      "mode": "tenant_and_role_checked",
      "caseId": "C03",
      "account": "viewerB",
      "resource": "invoiceB",
      "method": "GET",
      "expected": "allow",
      "requestPath": "/v1/invoices/invoiceB",
      "observed": {
        "status": 200,
        "body": {
          "id": "invoiceB",
          "tenant": "tenantB",
          "note": "fictional initial value"
        }
      },
      "expectationMet": true
    },
    {
      "mode": "tenant_and_role_checked",
      "caseId": "C04",
      "account": "viewerB",
      "resource": "invoiceA",
      "method": "GET",
      "expected": "deny",
      "requestPath": "/v1/invoices/invoiceA",
      "observed": {
        "status": 403,
        "body": {
          "error": "forbidden"
        }
      },
      "expectationMet": true
    },
    {
      "mode": "tenant_and_role_checked",
      "caseId": "C05",
      "account": "editorA",
      "resource": "invoiceA",
      "method": "PATCH",
      "expected": "allow",
      "requestPath": "/v1/invoices/invoiceA",
      "observed": {
        "status": 200,
        "body": {
          "id": "invoiceA",
          "tenant": "tenantA",
          "note": "fictional update by editorA"
        }
      },
      "expectationMet": true
    },
    {
      "mode": "tenant_and_role_checked",
      "caseId": "C06",
      "account": "viewerA",
      "resource": "invoiceA",
      "method": "PATCH",
      "expected": "deny",
      "requestPath": "/v1/invoices/invoiceA",
      "observed": {
        "status": 403,
        "body": {
          "error": "forbidden"
        }
      },
      "expectationMet": true
    },
    {
      "mode": "tenant_and_role_checked",
      "caseId": "C07",
      "account": "adminA",
      "resource": "invoiceA",
      "method": "PATCH",
      "expected": "allow",
      "requestPath": "/v1/invoices/invoiceA",
      "observed": {
        "status": 200,
        "body": {
          "id": "invoiceA",
          "tenant": "tenantA",
          "note": "fictional update by adminA"
        }
      },
      "expectationMet": true
    },
    {
      "mode": "tenant_and_role_checked",
      "caseId": "C08",
      "account": "adminA",
      "resource": "invoiceB",
      "method": "PATCH",
      "expected": "deny",
      "requestPath": "/v1/invoices/invoiceB",
      "observed": {
        "status": 403,
        "body": {
          "error": "forbidden"
        }
      },
      "expectationMet": true
    }
  ],
  "controls": [
    {
      "name": "no_demo_token",
      "status": 401,
      "body": {
        "error": "demo_authentication_required"
      }
    },
    {
      "name": "forged_tenant_header",
      "status": 403,
      "body": {
        "error": "forbidden"
      }
    }
  ],
  "scriptSha256": "f51b48d04abbdaa35f8d3e73026362cbb816089eacf6a106b3620312b93877f0"
}
