{
  "trace_schema_version": "capsule_replay.trace.v1",
  "trace_id": "base-useful-reemission",
  "description": "Show that compile emits bounded context that is useful to downstream execution, not only archival storage.",
  "steps": [
    {
      "step_id": "event_triage",
      "endpoint": "/v1/event",
      "body": {
        "task_id": "proof_base_reemit_task",
        "step_id": "step_001",
        "idempotency_key": "proof_base_reemit_event_001",
        "event_type": "tool_result",
        "summary_1line": "triage unsigned webhook replay regression",
        "task_title": "Webhook Signature Hotfix",
        "task_goal": "Hand downstream execution a bounded and actionable context bundle",
        "fact_key": "incident_code",
        "fact_value": "OMEGA-9921",
        "payload": {
          "artifacts_inline": [
            {
              "type": "stdout",
              "content": "unsigned replay accepted in staging",
              "tags": [
                "auth",
                "triage"
              ],
              "related_paths": [
                "tests/auth/webhook_guard.rs"
              ]
            }
          ],
          "artifact_refs": [],
          "paths_touched": [
            "tests/auth/webhook_guard.rs"
          ]
        }
      }
    },
    {
      "step_id": "event_target",
      "endpoint": "/v1/event",
      "body": {
        "task_id": "proof_base_reemit_task",
        "step_id": "step_002",
        "idempotency_key": "proof_base_reemit_event_002",
        "event_type": "tool_result",
        "summary_1line": "identify target file for signature restore",
        "task_title": "Webhook Signature Hotfix",
        "task_goal": "Hand downstream execution a bounded and actionable context bundle",
        "fact_key": "target_file",
        "fact_value": "src/auth/webhook_guard.rs",
        "payload": {
          "artifacts_inline": [
            {
              "type": "diff",
              "content": "restore signature verification call in webhook guard",
              "tags": [
                "auth",
                "fix"
              ],
              "related_paths": [
                "src/auth/webhook_guard.rs"
              ]
            }
          ],
          "artifact_refs": [],
          "paths_touched": [
            "src/auth/webhook_guard.rs"
          ]
        }
      }
    },
    {
      "step_id": "event_action",
      "endpoint": "/v1/event",
      "body": {
        "task_id": "proof_base_reemit_task",
        "step_id": "step_003",
        "idempotency_key": "proof_base_reemit_event_003",
        "event_type": "tool_result",
        "summary_1line": "choose re-enable HMAC verification as next action",
        "task_title": "Webhook Signature Hotfix",
        "task_goal": "Hand downstream execution a bounded and actionable context bundle",
        "fact_key": "next_action",
        "fact_value": "re-enable HMAC verification",
        "payload": {
          "artifacts_inline": [],
          "artifact_refs": [],
          "paths_touched": [
            "src/auth/webhook_guard.rs"
          ]
        }
      }
    },
    {
      "step_id": "compile_after",
      "endpoint": "/v1/compile",
      "body": {
        "task_id": "proof_base_reemit_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
        }
      }
    }
  ]
}
