entelligence-cli 0.1.339__tar.gz → 0.1.342__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 (271) hide show
  1. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/PKG-INFO +1 -1
  2. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/commands/insights.py +8 -1
  3. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/facts_envelope.py +53 -0
  4. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/session_map.py +10 -0
  5. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/session_map_upload.py +1 -0
  6. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli.egg-info/PKG-INFO +1 -1
  7. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/pyproject.toml +1 -1
  8. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_facts_envelope.py +66 -0
  9. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_session_map.py +21 -0
  10. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_sync_pushes_built_sessions.py +38 -0
  11. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/README.md +0 -0
  12. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/__init__.py +0 -0
  13. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/MEMORY_CORE_SOURCE_REVISION +0 -0
  14. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/MEMORY_CORE_VERSION +0 -0
  15. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/__init__.py +0 -0
  16. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/__init__.py +0 -0
  17. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/claude_edit_evidence.py +0 -0
  18. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/code_authorship.py +0 -0
  19. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/__init__.py +0 -0
  20. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/__init__.py +0 -0
  21. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_paths.py +0 -0
  22. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_segmentation_prompts/system.j2 +0 -0
  23. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_segmentation_prompts/user.j2 +0 -0
  24. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/__init__.py +0 -0
  25. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/_base.py +0 -0
  26. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/_jsonl_utils.py +0 -0
  27. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/__init__.py +0 -0
  28. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/git_reader.py +0 -0
  29. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/models.py +0 -0
  30. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/parser.py +0 -0
  31. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/entireio/source.py +0 -0
  32. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/factory.py +0 -0
  33. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/__init__.py +0 -0
  34. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/__init__.py +0 -0
  35. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/base.py +0 -0
  36. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/claude_code.py +0 -0
  37. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/claude_cost_summary.py +0 -0
  38. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/codex.py +0 -0
  39. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/copilot.py +0 -0
  40. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/cursor_agent_transcript.py +0 -0
  41. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/cursor_store.py +0 -0
  42. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/kiro.py +0 -0
  43. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/parsers/opencode.py +0 -0
  44. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/_sources/local/source.py +0 -0
  45. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/behavior_signals.py +0 -0
  46. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/edit_lines.py +0 -0
  47. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/file_paths.py +0 -0
  48. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/metrics.py +0 -0
  49. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/native_operations.py +0 -0
  50. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/produced.py +0 -0
  51. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/segment_orchestrator.py +0 -0
  52. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/segment_pure.py +0 -0
  53. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/session_pure.py +0 -0
  54. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/skill_names.py +0 -0
  55. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/ingestion/coding_agent/spans.py +0 -0
  56. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/pricing.py +0 -0
  57. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/vocabulary/__init__.py +0 -0
  58. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/vocabulary/categories.py +0 -0
  59. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/vocabulary/edges.py +0 -0
  60. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/_vendor/memory_core/vocabulary/nodes.py +0 -0
  61. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/agent_insights_proxy.py +0 -0
  62. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/agent_insights_segment.py +0 -0
  63. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/api_client.py +0 -0
  64. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/ascii-art.txt +0 -0
  65. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/billing_snapshot.py +0 -0
  66. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/browser_login.py +0 -0
  67. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/claude_cloud.py +0 -0
  68. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/cli.py +0 -0
  69. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/code_authorship.py +0 -0
  70. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/commands/__init__.py +0 -0
  71. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/commands/auth.py +0 -0
  72. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/commands/budget.py +0 -0
  73. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/commands/config.py +0 -0
  74. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/commands/cursor_doctor.py +0 -0
  75. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/commands/incident.py +0 -0
  76. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/commands/mcp.py +0 -0
  77. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/commands/reset.py +0 -0
  78. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/commands/review.py +0 -0
  79. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/commands/router.py +0 -0
  80. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/commands/security.py +0 -0
  81. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/commands/skills.py +0 -0
  82. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/commands/trim.py +0 -0
  83. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/commands/update.py +0 -0
  84. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/config.py +0 -0
  85. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/cursor_cloud.py +0 -0
  86. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/cursor_path_a_usage.py +0 -0
  87. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/daily_billing.py +0 -0
  88. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/daily_claude.py +0 -0
  89. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/diagnostics.py +0 -0
  90. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/exceptions.py +0 -0
  91. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/git_operations.py +0 -0
  92. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/hooks/__init__.py +0 -0
  93. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/hooks/capacity_emit.py +0 -0
  94. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/hooks/context_guard.py +0 -0
  95. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/hooks/session_brief.py +0 -0
  96. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/hooks/standup_emit.py +0 -0
  97. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/insights_log.py +0 -0
  98. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/insights_watch.py +0 -0
  99. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/mcp_inventory.py +0 -0
  100. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/platform_env.py +0 -0
  101. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/router/__init__.py +0 -0
  102. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/router/claude_settings.py +0 -0
  103. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/router/codex_auth.py +0 -0
  104. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/router/codex_settings.py +0 -0
  105. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/router/compress.py +0 -0
  106. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/router/copilot_launcher.py +0 -0
  107. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/router/copilot_settings.py +0 -0
  108. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/router/cursor_settings.py +0 -0
  109. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/router/state.py +0 -0
  110. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/scheduling.py +0 -0
  111. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/session_deferrals.py +0 -0
  112. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/session_inventory.py +0 -0
  113. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/session_revisions.py +0 -0
  114. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/textual_ui.py +0 -0
  115. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/token_savings_snapshot.py +0 -0
  116. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/ui/__init__.py +0 -0
  117. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/ui/interactive.py +0 -0
  118. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/ui/keys.py +0 -0
  119. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/ui/loaders.py +0 -0
  120. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/ui/output.py +0 -0
  121. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/ui/styles.py +0 -0
  122. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/update_checker.py +0 -0
  123. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/upload/__init__.py +0 -0
  124. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/upload/conductor.py +0 -0
  125. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/upload/config.py +0 -0
  126. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/upload/cursor_usage.py +0 -0
  127. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/upload/discovery.py +0 -0
  128. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/upload/manifest.py +0 -0
  129. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/upload/models.py +0 -0
  130. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/upload/pii.py +0 -0
  131. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/upload/runner.py +0 -0
  132. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/upload/secrets.py +0 -0
  133. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/upload/stores.py +0 -0
  134. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli/wrapped_game.py +0 -0
  135. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli.egg-info/SOURCES.txt +0 -0
  136. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli.egg-info/dependency_links.txt +0 -0
  137. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli.egg-info/entry_points.txt +0 -0
  138. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli.egg-info/requires.txt +0 -0
  139. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/entelligence_cli.egg-info/top_level.txt +0 -0
  140. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/setup.cfg +0 -0
  141. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_agent_insights_proxy.py +0 -0
  142. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_agent_insights_proxy_api_client.py +0 -0
  143. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_agent_insights_segment.py +0 -0
  144. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_attach_fix_smoke.py +0 -0
  145. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_attach_ticket_smoke.py +0 -0
  146. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_auto_update_loop_guard.py +0 -0
  147. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_billing_snapshot.py +0 -0
  148. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_billing_snapshot_cloud.py +0 -0
  149. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_budget_smoke.py +0 -0
  150. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_capacity_emit.py +0 -0
  151. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_claude_capture_boundary.py +0 -0
  152. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_claude_cloud.py +0 -0
  153. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_claude_cloud_cadence.py +0 -0
  154. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_claude_code_cost_events.py +0 -0
  155. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_claude_code_subagent_usage.py +0 -0
  156. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_claude_edit_results.py +0 -0
  157. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_claude_hook_helper_classification.py +0 -0
  158. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_code_authorship.py +0 -0
  159. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_code_authorship_parser_regressions.py +0 -0
  160. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_code_authorship_parsers.py +0 -0
  161. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_codex_auth.py +0 -0
  162. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_codex_native_ledger.py +0 -0
  163. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_codex_settings.py +0 -0
  164. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_codex_total_only_sync.py +0 -0
  165. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_conductor.py +0 -0
  166. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_context_guard.py +0 -0
  167. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_copilot_launcher.py +0 -0
  168. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_copilot_parser_tokens.py +0 -0
  169. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_creation_provenance_contract.py +0 -0
  170. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_cursor_cloud.py +0 -0
  171. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_cursor_composer_mtime_stamp.py +0 -0
  172. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_cursor_doctor.py +0 -0
  173. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_cursor_path_a_usage.py +0 -0
  174. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_cursor_path_regex_and_heartbeat.py +0 -0
  175. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_cursor_self_heal_loop.py +0 -0
  176. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_cursor_settings.py +0 -0
  177. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_cursor_unknown_timestamps.py +0 -0
  178. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_cursor_usage.py +0 -0
  179. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_cursor_usage_archive.py +0 -0
  180. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_cursor_usage_completeness.py +0 -0
  181. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_cursor_usage_heal.py +0 -0
  182. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_cursor_usage_recapture.py +0 -0
  183. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_cursor_usage_state.py +0 -0
  184. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_daily_billing.py +0 -0
  185. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_detached_background_work.py +0 -0
  186. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_diagnostics.py +0 -0
  187. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_discovery_head_unicode.py +0 -0
  188. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_discovery_opencode.py +0 -0
  189. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_eligibility_state.py +0 -0
  190. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_endpoint_scheme_enforcement.py +0 -0
  191. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_entropy_secret_detection.py +0 -0
  192. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_error_body_decode.py +0 -0
  193. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_git_operations_copilot.py +0 -0
  194. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_heartbeat_api_client.py +0 -0
  195. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_identity_cache_refresh.py +0 -0
  196. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_incident_refs.py +0 -0
  197. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_incident_smoke.py +0 -0
  198. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_insights_cadence_heartbeat.py +0 -0
  199. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_insights_checkpoint_resume.py +0 -0
  200. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_insights_copilot_prompts.py +0 -0
  201. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_insights_cursor_composer_home.py +0 -0
  202. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_insights_index_failure.py +0 -0
  203. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_insights_kiro_prompts.py +0 -0
  204. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_insights_log.py +0 -0
  205. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_insights_me_smoke.py +0 -0
  206. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_insights_path_a_default.py +0 -0
  207. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_insights_produced_prs.py +0 -0
  208. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_insights_redrain.py +0 -0
  209. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_insights_repo_attribution.py +0 -0
  210. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_insights_schedule.py +0 -0
  211. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_insights_schedule_arm.py +0 -0
  212. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_insights_structured_payload.py +0 -0
  213. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_insights_watch.py +0 -0
  214. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_insights_watch_transport.py +0 -0
  215. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_legacy_encoding_recovery.py +0 -0
  216. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_local_source_discovery_stats.py +0 -0
  217. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_login_token_stdin.py +0 -0
  218. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_machine_fingerprint.py +0 -0
  219. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_mcp_install.py +0 -0
  220. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_mcp_inventory.py +0 -0
  221. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_multipart_backoff.py +0 -0
  222. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_pii.py +0 -0
  223. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_presigned_skip_index.py +0 -0
  224. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_processing_checkpoint_api_client.py +0 -0
  225. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_release_directive.py +0 -0
  226. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_reset_command.py +0 -0
  227. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_review_redaction.py +0 -0
  228. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_rosetta_self_heal.py +0 -0
  229. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_router_commands.py +0 -0
  230. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_router_dead_proxy_guard.py +0 -0
  231. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_router_stats.py +0 -0
  232. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_scheduling_cron_env.py +0 -0
  233. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_schtasks_integration.py +0 -0
  234. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_secrets_redaction_boundary.py +0 -0
  235. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_security_commands.py +0 -0
  236. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_segment_chunking.py +0 -0
  237. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_segment_session_timeout.py +0 -0
  238. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_segmentation_role_gate.py +0 -0
  239. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_segmentation_window_scope.py +0 -0
  240. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_segmentation_worker_failure_visibility.py +0 -0
  241. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_session_accuracy_regressions.py +0 -0
  242. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_session_brief.py +0 -0
  243. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_session_deferrals.py +0 -0
  244. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_session_inventory.py +0 -0
  245. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_session_map_pr_outcome.py +0 -0
  246. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_session_map_stage2.py +0 -0
  247. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_session_revisions.py +0 -0
  248. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_sessions_status_chunking.py +0 -0
  249. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_sessions_status_safe_default.py +0 -0
  250. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_skills_command.py +0 -0
  251. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_structured_pr_creation.py +0 -0
  252. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_sync_backgrounding.py +0 -0
  253. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_sync_dry_run_checkpoint.py +0 -0
  254. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_sync_parse_failure_checkpoint.py +0 -0
  255. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_sync_partial_schema.py +0 -0
  256. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_sync_runs_full_pipeline.py +0 -0
  257. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_token_savings_snapshot.py +0 -0
  258. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_trim_command.py +0 -0
  259. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_trim_hook_opt_in_only_guard.py +0 -0
  260. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_update_command.py +0 -0
  261. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_upload_copilot.py +0 -0
  262. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_upload_cursor_store.py +0 -0
  263. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_upload_home_backfill.py +0 -0
  264. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_upload_kiro.py +0 -0
  265. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_upload_repo_filter.py +0 -0
  266. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_upload_repo_roots.py +0 -0
  267. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_upload_skips_codex_imports.py +0 -0
  268. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_windows_compat.py +0 -0
  269. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_world_model_provenance.py +0 -0
  270. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/tests/test_wrap_retry.py +0 -0
  271. {entelligence_cli-0.1.339 → entelligence_cli-0.1.342}/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.339
