{
  "schema": "dispatch_entry_wiring_matrix_v2.v1",
  "ts_kst": "2026-05-20 22:35 KST",
  "audit_method": "grep+sed read-only · 메인 리포만(.worktrees 제외 — 격리 dev workspace)",
  "context": "task-2620 audit(S01~S09 정본) + task-2621 production-path wiring(S05 composite L2910/POST L2984, single-team L3993/POST L4065) 사후 재분류",
  "sites_v2_post_task_2621": [
    {
      "site_id": "S01",
      "file": "dispatch.py",
      "role": "host CLI shim — python3 dispatch.py --team ... entry",
      "phase1_classification": "NOT_WIRED",
      "task_2621_change": "task-2620 §2.1 ADDITIVE PATCH 으로 dispatch_callback_contract symbol 추가 import. task-2621 변경 0.",
      "phase2_classification": "SURFACE_REEXPORT_ONLY (회장 caveat 정합 · ledger 48 박제)",
      "production_role": "shim 자체는 production 게이트 아님 · CLI 호출 시 dispatch.core.main → dispatch.dispatch() 로 위임 → S05 task-2621 wiring 에서 실제 gate. 외부 caller 가 'import dispatch' 후 직접 symbol 사용 시 surface 노출용.",
      "is_daily_dispatch_path": true,
      "is_production_gate": false
    },
    {
      "site_id": "S02",
      "file": "dispatch/normal_fallback_callback_helper.py",
      "role": "build_anu_owned_callback_request — ANU-owned callback argv builder",
      "phase1_classification": "WIRED_HELPER_BUILDER (task-2620 §2.1 defensive call to assert_collector_key_is_independent_anu)",
      "task_2621_change": "S05 task-2621 wiring 에서 본 helper 를 build_anu_owned_callback_request 로 invoke (POST-cron fallback 자동 등록). 즉 본 helper 가 production 호출됨.",
      "phase2_classification": "WIRED_HELPER_BUILDER_NOW_PRODUCTION_INVOKED (helper 자체는 import-only 였으나 task-2621 wiring 으로 production path 에서 실제 호출)",
      "is_daily_dispatch_path": true,
      "is_production_gate": true
    },
    {
      "site_id": "S03",
      "file": "dispatch/cron_dispatch_guard.py",
      "role": "guard_dispatch_with_owner / guard_callback_registration — fail-closed composite gate",
      "phase1_classification": "OUT_OF_SCOPE_DOCUMENTED",
      "task_2621_change": "변경 0 — task-2621 의 ADDITIVE PATCH 는 enforce_callback_owner 와 build_anu_owned_callback_request 만 호출. S03 의 guard_dispatch_with_owner / guard_callback_registration 은 task-2621 wiring 에서 호출되지 않음.",
      "phase2_classification": "INDEPENDENT_AUTHORITY_NOT_INVOKED_BY_PRODUCTION (자체 ANU-key 권위 보유 — DEFAULT_ANU_KEYS 기반 fail-closed · 그러나 dispatch.dispatch() 가 본 함수를 호출하지 않음)",
      "production_role": "facade exposure 만 · 외부 caller 가 명시 import 시에만 활성",
      "is_daily_dispatch_path": false,
      "is_production_gate": false,
      "dispatch_callback_contract_chained": false,
      "note": "task-2553+49 era 모듈 · enforce_callback_owner 와 동일 family 의 보완 guard. defense-in-depth 후보 (LOW priority)."
    },
    {
      "site_id": "S04",
      "file": "dispatch/callback_owner_enforcer.py",
      "role": "enforce_callback_owner — ANU-key owner pin enforcer",
      "phase1_classification": "OUT_OF_SCOPE_DOCUMENTED (own authority)",
      "task_2621_change": "★ task-2621 의 ADDITIVE PATCH 가 enforce_callback_owner 를 PRE-cron 게이트로 호출(L2917 composite · L3998 single-team).",
      "phase2_classification": "WIRED_AS_PRODUCTION_GATE_OWN_AUTHORITY (자체 DEFAULT_ANU_KEYS 권위 + task-2621 wiring 으로 production path 에서 실제 호출)",
      "production_role": "+49 era ANU-key 권위의 primary gate · task-2621 이 production 결선 완료",
      "is_daily_dispatch_path": true,
      "is_production_gate": true,
      "dispatch_callback_contract_chained": false,
      "two_system_relationship": "+49 era authority(S04 enforce_callback_owner) 와 task-2614 era authority(dispatch_callback_contract.assert_collector_key_is_independent_anu) 가 task-2621 wiring 에서 병렬 호출됨 — 첫째 PRE-cron 게이트(enforce_callback_owner) · 둘째 helper 내부 chain(build_anu_owned_callback_request 가 assert_collector_key_is_independent_anu 호출). 양 시스템 효과적으로 chain 완료."
    },
    {
      "site_id": "S05",
      "file": "dispatch/__init__.py:dispatch (L3282)",
      "role": "central dispatch flow (resume_from + composite + main path) — production dispatch entry",
      "phase1_classification": "NOT_WIRED (PHASE1 audit 핵심 발견)",
      "task_2621_change": "★★ task-2621 ADDITIVE WIRING — module top imports (L198-220) · composite PRE-cron (L2910-2960) + POST-cron fallback (L2984-3044) · single-team PRE-cron (L3993-4041) + POST-cron fallback (L4065-4124). 두 cokacdir 호출 사이트(L2962·L4043) 모두 ADDITIVE gate 통과.",
      "phase2_classification": "WIRED_PRODUCTION_PATH",
      "production_role": "★★ 일상 dispatch 의 핵심 게이트 — CLI 호출 + import 호출 둘 다 본 함수로 수렴. task-2621 wiring 으로 callback contract 강제 production-wide 완료.",
      "is_daily_dispatch_path": true,
      "is_production_gate": true,
      "dispatch_callback_contract_chained": true
    },
    {
      "site_id": "S06",
      "file": "dispatch/core.py:1-74",
      "role": "facade — guard_dispatch_with_owner / enforce_callback_owner / guard_callback_registration re-export",
      "phase1_classification": "OUT_OF_SCOPE_DOCUMENTED",
      "task_2621_change": "변경 0",
      "phase2_classification": "SURFACE_REEXPORT_ONLY (외부 caller 가 명시 import 시에만 활성 · production 게이트 아님)",
      "is_daily_dispatch_path": false,
      "is_production_gate": false
    },
    {
      "site_id": "S07",
      "file": "dispatch/prompt.py:20-48",
      "role": "facade — build_prompt + normal_fallback_callback_helper symbols re-export",
      "phase1_classification": "OUT_OF_SCOPE_DOCUMENTED",
      "task_2621_change": "변경 0",
      "phase2_classification": "SURFACE_REEXPORT_ONLY (외부 caller 가 명시 import 시에만 활성 · production 게이트 아님)",
      "is_daily_dispatch_path": false,
      "is_production_gate": false
    },
    {
      "site_id": "S08",
      "file": "scripts/run_batch_hold_adjudicator.py:65",
      "role": "BATCH_LEVEL_HOLD adjudicator (CLOSED_ALL_SETTLED Track E/F entrypoint)",
      "phase1_classification": "WIRED",
      "task_2621_change": "변경 0",
      "phase2_classification": "WIRED_SCRIPT (dogfood/Track F entrypoint · explicit dispatch_callback_contract import + use)",
      "is_daily_dispatch_path": false,
      "is_production_gate": false
    },
    {
      "site_id": "S09",
      "file": "tests/regression/test_dispatch_callback_contract.py + test_dispatch_init_callback_wiring.py",
      "role": "regression coverage",
      "phase1_classification": "WIRED",
      "task_2621_change": "★ task-2621 신규 test_dispatch_init_callback_wiring.py 추가 (production path 결선 검증)",
      "phase2_classification": "WIRED_TEST (regression invocation only)",
      "is_daily_dispatch_path": false,
      "is_production_gate": false
    }
  ],
  "additional_production_paths_search": {
    "main_repo_other_cokacdir_subprocess_sites": "scripts/* 대부분 'ZERO subprocess/cokacdir' 또는 'Layer A NO-CRON' 명시 · utils/error_alert.py:109 (subprocess.run([\"cokacdir\", message]) — message 알림 한정·--cron 아님·dispatch path 아님) · utils/normal_completion_callback_collector_entrypoint.py (binding template 만·실 subprocess 0) · utils/cron_targeting_audit.py:402 (cmdline 매칭 audit 유틸·실 subprocess 0)",
    "worktrees_excluded": ".worktrees/* 격리 dev workspace — active production 아님",
    "verdict": "메인 리포 dispatch/__init__.py 외 production cokacdir --cron 호출 사이트 0 — task-2621 wiring 으로 전수 커버"
  },
  "daily_dispatch_path_comparison": {
    "cli_path": "python3 /home/jay/workspace/dispatch.py --team <team> --task-file <path> → dispatch.py shim → dispatch.core.main → dispatch.__init__.main (L4226) → dispatch.dispatch() (L3282) → task-2621 wiring gate (L2910/L3993) → cokacdir --cron (L2962/L4043). ★ task-2621 wiring 통과 필수.",
    "import_path": "import dispatch; dispatch.dispatch(...) → dispatch.__init__.dispatch() (L3282) → task-2621 wiring gate (L2910/L3993) → cokacdir --cron. ★ task-2621 wiring 통과 필수.",
    "facade_path_alternate": "from dispatch.core import dispatch / from dispatch.prompt import build_anu_owned_callback_request — facade re-export. 호출자가 직접 cokacdir 를 invoke 하지 않으면 wiring 우회 위험 없음. 자체 cokacdir invoke 시 본 audit 의 별도 backlog 후보.",
    "conclusion": "★ daily dispatch 의 두 path(CLI + import) 모두 task-2621 wiring 통과 — production-wide 결선 완료 판정 정당화 (단 dispatch.py shim re-export 자체를 production-wide 결선으로 표현 금지 — ledger 48 정합)."
  },
  "callback_mandatory_enforcement_matrix": {
    "normal_callback_anu_key": {
      "PRE_cron_enforce_callback_owner_via_S04": "✓ task-2621 WIRED (L2917 composite · L3998 single-team)",
      "PRE_cron_assert_collector_key_via_dispatch_callback_contract": "△ INDIRECT (helper-internal chain — S02 build_anu_owned_callback_request 가 호출. PRE-cron 시점에는 enforce_callback_owner 만 직접 호출)",
      "PROMPT_LEVEL_instruction": "✓ dispatch prompt 마지막 1줄로 봇에게 ANU-key callback 발사 지시 (doctrine 박제)",
      "COLLECTOR_SIDE_validation": "✓ spawned ANU collector session 이 callback_owner_enforcer 호출"
    },
    "anu_key_fallback_safety_net": {
      "POST_cron_auto_registration": "✓ task-2621 WIRED (L2984 composite POST · L4065 single-team POST). build_anu_owned_callback_request 가 invoke 되어 S02 의 dispatch_callback_contract chain 활성",
      "recovery_only_single_purpose": "✓ no-dual-purpose doctrine 정합 (feedback_no_dual_purpose_watcher)",
      "cancel_on_success": "△ collector adjudication durable-success 확정 후 수동 제거 (자동화 미완·다음 단계 후보)",
      "byte_limit_3900_guard": "✗ runtime guard 미구현 (CALLBACK_PROMPT_BYTE_AUDIT 단계 — doctrine/guide 단계만)"
    }
  },
  "not_wired_remaining_production": [],
  "summary": {
    "production_path_callback_contract": "WIRED (task-2621 ADDITIVE wiring · CLI+import 둘 다 통과)",
    "two_system_relationship": "+49 era (enforce_callback_owner DEFAULT_ANU_KEYS 권위) + task-2614 era (dispatch_callback_contract.assert_collector_key_is_independent_anu) 가 task-2621 wiring 에서 병렬 호출 — chain 효과적 완료",
    "remaining_facades": "S01·S06·S07 SURFACE_REEXPORT_ONLY (production 게이트 아님 · 외부 caller surface 노출만)",
    "byte_limit_runtime_guard": "★ NOT_YET — doctrine/guide 단계만 · runtime guard 별도 chair-authorized task (10표본 분석 후 결정)",
    "cancel_on_success_automation": "★ NOT_YET — 현재 수동 제거 · 자동화 후보 (LOW priority)",
    "additional_main_repo_production_paths": "ZERO — main repo dispatch/__init__.py 외 production cokacdir --cron 사이트 없음"
  }
}
