{
  "trace_schema_version": "capsule_replay.trace.v1",
  "trace_id": "base-disciplined-ingress",
  "description": "Show that information enters the runtime through /v1/event and then appears in compile output as structured retained state.",
  "steps": [
    {
      "step_id": "compile_before",
      "endpoint": "/v1/compile",
      "body": {
        "task_id": "proof_base_ingress_task",
        "budget": {
          "total_tokens_max": 5000,
          "section_tokens_max": {
            "TASK": 400,
            "SUCCESS_CRITERIA": 200,
            "CONSTRAINTS": 200,
            "CURRENT_STATE_SNAPSHOT": 500,
            "RECENT_DECISIONS": 300,
            "KNOWN_FACTS": 400,
            "RELEVANT_ARTIFACT_SNIPPETS": 1200,
            "PLAN_SLICE": 300,
            "OPEN_ITEMS_AND_RISKS": 200,
            "OUTPUT_REQUIREMENTS": 200
          }
        },
        "format": {
          "template_id": "default_v1",
          "include_artifact_hashes": true
        }
      }
    },
    {
      "step_id": "event_seed",
      "endpoint": "/v1/event",
      "body": {
        "task_id": "proof_base_ingress_task",
        "step_id": "step_001",
        "idempotency_key": "proof_base_ingress_event_001",
        "event_type": "tool_result",
        "summary_1line": "capture webhook incident code from staging triage",
        "task_title": "Webhook Signature Hotfix",
        "task_goal": "Restore HMAC validation without widening scope",
        "fact_key": "incident_code",
        "fact_value": "OMEGA-9921",
        "payload": {
          "artifacts_inline": [
            {
              "type": "stdout",
              "content": "staging replay showed unsigned webhook accepted",
              "tags": [
                "auth",
                "triage"
              ],
              "related_paths": [
                "src/auth/webhook_guard.rs"
              ]
            }
          ],
          "artifact_refs": [],
          "paths_touched": [
            "src/auth/webhook_guard.rs"
          ]
        }
      }
    },
    {
      "step_id": "compile_after",
      "endpoint": "/v1/compile",
      "body": {
        "task_id": "proof_base_ingress_task",
        "budget": {
          "total_tokens_max": 5000,
          "section_tokens_max": {
            "TASK": 400,
            "SUCCESS_CRITERIA": 200,
            "CONSTRAINTS": 200,
            "CURRENT_STATE_SNAPSHOT": 500,
            "RECENT_DECISIONS": 300,
            "KNOWN_FACTS": 400,
            "RELEVANT_ARTIFACT_SNIPPETS": 1200,
            "PLAN_SLICE": 300,
            "OPEN_ITEMS_AND_RISKS": 200,
            "OUTPUT_REQUIREMENTS": 200
          }
        },
        "format": {
          "template_id": "default_v1",
          "include_artifact_hashes": true
        }
      }
    }
  ]
}