3
+ Version: 0.1.342
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
@@ -4188,7 +4188,14 @@ def _sync_cmd(
4188
4188
  # AFTER the attribution tiers above so the v2 envelope's repo_remote
4189
4189
  # env fact (ENT-4180) carries the same resolved value the structured
4190
4190
  # payload ships.
4191
- with suppress(Exception):
4191
+ # `runlog.capture("build")` (ENT-4827 review finding): `build_envelope`
4192
+ # logs its skill-capture diagnostic via the plain `logging` module, which
4193
+ # only reaches insights.log while a capture scope is active. Direct
4194
+ # `insights sync` wraps discovery in its own scope but never wrapped this
4195
+ # loop, so the diagnostic was silently dropped on that path — only the
4196
+ # `--agent` path (which wraps this whole command in one outer capture)
4197
+ # ever saw it.
4198
+ with suppress(Exception), runlog.capture("build"):
4192
4199
  _cwd_repos = None
4193
4200
  with suppress(Exception):
4194
4201
  _cwd_repos = source.get_cwd_repos(disc.session_id) or None
@@ -617,6 +617,57 @@ def _build_skills_used(spans: list[SpanData]) -> list[dict[str, Any]]:
617
617
  ]
618
618
 
619
619
 
620
+ def _log_skill_capture(
621
+ session_id: str, spans: list[SpanData], turn_count: int, computed: list[dict[str, Any]]
622
+ ) -> None:
623
+ """One INFO line (captured into ~/.entelligence/insights.log) per push that
624
+ claims at least one skill: the pre-normalization ``path``/``count`` entries
625
+ this run's parser actually saw, next to the normalized ``name``/``count``
626
+ the envelope will carry.
627
+
628
+ Added after ENT-4827's "synced" anomaly (2026-09-26): one Freshworks
629
+ session, pushed twice 47 minutes apart over a transcript whose
630
+ `transcript_bytes` and turn count were IDENTICAL both times, produced two
631
+ DIFFERENT single skill names. Root-caused only after the fact, by
632
+ cross-referencing six already-stored envelopes days later — and even
633
+ then, not fully: without the raw path this run's parser actually saw,
634
+ there was no way to tell a parsing bug (a different raw path each run)
635
+ from a normalization bug (the same raw path, two different outputs).
636
+ This line answers that directly, next time, from the log file itself:
637
+ diff two lines for the same session id and see which one changed.
638
+
639
+ Args:
640
+ session_id: This push's session id, so two log lines for the same
641
+ session can be found and diffed.
642
+ spans: The parsed spans, to read `transcript_bytes` and the raw
643
+ (pre-normalization) skill signal off the root span.
644
+ turn_count: `len(turns)` at the call site — reused rather than
645
+ recomputed, and logged so "did the input actually change between
646
+ two pushes" never again requires querying stored envelopes.
647
+ computed: This push's `_build_skills_used` result, e.g.
648
+ `[{"name": "entloop", "count": 1}]`.
649
+ """
650
+ root = next((s for s in spans if s.parent_id is None), None)
651
+ raw_entries: Any = None
652
+ if root is not None:
653
+ sig_raw = root.attributes.get("harness.session_signals")
654
+ try:
655
+ sig = json.loads(sig_raw) if isinstance(sig_raw, str) else sig_raw
656
+ except (TypeError, ValueError):
657
+ sig = None
658
+ if isinstance(sig, dict) and isinstance(sig.get("skills_used"), list):
659
+ raw_entries = sig["skills_used"]
660
+ transcript_bytes = root.attributes.get("source.transcript_bytes") if root else None
661
+ logger.info(
662
+ "[facts] skill_capture session=%s turn_count=%s transcript_bytes=%s raw=%s normalized=%s",
663
+ session_id,
664
+ turn_count,
665
+ transcript_bytes,
666
+ raw_entries,
667
+ computed,
668
+ )
669
+
670
+
620
671
  def _interrupt_count(spans: list[SpanData]) -> int | None:
