{
  "packet_version": "v1",
  "packet_type": "chair_signature_packet_per_axis",
  "recorded_at": "2026-05-24T12:55:00+09:00",
  "recorded_by": "ANU_chair_facing_session",
  "source_attribution": "LOG_LOOKUP_OR_SCHEDULE_HISTORY_VERIFICATION",
  "scope_note": "이번 packet은 실행/적용 승인 아님. Axis 2 단독 서명 준비 단계 (회장 verbatim 2026-05-24). HARNESS_ENFORCED 전체 진입 아님. live activation 금지.",

  "axis_id": 2,
  "axis_name": "callback_collector_control_plane",
  "axis_task_id_source": "task-2644+1",
  "axis_runtime_guarded_status": "AUTHORITATIVE_CLEAN_REPLACEMENT / RUNTIME_GUARDED / LIVE_NOT_APPLIED",
  "axis_runtime_guarded_marker_ref": "memory/events/task-2644+1.closeout-260524.json",
  "axis_finalize_commit": "f4bded9cad73d16fa9e9f68badd492642c61da7e",
  "axis_branch": "task/task-2644+1-dev4",
  "axis_staged_worktree": "/home/jay/workspace/.worktrees/task-2644+1-dev4",

  "axis_2_core_purpose_chair_verbatim": "본 회장-facing ANU 세션 inbound 자동 인식",
  "axis_2_problem_to_solve": "본 회장-facing ANU 세션은 ANU collector 별도 spawn 세션과 분리되어 callback inbound 직접 수신 0. 사후 schedule_history/cron-history 조회만 가능 (LOG_LOOKUP_OR_SCHEDULE_HISTORY_VERIFICATION). Axis 2 hooks 3종 live activation 후에야 본 세션이 SessionStart hook으로 collector mode 자동 진입 + Stop hook으로 처리 의무 종료 차단 + UserPromptSubmit hook으로 .callback 감지 가능 → RECEIVED_INBOUND_THIS_SESSION 정당 주장 가능해짐.",

  "field_01_hooks_3_to_register_in_live_settings_json": [
    {
      "hook_role": "SessionStart",
      "staged_path": "task/task-2644+1-dev4:hooks/session_start_anu_callback_collector_v2.py",
      "live_target_path": "~/.claude/settings.json hooks.SessionStart 항목 추가",
      "purpose": "collector mode 감지 + 의무 prompt/context 주입 + Axis 1 helper 호출 트리거"
    },
    {
      "hook_role": "Stop",
      "staged_path": "task/task-2644+1-dev4:hooks/stop_anu_callback_collector_verifier_v2.py",
      "live_target_path": "~/.claude/settings.json hooks.Stop 항목 추가",
      "purpose": "처리 의무 미완료/거짓 표현/next_action 누락 시 종료 차단 (Stop hook 종료 차단 10 조건 강제)"
    },
    {
      "hook_role": "UserPromptSubmit",
      "staged_path": "task/task-2644+1-dev4:hooks/user_prompt_submit_hook_callback_inbox_v2.py",
      "live_target_path": "~/.claude/settings.json hooks.UserPromptSubmit 항목 추가",
      "purpose": ".callback 파일 감지 이중 안전망 (회장 본 세션 prompt 제출 시 inbox 폴더 스캔)"
    }
  ],

  "field_02_session_start_collector_mode_detection_method": {
    "trigger_condition": "cokacdir spawned 세션 시 환경변수 또는 envelope 파일로 'ANU_CALLBACK_COLLECTOR' 모드 감지",
    "detection_artifacts": [
      "envelope file: /home/jay/.cokacdir/workspace/<cron_id>/envelope.json (collector_role=COLLECTOR_ANU 필드)",
      "system_prompt 파일 메타데이터 (cokacdir append-system-prompt-file에 collector flag 포함)",
      "task md 본문에 [ANU_CALLBACK_COLLECTOR ...] 헤더 명시"
    ],
    "on_match_action": "Axis 1 helper 3종 (callback_registration / authority_validator / source_cross_checker) 자동 import + 4 source cross-check + actual owner key 검증 + ledger row append",
    "on_no_match_action": "일반 세션 모드 (collector mode 아닌 dispatch executor) — 본 hook은 noop으로 통과"
  },

  "field_03_stop_hook_processing_obligation_termination_block_method": {
    "block_conditions_chair_verbatim_10": [
      "collector mode 에서 callback_envelope_parsed 없으면 fail",
      "context_recovered 없으면 fail",
      "terminal_state_classified 없으면 fail",
      "next_action_decided 없으면 fail",
      "auto_action_dispatched / chair_report_emitted / noop_terminal_recorded / batch_wait_recorded 중 하나 없으면 fail",
      "callback_ledger_written 없으면 fail",
      "'callback received / 도착 / 수신' 표현 + source attribution 없으면 fail",
      "schedule_history 사후 조회를 inbound 수신처럼 표현하면 fail",
      "next_action_result 없으면 fail (회장 보강 #9)",
      "state_version mismatch / .anu_state stale 인데 SAFE_DEGRADED_MODE / HOLD_FOR_CHAIR 둘 다 아니면 fail (회장 보강 #10)"
    ],
    "block_action": "Stop hook이 종료 거부 (return exit_code=1 또는 hook block 메커니즘) → 봇이 추가 처리 후 재시도 가능",
    "audit_log_path": "memory/system/.stop_hook_block_audit.jsonl"
  },

  "field_04_user_prompt_submit_callback_inbox_detection_method": {
    "trigger_condition": "회장 본 세션 prompt 제출 시점에 hook 발동",
    "inbox_scan_path": "/home/jay/workspace/memory/.callback_inbox/*.callback",
    "callback_file_format": "JSON · {schema_version, callback_id, task_id, schedule_id, source_cron_id, owner_key, envelope_bytes, ledger_pointer, ttl_at, processed=false}",
    "on_callback_file_found_action": "본 회장-facing ANU 세션의 context에 callback summary 자동 주입 + .callback 파일을 .callback.acked로 rename + ledger pointer 첨부",
    "on_no_callback_file_action": "noop · 일반 prompt 처리",
    "race_condition_protection": "file lock + processed=true atomic flag set"
  },

  "field_05_received_inbound_this_session_claim_condition": {
    "current_status_strict": "본 회장-facing ANU 세션은 RECEIVED_INBOUND_THIS_SESSION 주장 절대 불가 (구조적 한계)",
    "after_axis_2_live_activation_allowed_condition": [
      "UserPromptSubmit hook이 .callback 파일을 인식했고",
      "callback 파일 내 ledger_pointer가 Axis 1 ledger row와 1:1 매칭되며",
      "ledger row의 source_attribution == CALLBACK_COLLECTOR_PROCESSED (다른 collector 세션이 작성한 것 확인) AND",
      "본 ANU 세션이 그 callback 정보를 직접 응답에 활용했고",
      "본 ANU 세션이 그 callback에 대한 next_action을 본 세션 내에서 실행 또는 결정했을 때만"
    ],
    "incorrect_claim_consequence": "Stop hook 종료 차단 조건 #7 '수신 표현 + source attribution 없으면 fail' 적용 + ANU 자가 박제 위반 (회장 박제 doctrine 위반)"
  },

  "field_06_callback_file_path_and_ttl": {
    "inbox_directory": "/home/jay/workspace/memory/.callback_inbox/",
    "filename_template": "<callback_id>__<schedule_id>__<ts>.callback",
    "ttl_hours_default": 72,
    "ttl_extension_rule": "회장 본 세션이 ack하지 않은 callback은 72시간 후 .callback.expired로 rename · ledger row는 보존 · 회장 보고 1회 (ANU collector가 자동 보고)",
    "cleanup_policy": "expired callback은 14일 후 archive/ 폴더로 이동 · 삭제 0 (감사 흔적 보존)"
  },

  "field_07_dedupe_condition": {
    "primary_dedupe_key": "callback_id (envelope 헤더의 callback_id 필드)",
    "secondary_dedupe_key": "(task_id, source_cron_id) 튜플",
    "dedupe_table_path": "memory/system/.callback_dedupe_table.jsonl",
    "dedupe_rule": "동일 callback_id 또는 동일 (task_id, source_cron_id) 튜플 발견 시 두번째 callback file 생성 차단 + .callback.duplicate marker 생성",
    "race_protection": "file lock (flock) + atomic move"
  },

  "field_08_failure_fallback_and_rollback": {
    "L1_failure_trigger_30sec": [
      "SessionStart hook unhandled exception (세션 spawn 자체 차단)",
      "Stop hook 자체 crash (모든 봇 종료 차단)",
      "UserPromptSubmit hook crash (회장 prompt 처리 차단)"
    ],
    "L1_rollback_action": "~/.claude/settings.json hooks 항목 3개 자동 제거 + cokacdir 재기동 신호 + ANU 회장 보고",
    "L1_rollback_command_template": "git revert <axis_2_settings_patch_commit> + python3 utils/hooks_unregister.py --axis 2",
    "L2_failure_trigger_5min": [
      "callback collector 세션이 spawn되어도 context_recovered=false 5회 연속",
      "Axis 1 ledger row append 누락 5회 연속",
      "본 ANU 세션이 .callback 파일을 5회 연속 인식 실패"
    ],
    "L2_rollback_action": "Axis 2 hooks 비활성화 (settings.json 항목 비활성 flag 토글) + Axis 2 RUNTIME_GUARDED 복귀 + 회장 보고",
    "chair_rollback_trigger": "회장 verbatim revert signature 시 즉시 rollback"
  },

  "field_09_axis_1_ledger_linkage_method": {
    "axis_1_ledger_path": "memory/system/.callback_ledger.jsonl",
    "axis_2_callback_file_to_ledger_pointer_format": "ledger row의 (callback_id, schedule_id) 쌍을 .callback 파일에 ledger_pointer 필드로 포함",
    "linkage_verification": "Axis 2 UserPromptSubmit hook이 .callback 파일 처리 시 ledger_pointer로 ledger row 조회 → actual_owner_key_verified=true 확인 → 본 세션 context 주입 허용",
    "linkage_failure_action": ".callback 파일 파싱 PASS이나 ledger row 미존재 시 'CALLBACK_FILE_WITHOUT_LEDGER_ENTRY' state로 분류 + 회장 보고",
    "axis_1_ledger_v1_compat": "Axis 2 hooks는 Axis 1 ledger v1 schema 100% 호환 (utils.callback_registration.v1 marker schema)"
  },

  "field_10_forbidden_during_axis_2_signature_packet_prep": [
    "Axis 3 touch (task-2643 PreToolUse runtime guard)",
    "real auto-merge",
    "PR #141 pilot",
    "BOT App token 사용",
    "commit / push / PR / merge",
    "live settings.json 수정 (★ Axis 2 packet 준비 단계 · live 적용은 별도 chair signature 필요)",
    "live cokacdir 수정",
    "Axis 1 helper 변경 (Axis 1 LIVE_VERIFIED 모듈은 read-only)",
    "HARNESS_ENFORCED 전체 선언",
    "callback system verified 전체 선언",
    "chair_authorization_id 임의 변형 (verbatim 그대로 사용만 허용)"
  ],

  "chair_authorization_id_placeholder": {
    "current_value": "PENDING_CHAIR_VERBATIM_STRING_SIGNATURE",
    "anu_random_generation_forbidden": true,
    "axis_1_placeholder_literal_id_reused_forbidden": true,
    "expected_format_template": "CHAIR-AUTH-AXIS-2-YYYYMMDD-<chair_verbatim_string>",
    "issuance_condition": "회장 verbatim 직접 문자열 명시 (실제 random 또는 의미있는 문자열) · placeholder 그대로 박제 금지 (회장 박제 hygiene WARN doctrine 적용)"
  },

  "completion_state": "AXIS_2_SIGNATURE_PACKET_READY",
  "next_action_required": "회장 verbatim per-axis signature (Axis 2 단독 · 실제 chair_authorization_id 문자열 직접 명시) · ANU 자동 생성 절대 금지 · Axis 1 placeholder 재사용 절대 금지",
  "axis_3_packet_status": "NOT_PREPARED (회장 axis 2 signature 후 axis 3 packet 준비 단계 진입)",
  "chair_directive_ref": "회장 verbatim 2026-05-24 Axis 2 chair signature packet 준비 + 본 회장-facing ANU 세션 inbound 자동 인식 핵심 목표 + 10 필수 필드"
}
