entelligence-cli 0.1.329__tar.gz → 0.1.331__tar.gz

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 (258) hide show
  1. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/PKG-INFO +1 -1
  2. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/commands/insights.py +45 -2
  3. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/facts_envelope.py +51 -3
  4. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/update_checker.py +26 -15
  5. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli.egg-info/PKG-INFO +1 -1
  6. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/pyproject.toml +1 -1
  7. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_facts_envelope.py +92 -0
  8. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_insights_schedule.py +54 -0
  9. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_sync_pushes_built_sessions.py +8 -1
  10. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/README.md +0 -0
  11. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/__init__.py +0 -0
  12. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/MEMORY_CORE_SOURCE_REVISION +0 -0
  13. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/MEMORY_CORE_VERSION +0 -0
  14. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/__init__.py +0 -0
  15. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/__init__.py +0 -0
  16. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/code_authorship.py +0 -0
  17. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/__init__.py +0 -0
  18. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/__init__.py +0 -0
  19. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_paths.py +0 -0
  20. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_segmentation_prompts/system.j2 +0 -0
  21. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_segmentation_prompts/user.j2 +0 -0
  22. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/__init__.py +0 -0
  23. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/_base.py +0 -0
  24. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/_jsonl_utils.py +0 -0
  25. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/__init__.py +0 -0
  26. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/git_reader.py +0 -0
  27. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/models.py +0 -0
  28. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/parser.py +0 -0
  29. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/source.py +0 -0
  30. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/factory.py +0 -0
  31. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/__init__.py +0 -0
  32. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/__init__.py +0 -0
  33. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/base.py +0 -0
  34. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/claude_code.py +0 -0
  35. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/claude_cost_summary.py +0 -0
  36. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/codex.py +0 -0
  37. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/copilot.py +0 -0
  38. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/cursor_agent_transcript.py +0 -0
  39. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/cursor_store.py +0 -0
  40. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/kiro.py +0 -0
  41. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/opencode.py +0 -0
  42. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/source.py +0 -0
  43. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/behavior_signals.py +0 -0
  44. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/edit_lines.py +0 -0
  45. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/file_paths.py +0 -0
  46. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/metrics.py +0 -0
  47. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/produced.py +0 -0
  48. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/segment_orchestrator.py +0 -0
  49. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/segment_pure.py +0 -0
  50. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/session_pure.py +0 -0
  51. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/skill_names.py +0 -0
  52. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/spans.py +0 -0
  53. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/pricing.py +0 -0
  54. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/vocabulary/__init__.py +0 -0
  55. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/vocabulary/categories.py +0 -0
  56. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/vocabulary/edges.py +0 -0
  57. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/_vendor/memory_core/vocabulary/nodes.py +0 -0
  58. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/agent_insights_proxy.py +0 -0
  59. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/agent_insights_segment.py +0 -0
  60. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/api_client.py +0 -0
  61. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/ascii-art.txt +0 -0
  62. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/billing_snapshot.py +0 -0
  63. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/browser_login.py +0 -0
  64. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/claude_cloud.py +0 -0
  65. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/cli.py +0 -0
  66. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/code_authorship.py +0 -0
  67. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/commands/__init__.py +0 -0
  68. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/commands/auth.py +0 -0
  69. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/commands/budget.py +0 -0
  70. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/commands/config.py +0 -0
  71. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/commands/cursor_doctor.py +0 -0
  72. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/commands/incident.py +0 -0
  73. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/commands/mcp.py +0 -0
  74. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/commands/reset.py +0 -0
  75. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/commands/review.py +0 -0
  76. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/commands/router.py +0 -0
  77. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/commands/security.py +0 -0
  78. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/commands/skills.py +0 -0
  79. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/commands/trim.py +0 -0
  80. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/commands/update.py +0 -0
  81. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/config.py +0 -0
  82. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/cursor_cloud.py +0 -0
  83. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/cursor_path_a_usage.py +0 -0
  84. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/diagnostics.py +0 -0
  85. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/exceptions.py +0 -0
  86. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/git_operations.py +0 -0
  87. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/hooks/__init__.py +0 -0
  88. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/hooks/capacity_emit.py +0 -0
  89. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/hooks/context_guard.py +0 -0
  90. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/hooks/session_brief.py +0 -0
  91. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/hooks/standup_emit.py +0 -0
  92. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/insights_log.py +0 -0
  93. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/insights_watch.py +0 -0
  94. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/mcp_inventory.py +0 -0
  95. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/platform_env.py +0 -0
  96. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/router/__init__.py +0 -0
  97. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/router/claude_settings.py +0 -0
  98. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/router/codex_auth.py +0 -0
  99. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/router/codex_settings.py +0 -0
  100. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/router/compress.py +0 -0
  101. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/router/copilot_launcher.py +0 -0
  102. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/router/copilot_settings.py +0 -0
  103. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/router/cursor_settings.py +0 -0
  104. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/router/state.py +0 -0
  105. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/scheduling.py +0 -0
  106. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/session_deferrals.py +0 -0
  107. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/session_inventory.py +0 -0
  108. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/session_revisions.py +0 -0
  109. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/textual_ui.py +0 -0
  110. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/token_savings_snapshot.py +0 -0
  111. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/ui/__init__.py +0 -0
  112. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/ui/interactive.py +0 -0
  113. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/ui/keys.py +0 -0
  114. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/ui/loaders.py +0 -0
  115. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/ui/output.py +0 -0
  116. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/ui/styles.py +0 -0
  117. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/upload/__init__.py +0 -0
  118. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/upload/conductor.py +0 -0
  119. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/upload/config.py +0 -0
  120. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/upload/cursor_usage.py +0 -0
  121. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/upload/discovery.py +0 -0
  122. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/upload/manifest.py +0 -0
  123. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/upload/models.py +0 -0
  124. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/upload/pii.py +0 -0
  125. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/upload/runner.py +0 -0
  126. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/upload/secrets.py +0 -0
  127. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/upload/stores.py +0 -0
  128. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli/wrapped_game.py +0 -0
  129. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli.egg-info/SOURCES.txt +0 -0
  130. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli.egg-info/dependency_links.txt +0 -0
  131. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli.egg-info/entry_points.txt +0 -0
  132. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli.egg-info/requires.txt +0 -0
  133. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/entelligence_cli.egg-info/top_level.txt +0 -0
  134. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/setup.cfg +0 -0
  135. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_agent_insights_proxy.py +0 -0
  136. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_agent_insights_proxy_api_client.py +0 -0
  137. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_agent_insights_segment.py +0 -0
  138. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_attach_fix_smoke.py +0 -0
  139. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_attach_ticket_smoke.py +0 -0
  140. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_auto_update_loop_guard.py +0 -0
  141. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_billing_snapshot.py +0 -0
  142. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_billing_snapshot_cloud.py +0 -0
  143. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_budget_smoke.py +0 -0
  144. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_capacity_emit.py +0 -0
  145. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_claude_capture_boundary.py +0 -0
  146. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_claude_cloud.py +0 -0
  147. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_claude_cloud_cadence.py +0 -0
  148. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_claude_code_cost_events.py +0 -0
  149. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_claude_code_subagent_usage.py +0 -0
  150. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_claude_hook_helper_classification.py +0 -0
  151. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_code_authorship.py +0 -0
  152. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_code_authorship_parser_regressions.py +0 -0
  153. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_code_authorship_parsers.py +0 -0
  154. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_codex_auth.py +0 -0
  155. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_codex_native_ledger.py +0 -0
  156. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_codex_settings.py +0 -0
  157. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_codex_total_only_sync.py +0 -0
  158. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_conductor.py +0 -0
  159. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_context_guard.py +0 -0
  160. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_copilot_launcher.py +0 -0
  161. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_copilot_parser_tokens.py +0 -0
  162. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_creation_provenance_contract.py +0 -0
  163. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_cursor_cloud.py +0 -0
  164. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_cursor_composer_mtime_stamp.py +0 -0
  165. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_cursor_doctor.py +0 -0
  166. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_cursor_path_a_usage.py +0 -0
  167. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_cursor_path_regex_and_heartbeat.py +0 -0
  168. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_cursor_self_heal_loop.py +0 -0
  169. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_cursor_settings.py +0 -0
  170. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_cursor_unknown_timestamps.py +0 -0
  171. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_cursor_usage.py +0 -0
  172. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_cursor_usage_archive.py +0 -0
  173. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_cursor_usage_completeness.py +0 -0
  174. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_cursor_usage_heal.py +0 -0
  175. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_cursor_usage_recapture.py +0 -0
  176. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_cursor_usage_state.py +0 -0
  177. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_detached_background_work.py +0 -0
  178. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_diagnostics.py +0 -0
  179. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_discovery_head_unicode.py +0 -0
  180. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_discovery_opencode.py +0 -0
  181. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_eligibility_state.py +0 -0
  182. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_endpoint_scheme_enforcement.py +0 -0
  183. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_entropy_secret_detection.py +0 -0
  184. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_error_body_decode.py +0 -0
  185. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_git_operations_copilot.py +0 -0
  186. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_heartbeat_api_client.py +0 -0
  187. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_identity_cache_refresh.py +0 -0
  188. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_incident_refs.py +0 -0
  189. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_incident_smoke.py +0 -0
  190. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_insights_cadence_heartbeat.py +0 -0
  191. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_insights_checkpoint_resume.py +0 -0
  192. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_insights_copilot_prompts.py +0 -0
  193. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_insights_cursor_composer_home.py +0 -0
  194. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_insights_index_failure.py +0 -0
  195. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_insights_kiro_prompts.py +0 -0
  196. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_insights_log.py +0 -0
  197. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_insights_me_smoke.py +0 -0
  198. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_insights_path_a_default.py +0 -0
  199. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_insights_produced_prs.py +0 -0
  200. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_insights_redrain.py +0 -0
  201. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_insights_repo_attribution.py +0 -0
  202. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_insights_schedule_arm.py +0 -0
  203. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_insights_structured_payload.py +0 -0
  204. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_insights_watch.py +0 -0
  205. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_insights_watch_transport.py +0 -0
  206. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_legacy_encoding_recovery.py +0 -0
  207. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_local_source_discovery_stats.py +0 -0
  208. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_login_token_stdin.py +0 -0
  209. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_machine_fingerprint.py +0 -0
  210. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_mcp_install.py +0 -0
  211. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_mcp_inventory.py +0 -0
  212. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_multipart_backoff.py +0 -0
  213. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_pii.py +0 -0
  214. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_presigned_skip_index.py +0 -0
  215. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_processing_checkpoint_api_client.py +0 -0
  216. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_release_directive.py +0 -0
  217. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_reset_command.py +0 -0
  218. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_review_redaction.py +0 -0
  219. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_rosetta_self_heal.py +0 -0
  220. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_router_commands.py +0 -0
  221. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_router_dead_proxy_guard.py +0 -0
  222. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_router_stats.py +0 -0
  223. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_scheduling_cron_env.py +0 -0
  224. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_schtasks_integration.py +0 -0
  225. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_secrets_redaction_boundary.py +0 -0
  226. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_security_commands.py +0 -0
  227. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_segment_chunking.py +0 -0
  228. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_segment_session_timeout.py +0 -0
  229. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_segmentation_role_gate.py +0 -0
  230. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_segmentation_window_scope.py +0 -0
  231. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_segmentation_worker_failure_visibility.py +0 -0
  232. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_session_accuracy_regressions.py +0 -0
  233. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_session_brief.py +0 -0
  234. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_session_deferrals.py +0 -0
  235. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_session_inventory.py +0 -0
  236. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_session_revisions.py +0 -0
  237. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_sessions_status_chunking.py +0 -0
  238. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_sessions_status_safe_default.py +0 -0
  239. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_skills_command.py +0 -0
  240. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_sync_backgrounding.py +0 -0
  241. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_sync_dry_run_checkpoint.py +0 -0
  242. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_sync_parse_failure_checkpoint.py +0 -0
  243. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_sync_partial_schema.py +0 -0
  244. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_sync_runs_full_pipeline.py +0 -0
  245. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_token_savings_snapshot.py +0 -0
  246. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_trim_command.py +0 -0
  247. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_trim_hook_opt_in_only_guard.py +0 -0
  248. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_update_command.py +0 -0
  249. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_upload_copilot.py +0 -0
  250. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_upload_cursor_store.py +0 -0
  251. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_upload_home_backfill.py +0 -0
  252. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_upload_kiro.py +0 -0
  253. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_upload_repo_filter.py +0 -0
  254. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_upload_repo_roots.py +0 -0
  255. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_windows_compat.py +0 -0
  256. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_world_model_provenance.py +0 -0
  257. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_wrap_retry.py +0 -0
  258. {entelligence_cli-0.1.329 → entelligence_cli-0.1.331}/tests/test_wsl_support.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: entelligence-cli
