[
  {
    "name": "core-start",
    "request": {
      "method": "POST",
      "path": "/execkernel/session/start",
      "body": {
        "flow": "expense-review",
        "session_id": "core-reference",
        "lang": "en",
        "context": {
          "amount": 0
        },
        "timestamp": 1700000000
      },
      "query": []
    },
    "response": {
      "status": 200,
      "headers": {
        "Content-Type": "application/json",
        "X-Trace-Id": "core-http-reference"
      },
      "body": {
        "session_id": "core-reference",
        "payload": {
          "type": "node",
          "node_id": 10,
          "title": "Enter an expense",
          "subtitle": null,
          "description": null,
          "extras": null,
          "edges": [
            {
              "id": 101,
              "from": 10,
              "to": 20,
              "labels": [
                {
                  "text": "Review",
                  "description": null,
                  "extras": null
                }
              ],
              "enabled": true,
              "disabled_reason": null,
              "availability": "available"
            }
          ]
        },
        "trace_id": "core-http-reference",
        "state": {
          "graph_code": "expense-review",
          "flow_id": 610,
          "current_node": 10,
          "context": {
            "amount": 0
          },
          "history": {
            "edges": [],
            "nodes": [
              10
            ],
            "overflow_policy": "preserve"
          },
          "created_at": 1700000000,
          "updated_at": 1700000000,
          "last_transition_at": 1700000000,
          "graph_version": "1.0.0",
          "dsl_version": "1.0"
        },
        "persisted": true
      }
    }
  },
  {
    "name": "core-next",
    "request": {
      "method": "POST",
      "path": "/execkernel/session/next",
      "body": {
        "session_id": "core-reference",
        "edge_id": 101,
        "context": {
          "amount": 180
        },
        "timestamp": 1700000005
      },
      "query": []
    },
    "response": {
      "status": 200,
      "headers": {
        "Content-Type": "application/json",
        "X-Trace-Id": "core-http-reference"
      },
      "body": {
        "session_id": "core-reference",
        "payload": {
          "type": "node",
          "node_id": 20,
          "title": "Review the amount",
          "subtitle": null,
          "description": null,
          "extras": null,
          "edges": [
            {
              "id": 102,
              "from": 20,
              "to": 30,
              "labels": [
                {
                  "text": "Submit",
                  "description": null,
                  "extras": null
                }
              ],
              "enabled": false,
              "disabled_reason": "context_value_failed",
              "availability": "blocked"
            }
          ]
        },
        "trace_id": "core-http-reference",
        "state": {
          "graph_code": "expense-review",
          "flow_id": 610,
          "current_node": 20,
          "context": {
            "amount": 180
          },
          "history": {
            "edges": [
              101
            ],
            "nodes": [
              10,
              20
            ],
            "overflow_policy": "preserve"
          },
          "created_at": 1700000000,
          "updated_at": 1700000005,
          "last_transition_at": 1700000005,
          "graph_version": "1.0.0",
          "dsl_version": "1.0"
        },
        "persisted": true
      }
    }
  },
  {
    "name": "core-resume",
    "request": {
      "method": "POST",
      "path": "/execkernel/session/resume",
      "body": {
        "session_id": "core-reference",
        "lang": "es",
        "timestamp": 1700000005
      },
      "query": []
    },
    "response": {
      "status": 200,
      "headers": {
        "Content-Type": "application/json",
        "X-Trace-Id": "core-http-reference"
      },
      "body": {
        "session_id": "core-reference",
        "payload": {
          "type": "node",
          "node_id": 20,
          "title": "Revisa el importe",
          "subtitle": null,
          "description": null,
          "extras": null,
          "edges": [
            {
              "id": 102,
              "from": 20,
              "to": 30,
              "labels": [
                {
                  "text": "Enviar",
                  "description": null,
                  "extras": null
                }
              ],
              "enabled": false,
              "disabled_reason": "context_value_failed",
              "availability": "blocked"
            }
          ]
        },
        "trace_id": "core-http-reference",
        "state": {
          "graph_code": "expense-review",
          "flow_id": 610,
          "current_node": 20,
          "context": {
            "amount": 180
          },
          "history": {
            "edges": [
              101
            ],
            "nodes": [
              10,
              20
            ],
            "overflow_policy": "preserve"
          },
          "created_at": 1700000000,
          "updated_at": 1700000005,
          "last_transition_at": 1700000005,
          "graph_version": "1.0.0",
          "dsl_version": "1.0"
        }
      }
    }
  },
  {
    "name": "core-navigate-alias",
    "request": {
      "method": "POST",
      "path": "/execkernel/session/navigate",
      "body": {
        "session_id": "core-reference",
        "edge_id": 102,
        "context": {
          "amount": 120
        },
        "timestamp": 1700000010
      },
      "query": []
    },
    "response": {
      "status": 200,
      "headers": {
        "Content-Type": "application/json",
        "X-Trace-Id": "core-http-reference"
      },
      "body": {
        "session_id": "core-reference",
        "payload": {
          "type": "terminal",
          "node_id": 30,
          "title": "Request ready",
          "subtitle": null,
          "description": null,
          "extras": null,
          "outputs": [
            {
              "type": "content",
              "url": null,
              "label": null,
              "open_behavior": null,
              "lang": "en",
              "content": "Your application can now process the request."
            }
          ]
        },
        "trace_id": "core-http-reference",
        "state": {
          "graph_code": "expense-review",
          "flow_id": 610,
          "current_node": 30,
          "context": {
            "amount": 120
          },
          "history": {
            "edges": [
              101,
              102
            ],
            "nodes": [
              10,
              20,
              30
            ],
            "overflow_policy": "preserve"
          },
          "created_at": 1700000000,
          "updated_at": 1700000010,
          "last_transition_at": 1700000010,
          "graph_version": "1.0.0",
          "dsl_version": "1.0"
        },
        "persisted": true
      }
    }
  },
  {
    "name": "core-delete",
    "request": {
      "method": "DELETE",
      "path": "/execkernel/session/core-reference",
      "body": [],
      "query": []
    },
    "response": {
      "status": 200,
      "headers": {
        "Content-Type": "application/json",
        "X-Trace-Id": "core-http-reference"
      },
      "body": {
        "session_id": "core-reference",
        "deleted": true,
        "trace_id": "core-http-reference"
      }
    }
  },
  {
    "name": "core-unknown-inspect",
    "request": {
      "method": "POST",
      "path": "/execkernel/graph/inspect",
      "body": {
        "flow": "expense-review"
      },
      "query": []
    },
    "response": {
      "status": 400,
      "headers": {
        "Content-Type": "application/json",
        "X-Trace-Id": "core-http-reference"
      },
      "body": {
        "error": {
          "ek_code": "EK-INPUT-400",
          "message": "Operación no disponible.",
          "severity": "BLOCKER",
          "context": [],
          "hint": null,
          "timestamp": 1796417858,
          "http": 400,
          "trace_id": "core-http-reference"
        },
        "trace_id": "core-http-reference",
        "session_id": null
      }
    }
  },
  {
    "name": "replay-export",
    "request": {
      "method": "GET",
      "path": "/api/replay/expense-example",
      "body": [],
      "query": {
        "range": "1-1"
      }
    },
    "response": {
      "status": 200,
      "headers": {
        "Content-Type": "application/json",
        "X-Trace-Id": "a82d814f3aad1e92"
      },
      "body": {
        "trace_id": "a82d814f3aad1e92",
        "replay": {
          "version": "1.0",
          "engine_version": "0.2.0",
          "graph_code": "expense-review",
          "flow_id": 610,
          "graph_version": "1.0.0",
          "dsl_version": "1.0",
          "session": {
            "session_id": "expense-example",
            "initial_min_state": {
              "node_id": 10,
              "context": {
                "amount": 0
              },
              "timestamp": 1700000000
            },
            "steps": [
              {
                "step_number": 1,
                "node_before": 20,
                "node_after": 30,
                "selected_edge": 102,
                "available_edges": [
                  102
                ],
                "context_diff": {
                  "amount": 120
                },
                "timestamp": 1700000010,
                "evaluated_conditions": [
                  {
                    "edge_id": 102,
                    "rule": "context_value",
                    "result": true,
                    "details": {
                      "input": {
                        "key": "amount",
                        "operator": "<=",
                        "value": 150
                      },
                      "actual": 120,
                      "reason": null,
                      "ek_code": null,
                      "context": []
                    }
                  }
                ]
              }
            ],
            "final": {
              "node_id": 30,
              "context": {
                "amount": 120
              },
              "timestamp": 1700000010,
              "is_terminal": true
            },
            "graph_code": "expense-review",
            "flow_id": 610
          },
          "export_scope": "inspection_window",
          "window": {
            "start_step": 1,
            "end_step": 1,
            "source_step_count": 2
          }
        }
      }
    }
  },
  {
    "name": "replay-session",
    "request": {
      "method": "POST",
      "path": "/api/replay/session/expense-example",
      "body": {
        "replay_mode": "strict"
      },
      "query": []
    },
    "response": {
      "status": 200,
      "headers": {
        "Content-Type": "application/json",
        "X-Trace-Id": "40ce717e64460dbc"
      },
      "body": {
        "trace_id": "40ce717e64460dbc",
        "session_id": "expense-example",
        "mode": "strict",
        "final_node_id": 30,
        "final_context": {
          "amount": 120
        },
        "steps": [
          {
            "step_number": 0,
            "node_before": 10,
            "node_after": 20,
            "selected_edge": 101,
            "available_edges": [
              101
            ],
            "context_diff": {
              "amount": 180
            },
            "timestamp": 1700000005,
            "evaluated_conditions": []
          },
          {
            "step_number": 1,
            "node_before": 20,
            "node_after": 30,
            "selected_edge": 102,
            "available_edges": [
              102
            ],
            "context_diff": {
              "amount": 120
            },
            "timestamp": 1700000010,
            "evaluated_conditions": [
              {
                "edge_id": 102,
                "rule": "context_value",
                "result": true,
                "details": {
                  "input": {
                    "key": "amount",
                    "operator": "<=",
                    "value": 150
                  },
                  "actual": 120,
                  "reason": null,
                  "ek_code": null,
                  "context": []
                }
              }
            ]
          }
        ],
        "divergences": [],
        "has_divergences": false,
        "evidence_level": "trace_consistency",
        "terminal_verified": null,
        "final_timestamp": 1700000010,
        "reconstructed_history": {
          "nodes": [
            10,
            20,
            30
          ],
          "edges": [
            101,
            102
          ]
        },
        "source_kind": "debug_trace",
        "source_hash": "eb9ee1e46c0881d50ee8a672dd966490492b3c82a6caeff25007f7c37413631e",
        "source_graph_code": "expense-review",
        "source_flow_id": 610,
        "source_graph_version": "1.0.0",
        "source_dsl_version": "1.0",
        "source_engine_version": "0.2.0",
        "window": {
          "start_step": 0,
          "end_step": 1
        },
        "source_step_count": 2,
        "source_evidence_level": "trace_consistency",
        "override_keys": [],
        "comparison_scope": "recorded_reconstruction",
        "uncompared_alternative_outcomes": 0
      }
    }
  },
  {
    "name": "replay-partial",
    "request": {
      "method": "POST",
      "path": "/api/replay/partial",
      "body": {
        "session_id": "expense-example",
        "start_step": 1,
        "end_step": 1
      },
      "query": []
    },
    "response": {
      "status": 200,
      "headers": {
        "Content-Type": "application/json",
        "X-Trace-Id": "72ff560e8656db2e"
      },
      "body": {
        "trace_id": "72ff560e8656db2e",
        "session_id": "expense-example",
        "mode": "strict",
        "final_node_id": 30,
        "final_context": {
          "amount": 120
        },
        "steps": [
          {
            "step_number": 1,
            "node_before": 20,
            "node_after": 30,
            "selected_edge": 102,
            "available_edges": [
              102
            ],
            "context_diff": {
              "amount": 120
            },
            "timestamp": 1700000010,
            "evaluated_conditions": [
              {
                "edge_id": 102,
                "rule": "context_value",
                "result": true,
                "details": {
                  "input": {
                    "key": "amount",
                    "operator": "<=",
                    "value": 150
                  },
                  "actual": 120,
                  "reason": null,
                  "ek_code": null,
                  "context": []
                }
              }
            ]
          }
        ],
        "divergences": [],
        "has_divergences": false,
        "evidence_level": "trace_consistency",
        "terminal_verified": null,
        "final_timestamp": 1700000010,
        "reconstructed_history": {
          "nodes": [
            10,
            20,
            30
          ],
          "edges": [
            101,
            102
          ]
        },
        "source_kind": "debug_trace",
        "source_hash": "eb9ee1e46c0881d50ee8a672dd966490492b3c82a6caeff25007f7c37413631e",
        "source_graph_code": "expense-review",
        "source_flow_id": 610,
        "source_graph_version": "1.0.0",
        "source_dsl_version": "1.0",
        "source_engine_version": "0.2.0",
        "window": {
          "start_step": 1,
          "end_step": 1
        },
        "source_step_count": 2,
        "source_evidence_level": "trace_consistency",
        "override_keys": [],
        "comparison_scope": "recorded_reconstruction",
        "uncompared_alternative_outcomes": 0
      }
    }
  },
  {
    "name": "replay-compare",
    "request": {
      "method": "POST",
      "path": "/api/replay/compare",
      "body": {
        "session_id": "expense-example",
        "graph_code": "expense-review",
        "engine_version": "0.2.0",
        "allow_side_effects": false,
        "allow_webhooks": false
      },
      "query": []
    },
    "response": {
      "status": 200,
      "headers": {
        "Content-Type": "application/json",
        "X-Trace-Id": "e6b036b2b1ba7803"
      },
      "body": {
        "trace_id": "e6b036b2b1ba7803",
        "session_id": "expense-example",
        "mode": "reeval",
        "final_node_id": 30,
        "final_context": {
          "amount": 120
        },
        "steps": [
          {
            "step_number": 0,
            "node_before": 10,
            "node_after": 20,
            "selected_edge": 101,
            "available_edges": [
              101
            ],
            "context_diff": {
              "amount": 180
            },
            "timestamp": 1700000005,
            "evaluated_conditions": []
          },
          {
            "step_number": 1,
            "node_before": 20,
            "node_after": 30,
            "selected_edge": 102,
            "available_edges": [
              102
            ],
            "context_diff": {
              "amount": 120
            },
            "timestamp": 1700000010,
            "evaluated_conditions": [
              {
                "edge_id": 102,
                "rule": "context_value",
                "result": true,
                "details": {
                  "input": {
                    "key": "amount",
                    "operator": "<=",
                    "value": 150
                  },
                  "actual": 120,
                  "reason": null,
                  "ek_code": null,
                  "context": []
                }
              }
            ]
          }
        ],
        "divergences": [],
        "has_divergences": false,
        "evidence_level": "counterfactual",
        "terminal_verified": true,
        "final_timestamp": 1700000010,
        "reconstructed_history": {
          "nodes": [
            10,
            20,
            30
          ],
          "edges": [
            101,
            102
          ]
        },
        "target_graph_code": "expense-review",
        "target_graph_version": "1.0.0",
        "target_dsl_version": "1.0",
        "target_engine_version": "0.2.0",
        "attempted_step_count": 2,
        "time_basis": "explicit_steps",
        "historical_comparison_complete": true,
        "completed_step_count": 2,
        "stop_reason": null,
        "report_id": "e6b036b2b1ba7803",
        "report_write_confirmed": true,
        "source_kind": "debug_trace",
        "source_hash": "eb9ee1e46c0881d50ee8a672dd966490492b3c82a6caeff25007f7c37413631e",
        "source_graph_code": "expense-review",
        "source_flow_id": 610,
        "source_graph_version": "1.0.0",
        "source_dsl_version": "1.0",
        "source_engine_version": "0.2.0",
        "window": {
          "start_step": 0,
          "end_step": 1
        },
        "source_step_count": 2,
        "source_evidence_level": "trace_consistency",
        "override_keys": [],
        "comparison_scope": "selected_edges_and_boundary",
        "uncompared_alternative_outcomes": 0
      }
    }
  },
  {
    "name": "replay-no-range-on-session",
    "request": {
      "method": "POST",
      "path": "/api/replay/session/expense-example",
      "body": {
        "start_step": 0,
        "end_step": 1
      },
      "query": []
    },
    "response": {
      "status": 400,
      "headers": {
        "Content-Type": "application/json",
        "X-Trace-Id": "3f930e212f99f985"
      },
      "body": {
        "error": {
          "ek_code": "EK-API-001",
          "message": "Request inválida.",
          "severity": "BLOCKER",
          "context": [],
          "hint": null,
          "http": 400,
          "trace_id": "3f930e212f99f985"
        },
        "trace_id": "3f930e212f99f985",
        "session_id": "expense-example"
      }
    }
  },
  {
    "name": "replay-effects-rejected",
    "request": {
      "method": "POST",
      "path": "/api/replay/session/expense-example",
      "body": {
        "allow_side_effects": true
      },
      "query": []
    },
    "response": {
      "status": 400,
      "headers": {
        "Content-Type": "application/json",
        "X-Trace-Id": "4a3875af8dedd9d0"
      },
      "body": {
        "error": {
          "ek_code": "EK-REPLAY-001",
          "message": "Datos de sesión incompletos o inconsistentes para replay.",
          "severity": "BLOCKER",
          "context": [],
          "hint": null,
          "http": 400,
          "trace_id": "4a3875af8dedd9d0"
        },
        "trace_id": "4a3875af8dedd9d0",
        "session_id": "expense-example"
      }
    }
  }
]
