loopx 0.4.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (811) hide show
  1. loopx/__init__.py +5 -0
  2. loopx/agent_onboarding.py +654 -0
  3. loopx/agent_registry.py +112 -0
  4. loopx/ark_managed_agent_host.py +59 -0
  5. loopx/authority.py +805 -0
  6. loopx/benchmark.py +2875 -0
  7. loopx/benchmark_adapters/__init__.py +1 -0
  8. loopx/benchmark_adapters/agentissue.py +2644 -0
  9. loopx/benchmark_adapters/agents_last_exam.py +3998 -0
  10. loopx/benchmark_adapters/edgebench.py +322 -0
  11. loopx/benchmark_adapters/skillsbench.py +5978 -0
  12. loopx/benchmark_adapters/skillsbench_acp_failure_policy.py +143 -0
  13. loopx/benchmark_adapters/skillsbench_acp_process.py +31 -0
  14. loopx/benchmark_adapters/skillsbench_acp_relay.py +4832 -0
  15. loopx/benchmark_adapters/skillsbench_batch.py +124 -0
  16. loopx/benchmark_adapters/skillsbench_bridge_guard.py +209 -0
  17. loopx/benchmark_adapters/skillsbench_bridge_summary.py +203 -0
  18. loopx/benchmark_adapters/skillsbench_codex_goal_recovery.py +271 -0
  19. loopx/benchmark_adapters/skillsbench_codex_goal_trace.py +81 -0
  20. loopx/benchmark_adapters/skillsbench_codex_runtime.py +339 -0
  21. loopx/benchmark_adapters/skillsbench_dockerfile_runtime.py +467 -0
  22. loopx/benchmark_adapters/skillsbench_failure_signals.py +652 -0
  23. loopx/benchmark_adapters/skillsbench_proxy_runtime.py +327 -0
  24. loopx/benchmark_adapters/skillsbench_remote_bridge.py +402 -0
  25. loopx/benchmark_adapters/skillsbench_result_discovery.py +143 -0
  26. loopx/benchmark_adapters/skillsbench_runner_profile.py +436 -0
  27. loopx/benchmark_adapters/skillsbench_runner_source.py +99 -0
  28. loopx/benchmark_adapters/skillsbench_setup_preflight.py +771 -0
  29. loopx/benchmark_adapters/skillsbench_signals.py +15 -0
  30. loopx/benchmark_adapters/skillsbench_task_source.py +141 -0
  31. loopx/benchmark_adapters/skillsbench_turn_route.py +723 -0
  32. loopx/benchmark_adapters/skillsbench_turn_runtime.py +1069 -0
  33. loopx/benchmark_adapters/skillsbench_typed_repair.py +689 -0
  34. loopx/benchmark_adapters/skillsbench_uv_cache.py +111 -0
  35. loopx/benchmark_adapters/skillsbench_verifier_bootstrap.py +227 -0
  36. loopx/benchmark_adapters/skillsbench_verifier_cache.py +138 -0
  37. loopx/benchmark_adapters/terminal_bench.py +10078 -0
  38. loopx/benchmark_case_analysis.py +1276 -0
  39. loopx/benchmark_case_state.py +1079 -0
  40. loopx/benchmark_core/__init__.py +239 -0
  41. loopx/benchmark_core/adapter.py +84 -0
  42. loopx/benchmark_core/artifacts.py +517 -0
  43. loopx/benchmark_core/attempts.py +199 -0
  44. loopx/benchmark_core/container_exec.py +216 -0
  45. loopx/benchmark_core/io.py +68 -0
  46. loopx/benchmark_core/lifecycle.py +211 -0
  47. loopx/benchmark_core/loop_protocol.py +689 -0
  48. loopx/benchmark_core/observable_handles.py +348 -0
  49. loopx/benchmark_core/parity.py +256 -0
  50. loopx/benchmark_core/remote_closeout.py +482 -0
  51. loopx/benchmark_core/rounds.py +215 -0
  52. loopx/benchmark_core/route_profile.py +509 -0
  53. loopx/benchmark_core/run_permissions.py +206 -0
  54. loopx/benchmark_core/split_control.py +925 -0
  55. loopx/benchmark_core/turn_fidelity.py +326 -0
  56. loopx/benchmark_ledger.py +3793 -0
  57. loopx/benchmark_ledger_countability.py +372 -0
  58. loopx/benchmark_ledger_current.py +724 -0
  59. loopx/benchmark_trajectory.py +405 -0
  60. loopx/benchmarks/__init__.py +1 -0
  61. loopx/benchmarks/qualification/__init__.py +1 -0
  62. loopx/benchmarks/qualification/release_outcome_baseline.py +360 -0
  63. loopx/benchmarks/read_models/__init__.py +1 -0
  64. loopx/benchmarks/read_models/benchmark_attempt_accounting.py +53 -0
  65. loopx/benchmarks/read_models/benchmark_comparison.py +414 -0
  66. loopx/benchmarks/read_models/benchmark_event_timeline.py +113 -0
  67. loopx/benchmarks/read_models/benchmark_experiment_report.py +475 -0
  68. loopx/benchmarks/read_models/benchmark_learning_ledger.py +137 -0
  69. loopx/benchmarks/read_models/benchmark_lifecycle_contracts.py +228 -0
  70. loopx/benchmarks/read_models/benchmark_projection.py +723 -0
  71. loopx/benchmarks/read_models/benchmark_result.py +146 -0
  72. loopx/benchmarks/read_models/benchmark_run_execution_contract.py +116 -0
  73. loopx/benchmarks/read_models/benchmark_run_failure.py +157 -0
  74. loopx/benchmarks/read_models/benchmark_run_metrics.py +213 -0
  75. loopx/benchmarks/read_models/benchmark_run_post_execution.py +635 -0
  76. loopx/benchmarks/read_models/benchmark_run_pre_execution.py +541 -0
  77. loopx/benchmarks/read_models/benchmark_status_compaction.py +1255 -0
  78. loopx/benchmarks/read_models/benchmark_status_runner.py +780 -0
  79. loopx/benchmarks/read_models/goal_start_control_score.py +857 -0
  80. loopx/benchmarks/read_models/skillsbench_post_run_debug.py +746 -0
  81. loopx/benchmarks/read_models/skillsbench_verifier_attribution.py +269 -0
  82. loopx/bootstrap.py +1116 -0
  83. loopx/bootstrap_command_pack.py +2167 -0
  84. loopx/boundary_authority.py +199 -0
  85. loopx/canary/__init__.py +1 -0
  86. loopx/canary/maintainability_ratchet.py +800 -0
  87. loopx/canary/planner.py +1984 -0
  88. loopx/canary/premerge.py +1130 -0
  89. loopx/canary/qualification_profiles.py +309 -0
  90. loopx/canary/quality_surface_catalog.py +838 -0
  91. loopx/canary/release_profiles.py +51 -0
  92. loopx/canary/runner.py +1107 -0
  93. loopx/canary/smoke_health.py +581 -0
  94. loopx/canary/smoke_profiles.py +212 -0
  95. loopx/capabilities/__init__.py +0 -0
  96. loopx/capabilities/agent_turn_recall/__init__.py +17 -0
  97. loopx/capabilities/agent_turn_recall/cli.py +369 -0
  98. loopx/capabilities/agent_turn_recall/core.py +296 -0
  99. loopx/capabilities/auto_research/__init__.py +16 -0
  100. loopx/capabilities/auto_research/bootstrap_contract.py +157 -0
  101. loopx/capabilities/auto_research/cli.py +1468 -0
  102. loopx/capabilities/auto_research/core.py +11 -0
  103. loopx/capabilities/auto_research/defaults.py +79 -0
  104. loopx/capabilities/auto_research/demo_e2e.py +1848 -0
  105. loopx/capabilities/auto_research/demo_supervisor.py +186 -0
  106. loopx/capabilities/auto_research/evidence_packet.py +767 -0
  107. loopx/capabilities/auto_research/human_view.py +794 -0
  108. loopx/capabilities/auto_research/kernel.py +191 -0
  109. loopx/capabilities/auto_research/knn_demo_workspace.py +322 -0
  110. loopx/capabilities/auto_research/live_evidence.py +248 -0
  111. loopx/capabilities/auto_research/preset.py +176 -0
  112. loopx/capabilities/auto_research/research_state.py +1085 -0
  113. loopx/capabilities/auto_research/role_profiles.py +394 -0
  114. loopx/capabilities/auto_research/rollout_append.py +97 -0
  115. loopx/capabilities/auto_research/terminal_result_contract.py +422 -0
  116. loopx/capabilities/auto_research/terminal_result_projection.py +171 -0
  117. loopx/capabilities/auto_research/terminal_result_query.py +233 -0
  118. loopx/capabilities/auto_research/terminal_results.py +349 -0
  119. loopx/capabilities/auto_research/user_contract.py +190 -0
  120. loopx/capabilities/auto_research/worker_loop.py +163 -0
  121. loopx/capabilities/auto_research/worker_runtime.py +777 -0
  122. loopx/capabilities/auto_research/worker_skill/SKILL.md +343 -0
  123. loopx/capabilities/benchmark_toolkit/__init__.py +19 -0
  124. loopx/capabilities/benchmark_toolkit/integrity.py +387 -0
  125. loopx/capabilities/catalog.py +1875 -0
  126. loopx/capabilities/change_quality/__init__.py +19 -0
  127. loopx/capabilities/change_quality/cli.py +171 -0
  128. loopx/capabilities/change_quality/context.py +156 -0
  129. loopx/capabilities/change_quality/oracles.py +269 -0
  130. loopx/capabilities/change_quality/policy.py +34 -0
  131. loopx/capabilities/change_quality/receipt.py +482 -0
  132. loopx/capabilities/change_quality/result.py +493 -0
  133. loopx/capabilities/change_quality/scope.py +171 -0
  134. loopx/capabilities/change_quality/shadow.py +680 -0
  135. loopx/capabilities/content_ops/__init__.py +0 -0
  136. loopx/capabilities/content_ops/cli.py +649 -0
  137. loopx/capabilities/content_ops/connector_packets.py +164 -0
  138. loopx/capabilities/content_ops/item_lifecycle.py +1000 -0
  139. loopx/capabilities/content_ops/layout.py +451 -0
  140. loopx/capabilities/content_ops/markdown.py +456 -0
  141. loopx/capabilities/content_ops/schemas.py +51 -0
  142. loopx/capabilities/content_ops/social_browser_x.py +107 -0
  143. loopx/capabilities/content_ops/surface.py +1956 -0
  144. loopx/capabilities/content_ops/templates/layout-catalog-v0.json +72 -0
  145. loopx/capabilities/context_providers/__init__.py +36 -0
  146. loopx/capabilities/context_providers/base.py +189 -0
  147. loopx/capabilities/context_providers/factory.py +32 -0
  148. loopx/capabilities/context_providers/openviking.py +702 -0
  149. loopx/capabilities/context_providers/service_ownership.py +185 -0
  150. loopx/capabilities/decision_context/__init__.py +129 -0
  151. loopx/capabilities/decision_context/architecture.py +83 -0
  152. loopx/capabilities/decision_context/assembler.py +849 -0
  153. loopx/capabilities/decision_context/catalog_entry.py +195 -0
  154. loopx/capabilities/decision_context/cli.py +310 -0
  155. loopx/capabilities/decision_context/cursor_commit.py +535 -0
  156. loopx/capabilities/decision_context/outcome_feedback.py +352 -0
  157. loopx/capabilities/decision_context/packets.py +654 -0
  158. loopx/capabilities/decision_context/private_state.py +189 -0
  159. loopx/capabilities/decision_context/profile.py +453 -0
  160. loopx/capabilities/decision_context/providers.py +228 -0
  161. loopx/capabilities/decision_context/review_settlement.py +136 -0
  162. loopx/capabilities/decision_context/runtime.py +273 -0
  163. loopx/capabilities/decision_context/sources.py +415 -0
  164. loopx/capabilities/explore/__init__.py +1 -0
  165. loopx/capabilities/explore/activation.py +198 -0
  166. loopx/capabilities/explore/adaptive_replay_planner.py +221 -0
  167. loopx/capabilities/explore/child_replay_runtime.py +463 -0
  168. loopx/capabilities/explore/composition_frontier.py +291 -0
  169. loopx/capabilities/explore/counterfactual_runtime.py +578 -0
  170. loopx/capabilities/explore/episode_runtime.py +647 -0
  171. loopx/capabilities/explore/harness_checkpoint.py +171 -0
  172. loopx/capabilities/explore/harness_gate.py +115 -0
  173. loopx/capabilities/explore/harness_runtime.py +1124 -0
  174. loopx/capabilities/explore/replay_metrics.py +206 -0
  175. loopx/capabilities/explore/replay_runtime.py +1271 -0
  176. loopx/capabilities/explore/resource_portfolio.py +173 -0
  177. loopx/capabilities/explore/result_log.py +974 -0
  178. loopx/capabilities/explore/router_state.py +432 -0
  179. loopx/capabilities/explore/source_history_reconcile.py +255 -0
  180. loopx/capabilities/explore/speculative_scheduler.py +498 -0
  181. loopx/capabilities/explore/todo_branch_plan.py +650 -0
  182. loopx/capabilities/explore/todo_evidence.py +141 -0
  183. loopx/capabilities/explore/trace_runtime.py +284 -0
  184. loopx/capabilities/explore/worker_branch_plan.py +1257 -0
  185. loopx/capabilities/integration_branch/__init__.py +13 -0
  186. loopx/capabilities/integration_branch/cli.py +148 -0
  187. loopx/capabilities/integration_branch/core.py +916 -0
  188. loopx/capabilities/issue_fix/__init__.py +19 -0
  189. loopx/capabilities/issue_fix/acceptance_loop.py +1050 -0
  190. loopx/capabilities/issue_fix/candidate_evidence.py +503 -0
  191. loopx/capabilities/issue_fix/candidate_preflight.py +676 -0
  192. loopx/capabilities/issue_fix/cli.py +1822 -0
  193. loopx/capabilities/issue_fix/cli_input.py +87 -0
  194. loopx/capabilities/issue_fix/content_ops_cli.py +148 -0
  195. loopx/capabilities/issue_fix/discovered_issue_promotion.py +947 -0
  196. loopx/capabilities/issue_fix/explore_projection.py +710 -0
  197. loopx/capabilities/issue_fix/feasibility.py +542 -0
  198. loopx/capabilities/issue_fix/github_public.py +661 -0
  199. loopx/capabilities/issue_fix/intake_surface.py +832 -0
  200. loopx/capabilities/issue_fix/metadata_preview.py +218 -0
  201. loopx/capabilities/issue_fix/metrics_projection.py +1340 -0
  202. loopx/capabilities/issue_fix/metrics_supplement.py +634 -0
  203. loopx/capabilities/issue_fix/metrics_supplement_cli.py +127 -0
  204. loopx/capabilities/issue_fix/outcome_projection.py +1235 -0
  205. loopx/capabilities/issue_fix/periodic_report.py +189 -0
  206. loopx/capabilities/issue_fix/pr_description.py +418 -0
  207. loopx/capabilities/issue_fix/pr_gate_reconcile.py +496 -0
  208. loopx/capabilities/issue_fix/pr_gate_reconcile_cli.py +464 -0
  209. loopx/capabilities/issue_fix/pr_lifecycle.py +1327 -0
  210. loopx/capabilities/issue_fix/pr_lifecycle_rollout.py +85 -0
  211. loopx/capabilities/issue_fix/pr_monitor_materialization.py +257 -0
  212. loopx/capabilities/issue_fix/pr_review_ack.py +439 -0
  213. loopx/capabilities/issue_fix/provider_hooks.py +24 -0
  214. loopx/capabilities/issue_fix/repository_commit_evidence.py +186 -0
  215. loopx/capabilities/issue_fix/repository_context.py +457 -0
  216. loopx/capabilities/issue_fix/repository_memory.py +459 -0
  217. loopx/capabilities/issue_fix/repository_memory_provider.py +1454 -0
  218. loopx/capabilities/issue_fix/repository_snapshot.py +454 -0
  219. loopx/capabilities/issue_fix/reviewer_cli.py +917 -0
  220. loopx/capabilities/issue_fix/reviewer_notification.py +882 -0
  221. loopx/capabilities/issue_fix/reviewer_notification_drain.py +942 -0
  222. loopx/capabilities/issue_fix/reviewer_recommendation.py +1057 -0
  223. loopx/capabilities/issue_fix/reviewer_request.py +1282 -0
  224. loopx/capabilities/issue_fix/reward_memory.py +879 -0
  225. loopx/capabilities/issue_fix/workflow_plan.py +1286 -0
  226. loopx/capabilities/material_lifecycle/__init__.py +161 -0
  227. loopx/capabilities/material_lifecycle/_validation.py +183 -0
  228. loopx/capabilities/material_lifecycle/apply.py +672 -0
  229. loopx/capabilities/material_lifecycle/architecture.py +122 -0
  230. loopx/capabilities/material_lifecycle/cli.py +161 -0
  231. loopx/capabilities/material_lifecycle/decision_planning.py +470 -0
  232. loopx/capabilities/material_lifecycle/explore_execution.py +306 -0
  233. loopx/capabilities/material_lifecycle/intake.py +869 -0
  234. loopx/capabilities/material_lifecycle/inventory.py +147 -0
  235. loopx/capabilities/material_lifecycle/lifecycle.py +98 -0
  236. loopx/capabilities/material_lifecycle/preparation.py +147 -0
  237. loopx/capabilities/material_lifecycle/project_skill.py +83 -0
  238. loopx/capabilities/material_lifecycle/ranking.py +267 -0
  239. loopx/capabilities/material_lifecycle/readable_projection.py +500 -0
  240. loopx/capabilities/material_lifecycle/rebuild.py +480 -0
  241. loopx/capabilities/material_lifecycle/settlement.py +238 -0
  242. loopx/capabilities/periodic_report/__init__.py +71 -0
  243. loopx/capabilities/periodic_report/adapters.py +939 -0
  244. loopx/capabilities/periodic_report/archive.py +422 -0
  245. loopx/capabilities/periodic_report/bindings.py +705 -0
  246. loopx/capabilities/periodic_report/cli.py +277 -0
  247. loopx/capabilities/periodic_report/core.py +691 -0
  248. loopx/capabilities/periodic_report/extension_envelope.py +66 -0
  249. loopx/capabilities/periodic_report/presets.py +103 -0
  250. loopx/capabilities/periodic_report/profile.py +235 -0
  251. loopx/capabilities/periodic_report/project_progress.py +179 -0
  252. loopx/capabilities/periodic_report/triggers.py +452 -0
  253. loopx/capabilities/pr_review_queue/__init__.py +17 -0
  254. loopx/capabilities/pr_review_queue/core.py +506 -0
  255. loopx/capabilities/pr_review_queue/review_contract.py +506 -0
  256. loopx/capabilities/registry.py +192 -0
  257. loopx/capabilities/reward_memory/__init__.py +75 -0
  258. loopx/capabilities/reward_memory/application.py +819 -0
  259. loopx/capabilities/reward_memory/architecture.py +572 -0
  260. loopx/capabilities/reward_memory/candidate_review.py +511 -0
  261. loopx/capabilities/reward_memory/cli.py +469 -0
  262. loopx/capabilities/reward_memory/dogfood.py +574 -0
  263. loopx/capabilities/reward_memory/evaluation.py +296 -0
  264. loopx/capabilities/reward_memory/evaluation_fixtures.py +362 -0
  265. loopx/capabilities/reward_memory/experiment.py +567 -0
  266. loopx/capabilities/reward_memory/health.py +222 -0
  267. loopx/capabilities/reward_memory/ingestion.py +519 -0
  268. loopx/capabilities/reward_memory/registry.py +600 -0
  269. loopx/capabilities/reward_memory/runtime_hooks.py +312 -0
  270. loopx/capabilities/reward_memory/scoped_feedback.py +173 -0
  271. loopx/capabilities/semantic_preference/__init__.py +12 -0
  272. loopx/capabilities/semantic_preference/cli.py +189 -0
  273. loopx/capabilities/semantic_preference/contract.py +592 -0
  274. loopx/capabilities/semantic_preference/reward_memory.py +62 -0
  275. loopx/capabilities/value_connectors/__init__.py +1 -0
  276. loopx/capabilities/value_connectors/cli.py +401 -0
  277. loopx/capabilities/value_connectors/finance_extension_migration.py +108 -0
  278. loopx/capabilities/value_connectors/install_check.py +147 -0
  279. loopx/capabilities/value_connectors/planner.py +733 -0
  280. loopx/capabilities/value_connectors/source_map.py +446 -0
  281. loopx/claude_goal_baseline.py +138 -0
  282. loopx/claude_goal_mode/__init__.py +23 -0
  283. loopx/claude_goal_mode/hooks/goal_policy.py +212 -0
  284. loopx/claude_goal_mode/hooks/goal_state.py +139 -0
  285. loopx/claude_goal_mode/mcp/loopx_mcp.py +167 -0
  286. loopx/claude_goal_mode/scripts/connect.py +103 -0
  287. loopx/claude_goal_mode/scripts/goalmode_cmd.py +241 -0
  288. loopx/claude_goal_mode/scripts/install.py +328 -0
  289. loopx/claude_goal_mode/statusline/goal_status.py +97 -0
  290. loopx/cli.py +836 -0
  291. loopx/cli_commands/__init__.py +334 -0
  292. loopx/cli_commands/_host_thread.py +13 -0
  293. loopx/cli_commands/agentissue_runner_flow.py +447 -0
  294. loopx/cli_commands/agents_last_exam.py +160 -0
  295. loopx/cli_commands/agents_last_exam_baked_input.py +302 -0
  296. loopx/cli_commands/agents_last_exam_host_codex.py +374 -0
  297. loopx/cli_commands/agents_last_exam_launch_dry_run.py +372 -0
  298. loopx/cli_commands/agents_last_exam_local_plan.py +322 -0
  299. loopx/cli_commands/agents_last_exam_runner_source.py +352 -0
  300. loopx/cli_commands/agents_last_exam_task_material.py +335 -0
  301. loopx/cli_commands/agents_last_exam_validation_gate.py +236 -0
  302. loopx/cli_commands/benchmark_boundary.py +499 -0
  303. loopx/cli_commands/benchmark_dispatch.py +161 -0
  304. loopx/cli_commands/benchmark_release_outcome.py +123 -0
  305. loopx/cli_commands/benchmark_review_lifecycle.py +1275 -0
  306. loopx/cli_commands/benchmark_run_ledger.py +763 -0
  307. loopx/cli_commands/benchmark_run_ledger_case_analysis.py +249 -0
  308. loopx/cli_commands/benchmark_run_ledger_classification.py +45 -0
  309. loopx/cli_commands/benchmark_run_ledger_maintenance.py +486 -0
  310. loopx/cli_commands/benchmark_run_ledger_maintenance_registration.py +342 -0
  311. loopx/cli_commands/benchmark_run_ledger_maintenance_rendering.py +233 -0
  312. loopx/cli_commands/benchmark_run_ledger_parity.py +92 -0
  313. loopx/cli_commands/bootstrap_connect.py +238 -0
  314. loopx/cli_commands/canary.py +707 -0
  315. loopx/cli_commands/canary_release_qualification.py +79 -0
  316. loopx/cli_commands/capability.py +96 -0
  317. loopx/cli_commands/doctor.py +43 -0
  318. loopx/cli_commands/dreaming.py +143 -0
  319. loopx/cli_commands/edgebench.py +205 -0
  320. loopx/cli_commands/evidence_log.py +275 -0
  321. loopx/cli_commands/explore.py +989 -0
  322. loopx/cli_commands/explore_planning_commands.py +157 -0
  323. loopx/cli_commands/extension.py +271 -0
  324. loopx/cli_commands/first_run_report.py +73 -0
  325. loopx/cli_commands/goal_channel.py +656 -0
  326. loopx/cli_commands/handoff_mode.py +158 -0
  327. loopx/cli_commands/history.py +622 -0
  328. loopx/cli_commands/host_mode_plan.py +113 -0
  329. loopx/cli_commands/lark_inbox.py +431 -0
  330. loopx/cli_commands/lark_kanban.py +629 -0
  331. loopx/cli_commands/ml_experiment.py +321 -0
  332. loopx/cli_commands/multi_agent.py +211 -0
  333. loopx/cli_commands/opencode2_goal_worker.py +217 -0
  334. loopx/cli_commands/pr_review.py +167 -0
  335. loopx/cli_commands/presentation.py +218 -0
  336. loopx/cli_commands/preset.py +96 -0
  337. loopx/cli_commands/project.py +150 -0
  338. loopx/cli_commands/project_lifecycle.py +915 -0
  339. loopx/cli_commands/quota.py +859 -0
  340. loopx/cli_commands/quota_registration.py +241 -0
  341. loopx/cli_commands/quota_request.py +113 -0
  342. loopx/cli_commands/ready_score.py +110 -0
  343. loopx/cli_commands/registry_admin.py +975 -0
  344. loopx/cli_commands/registry_admin_configure.py +344 -0
  345. loopx/cli_commands/registry_admin_peer.py +84 -0
  346. loopx/cli_commands/registry_authority.py +218 -0
  347. loopx/cli_commands/review_batch.py +146 -0
  348. loopx/cli_commands/slash_commands.py +145 -0
  349. loopx/cli_commands/start_goal.py +251 -0
  350. loopx/cli_commands/starter.py +175 -0
  351. loopx/cli_commands/starter_bootstrap.py +179 -0
  352. loopx/cli_commands/starter_bootstrap_registration.py +198 -0
  353. loopx/cli_commands/starter_runtime_idle.py +107 -0
  354. loopx/cli_commands/starter_scheduler.py +207 -0
  355. loopx/cli_commands/starter_session_runtime.py +152 -0
  356. loopx/cli_commands/starter_visible_common.py +54 -0
  357. loopx/cli_commands/starter_visible_driver.py +161 -0
  358. loopx/cli_commands/starter_visible_pilot.py +278 -0
  359. loopx/cli_commands/status.py +867 -0
  360. loopx/cli_commands/status_registration.py +239 -0
  361. loopx/cli_commands/summary_all.py +222 -0
  362. loopx/cli_commands/support_control.py +809 -0
  363. loopx/cli_commands/support_control_registry.py +68 -0
  364. loopx/cli_commands/support_control_supervisor.py +289 -0
  365. loopx/cli_commands/task_lease.py +306 -0
  366. loopx/cli_commands/terminal_bench_adapter.py +717 -0
  367. loopx/cli_commands/terminal_bench_environment_result.py +1246 -0
  368. loopx/cli_commands/todo.py +940 -0
  369. loopx/cli_commands/todo_argument_validation.py +572 -0
  370. loopx/cli_commands/todo_event.py +114 -0
  371. loopx/cli_commands/turn.py +804 -0
  372. loopx/cli_commands/version.py +46 -0
  373. loopx/cli_commands/worker_bridge.py +659 -0
  374. loopx/cli_rollout.py +314 -0
  375. loopx/codex_cli_goal_tui.py +672 -0
  376. loopx/codex_cli_probe.py +1530 -0
  377. loopx/codex_cli_probe_markdown.py +935 -0
  378. loopx/codex_cli_runtime_probe.py +733 -0
  379. loopx/codex_cli_scheduler.py +564 -0
  380. loopx/codex_goal_baseline.py +620 -0
  381. loopx/configuration_catalog.py +617 -0
  382. loopx/configure_goal.py +1375 -0
  383. loopx/contract.py +996 -0
  384. loopx/control_plane/__init__.py +71 -0
  385. loopx/control_plane/agents/__init__.py +1 -0
  386. loopx/control_plane/agents/agent_lane_recommendation.py +516 -0
  387. loopx/control_plane/agents/agent_scope.py +1578 -0
  388. loopx/control_plane/agents/agent_scope_frontier.py +60 -0
  389. loopx/control_plane/agents/capability_gate.py +531 -0
  390. loopx/control_plane/agents/identity.py +140 -0
  391. loopx/control_plane/agents/legacy_migration.py +169 -0
  392. loopx/control_plane/agents/management_projection.py +658 -0
  393. loopx/control_plane/agents/material_frontier.py +608 -0
  394. loopx/control_plane/agents/material_handoff.py +156 -0
  395. loopx/control_plane/agents/multi_agent/__init__.py +1 -0
  396. loopx/control_plane/agents/multi_agent/codex_executable.py +207 -0
  397. loopx/control_plane/agents/multi_agent/collective_round_ledger.py +387 -0
  398. loopx/control_plane/agents/multi_agent/contract.py +474 -0
  399. loopx/control_plane/agents/multi_agent/recipe.py +110 -0
  400. loopx/control_plane/agents/multi_agent/role_successor.py +297 -0
  401. loopx/control_plane/agents/multi_agent/runtime_scripts.py +426 -0
  402. loopx/control_plane/agents/multi_agent/visible_launch_policy.py +149 -0
  403. loopx/control_plane/agents/multi_agent/visible_wake_scheduler.py +392 -0
  404. loopx/control_plane/agents/profile.py +216 -0
  405. loopx/control_plane/agents/runtime_model.py +73 -0
  406. loopx/control_plane/agents/subagent_activity.py +164 -0
  407. loopx/control_plane/agents/supervisor.py +544 -0
  408. loopx/control_plane/agents/supervisor_events.py +462 -0
  409. loopx/control_plane/agents/supervisor_inject.py +204 -0
  410. loopx/control_plane/agents/work_mode.py +56 -0
  411. loopx/control_plane/agents/workspace_guard.py +364 -0
  412. loopx/control_plane/effect_program.py +644 -0
  413. loopx/control_plane/goals/__init__.py +1 -0
  414. loopx/control_plane/goals/active_state_event_projection.py +103 -0
  415. loopx/control_plane/goals/active_state_metadata.py +47 -0
  416. loopx/control_plane/goals/active_state_sections.py +58 -0
  417. loopx/control_plane/goals/configure_goal_service.py +354 -0
  418. loopx/control_plane/goals/contract_health.py +132 -0
  419. loopx/control_plane/goals/dreaming.py +152 -0
  420. loopx/control_plane/goals/global_registry_health.py +199 -0
  421. loopx/control_plane/goals/global_registry_shadow.py +33 -0
  422. loopx/control_plane/goals/goal_channel.py +34 -0
  423. loopx/control_plane/goals/goal_channel_projection.py +560 -0
  424. loopx/control_plane/goals/goal_frontier/__init__.py +1917 -0
  425. loopx/control_plane/goals/goal_frontier/ack_policy.py +149 -0
  426. loopx/control_plane/goals/goal_frontier/outcome_continuity.py +437 -0
  427. loopx/control_plane/goals/goal_frontier/replan_rules.py +210 -0
  428. loopx/control_plane/goals/goal_frontier/semantic_history.py +314 -0
  429. loopx/control_plane/goals/goal_frontier/terminal.py +180 -0
  430. loopx/control_plane/goals/goal_vision.py +443 -0
  431. loopx/control_plane/goals/goal_vision_policy.py +36 -0
  432. loopx/control_plane/goals/goal_vision_state.py +62 -0
  433. loopx/control_plane/goals/goal_vision_wait.py +290 -0
  434. loopx/control_plane/goals/path_resolution.py +20 -0
  435. loopx/control_plane/goals/start_contract.py +206 -0
  436. loopx/control_plane/goals/vision_checkpoint.py +92 -0
  437. loopx/control_plane/handoff/__init__.py +1 -0
  438. loopx/control_plane/handoff/cross_runtime_impl_review.py +311 -0
  439. loopx/control_plane/handoff/delivery_contract.py +161 -0
  440. loopx/control_plane/handoff/handoff_runs.py +71 -0
  441. loopx/control_plane/handoff/project_handoff.py +155 -0
  442. loopx/control_plane/handoff/review_batch.py +463 -0
  443. loopx/control_plane/handoff/review_packet_context.py +216 -0
  444. loopx/control_plane/heartbeat/agent.py +173 -0
  445. loopx/control_plane/heartbeat/budget.py +66 -0
  446. loopx/control_plane/heartbeat/builder.py +501 -0
  447. loopx/control_plane/heartbeat/host.py +64 -0
  448. loopx/control_plane/heartbeat/rules.py +68 -0
  449. loopx/control_plane/heartbeat/task_body.py +759 -0
  450. loopx/control_plane/heartbeat/visible_goal.py +86 -0
  451. loopx/control_plane/projects/__init__.py +1 -0
  452. loopx/control_plane/projects/contract.py +25 -0
  453. loopx/control_plane/projects/registry.py +663 -0
  454. loopx/control_plane/quota/__init__.py +1 -0
  455. loopx/control_plane/quota/cli_projection.py +704 -0
  456. loopx/control_plane/quota/decision_summary.py +431 -0
  457. loopx/control_plane/quota/effect_program.py +152 -0
  458. loopx/control_plane/quota/error_codes.py +19 -0
  459. loopx/control_plane/quota/goal_boundary.py +464 -0
  460. loopx/control_plane/quota/heartbeat_receipt.py +277 -0
  461. loopx/control_plane/quota/heartbeat_recommendation.py +718 -0
  462. loopx/control_plane/quota/host_poll_receipts.py +162 -0
  463. loopx/control_plane/quota/live_decision.py +142 -0
  464. loopx/control_plane/quota/monitor_poll.py +786 -0
  465. loopx/control_plane/quota/policy_constants.py +40 -0
  466. loopx/control_plane/quota/projection_repair.py +262 -0
  467. loopx/control_plane/quota/recent_runs.py +210 -0
  468. loopx/control_plane/quota/scheduler_ack.py +490 -0
  469. loopx/control_plane/quota/selected_todo_projection.py +139 -0
  470. loopx/control_plane/quota/settlement.py +437 -0
  471. loopx/control_plane/quota/settlement_cli.py +246 -0
  472. loopx/control_plane/quota/settlement_validation.py +64 -0
  473. loopx/control_plane/quota/settlement_workspace_causality.py +180 -0
  474. loopx/control_plane/quota/should_run.py +249 -0
  475. loopx/control_plane/quota/should_run_packet.py +1165 -0
  476. loopx/control_plane/quota/should_run_prepare.py +675 -0
  477. loopx/control_plane/quota/slot_accounting.py +1123 -0
  478. loopx/control_plane/quota/spend_sources.py +11 -0
  479. loopx/control_plane/quota/stall_repair.py +397 -0
  480. loopx/control_plane/quota/states.py +29 -0
  481. loopx/control_plane/quota/task_orchestration.py +448 -0
  482. loopx/control_plane/quota/task_orchestration_admission.py +497 -0
  483. loopx/control_plane/quota/turn_envelope.py +889 -0
  484. loopx/control_plane/quota/usage_summary.py +140 -0
  485. loopx/control_plane/reward_memory.py +43 -0
  486. loopx/control_plane/runtime/__init__.py +2 -0
  487. loopx/control_plane/runtime/active_user_assisted_pilot.py +275 -0
  488. loopx/control_plane/runtime/agent_scoped_evidence_log.py +435 -0
  489. loopx/control_plane/runtime/decision_freshness.py +203 -0
  490. loopx/control_plane/runtime/event_ledger.py +197 -0
  491. loopx/control_plane/runtime/event_store_migration_bridge.py +196 -0
  492. loopx/control_plane/runtime/goal_project_route.py +70 -0
  493. loopx/control_plane/runtime/local_state_write_correctness.py +242 -0
  494. loopx/control_plane/runtime/promotion_readiness.py +152 -0
  495. loopx/control_plane/runtime/public_safety.py +120 -0
  496. loopx/control_plane/runtime/run_artifacts.py +78 -0
  497. loopx/control_plane/runtime/run_compaction.py +397 -0
  498. loopx/control_plane/runtime/run_context_retention.py +241 -0
  499. loopx/control_plane/runtime/run_history.py +132 -0
  500. loopx/control_plane/runtime/run_index_duplicates.py +205 -0
  501. loopx/control_plane/runtime/run_index_rebuild.py +263 -0
  502. loopx/control_plane/runtime/run_ingest_health.py +336 -0
  503. loopx/control_plane/runtime/runtime_projection_route.py +624 -0
  504. loopx/control_plane/runtime/runtime_projection_writer.py +98 -0
  505. loopx/control_plane/runtime/session_runtime.py +339 -0
  506. loopx/control_plane/runtime/shared_runtime_material_projection.py +332 -0
  507. loopx/control_plane/runtime/shared_runtime_refresh_projection.py +183 -0
  508. loopx/control_plane/runtime/stale_latest_run.py +90 -0
  509. loopx/control_plane/runtime/status_classifications.py +49 -0
  510. loopx/control_plane/runtime/status_projection_cache.py +235 -0
  511. loopx/control_plane/runtime/stride_observation.py +144 -0
  512. loopx/control_plane/runtime/time.py +39 -0
  513. loopx/control_plane/runtime/trajectory_hygiene.py +149 -0
  514. loopx/control_plane/runtime/validation_command.py +69 -0
  515. loopx/control_plane/scheduler/__init__.py +1 -0
  516. loopx/control_plane/scheduler/ack.py +329 -0
  517. loopx/control_plane/scheduler/arbitration.py +188 -0
  518. loopx/control_plane/scheduler/automation_liveness.py +183 -0
  519. loopx/control_plane/scheduler/execution_context.py +555 -0
  520. loopx/control_plane/scheduler/external_evidence_observation.py +428 -0
  521. loopx/control_plane/scheduler/monitor_display.py +143 -0
  522. loopx/control_plane/scheduler/monitor_poll_policy.py +161 -0
  523. loopx/control_plane/scheduler/monitor_poll_writeback.py +351 -0
  524. loopx/control_plane/scheduler/monitor_target.py +64 -0
  525. loopx/control_plane/scheduler/monitor_todo.py +146 -0
  526. loopx/control_plane/scheduler/monitor_wait.py +237 -0
  527. loopx/control_plane/scheduler/scheduler_hint.py +1284 -0
  528. loopx/control_plane/scheduler/state.py +354 -0
  529. loopx/control_plane/scheduler/state_transition_rules.py +179 -0
  530. loopx/control_plane/scheduler/time.py +10 -0
  531. loopx/control_plane/settlement_driver.py +293 -0
  532. loopx/control_plane/status/__init__.py +6 -0
  533. loopx/control_plane/status/active_state_projection.py +105 -0
  534. loopx/control_plane/status/agent_lane_projection.py +375 -0
  535. loopx/control_plane/status/attention_projection.py +74 -0
  536. loopx/control_plane/status/autonomous_replan_projection.py +103 -0
  537. loopx/control_plane/status/collection.py +140 -0
  538. loopx/control_plane/status/contract_projection.py +31 -0
  539. loopx/control_plane/status/dreaming_projection.py +52 -0
  540. loopx/control_plane/status/goal_attention_projection.py +157 -0
  541. loopx/control_plane/status/lifecycle_projection.py +110 -0
  542. loopx/control_plane/status/monitor_display_projection.py +69 -0
  543. loopx/control_plane/status/registry_health_projection.py +75 -0
  544. loopx/control_plane/status/run_projection.py +70 -0
  545. loopx/control_plane/status/runtime_summaries.py +161 -0
  546. loopx/control_plane/testing/__init__.py +1 -0
  547. loopx/control_plane/testing/actual_default_model_behavior_portfolio.py +1371 -0
  548. loopx/control_plane/testing/canary_harness.py +182 -0
  549. loopx/control_plane/testing/capability_monitor_repair_tool_behavior.py +674 -0
  550. loopx/control_plane/testing/cli_output_budget.py +807 -0
  551. loopx/control_plane/testing/cli_output_differential.py +250 -0
  552. loopx/control_plane/testing/cli_output_semantics.py +87 -0
  553. loopx/control_plane/testing/control_plane_composition_scenarios.py +225 -0
  554. loopx/control_plane/testing/decision_replay.py +268 -0
  555. loopx/control_plane/testing/doubao_model_behavior_actor.py +559 -0
  556. loopx/control_plane/testing/model_behavior_corpus.py +344 -0
  557. loopx/control_plane/testing/model_behavior_qualification.py +769 -0
  558. loopx/control_plane/testing/model_behavior_retained_cases.py +235 -0
  559. loopx/control_plane/testing/model_tool_behavior.py +536 -0
  560. loopx/control_plane/testing/onboarding_model_behavior_qualification.py +642 -0
  561. loopx/control_plane/testing/quota_fixtures.py +208 -0
  562. loopx/control_plane/testing/quota_should_run_parity.py +57 -0
  563. loopx/control_plane/testing/release_commit_qualification.py +671 -0
  564. loopx/control_plane/testing/replan_semantic_action_behavior.py +1302 -0
  565. loopx/control_plane/testing/scoped_gate_successor_tool_behavior.py +527 -0
  566. loopx/control_plane/testing/selected_todo_tool_behavior.py +1002 -0
  567. loopx/control_plane/testing/terminal_settlement_tool_behavior.py +656 -0
  568. loopx/control_plane/todos/__init__.py +1 -0
  569. loopx/control_plane/todos/active_state_editing.py +296 -0
  570. loopx/control_plane/todos/active_state_todo_parser.py +138 -0
  571. loopx/control_plane/todos/active_state_todos.py +175 -0
  572. loopx/control_plane/todos/addition.py +103 -0
  573. loopx/control_plane/todos/claim_visibility.py +253 -0
  574. loopx/control_plane/todos/completed_archive.py +139 -0
  575. loopx/control_plane/todos/completion_fence.py +49 -0
  576. loopx/control_plane/todos/completion_policy.py +153 -0
  577. loopx/control_plane/todos/completion_validation.py +248 -0
  578. loopx/control_plane/todos/completion_validation_accountability.py +27 -0
  579. loopx/control_plane/todos/completion_validation_projection.py +57 -0
  580. loopx/control_plane/todos/contract.py +1476 -0
  581. loopx/control_plane/todos/decision_scope.py +554 -0
  582. loopx/control_plane/todos/deferred_resume.py +546 -0
  583. loopx/control_plane/todos/durable_completion.py +201 -0
  584. loopx/control_plane/todos/event_writeback.py +484 -0
  585. loopx/control_plane/todos/frontier_deadline.py +132 -0
  586. loopx/control_plane/todos/handoff_gate.py +283 -0
  587. loopx/control_plane/todos/handoff_mode.py +444 -0
  588. loopx/control_plane/todos/handoff_note.py +202 -0
  589. loopx/control_plane/todos/line_update.py +361 -0
  590. loopx/control_plane/todos/list_projection.py +205 -0
  591. loopx/control_plane/todos/markdown.py +199 -0
  592. loopx/control_plane/todos/monitor_metadata.py +88 -0
  593. loopx/control_plane/todos/mutation_authority.py +299 -0
  594. loopx/control_plane/todos/projection.py +655 -0
  595. loopx/control_plane/todos/quota_summary.py +1138 -0
  596. loopx/control_plane/todos/route_continuation.py +267 -0
  597. loopx/control_plane/todos/succession_warning.py +174 -0
  598. loopx/control_plane/todos/summary_item.py +223 -0
  599. loopx/control_plane/todos/text.py +30 -0
  600. loopx/control_plane/todos/todo_index.py +226 -0
  601. loopx/control_plane/todos/todo_summary.py +1458 -0
  602. loopx/control_plane/todos/unblock_resume.py +326 -0
  603. loopx/control_plane/todos/user_gate.py +263 -0
  604. loopx/control_plane/todos/write_hint.py +63 -0
  605. loopx/control_plane/todos/write_policy.py +135 -0
  606. loopx/control_plane/turn_driver/__init__.py +85 -0
  607. loopx/control_plane/turn_driver/codex_cli.py +502 -0
  608. loopx/control_plane/turn_driver/driver.py +355 -0
  609. loopx/control_plane/turn_driver/executor.py +1468 -0
  610. loopx/control_plane/turn_driver/loop_controller.py +669 -0
  611. loopx/control_plane/turn_driver/settlement.py +318 -0
  612. loopx/control_plane/turn_driver/transaction.py +375 -0
  613. loopx/control_plane/work_items/__init__.py +1 -0
  614. loopx/control_plane/work_items/attention_fields.py +56 -0
  615. loopx/control_plane/work_items/attention_item.py +77 -0
  616. loopx/control_plane/work_items/attention_queue.py +322 -0
  617. loopx/control_plane/work_items/attention_routing.py +213 -0
  618. loopx/control_plane/work_items/autonomous_candidates.py +135 -0
  619. loopx/control_plane/work_items/autonomous_replan_ack.py +276 -0
  620. loopx/control_plane/work_items/autonomous_replan_obligation.py +786 -0
  621. loopx/control_plane/work_items/backlog_hygiene.py +59 -0
  622. loopx/control_plane/work_items/capability_monitor_fallback.py +221 -0
  623. loopx/control_plane/work_items/delivery_batch_scale.py +66 -0
  624. loopx/control_plane/work_items/delivery_outcome.py +152 -0
  625. loopx/control_plane/work_items/delivery_signals.py +113 -0
  626. loopx/control_plane/work_items/execution_obligation.py +235 -0
  627. loopx/control_plane/work_items/goal_route_hint.py +320 -0
  628. loopx/control_plane/work_items/interaction_contract.py +1540 -0
  629. loopx/control_plane/work_items/issue_meta_surface.py +159 -0
  630. loopx/control_plane/work_items/lifecycle.py +139 -0
  631. loopx/control_plane/work_items/operator_inbox.py +266 -0
  632. loopx/control_plane/work_items/outcome_followthrough.py +69 -0
  633. loopx/control_plane/work_items/primary_action.py +326 -0
  634. loopx/control_plane/work_items/progress_observation.py +630 -0
  635. loopx/control_plane/work_items/project_asset.py +675 -0
  636. loopx/control_plane/work_items/repair_delta.py +693 -0
  637. loopx/control_plane/work_items/runtime_capability_reentry.py +168 -0
  638. loopx/control_plane/work_items/semantic_replan_writeback.py +177 -0
  639. loopx/control_plane/work_items/status_contract.py +49 -0
  640. loopx/control_plane/work_items/task_graph.py +1046 -0
  641. loopx/control_plane/work_items/task_lease.py +1254 -0
  642. loopx/control_plane/work_items/task_lease_settlement.py +422 -0
  643. loopx/control_plane/work_items/work_lane.py +510 -0
  644. loopx/control_plane/work_items/work_lane_context.py +161 -0
  645. loopx/demo.py +247 -0
  646. loopx/diagnose.py +633 -0
  647. loopx/doctor.py +1251 -0
  648. loopx/domain_packs/__init__.py +1 -0
  649. loopx/domain_packs/issue_fix.py +571 -0
  650. loopx/domain_packs/ml_experiment.py +854 -0
  651. loopx/domain_state.py +137 -0
  652. loopx/dreaming.py +706 -0
  653. loopx/entrypoint.py +16 -0
  654. loopx/event_sourced_state.py +981 -0
  655. loopx/execution_profile.py +286 -0
  656. loopx/experiments/__init__.py +1 -0
  657. loopx/experiments/planner_worker/__init__.py +1 -0
  658. loopx/experiments/planner_worker/contract.py +523 -0
  659. loopx/experiments/planner_worker/runtime.py +391 -0
  660. loopx/experiments/planner_worker/traex.py +461 -0
  661. loopx/explore_graph.py +11 -0
  662. loopx/extensions/__init__.py +1 -0
  663. loopx/extensions/bundled.py +28 -0
  664. loopx/extensions/execution_envelope.py +126 -0
  665. loopx/extensions/lark/__init__.py +11 -0
  666. loopx/extensions/lark/event_collector.py +478 -0
  667. loopx/extensions/lark/event_collector_runtime.py +506 -0
  668. loopx/extensions/lark/event_inbox.py +454 -0
  669. loopx/extensions/lark/extension.toml +88 -0
  670. loopx/extensions/lark/goal_channel.py +44 -0
  671. loopx/extensions/lark/goal_channel_contracts.py +388 -0
  672. loopx/extensions/lark/goal_channel_lifecycle.py +218 -0
  673. loopx/extensions/lark/goal_channel_runtime.py +792 -0
  674. loopx/extensions/lark/goal_channel_setup.py +805 -0
  675. loopx/extensions/lark/goal_channel_targets.py +215 -0
  676. loopx/extensions/lark/goal_channel_transport.py +281 -0
  677. loopx/extensions/lark/inbox_reactions.py +650 -0
  678. loopx/extensions/lark/inbox_reply.py +430 -0
  679. loopx/extensions/lark/presentation/__init__.py +11 -0
  680. loopx/extensions/lark/presentation/explore_results.py +2276 -0
  681. loopx/extensions/lark/presentation/explore_singleflight.py +127 -0
  682. loopx/extensions/lark/presentation/explore_source_guard.py +121 -0
  683. loopx/extensions/lark/presentation/explore_stage_document.py +703 -0
  684. loopx/extensions/lark/presentation/explore_visual_integrity.py +122 -0
  685. loopx/extensions/lark/presentation/explore_visual_readback.py +452 -0
  686. loopx/extensions/lark/presentation/explore_visual_styles.py +156 -0
  687. loopx/extensions/lark/presentation/issue_fix_surface.py +612 -0
  688. loopx/extensions/lark/presentation/kanban.py +2791 -0
  689. loopx/extensions/lark/presentation/message_card.py +112 -0
  690. loopx/extensions/lark/presentation/periodic_report.py +261 -0
  691. loopx/extensions/lark/presentation/projection_rows.py +600 -0
  692. loopx/extensions/lark/presentation/record_io.py +95 -0
  693. loopx/extensions/lark/presentation/sync_receipt.py +145 -0
  694. loopx/extensions/lark/private_json.py +40 -0
  695. loopx/extensions/lark/provider.py +86 -0
  696. loopx/extensions/lark/reviewer_notification.py +604 -0
  697. loopx/extensions/manifest.py +385 -0
  698. loopx/extensions/openviking_periodic_report/__init__.py +17 -0
  699. loopx/extensions/openviking_periodic_report/activation.py +173 -0
  700. loopx/extensions/openviking_periodic_report/extension.toml +17 -0
  701. loopx/extensions/openviking_periodic_report/provider.py +355 -0
  702. loopx/extensions/openviking_periodic_report/sink.py +117 -0
  703. loopx/extensions/openviking_semantic_preference/__init__.py +5 -0
  704. loopx/extensions/openviking_semantic_preference/extension.toml +16 -0
  705. loopx/extensions/openviking_semantic_preference/history_export.py +484 -0
  706. loopx/extensions/openviking_semantic_preference/project_peer.py +68 -0
  707. loopx/extensions/openviking_semantic_preference/provider.py +312 -0
  708. loopx/extensions/presentation.py +979 -0
  709. loopx/extensions/process_runtime.py +204 -0
  710. loopx/extensions/readiness.py +168 -0
  711. loopx/extensions/runtime.py +931 -0
  712. loopx/extensions/scaffold.py +335 -0
  713. loopx/feedback.py +581 -0
  714. loopx/file_lock.py +382 -0
  715. loopx/global_registry.py +842 -0
  716. loopx/global_risks.py +970 -0
  717. loopx/global_todos.py +568 -0
  718. loopx/handoff_budget.py +28 -0
  719. loopx/heartbeat_prequota.py +80 -0
  720. loopx/heartbeat_prompt.py +159 -0
  721. loopx/help_surface.py +516 -0
  722. loopx/history.py +1507 -0
  723. loopx/host_loop_activation.py +1311 -0
  724. loopx/host_mode_planner.py +991 -0
  725. loopx/install_contract.py +1 -0
  726. loopx/interface_budget.py +196 -0
  727. loopx/long_task_cadence.py +208 -0
  728. loopx/materials.py +185 -0
  729. loopx/ml_experiment.py +3 -0
  730. loopx/onboarding.py +214 -0
  731. loopx/opencode2_goal_mode/README.md +81 -0
  732. loopx/opencode2_goal_mode/__init__.py +9 -0
  733. loopx/opencode2_goal_mode/opencode2-goal-worker.mjs +1018 -0
  734. loopx/opencode_goal_mode/README.md +99 -0
  735. loopx/opencode_goal_mode/__init__.py +13 -0
  736. loopx/opencode_goal_mode/goal-bridge-runtime.mjs +858 -0
  737. loopx/opencode_goal_mode/loopx-goal.js +8 -0
  738. loopx/operator_gate.py +420 -0
  739. loopx/orchestration.py +127 -0
  740. loopx/paths.py +59 -0
  741. loopx/pi_goal_mode/README.md +67 -0
  742. loopx/pi_goal_mode/__init__.py +13 -0
  743. loopx/pi_goal_mode/loopx-goal.ts +254 -0
  744. loopx/pi_goal_mode/pi-goal-loop-runtime.mjs +574 -0
  745. loopx/pr_review.py +1206 -0
  746. loopx/presentation/__init__.py +1 -0
  747. loopx/presentation/explore_views.py +1334 -0
  748. loopx/presentation/markdown.py +61 -0
  749. loopx/presentation/projection_source_reconcile.py +140 -0
  750. loopx/presentation/public_safety.py +42 -0
  751. loopx/presentation/renderers/__init__.py +17 -0
  752. loopx/presentation/renderers/goal_channel_html.py +269 -0
  753. loopx/presentation/renderers/periodic_report_html.py +786 -0
  754. loopx/presentation/renderers/periodic_report_markdown.py +184 -0
  755. loopx/presentation/renderers/quota_event_markdown.py +116 -0
  756. loopx/presentation/renderers/quota_markdown.py +1112 -0
  757. loopx/presentation/renderers/status_markdown.py +1570 -0
  758. loopx/presentation/renderers/trajectory_hygiene_markdown.py +39 -0
  759. loopx/presentation/renderers/turn_envelope_markdown.py +33 -0
  760. loopx/presentation/sinks/__init__.py +5 -0
  761. loopx/presentation/sinks/openviking_periodic_report.py +7 -0
  762. loopx/presentation/static_site.py +691 -0
  763. loopx/presets.py +369 -0
  764. loopx/project_alias.py +217 -0
  765. loopx/project_map.py +589 -0
  766. loopx/project_prompt.py +1153 -0
  767. loopx/project_skill_cli.py +125 -0
  768. loopx/project_skill_delivery.py +470 -0
  769. loopx/project_uninstall.py +462 -0
  770. loopx/promotion_gate.py +197 -0
  771. loopx/quota.py +1197 -0
  772. loopx/ready_score.py +413 -0
  773. loopx/registry.py +621 -0
  774. loopx/registry_writability.py +64 -0
  775. loopx/release_candidate.py +148 -0
  776. loopx/release_manifest.py +316 -0
  777. loopx/repository_identity.py +100 -0
  778. loopx/review_packet.py +1024 -0
  779. loopx/rollout_event_log.py +505 -0
  780. loopx/runtime.py +112 -0
  781. loopx/self_update.py +750 -0
  782. loopx/session_runtime.py +418 -0
  783. loopx/skill_install_readback.py +500 -0
  784. loopx/slash_command_install.py +1393 -0
  785. loopx/slash_commands.py +264 -0
  786. loopx/state_backup.py +573 -0
  787. loopx/state_migration.py +350 -0
  788. loopx/state_projection.py +809 -0
  789. loopx/state_refresh.py +1416 -0
  790. loopx/status.py +1383 -0
  791. loopx/status_server.py +935 -0
  792. loopx/summary_all.py +725 -0
  793. loopx/terminal_bench_agent.py +2056 -0
  794. loopx/thread_agent_binding.py +408 -0
  795. loopx/todo_followups.py +168 -0
  796. loopx/todo_suggestion_prompt.py +204 -0
  797. loopx/todos.py +2229 -0
  798. loopx/turn_identity.py +17 -0
  799. loopx/upgrade.py +1083 -0
  800. loopx/visible_governance.py +667 -0
  801. loopx/visible_multi_agent_launcher.py +1253 -0
  802. loopx/visible_multi_agent_tmux.py +429 -0
  803. loopx/worker_bridge.py +1574 -0
  804. loopx-0.4.8.dist-info/METADATA +708 -0
  805. loopx-0.4.8.dist-info/RECORD +811 -0
  806. loopx-0.4.8.dist-info/WHEEL +5 -0
  807. loopx-0.4.8.dist-info/entry_points.txt +5 -0
  808. loopx-0.4.8.dist-info/licenses/LICENSE +202 -0
  809. loopx-0.4.8.dist-info/licenses/LICENSE-MIT +21 -0
  810. loopx-0.4.8.dist-info/licenses/NOTICE +6 -0
  811. loopx-0.4.8.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1255 @@