3
- Version: 0.1.329
3
+ Version: 0.1.331
4
4
  Summary: AI-powered code review assistant for your terminal - Get instant, intelligent feedback on your code changes
5
5
  Author-email: EntelligenceAI <info@entelligence.ai>
6
6
  Project-URL: Homepage, https://entelligence.ai
@@ -58,6 +58,25 @@ class _PartialCaptureError(click.ClickException):
58
58
  """Some sources failed capture, but every built session was acknowledged."""
59
59
 
60
60
 
61
+ class _IncompleteSyncError(click.ClickException):
62
+ """The push lane could not prove every session landed, so the checkpoint stands.
63
+
64
+ Raised INSTEAD of a bare `click.ClickException` purely so the caller can tell
65
+ this failure apart from an auth/config one and still start the segmentation
66
+ worker (ENT-4714). It carries no new behaviour of its own: same message, same
67
+ non-zero exit, same untouched high-water mark.
68
+
69
+ Why the distinction matters: the shortfall this reports can be PERMANENT — a
70
+ session whose envelope never earns a countable acknowledgement fails the same
71
+ way on every subsequent run. Before this type existed the exception escaped
72
+ `_run_full_pipeline` before control reached `_spawn_agent_analyze`, so a
73
+ machine in that state segmented NOTHING (eight days, 127 consecutive runs, on
74
+ the reporting machine) while the structured push ABOVE the guard kept landing
75
+ session rows — which is why the sessions page stayed current and only `tasks`
76
+ sat at zero.
77
+ """
78
+
79
+
61
80
  # Look-back default for `sync` when there is no prior high-water mark (30 days).