621
672
  """The harness-reported interrupt total; None = never reported (NOT zero)."""
622
673
  from entelligence_cli import _vendor # noqa: F401 — vendored memory_core on sys.path
@@ -1983,6 +2034,8 @@ def build_envelope(
1983
2034
  tool_calls = _build_tool_calls(spans, cwd=(session_facts or {}).get("cwd"))
1984
2035
  segments = _build_segments(tasks, spans)
1985
2036
  skills_used = _build_skills_used(spans)
2037
+ if skills_used:
2038
+ _log_skill_capture(session_id, spans, len(turns), skills_used)
1986
2039
  # v11 (trim savings attribution): only ever computed for a machine where
1987
2040
  # `entelligence trim`'s hook is installed RIGHT NOW -- see
1988
2041
  # `_trim_is_locally_on`'s docstring for why this is checked fresh on
@@ -2232,12 +2232,21 @@ def build_map_from_spans(
2232
2232
  tasks: list[dict[str, Any]] | None = None,
2233
2233
  role: str | None = None,
2234
2234
  parent_session_id: str | None = None,
2235
+ started_at_hint: float | None = None,
2235
2236
  ) -> dict[str, Any]:
2236
2237
  """Build a map from the shared ``LocalSource`` span tree (Codex, Cursor, Kiro, …).
2237
2238
 
2238
2239
  Turn spans become one ``llm`` event (turn-level tokens) plus a ``user`` event;
2239
2240
  tool spans (children of turns) become tool events. Subagent traffic is not in
2240
2241
  the span tree, so these maps have only the main lane.
2242
+
2243
+ ``started_at_hint`` (epoch seconds, typically the source file's own mtime) is
2244
+ the session's ``startedAt`` when no span carries a timestamp — a real gap seen
2245
+ on tiny Cursor sessions (a handful of untimestamped events). Without it
2246
+ ``finish()``'s own fallback (``session.get("startedAt")``) has nothing to fall
2247
+ back to, since this dict never set that key, so the map ships with no
2248
+ ``startedAt`` at all and the backend's presign rejects it (``invalid_input``)
2249
+ — a real upload that quietly never lands, not a soft, logged skip.
2241
2250
  """
2242
2251
  b = MapBuilder(path_mode=path_mode, hmac_key=hmac_key, resolver=resolver)
2243
2252
  b.task_specs = tasks
@@ -2311,6 +2320,7 @@ def build_map_from_spans(
2311
2320
  "cliVersion": cli_version,
2312
2321
  "role": role,
2313
2322
  "parentSessionId": parent_session_id,
2323
+ "startedAt": _iso(started_at_hint) if started_at_hint else None,
2314
2324
  }
2315
2325
  )
