{
  "append_used": "NO",
  "authority": "Run long tasks with status, timeout, retry, cancel and ledger linkage instead of blocking the UI or chat.",
  "contract_id": "execution_job_queue_contract",
  "created_artifacts": [
    "/home/yeff/public_html/devon/canon/execution/state/execution_job_queue_contract.json",
    "/home/yeff/public_html/devon/canon/execution/state/job_queue_latest.json",
    "/home/yeff/public_html/devon/canon/execution/state/job_queue_state.json",
    "/home/yeff/public_html/devon/canon/execution/state/job_queue.jsonl"
  ],
  "created_at": "2026-06-26T08:01:05.815592+00:00",
  "created_endpoint": "/home/yeff/public_html/devon/canon/execution/ui/jobs.php",
  "final_readiness_result": {
    "event_id": "job_queue_task_runner_final_readiness_15677",
    "event_index": 15677,
    "finalized_at": "2026-06-26T16:34:20.818069+00:00",
    "job_queue_jsonl_appended": "NO",
    "next_integration_module": "terminal_output_panel",
    "next_required_action": "COMPLETE",
    "remote_yeffai_mutation": "NO",
    "status": "PASS"
  },
  "job_execution_policy_file": "/home/yeff/public_html/devon/canon/execution/state/job_execution_policy.json",
  "job_execution_policy_latest_file": "/home/yeff/public_html/devon/canon/execution/state/job_execution_policy_latest.json",
  "job_schema": {
    "attempt": "integer",
    "created_at": "ISO-8601 UTC timestamp",
    "error": "string or null",
    "evidence_path": "string or null",
    "finished_at": "ISO-8601 UTC timestamp or null",
    "job_id": "stable unique job id",
    "job_type": "scan|validation|backup|build|patch|custom",
    "ledger_event_id": "string or null",
    "max_attempts": "integer",
    "requested_by": "local_canon|panel|operator",
    "started_at": "ISO-8601 UTC timestamp or null",
    "status": "pending|running|pass|fail|timeout|cancelled",
    "timeout_seconds": "integer"
  },
  "last_job_execution_policy_test": {
    "ledger_event_emitted": "NO",
    "real_job_mutation_performed": "NO",
    "remote_yeffai_mutation": "NO",
    "status_transition_performed": "NO",
    "test_output": "/home/yeff/public_html/devon/_backup/test_job_execution_policy_policy_only_no_heredoc_20260626_125906/job_execution_policy_test_result_20260626_125906.json",
    "tested_at": "2026-06-26T15:59:09.010542+00:00"
  },
  "last_ledger_event_emission_test": {
    "event_id": "job_queue_task_runner_ledger_emission_test_15665",
    "event_index": 15665,
    "job_queue_jsonl_appended": "NO",
    "remote_yeffai_mutation": "NO",
    "test_output": "/home/yeff/public_html/devon/_backup/test_ledger_event_emission_real_structure_local_only_no_jsonl_no_remote_no_heredoc_20260626_132338/ledger_event_emission_real_structure_test_result_20260626_132338.json",
    "tested_at": "2026-06-26T16:23:41.662036+00:00"
  },
  "last_no_op_status_transition_test": {
    "ledger_event_emitted": "NO",
    "real_queue_mutation_performed": "NO",
    "remote_yeffai_mutation": "NO",
    "test_output": "/home/yeff/public_html/devon/_backup/test_no_op_status_transition_no_ledger_no_remote_no_heredoc_20260626_130614/no_op_status_transition_test_result_20260626_130614.json",
    "tested_at": "2026-06-26T16:06:16.764780+00:00"
  },
  "last_runner_test": {
    "append_used": "NO",
    "queue_depth": 0,
    "remote_yeffai_mutation": "NO",
    "runner_latest_file": "/home/yeff/public_html/devon/canon/execution/state/job_queue_runner_latest.json",
    "runner_output": "/home/yeff/public_html/devon/_backup/test_job_queue_runner_empty_queue_no_heredoc_20260626_054906/job_queue_runner_test_output_20260626_054906.json",
    "tested_at": "2026-06-26T08:49:08.322634+00:00"
  },
  "ledger_policy": {
    "event_source": "job_queue_task_runner",
    "queue_event_required": "YES",
    "status_transition_event_required": "YES",
    "terminal_event_required": "YES"
  },
  "module_id": "job_queue_task_runner",
  "next_required_action": "COMPLETE",
  "next_required_action_source": "execution_server_integration_plan.integration_backlog.4.next_action",
  "pending_artifacts": [
    "job execution policy test",
    "job status transition test",
    "ledger event emission test"
  ],
  "reconciliations": {
    "append_used": "NO",
    "job_execution_policy": "/home/yeff/public_html/devon/canon/execution/state/job_execution_policy.json",
    "job_execution_policy_created_at": "2026-06-26T15:21:42.930867+00:00",
    "job_queue_runner": "/home/yeff/public_html/devon/canon/execution/bin/job_queue_runner.php",
    "job_queue_runner_created_at": "2026-06-26T08:30:35.720244+00:00",
    "job_queue_runner_tested_at": "2026-06-26T08:49:08.322634+00:00",
    "jobs_endpoint": "/home/yeff/public_html/devon/canon/execution/ui/jobs.php",
    "jobs_endpoint_created_at": "2026-06-26T08:23:37.894035+00:00",
    "next_required_action_after": "TEST_JOB_EXECUTION_POLICY",
    "next_required_action_before": "CREATE_JOB_EXECUTION_POLICY",
    "remote_yeffai_mutation": "NO",
    "runner_test_output": "/home/yeff/public_html/devon/_backup/test_job_queue_runner_empty_queue_no_heredoc_20260626_054906/job_queue_runner_test_output_20260626_054906.json"
  },
  "remote_yeffai_mutation": "NO",
  "required_artifacts": [
    "state/job_queue.jsonl",
    "ui/jobs.php",
    "job status schema",
    "timeout policy"
  ],
  "required_evidence": [
    "job can be queued",
    "job status moves through pending/running/pass/fail",
    "job emits ledger event",
    "job timeout is observable"
  ],
  "risk_level": "HIGH",
  "runner_file": "/home/yeff/public_html/devon/canon/execution/bin/job_queue_runner.php",
  "runner_latest_file": "/home/yeff/public_html/devon/canon/execution/state/job_queue_runner_latest.json",
  "scope": {
    "local_canon_mutation": "YES",
    "purpose": "define the asynchronous job queue contract before implementing the protected jobs endpoint and runner execution surface",
    "remote_server_mutation": "NO",
    "ui_runtime_mutation": "NO"
  },
  "security_policy": {
    "job_payload_must_not_execute_without_runner_validation": "YES",
    "remote_mutation_default": "DENY",
    "shell_execution_requires_later_shell_gate": "YES",
    "unauthenticated_endpoint_must_return": "AUTH_REQUIRED"
  },
  "source_next_action": "CREATE_JOB_QUEUE_CONTRACT",
  "status": "PASS",
  "status_model": {
    "allowed_statuses": [
      "pending",
      "running",
      "pass",
      "fail",
      "timeout",
      "cancelled"
    ],
    "canonical_panel_statuses": [
      "PASS",
      "FAIL",
      "MISSING"
    ],
    "non_terminal_statuses": [
      "pending",
      "running"
    ],
    "terminal_statuses": [
      "pass",
      "fail",
      "timeout",
      "cancelled"
    ]
  },
  "timeout_policy": {
    "default_timeout_seconds": 900,
    "max_timeout_seconds": 7200,
    "retry_requires_explicit_policy": "YES",
    "timeout_must_emit_ledger_event": "YES",
    "timeout_must_leave_observable_state": "YES"
  },
  "title": "Job Queue / Task Runner",
  "updated_at": "2026-06-26T16:34:20.818069+00:00",
  "validation": {
    "contract_file_exists": "PASS",
    "controlled_ledger_event_emitted": "PASS",
    "final_readiness": "PASS",
    "job_execution_policy_exists": "PASS",
    "job_execution_policy_tested": "PASS",
    "job_queue_jsonl_unchanged": "PASS",
    "jobs_endpoint_auth_required_default": "PASS",
    "jobs_endpoint_exists": "PASS",
    "jobs_endpoint_read_only": "PASS",
    "ledger_event_emission_tested": "PASS",
    "no_op_status_transition_tested": "PASS",
    "queue_jsonl_file_exists": "PASS",
    "queue_latest_file_exists": "PASS",
    "queue_state_file_exists": "PASS",
    "remote_yeffai_mutation": "NO",
    "runner_empty_queue_test": "PASS",
    "runner_execution_exists": "PASS",
    "runner_file_exists": "PASS",
    "runner_lock_cleanup": "PASS",
    "runner_lock_policy_exists": "PASS",
    "runner_ready": "PASS",
    "runner_remote_mutation_guard": "PASS",
    "runner_tested": "PASS",
    "runner_timeout_policy_bound": "PASS",
    "status_transition_tested": "PASS"
  }
}