62
81
  _DEFAULT_SYNC_HOURS = 720
63
82
  # `sync --batch-size` default. Named rather than inlined because
@@ -4327,7 +4346,11 @@ def _sync_cmd(
4327
4346
  )
4328
4347
  # Always the hard type here: every capture-only failure now leaves via
4329
4348
  # the `_PartialCaptureError` below, AFTER the checkpoint is written.
4330
- raise click.ClickException(
4349
+ # `_IncompleteSyncError` (ENT-4714) is still that hard type — it subclasses
4350
+ # `click.ClickException` and changes nothing about this abort — it only
4351
+ # lets `_run_full_pipeline` recognise the failure and still start the
4352
+ # segmentation worker instead of dying before it.
4353
+ raise _IncompleteSyncError(
4331
4354
  f"Sync incomplete ({envelopes_archived_total}/{len(sessions)} archived, "
4332
4355
  f"{len(unconfirmed)} storage acknowledgements missing, capture failed={parse_failed}, "
4333
4356
  f"request facts truncated={incomplete_facts}). "
@@ -6561,6 +6584,20 @@ def _run_full_pipeline(
6561
6584
  # Keep the failed checkpoint and exit status; only allow analysis of
6562
6585
  # acknowledged sessions to proceed through the usual worker gates.
6563
6586
  partial_capture = exc
6587
+ except _IncompleteSyncError as exc:
6588
+ # ENT-4714: same reasoning, one step further out. This failure means the
6589
+ # run could not PROVE every session landed — not that nothing did. The
6590
+ # structured push above the guard has already stored and acknowledged its
6591
+ # batches, and the shortfall can be permanent, so letting this escape here
6592
+ # starves segmentation forever: the worker below never spawns, tasks stay
6593
+ # at zero, and the next run reproduces the identical shortfall.
6594
+ #
6595
+ # Deliberately NOT softened: the checkpoint stays unwritten (the raise
6596
+ # happens before the high-water write), the exit status stays non-zero and
6597
+ # the message is unchanged. Only the segmentation spawn moves ahead of the
6598
+ # re-raise, and the worker still applies its own lease and repo-gate checks
6599
+ # to decide what it may touch.
6600
+ partial_capture = exc
6564
6601
 
6565
6602
  # Insights + task segmentation come from analyze, which is slow on big
6566
6603
  # sessions (huge codex rollouts can take minutes). Run it DETACHED so this
@@ -6605,7 +6642,13 @@ def _run_full_pipeline(
6605
6642
  runlog.line("analyze", "background worker started" if analyzing_bg else "not started")
6606
6643
 
6607
6644
  if partial_capture is not None:
6608
- runlog.finish("partial-capture")
6645
+ # Name which of the two deferred failures this was; "partial-capture" on an
6646
+ # incomplete-sync run is what made this state so hard to read in the logs.
6647
+ runlog.finish(
6648
+ "incomplete-sync"
6649
+ if isinstance(partial_capture, _IncompleteSyncError)
6650
+ else "partial-capture"
6651
+ )
6609
6652
  raise partial_capture
6610
6653
 
6611
6654
  bits = []
@@ -2194,6 +2194,18 @@ def push_envelopes(api_client, org_uuid: str, envelopes: list[dict[str, Any]]) -
2194
2194
  return push_envelopes_with_eligibility(api_client, org_uuid, envelopes).sent
2195
2195
 
2196
2196
 
2197
+ def _session_ids(chunk: list[dict[str, Any]]) -> str:
2198
+ """Comma-joined session ids for a chunk, for the drop warnings (ENT-4714).
2199
+
2200
+ Bounded so one oversized chunk cannot dominate the log line; the count is
2201
+ always stated, so a truncated list is still unambiguous.
2202
+ """
2203
+ ids = [str(e.get("session_id")) for e in chunk if isinstance(e, dict)]
2204
+ head = ids[:10]
2205
+ suffix = f" (+{len(ids) - len(head)} more)" if len(ids) > len(head) else ""
2206
+ return ",".join(head) + suffix
2207
+
2208
+
2197
2209
  def push_envelopes_with_eligibility(
2198
2210
  api_client, org_uuid: str, envelopes: list[dict[str, Any]]
2199
2211
  ) -> EnvelopePushResult:
@@ -2276,8 +2288,20 @@ def push_envelopes_with_eligibility(
2276
2288
  resp = api_client.ingest_facts_envelope(
2277
2289
  org_uuid, {"orgUUID": org_uuid, "envelopes": chunk}
2278
2290
  )
2291
+ # ENT-4714: every `continue` below silently drops a whole chunk from
2292
+ # `result.sent`, and the caller turns that shortfall into a hard sync
2293
+ # abort that pins the checkpoint. At debug level the cause was
2294
+ # invisible — the reporting machine sat at "184/186 archived" for 127
2295
+ # consecutive runs with not one line naming the missing two. These are
2296
+ # warnings, and they carry the session ids, so the next occurrence is
2297
+ # one grep rather than an afternoon.
2279
2298
  if not isinstance(resp, dict) or resp.get("Error") or resp.get("success") is False:
2280
- logger.debug("[FactsEnvelope] push failed or returned no acknowledgment")
2299
+ logger.warning(
2300
+ "[FactsEnvelope] chunk of %d not acknowledged (error=%s); sessions=%s",
2301
+ len(chunk),
2302
+ (resp.get("Error") if isinstance(resp, dict) else "no-dict-response"),
2303
+ _session_ids(chunk),
2304
+ )
2281
2305
  continue
2282
2306
  archived = (
2283
2307
  valid_gate_generation(resp["envelopes_archived"])
@@ -2287,13 +2311,37 @@ def push_envelopes_with_eligibility(
2287
2311
  else None
2288
2312
  )
2289
2313
  if archived is None or archived > len(chunk):
2290
- logger.debug("[FactsEnvelope] missing or invalid archived count")
2314
+ logger.warning(
2315
+ "[FactsEnvelope] chunk of %d returned a missing/invalid archived "
2316
+ "count (%r); sessions=%s",
2317
+ len(chunk),
2318
+ resp.get("envelopes_archived"),
2319
+ _session_ids(chunk),
2320
+ )
2291
2321
  continue
2322
+ # The server can accept a chunk and still skip envelopes inside it
2323
+ # (`envelopes_skipped`, e.g. the per-envelope org-mismatch and schema
2324
+ # branches). The CLI never read this field, so a server-side drop was
2325
+ # indistinguishable from a transport one. Report it; `archived` already
2326
+ # excludes them, so this only adds the explanation.
2327
+ skipped = resp.get("envelopes_skipped")
2328
+ if isinstance(skipped, int) and skipped > 0:
2329
+ logger.warning(
2330
+ "[FactsEnvelope] server skipped %d of %d envelopes in this chunk; sessions=%s",
2331
+ skipped,
2332
+ len(chunk),
2333
+ _session_ids(chunk),
2334
+ )
2292
2335
  result.sent += archived
2293
2336
  if _merge_eligibility(result, resp, generations):
2294
2337
  answered_chunks += 1
2295
2338
  except Exception: # noqa: BLE001 — dual-write must never break a sync
2296
- logger.debug("[FactsEnvelope] push raised", exc_info=True)
2339
+ logger.warning(
2340
+ "[FactsEnvelope] push raised for a chunk of %d; sessions=%s",
2341
+ len(chunk),
2342
+ _session_ids(chunk),
2343
+ exc_info=True,
2344
+ )
2297
2345
  # All-or-nothing (same rule as sessions-status, review-caught): every
2298
2346
  # chunk answered, at one gate generation — otherwise a partial `gated`
2299
2347
  # list would be read as complete, or verdicts from two generations
@@ -671,34 +671,45 @@ def _resolve_argv(cmd: list[str]) -> list[str]:
671
671
 
672
672
 
673
673
  def _uv_accepts_refresh(uv_path: str) -> bool:
674
- """Whether this uv build takes ``--refresh`` on ``tool upgrade``.
675
-
676
- Asked at arm time rather than assumed, because the flag is the difference
677
- between a self-update job that works and one that silently no-ops forever:
678
- modern uv can serve a stale "latest" from its local cache, and a scheduled
679
- job has no second candidate to fall back to the way `_run_upgrade` does.
680
- Older uv builds reject the flag outright ("unexpected argument
681
- '--refresh'"), so arming it blindly would break exactly the machines that
682
- are furthest behind.
674
+ """Whether this uv build's ``tool upgrade`` PARSER accepts ``--refresh``.
675
+
676
+ Asked by running the parser, never by reading ``--help``. Live-caught on
677
+ 0.1.329: uv 0.11.12 prints ``--refresh`` inside the *description* of
678
+ ``--reinstall`` ("Implies `--refresh`") on that subcommand's help, so a
679
+ help-text match armed a job that then failed on every single firing with
680
+ ``error: unexpected argument '--refresh' found``. Matching prose is not
681
+ evidence about a parser.
682
+
683
+ The flag still matters: a scheduled job has no second candidate to fall
684
+ back to the way `_run_upgrade` does, so a uv serving a stale cached
685
+ "latest" would make the job a silent no-op forever.
686
+
687
+ The probe names NO tool at all, so there is nothing it could upgrade even
688
+ in principle: ``NAME...`` is a required positional and upgrading everything
689
+ needs an explicit ``--all``. A rejecting build fails on the argument, an
690
+ accepting one fails on the missing positional, and only the first says
691
+ "unexpected argument". (Review-caught: an earlier version passed a
692
+ made-up tool name, which would have upgraded a real tool if anyone ever
693
+ installed one under that name.)
683
694
 
684
695
  Args:
685
696
  uv_path: Absolute path to the uv binary to probe.
686
697
 
687
698
  Returns:
688
- True only when the flag is documented by that binary; False on any
689
- error, timeout, or unreadable help output — the plain form still
690
- upgrades, it just may lag a cache.
699
+ True only when the parser did NOT reject the flag; False on any error
700
+ or timeout. False is the safe answer — the plain form still upgrades,
701
+ it just may lag a cache.
691
702
  """
692
703
  try:
693
704
  probe = subprocess.run(
694
- [uv_path, "tool", "upgrade", "--help"],
705
+ [uv_path, "tool", "upgrade", "--refresh"],
695
706
  capture_output=True,
696
707
  text=True,
697
- timeout=10,
708
+ timeout=15,
698
709
  )
699
710
  except Exception: # noqa: BLE001 — a probe failure must not block arming
700
711
  return False
701
- return "--refresh" in f"{probe.stdout or ''}{probe.stderr or ''}"
712
+ return "unexpected argument" not in f"{probe.stdout or ''}{probe.stderr or ''}"
702
713
 
703
714
 
704
715
  def scheduled_upgrade_command() -> list[str] | None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: entelligence-cli
3
- Version: 0.1.329
3
+ Version: 0.1.331
4
4
  Summary: AI-powered code review assistant for your terminal - Get instant, intelligent feedback on your code changes
5
5
  Author-email: EntelligenceAI <info@entelligence.ai>
6
6
  Project-URL: Homepage, https://entelligence.ai
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "entelligence-cli"
7
- version = "0.1.329"
7
+ version = "0.1.331"
8
8
  description = "AI-powered code review assistant for your terminal - Get instant, intelligent feedback on your code changes"
9
9
  readme = "README.md"
10
10
  authors = [
@@ -2707,3 +2707,95 @@ class TestBuildEnvelopeTrimGate:
2707
2707
  )
2708
2708
  assert "trim_events" not in env
2709
2709
  assert env["claimed_counts"]["trim_events"] is None
2710
+
2711
+
2712
+ class TestEnvelopeDropsAreVisible:
2713
+ """ENT-4714: every path that drops a chunk from `sent` must say so, loudly.
2714
+
2715
+ These were `logger.debug` calls. The caller turns any shortfall in `sent`
2716
+ into a hard sync abort that pins the checkpoint, so a silent drop here
2717
+ presents downstream as "Sync incomplete (184/186 archived)" with nothing
2718
+ anywhere naming the missing two — which is exactly how the reporting machine
2719
+ stayed wedged for 127 consecutive runs.
2720
+ """
2721
+
2722
+ def test_unacknowledged_chunk_warns_with_session_ids(self, caplog):
2723
+ class FakeClient:
2724
+ def ingest_facts_envelope(self, org_uuid, payload):
2725
+ return {"Error": "boom"}
2726
+
2727
+ envelopes = [{"session_id": f"s{i}"} for i in range(3)]
2728
+ with caplog.at_level("WARNING", logger="entelligence_cli.facts_envelope"):
2729
+ result = facts_envelope.push_envelopes_with_eligibility(FakeClient(), "org1", envelopes)
2730
+
2731
+ assert result.sent == 0
2732
+ warnings = [r.getMessage() for r in caplog.records if r.levelname == "WARNING"]
2733
+ assert len(warnings) == 1
2734
+ assert "not acknowledged" in warnings[0]
2735
+ assert "boom" in warnings[0]
2736
+ # The point of the change: the ids are recoverable from the log alone.
2737
+ for sid in ("s0", "s1", "s2"):
2738
+ assert sid in warnings[0]
2739
+
2740
+ def test_server_side_skip_is_reported_even_though_chunk_succeeded(self, caplog):
2741
+ # The org-mismatch / schema-violation branches: HTTP fine, chunk accepted,
2742
+ # individual envelopes dropped. `envelopes_skipped` was never read by the
2743
+ # CLI, so this loss was indistinguishable from a transport failure.
2744
+ class FakeClient:
2745
+ def ingest_facts_envelope(self, org_uuid, payload):
2746
+ return {"success": True, "envelopes_archived": 3, "envelopes_skipped": 2}
2747
+
2748
+ envelopes = [{"session_id": f"s{i}"} for i in range(5)]
2749
+ with caplog.at_level("WARNING", logger="entelligence_cli.facts_envelope"):
2750
+ result = facts_envelope.push_envelopes_with_eligibility(FakeClient(), "org1", envelopes)
2751
+
2752
+ assert result.sent == 3 # unchanged accounting
2753
+ warnings = [r.getMessage() for r in caplog.records if r.levelname == "WARNING"]
2754
+ assert len(warnings) == 1
2755
+ assert "server skipped 2 of 5" in warnings[0]
2756
+ # The count alone would let an implementation satisfy this test while
2757
+ # dropping the ids — which is the exact state that made the production
2758
+ # shortfall unattributable. The ids ARE the diagnostic contract.
2759
+ for sid in ("s0", "s1", "s2", "s3", "s4"):
2760
+ assert sid in warnings[0]
2761
+
2762
+ def test_no_warning_on_a_fully_clean_push(self, caplog):
2763
+ # Guards the inverse: a healthy push must stay silent, or the warning is
2764
+ # noise and gets tuned out before the one that matters arrives.
2765
+ class FakeClient:
2766
+ def ingest_facts_envelope(self, org_uuid, payload):
2767
+ return {
2768
+ "success": True,
2769
+ "envelopes_archived": len(payload["envelopes"]),
2770
+ "envelopes_skipped": 0,
2771
+ }
2772
+
2773
+ envelopes = [{"session_id": f"s{i}"} for i in range(5)]
2774
+ with caplog.at_level("WARNING", logger="entelligence_cli.facts_envelope"):
2775
+ result = facts_envelope.push_envelopes_with_eligibility(FakeClient(), "org1", envelopes)
2776
+
2777
+ assert result.sent == 5
2778
+ assert [r for r in caplog.records if r.levelname == "WARNING"] == []
2779
+
2780
+ def test_raising_client_warns_with_session_ids(self, caplog):
2781
+ class FakeClient:
2782
+ def ingest_facts_envelope(self, org_uuid, payload):
2783
+ raise RuntimeError("connection reset")
2784
+
2785
+ envelopes = [{"session_id": "only-one"}]
2786
+ with caplog.at_level("WARNING", logger="entelligence_cli.facts_envelope"):
2787
+ result = facts_envelope.push_envelopes_with_eligibility(FakeClient(), "org1", envelopes)
2788
+
2789
+ assert result.sent == 0
2790
+ warnings = [r.getMessage() for r in caplog.records if r.levelname == "WARNING"]
2791
+ assert len(warnings) == 1
2792
+ assert "push raised" in warnings[0]
2793
+ assert "only-one" in warnings[0]
2794
+
2795
+ def test_session_id_list_is_bounded(self):
2796
+ chunk = [{"session_id": f"s{i}"} for i in range(15)]
2797
+ rendered = facts_envelope._session_ids(chunk)
2798
+ assert rendered.startswith("s0,s1,")
2799
+ assert "s9" in rendered
2800
+ assert "s10" not in rendered.split(" (+")[0]
2801
+ assert rendered.endswith("(+5 more)")
@@ -688,3 +688,57 @@ def test_bare_sync_survives_missing_local_data(fake_home):
688
688
  assert result.exit_code == 0, result.output
689
689
  upload.assert_not_called()
690
690
  assert "No sessions to sync yet" in result.output
691
+
692
+
693
+ @pytest.mark.parametrize("leased_ids", [None, [], ["healthy-session"]])
694
+ def test_incomplete_sync_still_dispatches_worker_without_claiming_success(
695
+ fake_home, capsys, leased_ids
696
+ ):
697
+ """ENT-4714: an unprovable push must not starve segmentation.
698
+
699
+ `_IncompleteSyncError` means "I could not prove every session landed" — not
700
+ "nothing landed". The structured push above the guard has already stored and
701
+ acknowledged its batches. The shortfall can be permanent, so letting this
702
+ escape before `_spawn_agent_analyze` means the machine segments nothing, for
703
+ as long as the shortfall lasts, while session rows keep arriving. That is
704
+ precisely the state this failure produced in production: 127 consecutive
705
+ runs, eight days, zero tasks, every dashboard green.
706
+ """
707
+ obj = _obj()
708
+ obj["insights_sync_leased_session_ids"] = leased_ids
709
+ ctx = types.SimpleNamespace(obj=obj, params={"args": ["--agent"]})
710
+ failure = mod._IncompleteSyncError(
711
+ "Sync incomplete (184/186 archived, 0 storage acknowledgements missing, "
712
+ "capture failed=False, request facts truncated=False). "
713
+ "Sync checkpoint unchanged; the next sync will retry."
714
+ )
715
+ with (
716
+ patch.object(mod, "_sync_cmd") as sync_cmd,
717
+ patch.object(mod, "_spawn_agent_analyze", return_value=True) as spawn,
718
+ patch.object(mod, "_arm_sync_schedule") as arm,
719
+ ):
720
+ sync_cmd.main.side_effect = failure
721
+ with pytest.raises(mod._IncompleteSyncError) as caught:
722
+ mod._run_full_pipeline(ctx)
723
+
724
+ # The failure is preserved exactly — same object, so same message and same
725
+ # non-zero exit. Nothing about the checkpoint contract is softened here.
726
+ assert caught.value is failure
727
+ # ...and the worker ran anyway. This is the whole fix.
728
+ spawn.assert_called_once_with("org-uuid-test", leased_session_ids=leased_ids)
729
+ arm.assert_called_once_with(transcripts=False)
730
+ # Still not a success: no "done" banner, no "synced today" marker (which would
731
+ # make the next hourly run self-gate into a no-op and hide the problem).
732
+ assert "Done — your data is synced" not in capsys.readouterr().out
733
+ assert mod._last_sync_run_at(transcripts=False) is None
734
+
735
+
736
+ def test_incomplete_sync_error_is_a_click_exception():
737
+ """The new type must stay a `ClickException` subclass.
738
+
739
+ Every existing caller (`insights sync` dispatch, the CliRunner paths) handles
740
+ it by that base type; narrowing the hierarchy would turn a clean non-zero
741
+ exit into an unhandled traceback.
742
+ """
743
+ assert issubclass(mod._IncompleteSyncError, click.ClickException)
744
+ assert not issubclass(mod._IncompleteSyncError, mod._PartialCaptureError)
@@ -295,7 +295,14 @@ def test_partial_capture_with_deferred_batch_is_not_recoverable(harness, deferre
295
295
  before = ins._read_sync_state(ORG)
296
296
  with pytest.raises(ins.click.ClickException, match="2/2 archived") as caught:
297
297
  harness.run(["--batch-size", "1"])
298
- assert type(caught.value) is ins.click.ClickException
298
+ # The hard type, NOT the recoverable one: `_PartialCaptureError` is the only
299
+ # failure allowed to write a checkpoint, and a deferred batch must never take
300
+ # that path. (ENT-4714 renamed the hard type from a bare `ClickException` to
301
+ # `_IncompleteSyncError` so `_run_full_pipeline` can still start segmentation;
302
+ # that changes nothing here, so this asserts the distinction that matters
303
+ # rather than an exact class identity.)
304
+ assert isinstance(caught.value, ins._IncompleteSyncError)
305
+ assert not isinstance(caught.value, ins._PartialCaptureError)
299
306
  assert [s["session_id"] for s in harness.pushed()] == [
300
307
  "local:claude-code:good1",
301
308
  "local:claude-code:good2",