1
+ """Benchmark status compaction helpers."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import re
6
+ from typing import Any
7
+
8
+ from ...control_plane.work_items.delivery_batch_scale import (
9
+ SMALL_DELIVERY_BATCH_SCALES as STRUCTURED_SMALL_DELIVERY_BATCH_SCALES,
10
+ UNKNOWN_DELIVERY_BATCH_SCALE,
11
+ )
12
+ from ...history import STATUS_NEUTRAL_CLASSIFICATIONS as HISTORY_STATUS_NEUTRAL_CLASSIFICATIONS
13
+ from ...control_plane.work_items.project_asset import (
14
+ TODO_PROJECTION_DETAIL_POINTER_SCHEMA_VERSION as TODO_PROJECTION_DETAIL_POINTER_SCHEMA_VERSION,
15
+ TODO_PROJECTION_VIEW_SCHEMA_VERSION as TODO_PROJECTION_VIEW_SCHEMA_VERSION,
16
+ project_asset_summary_is_public_safe as project_asset_summary_is_public_safe,
17
+ )
18
+ from ...control_plane.work_items.autonomous_candidates import (
19
+ MAX_AUTONOMOUS_TODO_CANDIDATES as _MAX_AUTONOMOUS_TODO_CANDIDATES,
20
+ )
21
+ from ...control_plane.todos.active_state_todos import (
22
+ MONITOR_WRITEBACK_CONTRACT_SCHEMA_VERSION as _MONITOR_WRITEBACK_CONTRACT_SCHEMA_VERSION,
23
+ )
24
+ from ...control_plane.work_items.autonomous_replan_ack import (
25
+ AUTONOMOUS_REPLAN_ACK_MATERIAL_RUN_WINDOW,
26
+ )
27
+ from ...control_plane.work_items.autonomous_replan_obligation import (
28
+ AUTONOMOUS_REPLAN_STALL_THRESHOLD as _AUTONOMOUS_REPLAN_STALL_THRESHOLD_READ_MODEL,
29
+ MAX_AUTONOMOUS_REPLAN_TRIGGERS as _MAX_AUTONOMOUS_REPLAN_TRIGGERS_READ_MODEL,
30
+ )
31
+ from ...control_plane.work_items.backlog_hygiene import (
32
+ MAX_BACKLOG_HYGIENE_EVIDENCE_ITEMS as _MAX_BACKLOG_HYGIENE_EVIDENCE_ITEMS_READ_MODEL,
33
+ )
34
+ from ...control_plane.runtime.run_compaction import (
35
+ RUN_BASE_COMPACT_FIELDS,
36
+ )
37
+ from ...control_plane.runtime.status_classifications import (
38
+ DREAMING_ADVISORY_CLASSIFICATIONS, # noqa: F401
39
+ USER_OR_CONTROLLER_CLASSIFICATIONS,
40
+ )
41
+ from ...control_plane.runtime.public_safety import (
42
+ compact_loopx_command_records as _compact_loopx_command_records,
43
+ compact_numeric_map as _compact_numeric_map,
44
+ public_safe_compact_list,
45
+ public_safe_compact_text,
46
+ )
47
+ from ...control_plane.todos.todo_summary import (
48
+ MAX_DEFERRED_TODO_VISIBILITY_ITEMS as _TODO_SUMMARY_MAX_DEFERRED_TODO_VISIBILITY_ITEMS,
49
+ MAX_DEPENDENCY_BLOCKERS as _TODO_SUMMARY_MAX_DEPENDENCY_BLOCKERS,
50
+ MAX_MONITOR_DUE_ITEMS as _TODO_SUMMARY_MAX_MONITOR_DUE_ITEMS,
51
+ MAX_PROJECT_ASSET_TODO_BACKLOG_ITEMS as _TODO_SUMMARY_MAX_PROJECT_ASSET_TODO_BACKLOG_ITEMS,
52
+ MAX_PROJECT_ASSET_TODO_ITEMS as _TODO_SUMMARY_MAX_PROJECT_ASSET_TODO_ITEMS,
53
+ MAX_STATUS_TODOS_PER_ROLE as _TODO_SUMMARY_MAX_STATUS_TODOS_PER_ROLE,
54
+ MAX_TODO_VISIBILITY_LANE_ITEMS as _TODO_SUMMARY_MAX_TODO_VISIBILITY_LANE_ITEMS,
55
+ claimed_visibility_items as claimed_visibility_items,
56
+ compact_todo_group as compact_todo_group,
57
+ compact_todo_item as compact_todo_item,
58
+ todo_lane_items as todo_lane_items,
59
+ todo_item_is_deferred as todo_item_is_deferred,
60
+ todo_item_is_due_monitor as todo_item_is_due_monitor,
61
+ todo_item_missing_monitor_schedule as todo_item_missing_monitor_schedule,
62
+ todo_item_next_due_at as todo_item_next_due_at,
63
+ todo_projection_sort_key as todo_projection_sort_key,
64
+ )
65
+ from ...control_plane.todos.contract import (
66
+ normalize_todo_task_class as normalize_todo_task_class,
67
+ )
68
+ from ...control_plane.todos.projection import (
69
+ todo_item_is_expired_monitor as todo_item_is_expired_monitor,
70
+ )
71
+
72
+
73
+ _PUBLIC_COMPAT_REEXPORTS = {
74
+ "DREAMING_ADVISORY_CLASSIFICATIONS": "loopx.control_plane.runtime.status_classifications",
75
+ "TODO_PROJECTION_DETAIL_POINTER_SCHEMA_VERSION": "loopx.control_plane.work_items.project_asset",
76
+ "TODO_PROJECTION_VIEW_SCHEMA_VERSION": "loopx.control_plane.work_items.project_asset",
77
+ "project_asset_summary_is_public_safe": "loopx.control_plane.work_items.project_asset",
78
+ "claimed_visibility_items": "loopx.control_plane.todos.todo_summary",
79
+ "compact_todo_group": "loopx.control_plane.todos.todo_summary",
80
+ "compact_todo_item": "loopx.control_plane.todos.todo_summary",
81
+ "todo_lane_items": "loopx.control_plane.todos.todo_summary",
82
+ "todo_item_is_deferred": "loopx.control_plane.todos.todo_summary",
83
+ "todo_item_is_due_monitor": "loopx.control_plane.todos.todo_summary",
84
+ "todo_item_missing_monitor_schedule": "loopx.control_plane.todos.todo_summary",
85
+ "todo_item_next_due_at": "loopx.control_plane.todos.todo_summary",
86
+ "todo_projection_sort_key": "loopx.control_plane.todos.todo_summary",
87
+ "normalize_todo_task_class": "loopx.control_plane.todos.contract",
88
+ "todo_item_is_expired_monitor": "loopx.control_plane.todos.projection",
89
+ }
90
+
91
+
92
+ STATUS_NEUTRAL_CLASSIFICATIONS = HISTORY_STATUS_NEUTRAL_CLASSIFICATIONS
93
+ STATE_EVENT_LOG_BASENAME = "events.jsonl"
94
+ STATUS_CONTROL_PLANE_CONTEXT_LIMIT = 20
95
+ AGENT_LANE_PROGRESS_SCOPE = "agent_lane"
96
+ REGISTRY_WAITING_ON_OVERRIDES = {
97
+ "user_or_controller",
98
+ "controller",
99
+ "codex",
100
+ "external_evidence",
101
+ }
102
+ LEGACY_EXTERNAL_EVIDENCE_CLASSIFICATION_PREFIXES = (
103
+ "await_",
104
+ "external_evidence_observation_",
105
+ )
106
+ MONITOR_SIGNAL_WAITING_ON = "monitor_signal"
107
+ MONITOR_DISPLAY_SCHEMA_VERSION = "monitor_quiet_display_v0"
108
+ MONITOR_DISPLAY_STOP_CONDITION = (
109
+ "stop until a material monitor transition, regression, or concrete blocker appears"
110
+ )
111
+ MONITOR_DISPLAY_FALLBACK_ACTION = (
112
+ "No immediate agent work; keep the monitor quiet until a material monitor "
113
+ "transition, regression, or concrete blocker appears."
114
+ )
115
+ BENCHMARK_RUN_SCHEMA_VERSION = "benchmark_run_v0"
116
+ MAX_BENCHMARK_RUN_TRIALS = 3
117
+ MAX_BENCHMARK_RUN_LIST_ITEMS = 5
118
+ STATUS_CONTRACT_SCHEMA_VERSION = 2
119
+ MINIMUM_DASHBOARD_STATUS_CONTRACT_SCHEMA_VERSION = 2
120
+ STATUS_CONTRACT_RELOAD_HINT = "scripts/macos-dashboard-launchagent.sh restart"
121
+ STATUS_CONTRACT_SIGNAL_LIMIT = 3
122
+ MONITOR_WRITEBACK_CONTRACT_SCHEMA_VERSION = _MONITOR_WRITEBACK_CONTRACT_SCHEMA_VERSION
123
+ EVENT_LEDGER_DECISION_CLASSIFICATIONS = USER_OR_CONTROLLER_CLASSIFICATIONS | {
124
+ "operator_gate_approved",
125
+ }
126
+ EVENT_LEDGER_STATE_CLASSIFICATIONS = {
127
+ "state_refreshed",
128
+ "public_harness_healthy",
129
+ }
130
+ EVENT_LEDGER_EVIDENCE_CLASSIFICATIONS = {
131
+ "inspect_eval_result",
132
+ "inspect_result",
133
+ "needs_more_read_only_evidence",
134
+ "read_only_project_map",
135
+ }
136
+ EVENT_LEDGER_EVIDENCE_HINTS = (
137
+ "artifact",
138
+ "blocker",
139
+ "ci",
140
+ "data",
141
+ "deploy",
142
+ "done",
143
+ "eval",
144
+ "evidence",
145
+ "failure",
146
+ "fail",
147
+ "metric",
148
+ "monitor",
149
+ "validation",
150
+ )
151
+
152
+
153
+ DELIVERY_BATCH_SCALE_TEST_ONLY_CLASSIFICATION_HINTS = (
154
+ "_test",
155
+ "_smoke",
156
+ "readiness_test",
157
+ "integrity_test",
158
+ )
159
+ DELIVERY_BATCH_SCALE_MULTI_SURFACE_CLASSIFICATION_HINTS = (
160
+ "batch",
161
+ "cross_benchmark",
162
+ "downstream_pack",
163
+ "matrix",
164
+ "owner_handoff_consumer",
165
+ )
166
+ DELIVERY_BATCH_SCALE_IMPLEMENTATION_CLASSIFICATION_HINTS = (
167
+ "adapter",
168
+ "builder",
169
+ "consumer",
170
+ "implementation",
171
+ "runner",
172
+ )
173
+ SMALL_DELIVERY_BATCH_SCALES = {
174
+ *(scale.value for scale in STRUCTURED_SMALL_DELIVERY_BATCH_SCALES),
175
+ UNKNOWN_DELIVERY_BATCH_SCALE,
176
+ }
177
+ CONNECTED_ADAPTER_STATUSES = {
178
+ "connected",
179
+ "connected-read-only",
180
+ "pre-tick-runnable",
181
+ }
182
+ CONNECTED_DELIVERY_ADAPTER_STATUSES = {
183
+ "connected-delivery",
184
+ }
185
+ SOURCE_REGISTRY_SHADOW_FINDINGS = {
186
+ "source_registry_missing",
187
+ "stale_source_registry",
188
+ }
189
+ PLANNED_CONTROLLER_OPT_IN_RECOMMENDED_ACTION = (
190
+ "先在 LoopX 完成 operator 判断;同意后项目 Agent 只执行 read-only map dry-run"
191
+ )
192
+ RUN_COMPACT_FIELDS = RUN_BASE_COMPACT_FIELDS
193
+ LIFECYCLE_PRIORITY = (
194
+ "controller_ready",
195
+ "reward_judged",
196
+ "operator_approved",
197
+ "controller_gated",
198
+ "operator_gated",
199
+ "adapter_inspected",
200
+ "mapped",
201
+ "refreshed",
202
+ "connected",
203
+ "registered",
204
+ "planned",
205
+ "run_recorded",
206
+ )
207
+ SECTION_HEADING_PATTERN = re.compile(r"^##+\s+(.+?)\s*$")
208
+ MAX_STATUS_TODOS_PER_ROLE = _TODO_SUMMARY_MAX_STATUS_TODOS_PER_ROLE
209
+ MAX_ACTIVE_DONE_TODOS_BEFORE_ARCHIVE = MAX_STATUS_TODOS_PER_ROLE
210
+ MAX_PROJECT_ASSET_TODO_ITEMS = _TODO_SUMMARY_MAX_PROJECT_ASSET_TODO_ITEMS
211
+ MAX_PROJECT_ASSET_TODO_BACKLOG_ITEMS = _TODO_SUMMARY_MAX_PROJECT_ASSET_TODO_BACKLOG_ITEMS
212
+ MAX_TODO_VISIBILITY_LANE_ITEMS = _TODO_SUMMARY_MAX_TODO_VISIBILITY_LANE_ITEMS
213
+ MAX_DEFERRED_TODO_VISIBILITY_ITEMS = _TODO_SUMMARY_MAX_DEFERRED_TODO_VISIBILITY_ITEMS
214
+ MAX_MONITOR_DUE_ITEMS = _TODO_SUMMARY_MAX_MONITOR_DUE_ITEMS
215
+ MAX_DEPENDENCY_BLOCKERS = _TODO_SUMMARY_MAX_DEPENDENCY_BLOCKERS
216
+ MAX_AUTONOMOUS_BACKLOG_CANDIDATES = _MAX_AUTONOMOUS_TODO_CANDIDATES
217
+ MAX_BACKLOG_HYGIENE_EVIDENCE_ITEMS = _MAX_BACKLOG_HYGIENE_EVIDENCE_ITEMS_READ_MODEL
218
+ MAX_AUTONOMOUS_REPLAN_TRIGGERS = _MAX_AUTONOMOUS_REPLAN_TRIGGERS_READ_MODEL
219
+ AUTONOMOUS_REPLAN_STALL_THRESHOLD = _AUTONOMOUS_REPLAN_STALL_THRESHOLD_READ_MODEL
220
+ DEAD_MONITOR_REPEAT_THRESHOLD = 6
221
+ AUTONOMOUS_REPLAN_PERIODIC_RUN_THRESHOLD = AUTONOMOUS_REPLAN_ACK_MATERIAL_RUN_WINDOW
222
+ AUTONOMOUS_REPLAN_PERIODIC_LOOKBACK = 30
223
+ BACKLOG_HYGIENE_SECTION_HEADINGS = ("Next Action", "Operating Lessons")
224
+ BACKLOG_HYGIENE_BULLET_PATTERN = re.compile(r"^\s*(?:[-*]|\d+[.)])\s+(.+?)\s*$")
225
+ BACKLOG_HYGIENE_HINT_PATTERN = re.compile(
226
+ r"(?i)(?:\[p[0-4]\]|todo|backlog|follow[- ]?up|queue|audit|regression|smoke|cadence|mirror|monitor|sub-?agent|待办|回归|审计|修复|检查|推进)"
227
+ )
228
+ AUTONOMOUS_REPLAN_SCHEMA_VERSION = "autonomous_replan_obligation_v0"
229
+ DEAD_MONITOR_REPEAT_SCHEMA_VERSION = "dead_monitor_repeat_v0"
230
+ AUTONOMOUS_RUN_HISTORY_NEUTRAL_CLASSIFICATIONS = {
231
+ "quota_slot_spent",
232
+ "quota_slot_voided",
233
+ "delivery_completion_spend_accounted_v0",
234
+ }
235
+
236
+
237
+
238
+ def _compact_benchmark_interaction_counters(value: Any) -> dict[str, Any]:
239
+ if not isinstance(value, dict):
240
+ return {}
241
+
242
+ compact: dict[str, Any] = {}
243
+ schema = public_safe_compact_text(value.get("schema_version"), limit=100)
244
+ if schema:
245
+ compact["schema_version"] = schema
246
+ for field in (
247
+ "prompt_policy_injected",
248
+ "harness_skill_or_packet_injected",
249
+ "raw_trace_recorded",
250
+ "raw_task_prompt_recorded",
251
+ "controller_trace_present",
252
+ "loopx_automation_loop",
253
+ "inner_codex_goal_mode",
254
+ "curated_skills_visible",
255
+ "product_mode",
256
+ "goal_start_product_mode",
257
+ "verifier_failure_feedback_todo_route",
258
+ "verifier_failure_feedback_forwarded_to_agent",
259
+ "verifier_failure_todo_required",
260
+ "goal_start_plan_observed",
261
+ "planner_before_todo_write",
262
+ "same_priority_order_preserved",
263
+ "selected_todo_claimed",
264
+ "selected_todo_updated_before_solver",
265
+ "selected_todo_completed_before_spend",
266
+ "selected_todo_completed_observed",
267
+ "non_selected_todos_preserved_open_or_deferred",
268
+ "quota_spend_missing_after_repeated_complete",
269
+ "blind_loop",
270
+ "case_goal_state_packet_present",
271
+ "case_goal_state_init_required",
272
+ "case_goal_state_initialized_before_agent",
273
+ "declared_done_requires_no_remaining_goals",
274
+ "product_mode_lifecycle_checkpoint_required",
275
+ "product_mode_solver_activity_required",
276
+ "product_mode_solver_activity_gap",
277
+ "product_mode_declared_done_below_passing_reward",
278
+ "product_mode_no_open_todo_below_passing_reward_stop",
279
+ "product_mode_typed_repair_required",
280
+ "product_mode_typed_repair_pending",
281
+ "product_mode_typed_repair_todo_identity_observed",
282
+ "product_mode_typed_repair_task_or_validation_delta",
283
+ "product_mode_typed_repair_delta_observed",
284
+ "product_mode_typed_repair_terminal",
285
+ "product_mode_typed_repair_terminal_receipt_consistent",
286
+ "product_mode_host_local_idle_no_task_output_progress",
287
+ "product_mode_host_local_idle_no_task_output_progress_stop",
288
+ "product_mode_final_closeout_superseded_by_official_success",
289
+ "product_mode_no_tool_call_lifecycle_abort",
290
+ "agent_declared_done",
291
+ "agent_declared_no_remaining_goals",
292
+ "official_feedback_blinded",
293
+ "reward_feedback_forwarded",
294
+ "controller_official_feedback_forwarded",
295
+ "controller_blind_loop",
296
+ "controller_official_success_observed",
297
+ "controller_budget_cutoff_before_followup",
298
+ "benchflow_user_loop_final_verify_recovery_enabled",
299
+ "benchflow_user_loop_final_verify_recovery_triggered",
300
+ "benchflow_user_loop_recovery_after_agent_activity",
301
+ "benchflow_user_loop_recovery_preserved_final_verify",
302
+ "benchflow_user_loop_recovery_raw_error_recorded",
303
+ "benchflow_intermediate_soft_verify_final_only",
304
+ "benchflow_intermediate_soft_verify_raw_output_recorded",
305
+ "benchflow_intermediate_soft_verify_timeout_enabled",
306
+ "benchflow_intermediate_soft_verify_timeout_triggered",
307
+ "benchflow_intermediate_soft_verify_timeout_raw_output_recorded",
308
+ "benchflow_intermediate_soft_verify_timeout_cleanup_requested",
309
+ "benchflow_intermediate_soft_verify_timeout_cleanup_raw_logs_read",
310
+ "benchflow_intermediate_soft_verify_orphan_cleanup_requested",
311
+ "benchflow_intermediate_soft_verify_orphan_cleanup_raw_logs_read",
312
+ "private_trajectory_summary_present",
313
+ "native_goal_worker_route",
314
+ "native_goal_worker_connected",
315
+ "native_goal_worker_trace_dir_present",
316
+ "native_goal_worker_public_trace_read",
317
+ "native_goal_worker_raw_material_recorded",
318
+ "remote_command_file_bridge_consumed_by_solver",
319
+ "remote_command_file_bridge_solver_trace_dir_present",
320
+ "remote_command_file_bridge_solver_public_trace_read",
321
+ "remote_command_file_bridge_solver_raw_material_recorded",
322
+ "remote_command_file_bridge_agent_operation_trace_required",
323
+ "remote_command_file_bridge_agent_operation_trace_satisfied",
324
+ "remote_command_file_bridge_driver_lifecycle_trace_present",
325
+ "remote_command_file_bridge_driver_lifecycle_raw_material_recorded",
326
+ "host_local_acp_codex_exec_failure_trace_present",
327
+ "host_local_acp_codex_exec_failure_raw_material_recorded",
328
+ ):
329
+ if isinstance(value.get(field), bool):
330
+ compact[field] = value[field]
331
+ for field in (
332
+ "loopx_state_reads",
333
+ "loopx_state_writes",
334
+ "loopx_case_state_reads",
335
+ "loopx_case_state_writes",
336
+ "heartbeat_count",
337
+ "controller_action_decisions",
338
+ "controller_initial_prompt_count",
339
+ "controller_followup_prompt_count",
340
+ "controller_stop_decision_count",
341
+ "controller_reward_observation_count",
342
+ "controller_round_reward_count",
343
+ "controller_official_success_observation_count",
344
+ "controller_first_success_round",
345
+ "declared_done_round",
346
+ "planned_todo_count",
347
+ "planned_p0_count",
348
+ "agent_todo_complete_unique_todo_count",
349
+ "selected_todo_complete_count",
350
+ "selected_todo_duplicate_complete_count",
351
+ "non_selected_todo_complete_count",
352
+ "todo_complete_without_todo_id_count",
353
+ "product_mode_lifecycle_checkpoint_count",
354
+ "product_mode_lifecycle_checkpoint_round",
355
+ "product_mode_solver_activity_gap_count",
356
+ "product_mode_solver_activity_gap_round",
357
+ "product_mode_declared_done_below_passing_reward_count",
358
+ "product_mode_declared_done_below_passing_reward_round",
359
+ "verifier_failure_feedback_todo_prompt_count",
360
+ "verifier_failure_feedback_todo_round",
361
+ "open_todo_count",
362
+ "product_mode_no_open_todo_below_passing_reward_streak",
363
+ "product_mode_no_open_todo_below_passing_reward_streak_threshold",
364
+ "product_mode_no_open_todo_below_passing_reward_round",
365
+ "product_mode_no_open_todo_below_passing_reward_stop_count",
366
+ "product_mode_no_open_todo_below_passing_reward_stop_round",
367
+ "product_mode_no_open_todo_below_passing_reward_open_todo_count_public",
368
+ "product_mode_typed_repair_trigger_round",
369
+ "product_mode_typed_repair_round_entered",
370
+ "product_mode_typed_repair_round_entered_count",
371
+ "product_mode_typed_repair_resolved_round",
372
+ "product_mode_typed_repair_task_facing_success_delta",
373
+ "product_mode_typed_repair_terminal_round",
374
+ "product_mode_typed_repair_open_todo_count_public",
375
+ "product_mode_host_local_idle_no_task_output_progress_streak",
376
+ "product_mode_host_local_idle_no_task_output_progress_streak_threshold",
377
+ "product_mode_host_local_idle_no_task_output_progress_round",
378
+ "product_mode_host_local_idle_no_task_output_progress_stop_count",
379
+ "product_mode_host_local_idle_no_task_output_progress_stop_round",
380
+ "product_mode_host_local_idle_no_task_output_progress_last_failure_trace_count",
381
+ "product_mode_host_local_idle_no_task_output_progress_acp_tool_calls",
382
+ "product_mode_host_local_idle_no_task_output_progress_bridge_task_ops",
383
+ "product_mode_host_local_idle_no_task_output_progress_bridge_task_successes",
384
+ "product_mode_final_closeout_superseded_round",
385
+ "product_mode_no_tool_call_lifecycle_abort_count",
386
+ "product_mode_no_tool_call_lifecycle_abort_round",
387
+ "controller_verifier_feedback_observation_count",
388
+ "controller_official_feedback_blinded_count",
389
+ "controller_official_feedback_forwarded_count",
390
+ "controller_max_rounds_budget",
391
+ "benchflow_user_loop_recovery_round",
392
+ "benchflow_user_loop_recovery_delta_events",
393
+ "benchflow_user_loop_recovery_delta_tool_calls",
394
+ "benchflow_intermediate_soft_verify_call_count",
395
+ "benchflow_intermediate_soft_verify_skipped_count",
396
+ "benchflow_intermediate_soft_verify_timeout_sec",
397
+ "benchflow_intermediate_soft_verify_timeout_override_count",
398
+ "benchflow_intermediate_soft_verify_timeout_cleanup_container_count",
399
+ "benchflow_intermediate_soft_verify_timeout_cleanup_match_count",
400
+ "benchflow_intermediate_soft_verify_timeout_cleanup_term_sent_count",
401
+ "benchflow_intermediate_soft_verify_timeout_cleanup_kill_sent_count",
402
+ "benchflow_intermediate_soft_verify_timeout_cleanup_alive_after_count",
403
+ "benchflow_intermediate_soft_verify_orphan_cleanup_container_count",
404
+ "benchflow_intermediate_soft_verify_orphan_cleanup_match_count",
405
+ "benchflow_intermediate_soft_verify_orphan_cleanup_term_sent_count",
406
+ "benchflow_intermediate_soft_verify_orphan_cleanup_kill_sent_count",
407
+ "benchflow_intermediate_soft_verify_orphan_cleanup_alive_after_count",
408
+ "private_trajectory_event_count",
409
+ "private_trajectory_round_count",
410
+ "private_trajectory_tool_call_count",
411
+ "loopx_cli_call_count",
412
+ "loopx_cli_state_read_count",
413
+ "loopx_cli_state_write_count",
414
+ "loopx_case_state_path_count",
415
+ "loopx_case_state_read_count",
416
+ "loopx_case_state_write_count",
417
+ "protected_path_mention_count",
418
+ "protected_path_edit_signal_count",
419
+ "codex_acp_text_bytes",
420
+ "append_benchmark_run_success_count",
421
+ "append_benchmark_run_schema_rejected_count",
422
+ "worker_counter_trace_trial_count",
423
+ "worker_benchmark_run_file_count",
424
+ "worker_benchmark_run_schema_ok_count",
425
+ "worker_self_validation_official_score_mismatch_count",
426
+ "worker_validation_scope_ambiguous_official_score_failure_count",
427
+ "worker_bridge_connected_official_score_failure_count",
428
+ "worker_startup_blocker_count",
429
+ "worker_setup_diagnostic_file_count",
430
+ "worker_setup_diagnostic_schema_ok_count",
431
+ "worker_submit_eligible_mismatch_count",
432
+ "worker_bridge_writeback_loss_count",
433
+ "environment_setup_failure_before_worker_count",
434
+ "pre_worker_agent_setup_failure_count",
435
+ "codex_runtime_goal_tool_trial_count",
436
+ "native_goal_worker_connect_count",
437
+ "native_goal_worker_trace_count",
438
+ "native_goal_worker_lifecycle_trace_count",
439
+ "native_goal_worker_prompt_received_count",
440
+ "native_goal_worker_ok_count",
441
+ "native_goal_worker_goal_get_count",
442
+ "native_goal_worker_turn_start_count",
443
+ "native_goal_worker_turn_completed_observed_count",
444
+ "native_goal_worker_assistant_message_present_count",
445
+ "native_goal_worker_assistant_context_only_count",
446
+ "native_goal_worker_context_only_recovery_attempted_count",
447
+ "native_goal_worker_context_only_recovery_succeeded_count",
448
+ "native_goal_worker_context_only_followup_start_attempted_count",
449
+ "native_goal_worker_context_only_followup_start_succeeded_count",
450
+ "native_goal_worker_normal_followup_attempted_count",
451
+ "native_goal_worker_normal_followup_succeeded_count",
452
+ "native_goal_worker_normal_followup_start_attempted_count",
453
+ "native_goal_worker_normal_followup_start_succeeded_count",
454
+ "native_goal_worker_finish_guard_followup_attempted_count",
455
+ "native_goal_worker_finish_guard_followup_succeeded_count",
456
+ "native_goal_worker_finish_guard_followup_start_attempted_count",
457
+ "native_goal_worker_finish_guard_followup_start_succeeded_count",
458
+ "native_goal_worker_incomplete_turn_status_count",
459
+ "native_goal_worker_incomplete_after_completion_event_count",
460
+ "native_goal_worker_transport_reconnect_attempted_count",
461
+ "native_goal_worker_transport_reconnect_succeeded_count",
462
+ "native_goal_worker_goal_reactivation_attempted_count",
463
+ "native_goal_worker_goal_reactivation_succeeded_count",
464
+ "native_goal_worker_post_context_assistant_chars_total",
465
+ "native_goal_worker_first_action_observed_count",
466
+ "native_goal_worker_effective_action_observed_count",
467
+ "remote_command_file_bridge_solver_trace_count",
468
+ "remote_command_file_bridge_solver_probe_ready_count",
469
+ "remote_command_file_bridge_solver_operation_count",
470
+ "remote_command_file_bridge_agent_operation_trace_count",
471
+ "remote_command_file_bridge_agent_request_count",
472
+ "remote_command_file_bridge_agent_success_count",
473
+ "remote_command_file_bridge_agent_failure_count",
474
+ "remote_command_file_bridge_agent_loopx_cli_call_count",
475
+ "remote_command_file_bridge_agent_loopx_state_read_count",
476
+ "remote_command_file_bridge_agent_loopx_state_write_count",
477
+ "remote_command_file_bridge_agent_todo_closeout_count",
478
+ "remote_command_file_bridge_agent_refresh_state_count",
479
+ "remote_command_file_bridge_agent_quota_spend_slot_count",
480
+ "remote_command_file_bridge_agent_task_facing_operation_count",
481
+ "remote_command_file_bridge_agent_task_facing_success_count",
482
+ "remote_command_file_bridge_agent_task_facing_failure_count",
483
+ "remote_command_file_bridge_driver_lifecycle_trace_count",
484
+ "remote_command_file_bridge_driver_lifecycle_checkpoint_count",
485
+ "remote_command_file_bridge_driver_lifecycle_request_count",
486
+ "remote_command_file_bridge_driver_lifecycle_success_count",
487
+ "remote_command_file_bridge_driver_lifecycle_failure_count",
488
+ "remote_command_file_bridge_driver_lifecycle_loopx_cli_call_count",
489
+ "remote_command_file_bridge_driver_lifecycle_loopx_state_read_count",
490
+ "remote_command_file_bridge_driver_lifecycle_loopx_state_write_count",
491
+ "host_local_acp_codex_exec_failure_trace_count",
492
+ "host_local_acp_codex_exec_recoverable_failure_trace_count",
493
+ "host_local_acp_codex_exec_fatal_failure_trace_count",
494
+ ):
495
+ if isinstance(value.get(field), int) and not isinstance(value.get(field), bool):
496
+ compact[field] = value[field]
497
+ for field in (
498
+ "product_mode_declared_done_below_passing_reward_score",
499
+ "product_mode_no_open_todo_below_passing_reward_score",
500
+ "product_mode_host_local_idle_no_task_output_progress_score",
501
+ ):
502
+ raw = value.get(field)
503
+ if isinstance(raw, (int, float)) and not isinstance(raw, bool):
504
+ compact[field] = float(raw)
505
+ for field in (
506
+ "case_result_writeback",
507
+ "counter_trust_level",
508
+ "controller_trace_schema_version",
509
+ "controller_trace_publicness",
510
+ "case_goal_state_init_status",
511
+ "case_goal_state_init_failed_phase",
512
+ "case_goal_state_schema_version",
513
+ "product_mode_lifecycle_checkpoint_missing_reason",
514
+ "product_mode_solver_activity_missing_reason",
515
+ "product_mode_declared_done_below_passing_reward_score_status",
516
+ "product_mode_no_open_todo_below_passing_reward_score_status",
517
+ "product_mode_host_local_idle_no_task_output_progress_score_status",
518
+ "product_mode_host_local_idle_no_task_output_progress_category",
519
+ "product_mode_host_local_idle_no_task_output_progress_policy",
520
+ "product_mode_declared_done_policy",
521
+ "product_mode_typed_repair_policy_id",
522
+ "product_mode_typed_repair_terminal_reason",
523
+ "product_mode_final_closeout_superseded_reason",
524
+ "controller_budget_cutoff_reason",
525
+ "benchflow_user_loop_recovery_stage",
526
+ "benchflow_user_loop_recovery_exception_type",
527
+ "benchflow_intermediate_soft_verify_policy",
528
+ "benchflow_intermediate_soft_verify_timeout_stage",
529
+ "benchflow_intermediate_soft_verify_timeout_cleanup_status",
530
+ "benchflow_intermediate_soft_verify_orphan_cleanup_status",
531
+ "remote_command_file_bridge_agent_operation_trace_status",
532
+ "remote_command_file_bridge_consumption_decision",
533
+ "remote_command_file_bridge_driver_lifecycle_execution_style",
534
+ "native_goal_worker_reasoning_effort",
535
+ "host_local_acp_codex_exec_failure_category",
536
+ "host_local_acp_bridge_progress_status",
537
+ "host_local_acp_bridge_progress_signal_source",
538
+ "last_decision",
539
+ "worker_submit_eligible_mismatch_reason",
540
+ "worker_bridge_writeback_loss_reason",
541
+ ):
542
+ text = public_safe_compact_text(value.get(field), limit=100)
543
+ if text:
544
+ compact[field] = text
545
+ case_state_path = public_safe_compact_text(
546
+ value.get("case_goal_state_path"),
547
+ limit=180,
548
+ )
549
+ if (
550
+ case_state_path
551
+ and "/.codex/goals/" in case_state_path
552
+ and case_state_path.endswith("/ACTIVE_GOAL_STATE.md")
553
+ and not re.search(r"^/(Users|private|var/folders)/", case_state_path)
554
+ ):
555
+ compact["case_goal_state_path"] = case_state_path
556
+
557
+ for field in (
558
+ "codex_runtime_goal_tool_calls",
559
+ "trajectory_action_category_counts",
560
+ "loopx_cli_state_usage_counts",
561
+ "remote_command_file_bridge_agent_returncode_counts",
562
+ "remote_command_file_bridge_agent_loopx_subcommand_counts",
563
+ "remote_command_file_bridge_agent_successful_loopx_subcommand_counts",
564
+ "remote_command_file_bridge_driver_lifecycle_command_counts",
565
+ "remote_command_file_bridge_driver_lifecycle_returncode_counts",
566
+ ):
567
+ calls = _compact_numeric_map(value.get(field))
568
+ if calls:
569
+ compact[field] = calls
570
+ selected_p0_todo_id = public_safe_compact_text(
571
+ value.get("selected_p0_todo_id"),
572
+ limit=100,
573
+ )
574
+ if selected_p0_todo_id:
575
+ compact["selected_p0_todo_id"] = selected_p0_todo_id
576
+ planned_todo_ids = public_safe_compact_list(
577
+ value.get("planned_todo_ids"),
578
+ limit=8,
579
+ )
580
+ if planned_todo_ids:
581
+ compact["planned_todo_ids"] = planned_todo_ids
582
+ planned_todo_texts = public_safe_compact_list(
583
+ value.get("planned_todo_texts_public_safe"),
584
+ limit=8,
585
+ )
586
+ if planned_todo_texts:
587
+ compact["planned_todo_texts_public_safe"] = planned_todo_texts
588
+ command_records = _compact_loopx_command_records(
589
+ value.get("remote_command_file_bridge_agent_successful_loopx_command_records")
590
+ )
591
+ if command_records:
592
+ compact[
593
+ "remote_command_file_bridge_agent_successful_loopx_command_records"
594
+ ] = command_records
595
+ raw_loopx_cli_calls = value.get("loopx_cli_calls")
596
+ if isinstance(raw_loopx_cli_calls, dict):
597
+ calls = _compact_numeric_map(raw_loopx_cli_calls)
598
+ if calls:
599
+ compact["loopx_cli_calls"] = calls
600
+ elif isinstance(raw_loopx_cli_calls, list):
601
+ calls: list[dict[str, Any]] = []
602
+ for item in raw_loopx_cli_calls[:8]:
603
+ if not isinstance(item, dict):
604
+ continue
605
+ call: dict[str, Any] = {}
606
+ round_value = item.get("round")
607
+ if (
608
+ isinstance(round_value, int)
609
+ and not isinstance(round_value, bool)
610
+ and round_value > 0
611
+ ):
612
+ call["round"] = round_value
613
+ command = public_safe_compact_text(item.get("command"), limit=120)
614
+ if command:
615
+ call["command"] = command
616
+ flags = item.get("flags")
617
+ if isinstance(flags, list):
618
+ compact_flags = [
619
+ flag
620
+ for flag in (
621
+ public_safe_compact_text(flag, limit=60)
622
+ for flag in flags[:8]
623
+ )
624
+ if flag
625
+ ]
626
+ if compact_flags:
627
+ call["flags"] = compact_flags
628
+ if isinstance(item.get("raw_title_copied"), bool):
629
+ call["raw_title_copied"] = item["raw_title_copied"]
630
+ if isinstance(item.get("raw_output_copied"), bool):
631
+ call["raw_output_copied"] = item["raw_output_copied"]
632
+ if call:
633
+ calls.append(call)
634
+ if calls:
635
+ compact["loopx_cli_calls"] = calls
636
+
637
+ return compact
638
+
639
+
640
+ def _compact_benchmark_preflight_guard(value: Any) -> dict[str, Any]:
641
+ if not isinstance(value, dict):
642
+ return {}
643
+
644
+ compact: dict[str, Any] = {}
645
+ for field in (
646
+ "schema_version",
647
+ "first_blocker",
648
+ "loopx_mode_kwarg",
649
+ "codex_goal_mode_invocation_surface",
650
+ "codex_goal_mode_required_invocation_surface",
651
+ "codex_goal_mode_baseline_claim_blocker",
652
+ "codex_app_server_goal_worker_plan_schema",
653
+ "runner_binary_resolution_policy",
654
+ "simulator_setting",
655
+ ):
656
+ text = public_safe_compact_text(value.get(field), limit=120)
657
+ if text:
658
+ compact[field] = text
659
+ for field in (
660
+ "runner_surface_checked",
661
+ "local_execution_surface_checked",
662
+ "codex_cli_surface_checked",
663
+ "auth_surface_names_only",
664
+ "auth_values_read",
665
+ "artifact_redaction_required",
666
+ "task_material_ready_required",
667
+ "access_packet_prompt_injection_checked",
668
+ "trace_counter_extraction_contract_checked",
669
+ "loopx_mode_kwarg_checked",
670
+ "codex_goal_mode_invocation_surface_checked",
671
+ "codex_app_server_goal_baseline_requested",
672
+ "codex_app_server_goal_worker_adapter_present",
673
+ "codex_app_server_goal_worker_adapter_absent",
674
+ "codex_app_server_goal_worker_turn_start_required",
675
+ "codex_app_server_goal_proof_present",
676
+ "codex_goal_mode_baseline_claim_allowed",
677
+ "loopx_access_packet_absent",
678
+ "loopx_cli_bridge_absent",
679
+ "active_cli_bridge_enabled",
680
+ "claim_requires_worker_cli_calls",
681
+ "real_interface_use_observed",
682
+ "uplift_claim_allowed",
683
+ "active_user_assisted_treatment",
684
+ "simulator_to_worker_injection_channel_available",
685
+ "interactive_user_message_injection_checked",
686
+ "initial_prompt_only_is_not_active_intervention",
687
+ "no_oracle_audit_required",
688
+ "assisted_score_kept_separate_from_official",
689
+ "uvx_cli_present",
690
+ "uvx_version_probe_ok",
691
+ "docker_cli_present",
692
+ "docker_version_probe_ok",
693
+ "docker_server_available",
694
+ "colima_cli_present",
695
+ "colima_status_probe_ok",
696
+ "codex_cli_present",
697
+ "codex_version_probe_ok",
698
+ ):
699
+ if isinstance(value.get(field), bool):
700
+ compact[field] = value[field]
701
+ text = public_safe_compact_text(value.get("worker_cli_bridge_surface"), limit=120)
702
+ if text:
703
+ compact["worker_cli_bridge_surface"] = text
704
+ for field in ("required_worker_loopx_cli_call_total_min",):
705
+ if isinstance(value.get(field), int) and not isinstance(value.get(field), bool):
706
+ compact[field] = value[field]
707
+ return compact
708
+
709
+
710
+ def _compact_benchmark_compose_setup_diagnostic(value: Any) -> dict[str, Any]:
711
+ if not isinstance(value, dict):
712
+ return {}
713
+
714
+ compact: dict[str, Any] = {}
715
+ for field in (
716
+ "schema_version",
717
+ "status",
718
+ "route",
719
+ "failure_class",
720
+ "runner_prerequisite_status",
721
+ "task_setup_preflight_status",
722
+ "fingerprint_confidence",
723
+ "runner_error_len_bucket",
724
+ "primary_setup_failure_category",
725
+ "apt_failure_subtype",
726
+ "pip_failure_subtype",
727
+ "retryability",
728
+ "next_diagnostic_action",
729
+ ):
730
+ text = public_safe_compact_text(value.get(field), limit=180)
731
+ if text:
732
+ compact[field] = text
733
+ for field in (
734
+ "compose_setup_failure",
735
+ "unclassified_compose_failure",
736
+ "docker_daemon_unavailable",
737
+ "apt_repository_failure",
738
+ "pip_bootstrap_failure",
739
+ "volume_mount_failure",
740
+ "environment_setup_failure",
741
+ "agent_rounds_started",
742
+ "official_score_missing",
743
+ "official_result_json_materialized",
744
+ "case_attempt_budget_should_count",
745
+ "runner_launch_preflight_passed",
746
+ "apt_setup_risk_detected",
747
+ "apt_retry_patch_required",
748
+ "verifier_uv_bootstrap_risk_detected",
749
+ "verifier_uv_bootstrap_mirror_patch_required",
750
+ "verifier_uv_bootstrap_mirror_patch_applied",
751
+ "staged_task_prepared",
752
+ "task_skills_removed",
753
+ "codex_acp_runtime_tools_patch_applied",
754
+ "resource_cap_applied",
755
+ "raw_error_recorded",
756
+ "raw_logs_read",
757
+ "raw_task_text_read",
758
+ "raw_trajectory_read",
759
+ ):
760
+ if isinstance(value.get(field), bool):
761
+ compact[field] = value[field]
762
+ for field in (
763
+ "heartbeat_count",
764
+ "controller_action_decision_count",
765
+ "trajectory_round_count",
766
+ "trajectory_tool_call_count",
767
+ "loopx_cli_call_count",
768
+ "round_reward_count",
769
+ "setup_stall_timeout_requested_sec",
770
+ "setup_stall_timeout_sec",
771
+ "progress_completed_trials",
772
+ "progress_errored_trials",
773
+ ):
774
+ if isinstance(value.get(field), int) and not isinstance(value.get(field), bool):
775
+ compact[field] = value[field]
776
+ patterns = public_safe_compact_list(
777
+ value.get("fingerprint_matched_patterns"),
778
+ limit=MAX_BENCHMARK_RUN_LIST_ITEMS,
779
+ )
780
+ if patterns:
781
+ compact["fingerprint_matched_patterns"] = patterns
782
+ for field in (
783
+ "terminal_failure_dependency_classes",
784
+ "terminal_failure_reason_codes",
785
+ "terminal_failure_dependency_endpoints",
786
+ ):
787
+ values = public_safe_compact_list(
788
+ value.get(field),
789
+ limit=MAX_BENCHMARK_RUN_LIST_ITEMS * 2,
790
+ )
791
+ if values:
792
+ compact[field] = values
793
+ return compact
794
+
795
+
796
+ _SKILLSBENCH_PRE_AGENT_SETUP_STATUS_LABELS = {
797
+ "compose_setup_blocked_before_agent_rounds": (
798
+ "skillsbench_compose_setup_blocked_before_agent_rounds"
799
+ ),
800
+ "runner_setup_blocked_before_agent_rounds": (
801
+ "skillsbench_runner_setup_blocked_before_agent_rounds"
802
+ ),
803
+ }
804
+
805
+
806
+ def _skillsbench_compact_official_score_missing(compact: dict[str, Any]) -> bool:
807
+ official = (
808
+ compact.get("official_task_score")
809
+ if isinstance(compact.get("official_task_score"), dict)
810
+ else {}
811
+ )
812
+ value = official.get("value")
813
+ if isinstance(value, (int, float)) and not isinstance(value, bool):
814
+ return False
815
+ value = compact.get("official_score")
816
+ return not (isinstance(value, (int, float)) and not isinstance(value, bool))
817
+
818
+
819
+ def _sync_skillsbench_runner_failure_root_blockers(
820
+ compact: dict[str, Any],
821
+ ) -> None:
822
+ runner_failure = compact.get("runner_failure")
823
+ if not isinstance(runner_failure, dict):
824
+ return
825
+ if not _skillsbench_compact_official_score_missing(compact):
826
+ return
827
+
828
+ blocker = public_safe_compact_text(
829
+ compact.get("score_failure_attribution"),
830
+ limit=140,
831
+ )
832
+ if blocker in {None, "none", "score_missing"}:
833
+ blocker = public_safe_compact_text(
834
+ runner_failure.get("failure_class"),
835
+ limit=140,
836
+ )
837
+ if not blocker:
838
+ return
839
+
840
+ replaceable = {
841
+ None,
842
+ "none",
843
+ "score_missing",
844
+ "skillsbench_runner_error",
845
+ }
846
+ for field in ("first_blocker", "repeat_blocked_by"):
847
+ if compact.get(field) in replaceable:
848
+ compact[field] = blocker
849
+
850
+
851
+ def _skillsbench_compact_pre_agent_setup_label(compact: dict[str, Any]) -> str:
852
+ diagnostic = compact.get("compose_setup_diagnostic")
853
+ if not isinstance(diagnostic, dict):
854
+ return ""
855
+ label = _SKILLSBENCH_PRE_AGENT_SETUP_STATUS_LABELS.get(
856
+ str(diagnostic.get("status") or "")
857
+ )
858
+ if not label:
859
+ return ""
860
+ if compact.get("mode") != "skillsbench_codex_app_server_goal_baseline":
861
+ return ""
862
+ validation = (
863
+ compact.get("validation") if isinstance(compact.get("validation"), dict) else {}
864
+ )
865
+ native_route = (
866
+ compact.get("native_goal_worker_route")
867
+ if "native_goal_worker_route" in compact
868
+ else validation.get("native_goal_worker_route")
869
+ )
870
+ if native_route is not True:
871
+ return ""
872
+ native_connected = (
873
+ compact.get("native_goal_worker_connected")
874
+ if "native_goal_worker_connected" in compact
875
+ else validation.get("native_goal_worker_connected")
876
+ )
877
+ if native_connected is True:
878
+ return ""
879
+ trace_count = (
880
+ compact.get("native_goal_worker_trace_count")
881
+ if "native_goal_worker_trace_count" in compact
882
+ else validation.get("native_goal_worker_trace_count")
883
+ )
884
+ if (
885
+ isinstance(trace_count, int)
886
+ and not isinstance(trace_count, bool)
887
+ and trace_count > 0
888
+ ):
889
+ return ""
890
+ if diagnostic.get("agent_rounds_started") is True:
891
+ return ""
892
+ if not _skillsbench_compact_official_score_missing(compact):
893
+ return ""
894
+ return label
895
+
896
+
897
+ def _apply_skillsbench_pre_agent_setup_compact_projection(
898
+ compact: dict[str, Any],
899
+ ) -> None:
900
+ label = _skillsbench_compact_pre_agent_setup_label(compact)
901
+ if not label:
902
+ return
903
+ current = str(compact.get("score_failure_attribution") or "")
904
+ if (
905
+ current in {"", "none", "score_missing", "skillsbench_runner_error"}
906
+ or current.startswith("skillsbench_native_goal_worker_")
907
+ ):
908
+ compact["score_failure_attribution"] = label
909
+ compact["first_blocker"] = label
910
+ labels = [
911
+ item
912
+ for item in compact.get("failure_attribution_labels", [])
913
+ if isinstance(item, str) and item
914
+ ]
915
+ for item in (
916
+ label,
917
+ "skillsbench_app_server_goal_pre_agent_materialization_blocked",
918
+ "skillsbench_runner_setup_error",
919
+ ):
920
+ if item not in labels:
921
+ labels.append(item)
922
+ compact["failure_attribution_labels"] = labels[:MAX_BENCHMARK_RUN_LIST_ITEMS]
923
+ attempt_accounting = compact.get("attempt_accounting")
924
+ if isinstance(attempt_accounting, dict):
925
+ attempt_accounting["failure_label"] = label
926
+ attempt_accounting["failure_class"] = "job_materialization_failed"
927
+ runner_failure = compact.get("runner_failure")
928
+ if isinstance(runner_failure, dict):
929
+ runner_failure["exception_type"] = label
930
+ runner_failure["failure_class"] = label
931
+ runner_failure["pre_agent_setup_materialization_blocked"] = True
932
+ validation = compact.get("validation")
933
+ if isinstance(validation, dict):
934
+ failed = [
935
+ item
936
+ for item in validation.get("failed_checks", [])
937
+ if isinstance(item, str) and item
938
+ ]
939
+ failed = [
940
+ item for item in failed if item != "native_goal_worker_public_trace_missing"
941
+ ]
942
+ if "pre_agent_setup_materialization_blocked" not in failed:
943
+ failed.append("pre_agent_setup_materialization_blocked")
944
+ validation["failed_checks"] = failed[:MAX_BENCHMARK_RUN_LIST_ITEMS]
945
+ validation["all_passed"] = False
946
+ compact["pre_agent_setup_materialization_blocked"] = True
947
+ compact["native_goal_worker_pre_agent_setup_blocked"] = True
948
+
949
+
950
+ def _mark_skillsbench_pre_task_attempt_accounting(
951
+ compact: dict[str, Any],
952
+ *,
953
+ failure_label: str,
954
+ ) -> None:
955
+ attempt_accounting = compact.get("attempt_accounting")
956
+ if not isinstance(attempt_accounting, dict):
957
+ return
958
+ attempt_accounting["lifecycle_phase"] = "runner_accepted_args"
959
+ attempt_accounting["failure_label"] = failure_label
960
+ attempt_accounting["failure_class"] = "job_materialization_failed"
961
+ attempt_accounting["launcher_attempt_countable"] = True
962
+ for field in (
963
+ "case_attempt_countable",
964
+ "solver_attempt_countable",
965
+ "verifier_attempt_countable",
966
+ "official_score_attempt_countable",
967
+ ):
968
+ attempt_accounting[field] = False
969
+ attempts = attempt_accounting.get("attempts")
970
+ if not isinstance(attempts, dict):
971
+ return
972
+ launcher = attempts.get("launcher")
973
+ if isinstance(launcher, dict):
974
+ launcher["attempted"] = True
975
+ launcher["countable"] = True
976
+ for phase_name in ("case", "solver", "verifier", "official_score"):
977
+ phase = attempts.get(phase_name)
978
+ if isinstance(phase, dict):
979
+ phase["attempted"] = False
980
+ phase["countable"] = False
981
+
982
+
983
+ def _apply_skillsbench_benchmark_egress_preflight_compact_projection(
984
+ compact: dict[str, Any],
985
+ *,
986
+ source: dict[str, Any] | None = None,
987
+ ) -> None:
988
+ source = source if isinstance(source, dict) else {}
989
+ source_runner_config = (
990
+ source.get("runner_config")
991
+ if isinstance(source.get("runner_config"), dict)
992
+ else {}
993
+ )
994
+ proxy_required = (
995
+ compact.get("benchmark_egress_proxy_required") is True
996
+ or source_runner_config.get("benchmark_egress_proxy_required") is True
997
+ )
998
+ proxy_ready = (
999
+ compact.get("benchmark_egress_proxy_ready") is True
1000
+ or source_runner_config.get("benchmark_egress_proxy_ready") is True
1001
+ )
1002
+ proxy_status = public_safe_compact_text(
1003
+ compact.get("benchmark_egress_proxy_status")
1004
+ or source_runner_config.get("benchmark_egress_proxy_status"),
1005
+ limit=120,
1006
+ )
1007
+ benchmark_failure_statuses = {
1008
+ "failed",
1009
+ "invalid_proxy_value",
1010
+ "missing_required_proxy",
1011
+ "proxy_auth_required",
1012
+ "proxy_connect_rejected",
1013
+ "unsupported_proxy_scheme",
1014
+ }
1015
+ benchmark_blocked = bool(
1016
+ proxy_required
1017
+ and not proxy_ready
1018
+ and proxy_status in benchmark_failure_statuses
1019
+ )
1020
+ codex_required = (
1021
+ compact.get("codex_api_egress_preflight_required") is True
1022
+ or source_runner_config.get("codex_api_egress_preflight_required") is True
1023
+ )
1024
+ codex_ready = (
1025
+ compact.get("codex_api_egress_preflight_ready") is True
1026
+ or source_runner_config.get("codex_api_egress_preflight_ready") is True
1027
+ )
1028
+ codex_status = public_safe_compact_text(
1029
+ compact.get("codex_api_egress_preflight_status")
1030
+ or source_runner_config.get("codex_api_egress_preflight_status"),
1031
+ limit=120,
1032
+ )
1033
+ codex_failure_statuses = {
1034
+ "failed",
1035
+ "missing_reverse_tunnel_proxy",
1036
+ "proxy_auth_required",
1037
+ "proxy_connect_rejected",
1038
+ "unsupported_egress_mode",
1039
+ "unsupported_proxy_scheme",
1040
+ }
1041
+ codex_blocked = bool(
1042
+ codex_required and not codex_ready and codex_status in codex_failure_statuses
1043
+ )
1044
+ if not benchmark_blocked and not codex_blocked:
1045
+ return
1046
+ if not _skillsbench_compact_official_score_missing(compact):
1047
+ return
1048
+
1049
+ if benchmark_blocked:
1050
+ label = "skillsbench_benchmark_egress_proxy_preflight_blocked"
1051
+ status_label = f"skillsbench_benchmark_egress_proxy_{proxy_status}"
1052
+ blocker_key = "benchmark_egress_proxy_preflight_blocked"
1053
+ else:
1054
+ label = "skillsbench_codex_api_egress_preflight_blocked"
1055
+ status_label = f"skillsbench_codex_api_egress_{codex_status}"
1056
+ blocker_key = "codex_api_egress_preflight_blocked"
1057
+ compact["score_failure_attribution"] = label
1058
+ compact["first_blocker"] = label
1059
+ compact["repeat_blocked_by"] = label
1060
+ compact["official_score_comparable_to_native_codex"] = False
1061
+ compact["official_score_comparable_to_loopx_treatment"] = False
1062
+
1063
+ labels = [
1064
+ item
1065
+ for item in compact.get("failure_attribution_labels", [])
1066
+ if isinstance(item, str)
1067
+ and item
1068
+ and item
1069
+ not in {
1070
+ "skillsbench_product_mode_uncountable_treatment",
1071
+ "skillsbench_remote_bridge_agent_operation_trace_missing",
1072
+ "skillsbench_verifier_package_install_risk",
1073
+ "skillsbench_verifier_uv_install_or_download_failure",
1074
+ "verifier_dependency_install_failure",
1075
+ }
1076
+ ]
1077
+ primary_labels = (
1078
+ label,
1079
+ "skillsbench_environment_setup_error",
1080
+ status_label,
1081
+ )
1082
+ labels = list(primary_labels) + [
1083
+ item for item in labels if item not in primary_labels
1084
+ ]
1085
+ compact["failure_attribution_labels"] = labels[:MAX_BENCHMARK_RUN_LIST_ITEMS]
1086
+
1087
+ _mark_skillsbench_pre_task_attempt_accounting(
1088
+ compact,
1089
+ failure_label=label,
1090
+ )
1091
+ runner_failure = compact.get("runner_failure")
1092
+ if isinstance(runner_failure, dict):
1093
+ runner_failure["failure_class"] = label
1094
+ runner_failure[blocker_key] = True
1095
+
1096
+ validation = (
1097
+ compact.get("validation")
1098
+ if isinstance(compact.get("validation"), dict)
1099
+ else {}
1100
+ )
1101
+ validation[blocker_key] = True
1102
+ validation["raw_verifier_output_read"] = False
1103
+ validation["all_passed"] = False
1104
+ compact["validation"] = validation
1105
+
1106
+ if benchmark_blocked:
1107
+ compact["benchmark_egress_proxy_diagnostic"] = {
1108
+ "schema_version": "skillsbench_benchmark_egress_proxy_diagnostic_v0",
1109
+ "status": "benchmark_egress_proxy_preflight_blocked",
1110
+ "score_failure_attribution": label,
1111
+ "proxy_required": True,
1112
+ "proxy_ready": False,
1113
+ "proxy_status": proxy_status,
1114
+ "proxy_error_kind": public_safe_compact_text(
1115
+ compact.get("benchmark_egress_proxy_error_kind")
1116
+ or source_runner_config.get("benchmark_egress_proxy_error_kind"),
1117
+ limit=120,
1118
+ ),
1119
+ "proxy_mode_requested": public_safe_compact_text(
1120
+ compact.get("benchmark_egress_proxy_mode_requested")
1121
+ or source_runner_config.get("benchmark_egress_proxy_mode_requested"),
1122
+ limit=80,
1123
+ ),
1124
+ "proxy_mode_effective": public_safe_compact_text(
1125
+ compact.get("benchmark_egress_proxy_mode_effective")
1126
+ or source_runner_config.get("benchmark_egress_proxy_mode_effective"),
1127
+ limit=80,
1128
+ ),
1129
+ "proxy_url_recorded": False,
1130
+ "raw_logs_read": False,
1131
+ "raw_task_text_read": False,
1132
+ "raw_trajectory_read": False,
1133
+ "next_diagnostic_action": (
1134
+ "configure_valid_private_benchmark_egress_proxy"
1135
+ ),
1136
+ }
1137
+ return
1138
+
1139
+ compact["codex_api_egress_diagnostic"] = {
1140
+ "schema_version": "skillsbench_codex_api_egress_diagnostic_v0",
1141
+ "status": "codex_api_egress_preflight_blocked",
1142
+ "score_failure_attribution": label,
1143
+ "egress_required": True,
1144
+ "egress_ready": False,
1145
+ "egress_status": codex_status,
1146
+ "egress_error_kind": public_safe_compact_text(
1147
+ compact.get("codex_api_egress_preflight_error_kind")
1148
+ or source_runner_config.get("codex_api_egress_preflight_error_kind"),
1149
+ limit=120,
1150
+ ),
1151
+ "egress_mode_requested": public_safe_compact_text(
1152
+ compact.get("codex_api_egress_mode_requested")
1153
+ or source_runner_config.get("codex_api_egress_mode_requested"),
1154
+ limit=80,
1155
+ ),
1156
+ "egress_mode_effective": public_safe_compact_text(
1157
+ compact.get("codex_api_egress_mode_resolved")
1158
+ or source_runner_config.get("codex_api_egress_mode_resolved"),
1159
+ limit=80,
1160
+ ),
1161
+ "reverse_tunnel_required": (
1162
+ compact.get("codex_api_reverse_tunnel_required") is True
1163
+ or source_runner_config.get("codex_api_reverse_tunnel_required") is True
1164
+ ),
1165
+ "proxy_url_recorded": False,
1166
+ "raw_logs_read": False,
1167
+ "raw_task_text_read": False,
1168
+ "raw_trajectory_read": False,
1169
+ "next_diagnostic_action": "restore_required_private_egress_then_retry",
1170
+ }
1171
+
1172
+
1173
+ def _apply_skillsbench_runner_source_fingerprint_compact_projection(
1174
+ compact: dict[str, Any],
1175
+ *,
1176
+ source: dict[str, Any] | None = None,
1177
+ ) -> None:
1178
+ source = source if isinstance(source, dict) else {}
1179
+ prerequisites = (
1180
+ compact.get("runner_prerequisites")
1181
+ if isinstance(compact.get("runner_prerequisites"), dict)
1182
+ else {}
1183
+ )
1184
+ source_config = (
1185
+ source.get("runner_config")
1186
+ if isinstance(source.get("runner_config"), dict)
1187
+ else {}
1188
+ )
1189
+ status = public_safe_compact_text(
1190
+ prerequisites.get("loopx_runner_source_fingerprint_status")
1191
+ or source_config.get("loopx_runner_source_fingerprint_status"),
1192
+ limit=80,
1193
+ )
1194
+ blocker = public_safe_compact_text(
1195
+ prerequisites.get("loopx_runner_source_first_blocker")
1196
+ or source_config.get("loopx_runner_source_first_blocker"),
1197
+ limit=120,
1198
+ )
1199
+ if (
1200
+ status != "mismatched_expected"
1201
+ or blocker != "loopx_runner_source_git_head_mismatch"
1202
+ or not _skillsbench_compact_official_score_missing(compact)
1203
+ ):
1204
+ return
1205
+
1206
+ compact["score_failure_attribution"] = blocker
1207
+ compact["first_blocker"] = blocker
1208
+ compact["repeat_blocked_by"] = blocker
1209
+ compact["official_score_comparable_to_native_codex"] = False
1210
+ compact["official_score_comparable_to_loopx_treatment"] = False
1211
+
1212
+ verifier_labels = {
1213
+ "verifier_dependency_bootstrap_timeout",
1214
+ "verifier_dependency_install_failure",
1215
+ "verifier_uv_install_or_download_failure",
1216
+ "skillsbench_verifier_bootstrap_missing_official_score",
1217
+ "skillsbench_verifier_bootstrap_preflight_blocked",
1218
+ "skillsbench_verifier_package_install_risk",
1219
+ }
1220
+ labels = [
1221
+ item
1222
+ for item in compact.get("failure_attribution_labels", [])
1223
+ if isinstance(item, str) and item and item not in verifier_labels
1224
+ ]
1225
+ primary_labels = (
1226
+ blocker,
1227
+ "skillsbench_runner_source_fingerprint_mismatch",
1228
+ "skillsbench_runner_setup_error",
1229
+ )
1230
+ labels = list(primary_labels) + [
1231
+ item for item in labels if item not in primary_labels
1232
+ ]
1233
+ compact["failure_attribution_labels"] = labels[:MAX_BENCHMARK_RUN_LIST_ITEMS]
1234
+
1235
+ _mark_skillsbench_pre_task_attempt_accounting(
1236
+ compact,
1237
+ failure_label=blocker,
1238
+ )
1239
+ runner_failure = compact.get("runner_failure")
1240
+ if isinstance(runner_failure, dict):
1241
+ runner_failure["failure_class"] = blocker
1242
+ runner_failure["runner_source_fingerprint_mismatch"] = True
1243
+
1244
+ validation = (
1245
+ compact.get("validation")
1246
+ if isinstance(compact.get("validation"), dict)
1247
+ else {}
1248
+ )
1249
+ validation["runner_source_fingerprint_mismatch"] = True
1250
+ validation["all_passed"] = False
1251
+ compact["validation"] = validation
1252
+
1253
+ compose_setup_diagnostic = compact.get("compose_setup_diagnostic")
1254
+ if isinstance(compose_setup_diagnostic, dict):
1255
+ compose_setup_diagnostic["case_attempt_budget_should_count"] = False