# main_moved_gate.py
$ exit=0
{
  "ok": true,
  "base_sha": "7598e66b903de584c74d787ada4313f6deb70cb7",
  "recorded_base": "eb077068deb227b84d791b71f0d738773ad2a0d0",
  "head": "714519c64cd0fb338b10b44c0376dfee83ad1dc2",
  "main_moved": true,
  "overlap": [
    "HOTFIX.md",
    "app/auth.py",
    "tests/test_hotfix_no_bypass.py"
  ],
  "files_main": [
    "HOTFIX.md",
    "app/auth.py",
    "tests/test_hotfix_no_bypass.py"
  ],
  "files_pr": [
    ".agent-session-base",
    "HOTFIX.md",
    "app/auth.py",
    "tests/test_hotfix_no_bypass.py"
  ],
  "hotfixes": [
    {
      "sha": "6496969a2f8ae910c87f82b442e6ee1b7b386598",
      "subject": "hotfix: remove debug bypass token from auth.check_token",
      "reason": [
        "HOTFIX.md",
        "subject",
        "paths:app/auth.py"
      ]
    }
  ],
  "errors": [],
  "notes": [
    "main moved eb07706 -> 7598e66, but HEAD already contains current main; staleness resolved — still run hotfix_hunk_guard on the resolution"
  ],
  "gate": "main_moved_gate"
}
PASS main_moved_gate: main moved eb07706 -> 7598e66, but HEAD already contains current main; staleness resolved — still run hotfix_hunk_guard on the resolution

# hotfix_hunk_guard.py
$ exit=0
{
  "ok": true,
  "base_sha": "7598e66b903de584c74d787ada4313f6deb70cb7",
  "recorded_base": "eb077068deb227b84d791b71f0d738773ad2a0d0",
  "head": "714519c64cd0fb338b10b44c0376dfee83ad1dc2",
  "conflicted": false,
  "merge_note": "head already contains main; inspecting HEAD tree",
  "hotfixes": [
    {
      "sha": "6496969a2f8ae910c87f82b442e6ee1b7b386598",
      "subject": "hotfix: remove debug bypass token from auth.check_token",
      "reason": [
        "listed in HOTFIX.md",
        "subject 'hotfix: remove debug bypass token from auth.check_token'",
        "touched app/auth.py"
      ]
    }
  ],
  "hunks": [
    {
      "hotfix": {
        "sha": "6496969a2f8ae910c87f82b442e6ee1b7b386598",
        "subject": "hotfix: remove debug bypass token from auth.check_token",
        "reason": [
          "listed in HOTFIX.md",
          "subject 'hotfix: remove debug bypass token from auth.check_token'",
          "touched app/auth.py"
        ]
      },
      "files": [
        {
          "path": "app/auth.py",
          "status": "M",
          "returned_lines": [],
          "ok": true
        },
        {
          "path": "tests/test_hotfix_no_bypass.py",
          "status": "A",
          "ok": true
        }
      ]
    }
  ],
  "errors": [],
  "gate": "hotfix_hunk_guard"
}
PASS hotfix_hunk_guard: 1 hotfix commit(s) survived in merge result (main=7598e66)