2316
2326
 
@@ -574,6 +574,7 @@ def _build_one(cand: dict[str, Any], plan: dict[str, Any], cli_version: str) ->
574
574
  tasks=tasks,
575
575
  role=role,
576
576
  parent_session_id=parent,
577
+ started_at_hint=cand.get("mtime") or None,
577
578
  )
578
579
 
579
580
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: entelligence-cli
3
- Version: 0.1.339
3
+ Version: 0.1.342
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.339"
7
+ version = "0.1.342"
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 = [
@@ -584,6 +584,72 @@ class TestEnvelopeV2Facts:
584
584
  # The raw path never rides along — normalized name only.
585
585
  assert "/Users/" not in json.dumps(skills)
586
586
 
587
+ def test_skill_capture_is_logged_with_raw_and_normalized_forms(
588
+ self, tmp_path, monkeypatch, caplog
589
+ ):
590
+ # ENT-4827: a session pushed twice over a byte-identical,
591
+ # turn-count-identical transcript produced two different single
592
+ # skill names, root-caused only after the fact by cross-referencing
593
+ # several days of stored envelopes. This line exists so the NEXT
594
+ # occurrence is diagnosable straight from the log: it carries the
595
+ # pre-normalization path next to the normalized name, so a future
596
+ # diff between two runs' lines for the same session id shows
597
+ # whether the RAW path changed (a parsing bug) or only the
598
+ # normalized output did (a normalization bug) — see
599
+ # `_log_skill_capture`'s docstring.
600
+ import logging
601
+
602
+ monkeypatch.setattr(facts_envelope.Path, "home", classmethod(lambda cls: tmp_path))
603
+ signals = json.dumps(
604
+ {
605
+ "skills_used": [
606
+ {"path": "/Users/x/.claude/skills/deploy-and-verify/SKILL.md", "count": 2}
607
+ ]
608
+ }
609
+ )
610
+ spans = [
611
+ _span(
612
+ "tr1:root",
613
+ name="Session",
614
+ attrs={"harness.session_signals": signals, "source.transcript_bytes": 4096},
615
+ ),
616
+ _turn_span(1, parent="tr1:root"),
617
+ ]
618
+ with caplog.at_level(logging.INFO, logger=facts_envelope.__name__):
619
+ envelope = facts_envelope.build_envelope(
620
+ session_id="local:claude-code:synced-repro",
621
+ org_uuid="org-1",
622
+ agent="claude-code",
623
+ spans=spans,
624
+ client_version="0.1.340",
625
+ )
626
+ assert envelope["skills_used"] == [{"name": "deploy-and-verify", "count": 2}]
627
+ (rec,) = (r for r in caplog.records if "skill_capture" in r.getMessage())
628
+ msg = rec.getMessage()
629
+ assert "session=local:claude-code:synced-repro" in msg
630
+ assert "transcript_bytes=4096" in msg
631
+ assert "turn_count=1" in msg
632
+ # Both forms present, so a future anomaly is diagnosable from the
633
+ # line alone: the RAW path this run saw, and what it normalized to.
634
+ assert "/Users/x/.claude/skills/deploy-and-verify/SKILL.md" in msg
635
+ assert "'name': 'deploy-and-verify', 'count': 2" in msg
636
+
637
+ def test_skill_capture_is_not_logged_when_no_skill_claimed(self, tmp_path, monkeypatch, caplog):
638
+ # No skill activity is the overwhelmingly common case — log volume
639
+ # must stay proportional to actual skill use, not fire on every push.
640
+ import logging
641
+
642
+ monkeypatch.setattr(facts_envelope.Path, "home", classmethod(lambda cls: tmp_path))
643
+ with caplog.at_level(logging.INFO, logger=facts_envelope.__name__):
644
+ facts_envelope.build_envelope(
645
+ session_id="local:claude-code:no-skills",
646
+ org_uuid="org-1",
647
+ agent="claude-code",
648
+ spans=[_turn_span(1)],
649
+ client_version="0.1.340",
650
+ )
651
+ assert not [r for r in caplog.records if "skill_capture" in r.getMessage()]
652
+
587
653
  def test_envelope_is_current_version_with_skills_and_env_facts(self, tmp_path, monkeypatch):
588
654
  monkeypatch.setattr(facts_envelope.Path, "home", classmethod(lambda cls: tmp_path))
589
655
  signals = json.dumps(
@@ -729,6 +729,27 @@ def test_spans_zero_usage_turn_counts_and_tool_duration():
729
729
  assert any(e["kind"] == "delay" and e.get("cause") == "tool" for e in doc["events"])
730
730
 
731
731
 
732
+ def test_spans_all_untimestamped_falls_back_to_started_at_hint():
733
+ """A tiny Cursor/Codex session where no span carries a timestamp (seen live on a
734
+ dogfood run 2026-09-23: a 3-event Cursor session) must still get a real
735
+ ``startedAt`` — without one, presign's ``_sm_parse_started_at`` rejects the
736
+ upload with ``invalid_input`` and the map silently never lands, even though the
737
+ build itself "succeeded"."""
738
+ spans = [
739
+ _span("t1", "Turn 1", None, **{"llm.model_name": "default"}),
740
+ _span("c1", "Shell", None, None, parent="t1", **{"tool.name": "Bash", "input.value": "{}"}),
741
+ ]
742
+ hint = 1_757_000_000.0 # arbitrary fixed epoch seconds, stands in for the source file's mtime
743
+ doc = sm.build_map_from_spans(
744
+ spans, session_id="local:cursor:x", agent_tool="cursor", started_at_hint=hint
745
+ )
746
+ assert doc["session"]["startedAt"] == sm._iso(hint)
747
+ # Without the hint the old (broken) behaviour is preserved — never silently
748
+ # invent a timestamp when nothing at all is known about when this happened.
749
+ doc_no_hint = sm.build_map_from_spans(spans, session_id="local:cursor:y", agent_tool="cursor")
750
+ assert doc_no_hint["session"]["startedAt"] is None
751
+
752
+
732
753
  def test_candidates_accept_datetime_mtime():
733
754
  from datetime import UTC, datetime, timedelta
734
755
 
@@ -173,6 +173,44 @@ def test_first_sync_pushes_every_discovered_session(harness):
173
173
  assert int(sent[0].get("input_tokens") or 0) == 1200
174
174
 
175
175
 
176
+ def test_skill_capture_diagnostic_reaches_the_log_on_a_direct_sync(harness, tmp_path):
177
+ """ENT-4827 review finding: `_log_skill_capture`'s INFO record only reaches
178
+ `insights.log` while a `runlog.capture(...)` scope is active. The `--agent`
179
+ path wraps its whole nested sync in one outer scope, so it always saw the
180
+ diagnostic; a direct `insights sync` wrapped only `discover`, so the push
181
+ loop's own build step — where this diagnostic actually fires — reached no
182
+ scope at all and the line was silently dropped for that path.
183
+ """
184
+ from entelligence_cli.insights_log import RunLog
185
+
186
+ root, turn = _spans("s1")
187
+ root.attributes["harness.session_signals"] = json.dumps(
188
+ {"skills_used": [{"path": "entloop", "count": 1}]}
189
+ )
190
+ harness.state["source"] = _Source(["s1"])
191
+ harness.state["source"].get_spans_by_session = lambda sid: [root, turn]
192
+ log_path = tmp_path / "direct-sync.log"
193
+ runlog = RunLog("insights sync", path=log_path)
194
+ ins._sync_cmd.main(
195
+ args=["--metrics-only", "--no-schedule"],
196
+ obj={
197
+ "api_client": harness.api,
198
+ "user_info": {"OrgUUID": ORG},
199
+ "insights_runlog": runlog,
200
+ },
201
+ standalone_mode=False,
202
+ )
203
+ runlog.finish()
204
+ # Guards against a vacuous pass: without this, the log assertions below
205
+ # would still hold even if the session were never actually built/pushed
206
+ # (review finding).
207
+ harness.api.ingest_agent_insights_structured.assert_called_once()
208
+ assert [s["session_id"] for s in harness.pushed()] == ["local:claude-code:s1"]
209
+ log_text = log_path.read_text(encoding="utf-8")
210
+ assert "skill_capture" in log_text
211
+ assert "entloop" in log_text
212
+
213
+
176
214
  def test_capture_upgrade_replays_old_sessions_through_both_windows_until_delivery(
177
215
  harness, monkeypatch, tmp_path
178
216
  ):