schema_id: sinji.api.cassette.v1
schema_version: "1"
cassette_id: musha_prewrite_rust_reject_dbg
description: apply_patch tool call -> fs-write-pre reject (RUST-ANTI-DBG-001) -> quit.
interactions:
  - id: models_empty
    matching:
      mode: loose
    request:
      method: GET
      path: /v1/models
    response:
      status_code: 200
      content_type: application/json
      body: |
        {"data":[],"object":"list"}

  - id: models_empty_2
    matching:
      mode: loose
    request:
      method: GET
      path: /v1/models
    response:
      status_code: 200
      content_type: application/json
      body: |
        {"data":[],"object":"list"}

  - id: apply_patch_tool_call
    matching:
      mode: loose
    request:
      method: POST
      path: /v1/responses
    response:
      status_code: 200
      content_type: text/event-stream
      body: |
        data: {"type":"response.output_item.done","item":{"type":"custom_tool_call","call_id":"call_apply_patch_dbg_1","name":"apply_patch","input":"*** Begin Patch\n*** Add File: prewrite_dbg.rs\n+fn main() {\n+    dbg!(1);\n+}\n*** End Patch"}}

        data: {"type":"response.completed","response":{"id":"resp_apply_patch_dbg_1"}}


  - id: apply_patch_after_tool
    matching:
      mode: loose
    request:
      method: POST
      path: /v1/responses
    response:
      status_code: 200
      content_type: text/event-stream
      body: |
        data: {"type":"response.output_item.added","item":{"type":"message","id":"msg_apply_patch_dbg_2","role":"assistant","content":[{"type":"output_text","text":""}]}}

        data: {"type":"response.output_text.delta","delta":"Write blocked by Rust prewrite gate (RUST-ANTI-DBG-001)."}

        data: {"type":"response.output_item.done","item":{"type":"message","id":"msg_apply_patch_dbg_2","role":"assistant","content":[{"type":"output_text","text":"Write blocked by Rust prewrite gate (RUST-ANTI-DBG-001)."}]}}

        data: {"type":"response.completed","response":{"id":"resp_apply_patch_dbg_2"}}
