{
    "id": "fb158-session-cleanup",
    "title": "Отменить резерв и не передать контекст клиента следующему запросу",
    "columns": [
        "Наблюдение",
        "Результат"
    ],
    "rows": [
        [
            "Остаток перед резервом",
            3
        ],
        [
            "Остаток внутри неподтверждённого резерва",
            1
        ],
        [
            "Остаток после rollback",
            3
        ],
        [
            "Контекст соединения после rollback",
            "CUSTOMER-A"
        ],
        [
            "Контекст после явной очистки",
            null
        ],
        [
            "Следующий запрос: остаток",
            3
        ],
        [
            "Следующий запрос: контекст",
            null
        ],
        [
            "Соединение осталось тем же",
            true
        ],
        [
            "HTTP-процесс остановлен",
            true
        ]
    ],
    "checks": {
        "two_real_http_requests": true,
        "expected_reservation_cancelled": true,
        "reserve_was_visible_inside_transaction": true,
        "rollback_restored_quantity": true,
        "session_context_not_transactional": true,
        "context_cleared": true,
        "next_request_clean": true,
        "same_attachment": true,
        "both_http_200": true,
        "worker_stopped": true,
        "owned_files_removed": true,
        "owned_objects_removed": true
    },
    "observations": {
        "http_session": {
            "responses": [
                {
                    "ok": true,
                    "action": "cancel-reservation",
                    "pid": 15108,
                    "attachment_id": 4,
                    "sapi": "cli-server",
                    "observed": {
                        "cancelled": true,
                        "qty_before": 3,
                        "qty_during": 1,
                        "qty_after": 3,
                        "context_before_clear": "CUSTOMER-A",
                        "context_after_clear": null
                    }
                },
                {
                    "ok": true,
                    "action": "check-clean",
                    "pid": 15108,
                    "attachment_id": 4,
                    "sapi": "cli-server",
                    "observed": {
                        "item": {
                            "id": 1,
                            "title": "Cable",
                            "qty": 3
                        },
                        "context": null
                    }
                }
            ],
            "worker_pid": 15108,
            "stopped": true,
            "http_requests": 2,
            "proof": {
                "statuses": [
                    200,
                    200
                ],
                "sha256s": [
                    "8c178984aa099ac58c607289ab6ed649213c14c6fe73549d2a602b33202d340f",
                    "a8cf0beff474867cc15e6c1a0aecb54507c429da3c1f5bafcb3707254c1393d5"
                ]
            }
        },
        "explicit_rollback": true,
        "explicit_context_cleanup": true,
        "same_attachment": true,
        "connection_context_is_not_browser_identity": true
    },
    "runtime": {
        "php": "8.2.35",
        "extension": "3.0.1",
        "server_version": "WI-V5.0.4.1812 Firebird 5.0",
        "implementation": "Firebird\/Windows\/AMD\/Intel\/x64",
        "transport": "embedded_local_services"
    },
    "owned_objects": [
        {
            "type": "DATABASE",
            "name": "fb158_cancel_0d97172b64.fdb"
        }
    ],
    "removed_objects": [
        {
            "type": "DATABASE",
            "name": "fb158_cancel_0d97172b64.fdb"
        }
    ]
}
