zikaron 0.4.1__tar.gz → 0.4.2__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 (447) hide show
  1. {zikaron-0.4.1/zikaron.egg-info → zikaron-0.4.2}/PKG-INFO +7 -4
  2. {zikaron-0.4.1 → zikaron-0.4.2}/README.md +6 -3
  3. {zikaron-0.4.1 → zikaron-0.4.2}/pyproject.toml +1 -1
  4. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_hook_stdlib_only.py +11 -0
  5. zikaron-0.4.2/tests/test_knowledge_excerpts.py +136 -0
  6. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_groups.py +65 -1
  7. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_integration.py +5 -1
  8. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_search.py +177 -16
  9. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/config/keys.py +8 -0
  10. zikaron-0.4.2/zikaron/core/knowledge/excerpts.py +75 -0
  11. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/groups.py +11 -9
  12. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/links.py +26 -11
  13. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/search.py +74 -55
  14. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/mcp/primary.py +27 -25
  15. {zikaron-0.4.1 → zikaron-0.4.2/zikaron.egg-info}/PKG-INFO +7 -4
  16. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron.egg-info/SOURCES.txt +2 -0
  17. {zikaron-0.4.1 → zikaron-0.4.2}/LICENSE +0 -0
  18. {zikaron-0.4.1 → zikaron-0.4.2}/setup.cfg +0 -0
  19. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_access_log.py +0 -0
  20. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_agent_scan.py +0 -0
  21. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_asyncio_compat.py +0 -0
  22. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_background_encoder.py +0 -0
  23. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_check_gate.py +0 -0
  24. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_ci_workflow.py +0 -0
  25. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_cli_front_door.py +0 -0
  26. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_clock.py +0 -0
  27. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_code_knowledge_claude_live.py +0 -0
  28. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_code_knowledge_command.py +0 -0
  29. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_code_knowledge_kiro_live.py +0 -0
  30. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_code_knowledge_plan.py +0 -0
  31. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_code_knowledge_reminder.py +0 -0
  32. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_config_keys.py +0 -0
  33. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_config_resolution.py +0 -0
  34. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_consolidation_grouping.py +0 -0
  35. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_consolidation_invariants.py +0 -0
  36. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_consolidation_observability.py +0 -0
  37. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_consolidation_planning.py +0 -0
  38. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_consolidation_refusals.py +0 -0
  39. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_consolidation_serving.py +0 -0
  40. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_consolidation_snapshot_planning.py +0 -0
  41. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_consolidation_verbs.py +0 -0
  42. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_ddl.py +0 -0
  43. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_definition_of_done_sites.py +0 -0
  44. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_design_pointers_resolve.py +0 -0
  45. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_design_tables.py +0 -0
  46. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_distribution.py +0 -0
  47. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_doctor.py +0 -0
  48. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_embedder.py +0 -0
  49. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_error_codes.py +0 -0
  50. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_event_kinds.py +0 -0
  51. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_guard_claude_live.py +0 -0
  52. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_guard_docstring_examples.py +0 -0
  53. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_guard_kiro_live.py +0 -0
  54. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_guard_main.py +0 -0
  55. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_guard_malformed.py +0 -0
  56. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_guard_nudge.py +0 -0
  57. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_guard_properties.py +0 -0
  58. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_guard_rule_table.py +0 -0
  59. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_guard_script_file.py +0 -0
  60. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_guard_selfmatch.py +0 -0
  61. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_guard_selfmatch_premise.py +0 -0
  62. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_guard_selfmatch_table.py +0 -0
  63. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_guard_texts.py +0 -0
  64. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_harness_detect.py +0 -0
  65. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_harness_store_scope.py +0 -0
  66. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_harness_table.py +0 -0
  67. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_harness_tier_guard.py +0 -0
  68. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_hook_components.py +0 -0
  69. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_hook_connect.py +0 -0
  70. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_hook_connect_edge_cases.py +0 -0
  71. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_hook_connect_integration.py +0 -0
  72. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_hook_connect_race.py +0 -0
  73. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_hook_connect_real_service_integration.py +0 -0
  74. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_hook_envelope.py +0 -0
  75. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_hook_failure.py +0 -0
  76. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_hook_main.py +0 -0
  77. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_hook_push.py +0 -0
  78. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_hook_reminder.py +0 -0
  79. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_hook_rpc.py +0 -0
  80. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_hook_session_relay.py +0 -0
  81. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_hook_shell_search.py +0 -0
  82. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_hook_spawn_warm.py +0 -0
  83. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_hook_subagent_policy.py +0 -0
  84. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_hook_tripwire.py +0 -0
  85. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_hook_warm_helper.py +0 -0
  86. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_hook_warm_helper_integration.py +0 -0
  87. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_hook_write_policy.py +0 -0
  88. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_indexing_acquisition.py +0 -0
  89. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_indexing_chunking.py +0 -0
  90. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_indexing_encoder.py +0 -0
  91. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_indexing_integration.py +0 -0
  92. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_indexing_model_cache.py +0 -0
  93. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_indexing_writes.py +0 -0
  94. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_injected_prose_log.py +0 -0
  95. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_install_assets.py +0 -0
  96. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_install_claude_live.py +0 -0
  97. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_install_code_knowledge.py +0 -0
  98. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_install_components.py +0 -0
  99. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_install_e2e.py +0 -0
  100. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_install_harness.py +0 -0
  101. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_install_kiro_guards.py +0 -0
  102. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_install_kiro_live.py +0 -0
  103. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_install_limits.py +0 -0
  104. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_install_main.py +0 -0
  105. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_install_models.py +0 -0
  106. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_install_snapshots.py +0 -0
  107. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_install_takeover.py +0 -0
  108. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_install_targets.py +0 -0
  109. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_install_writer.py +0 -0
  110. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_build_invariants.py +0 -0
  111. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_build_log.py +0 -0
  112. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_build_row_ordering.py +0 -0
  113. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_build_transactions.py +0 -0
  114. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_builds.py +0 -0
  115. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_chunking.py +0 -0
  116. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_cli.py +0 -0
  117. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_cli_integration.py +0 -0
  118. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_corpus_migration.py +0 -0
  119. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_counters.py +0 -0
  120. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_database.py +0 -0
  121. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_ddl.py +0 -0
  122. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_detach.py +0 -0
  123. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_files.py +0 -0
  124. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_git.py +0 -0
  125. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_indexer.py +0 -0
  126. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_invariants.py +0 -0
  127. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_lifecycle.py +0 -0
  128. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_linked_search.py +0 -0
  129. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_links.py +0 -0
  130. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_lock.py +0 -0
  131. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_lock_race.py +0 -0
  132. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_meta.py +0 -0
  133. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_registry.py +0 -0
  134. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_repair.py +0 -0
  135. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_reporting.py +0 -0
  136. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_roots.py +0 -0
  137. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_scan.py +0 -0
  138. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_scan_git.py +0 -0
  139. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_source_hash.py +0 -0
  140. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_state.py +0 -0
  141. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_text.py +0 -0
  142. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_vectors.py +0 -0
  143. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_walk.py +0 -0
  144. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_knowledge_writes.py +0 -0
  145. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_loop_lateness.py +0 -0
  146. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_markdown_renders_as_written.py +0 -0
  147. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_mcp_connection_ambiguous_failure.py +0 -0
  148. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_mcp_connection_cancellation.py +0 -0
  149. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_mcp_connection_concurrency.py +0 -0
  150. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_mcp_connection_integration.py +0 -0
  151. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_mcp_connection_labels.py +0 -0
  152. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_mcp_consolidator_bridge.py +0 -0
  153. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_mcp_errors.py +0 -0
  154. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_mcp_main.py +0 -0
  155. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_mcp_server.py +0 -0
  156. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_mcp_spill.py +0 -0
  157. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_mcp_tool_descriptions.py +0 -0
  158. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_mcp_wire_contracts.py +0 -0
  159. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_meta.py +0 -0
  160. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_permissions.py +0 -0
  161. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_project_scope.py +0 -0
  162. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_publication_hygiene.py +0 -0
  163. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_quoted_design_prose_is_verbatim.py +0 -0
  164. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_readme_config_table.py +0 -0
  165. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_readme_internal_links.py +0 -0
  166. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_records_memory.py +0 -0
  167. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_records_receipts.py +0 -0
  168. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_records_supersession.py +0 -0
  169. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_retrieval_arms.py +0 -0
  170. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_retrieval_eligibility.py +0 -0
  171. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_retrieval_integration.py +0 -0
  172. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_retrieval_query.py +0 -0
  173. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_retrieval_ranking.py +0 -0
  174. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_retrieval_reads.py +0 -0
  175. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_context.py +0 -0
  176. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_context_assemble.py +0 -0
  177. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_diagnostics.py +0 -0
  178. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_diagnostics_integration.py +0 -0
  179. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_dispatch.py +0 -0
  180. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_dispatch_consolidation.py +0 -0
  181. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_dispatch_knowledge.py +0 -0
  182. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_encoder_failure_stop.py +0 -0
  183. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_envelope.py +0 -0
  184. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_knowledge_management.py +0 -0
  185. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_lifecycle.py +0 -0
  186. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_lifecycle_integration.py +0 -0
  187. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_log.py +0 -0
  188. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_main.py +0 -0
  189. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_ownership.py +0 -0
  190. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_params.py +0 -0
  191. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_paths.py +0 -0
  192. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_read_contention.py +0 -0
  193. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_reminder.py +0 -0
  194. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_rpc.py +0 -0
  195. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_security.py +0 -0
  196. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_server.py +0 -0
  197. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_spawned_builds.py +0 -0
  198. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_surface_deadline.py +0 -0
  199. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_version_check.py +0 -0
  200. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_write_contention.py +0 -0
  201. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_service_writer.py +0 -0
  202. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_signals_contention.py +0 -0
  203. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_signals_dedup.py +0 -0
  204. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_signals_horizon.py +0 -0
  205. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_signals_repair.py +0 -0
  206. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_signals_retirement.py +0 -0
  207. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_signals_sessions.py +0 -0
  208. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_signals_writes.py +0 -0
  209. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_socket_path_budget.py +0 -0
  210. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_spawned_interpreter.py +0 -0
  211. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_store.py +0 -0
  212. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_store_connection.py +0 -0
  213. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_store_migration.py +0 -0
  214. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_store_pool.py +0 -0
  215. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_transaction_begin_sites.py +0 -0
  216. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_version_seam.py +0 -0
  217. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_write_dedup.py +0 -0
  218. {zikaron-0.4.1 → zikaron-0.4.2}/tests/test_write_tools.py +0 -0
  219. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/__init__.py +0 -0
  220. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/cli/__init__.py +0 -0
  221. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/cli/main.py +0 -0
  222. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/code_knowledge/__init__.py +0 -0
  223. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/code_knowledge/__main__.py +0 -0
  224. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/code_knowledge/apply.py +0 -0
  225. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/code_knowledge/main.py +0 -0
  226. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/code_knowledge/output.py +0 -0
  227. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/code_knowledge/survey.py +0 -0
  228. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/__init__.py +0 -0
  229. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/clock.py +0 -0
  230. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/code_knowledge/__init__.py +0 -0
  231. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/code_knowledge/document.py +0 -0
  232. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/code_knowledge/layout.py +0 -0
  233. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/code_knowledge/plan.py +0 -0
  234. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/code_knowledge/readme.py +0 -0
  235. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/code_knowledge/reminder.py +0 -0
  236. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/config/__init__.py +0 -0
  237. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/config/resolution.py +0 -0
  238. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/consolidation/__init__.py +0 -0
  239. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/consolidation/authorization.py +0 -0
  240. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/consolidation/candidates.py +0 -0
  241. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/consolidation/context.py +0 -0
  242. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/consolidation/grouping.py +0 -0
  243. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/consolidation/groups.py +0 -0
  244. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/consolidation/payload.py +0 -0
  245. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/consolidation/planning.py +0 -0
  246. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/consolidation/rowstate.py +0 -0
  247. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/consolidation/runs.py +0 -0
  248. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/consolidation/serving.py +0 -0
  249. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/consolidation/verbs.py +0 -0
  250. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/errors.py +0 -0
  251. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/events.py +0 -0
  252. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/indexing/__init__.py +0 -0
  253. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/indexing/acquisition.py +0 -0
  254. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/indexing/chunking.py +0 -0
  255. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/indexing/encoder.py +0 -0
  256. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/indexing/lexical.py +0 -0
  257. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/indexing/model_cache.py +0 -0
  258. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/indexing/model_pin.py +0 -0
  259. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/indexing/vectors.py +0 -0
  260. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/indexing/writes.py +0 -0
  261. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/__init__.py +0 -0
  262. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/arms.py +0 -0
  263. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/builds.py +0 -0
  264. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/candidates.py +0 -0
  265. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/changes.py +0 -0
  266. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/chunking.py +0 -0
  267. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/counters.py +0 -0
  268. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/database.py +0 -0
  269. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/ddl.py +0 -0
  270. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/disposal.py +0 -0
  271. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/errors.py +0 -0
  272. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/files.py +0 -0
  273. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/git.py +0 -0
  274. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/lexical.py +0 -0
  275. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/lifecycle.py +0 -0
  276. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/link_store.py +0 -0
  277. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/lock.py +0 -0
  278. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/meta.py +0 -0
  279. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/migration.py +0 -0
  280. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/paths.py +0 -0
  281. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/pending.py +0 -0
  282. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/registry.py +0 -0
  283. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/repair.py +0 -0
  284. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/reporting.py +0 -0
  285. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/roots.py +0 -0
  286. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/scan.py +0 -0
  287. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/source_hash.py +0 -0
  288. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/state.py +0 -0
  289. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/text.py +0 -0
  290. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/vectors.py +0 -0
  291. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/walk.py +0 -0
  292. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/knowledge/writes.py +0 -0
  293. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/records/__init__.py +0 -0
  294. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/records/memory.py +0 -0
  295. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/records/receipts.py +0 -0
  296. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/records/supersession.py +0 -0
  297. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/retrieval/__init__.py +0 -0
  298. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/retrieval/arms.py +0 -0
  299. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/retrieval/block.py +0 -0
  300. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/retrieval/eligibility.py +0 -0
  301. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/retrieval/query.py +0 -0
  302. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/retrieval/ranking.py +0 -0
  303. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/retrieval/reads.py +0 -0
  304. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/retrieval/retrieve.py +0 -0
  305. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/retrieval/similarity.py +0 -0
  306. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/signals/__init__.py +0 -0
  307. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/signals/contention.py +0 -0
  308. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/signals/dedup.py +0 -0
  309. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/signals/horizon.py +0 -0
  310. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/signals/repair.py +0 -0
  311. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/signals/retirement.py +0 -0
  312. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/signals/sessions.py +0 -0
  313. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/signals/writes.py +0 -0
  314. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/store/__init__.py +0 -0
  315. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/store/connection.py +0 -0
  316. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/store/ddl.py +0 -0
  317. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/store/deadline.py +0 -0
  318. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/store/embedder.py +0 -0
  319. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/store/holders.py +0 -0
  320. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/store/meta.py +0 -0
  321. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/store/migration.py +0 -0
  322. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/store/permissions.py +0 -0
  323. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/store/pool.py +0 -0
  324. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/store/store.py +0 -0
  325. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/store/transactions.py +0 -0
  326. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/version.py +0 -0
  327. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/write/__init__.py +0 -0
  328. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/write/dedup.py +0 -0
  329. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/core/write/tools.py +0 -0
  330. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/doctor/__init__.py +0 -0
  331. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/doctor/checks.py +0 -0
  332. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/doctor/main.py +0 -0
  333. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/__init__.py +0 -0
  334. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/arguments.py +0 -0
  335. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/chars.py +0 -0
  336. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/decision.py +0 -0
  337. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/expression.py +0 -0
  338. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/forms.py +0 -0
  339. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/grammar.py +0 -0
  340. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/grep_filter.py +0 -0
  341. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/heredoc.py +0 -0
  342. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/inplace.py +0 -0
  343. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/interpreter.py +0 -0
  344. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/lexer.py +0 -0
  345. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/limits.py +0 -0
  346. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/literal_text.py +0 -0
  347. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/main.py +0 -0
  348. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/messages.py +0 -0
  349. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/nudge.py +0 -0
  350. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/override.py +0 -0
  351. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/patterns.py +0 -0
  352. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/position.py +0 -0
  353. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/programs.py +0 -0
  354. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/quoting.py +0 -0
  355. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/redirects.py +0 -0
  356. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/scratch.py +0 -0
  357. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/script_file.py +0 -0
  358. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/selfmatch.py +0 -0
  359. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/start_text.py +0 -0
  360. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/guard/writes.py +0 -0
  361. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/harness/__init__.py +0 -0
  362. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/harness/detect.py +0 -0
  363. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/harness/spec.py +0 -0
  364. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/hook/__init__.py +0 -0
  365. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/hook/components.py +0 -0
  366. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/hook/connect.py +0 -0
  367. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/hook/envelope.py +0 -0
  368. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/hook/failure.py +0 -0
  369. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/hook/limits.py +0 -0
  370. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/hook/main.py +0 -0
  371. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/hook/push.py +0 -0
  372. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/hook/reminder.py +0 -0
  373. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/hook/rpc.py +0 -0
  374. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/hook/session_relay.py +0 -0
  375. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/hook/shell_search.py +0 -0
  376. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/hook/spawn_warm.py +0 -0
  377. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/hook/subagent_policy.py +0 -0
  378. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/hook/tripwire.py +0 -0
  379. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/hook/warm_helper.py +0 -0
  380. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/hook/write_policy.py +0 -0
  381. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/install/__init__.py +0 -0
  382. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/install/__main__.py +0 -0
  383. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/install/agent_scan.py +0 -0
  384. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/install/assets.py +0 -0
  385. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/install/code_knowledge.py +0 -0
  386. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/install/entries.py +0 -0
  387. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/install/harness.py +0 -0
  388. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/install/kiro_merge.py +0 -0
  389. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/install/main.py +0 -0
  390. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/install/models.py +0 -0
  391. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/install/ownership.py +0 -0
  392. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/install/settings_hooks.py +0 -0
  393. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/install/targets.py +0 -0
  394. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/install/writer.py +0 -0
  395. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/knowledge/__init__.py +0 -0
  396. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/knowledge/__main__.py +0 -0
  397. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/knowledge/client.py +0 -0
  398. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/knowledge/indexer/__init__.py +0 -0
  399. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/knowledge/indexer/__main__.py +0 -0
  400. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/knowledge/indexer/build_log.py +0 -0
  401. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/knowledge/indexer/detach.py +0 -0
  402. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/knowledge/indexer/main.py +0 -0
  403. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/knowledge/main.py +0 -0
  404. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/knowledge/scope.py +0 -0
  405. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/mcp/__init__.py +0 -0
  406. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/mcp/connection.py +0 -0
  407. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/mcp/consolidator.py +0 -0
  408. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/mcp/errors.py +0 -0
  409. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/mcp/main.py +0 -0
  410. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/mcp/server.py +0 -0
  411. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/mcp/spill.py +0 -0
  412. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/mcp/tool_names.py +0 -0
  413. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/project/__init__.py +0 -0
  414. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/project/__main__.py +0 -0
  415. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/project/initialize.py +0 -0
  416. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/project/messages.py +0 -0
  417. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/project/report.py +0 -0
  418. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/project/resolve.py +0 -0
  419. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/py.typed +0 -0
  420. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/service/__init__.py +0 -0
  421. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/service/access_log.py +0 -0
  422. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/service/asyncio_compat.py +0 -0
  423. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/service/context.py +0 -0
  424. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/service/diagnostics.py +0 -0
  425. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/service/dispatch.py +0 -0
  426. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/service/dispatch_consolidation.py +0 -0
  427. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/service/dispatch_knowledge.py +0 -0
  428. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/service/dispatch_reminder.py +0 -0
  429. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/service/envelope.py +0 -0
  430. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/service/lifecycle.py +0 -0
  431. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/service/log.py +0 -0
  432. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/service/main.py +0 -0
  433. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/service/methods.py +0 -0
  434. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/service/ownership.py +0 -0
  435. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/service/params.py +0 -0
  436. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/service/paths.py +0 -0
  437. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/service/reminders.py +0 -0
  438. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/service/rpc.py +0 -0
  439. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/service/security.py +0 -0
  440. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/service/serialize.py +0 -0
  441. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/service/serialize_knowledge.py +0 -0
  442. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/service/server.py +0 -0
  443. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron/service/spawned_builds.py +0 -0
  444. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron.egg-info/dependency_links.txt +0 -0
  445. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron.egg-info/entry_points.txt +0 -0
  446. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron.egg-info/requires.txt +0 -0
  447. {zikaron-0.4.1 → zikaron-0.4.2}/zikaron.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: zikaron
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: Memory and searchable project knowledge for coding agents
5
5
  License-Expression: MIT
6
6
  Project-URL: Homepage, https://github.com/nathan-shapiro/Zikaron
@@ -48,7 +48,8 @@ this as they go and read it back in later sessions.
48
48
 
49
49
  **Institutional knowledge — knowledge bases.** What the project *did* write down, indexed and made
50
50
  searchable: a docs tree, a directory of run books, design records, a vendored dependency's manual.
51
- The agent searches a named corpus and gets fragments back with real line ranges, quoted verbatim.
51
+ The agent searches a named corpus and gets fragments back with real line ranges, quoted verbatim —
52
+ the best few in full and the rest named, to read when it wants them.
52
53
 
53
54
  The two differ in where they come from and therefore in who maintains them. Memory accumulates
54
55
  without anybody curating it, and goes stale when the code moves under it — so the agent that a memory
@@ -117,7 +118,7 @@ comes only from the files on disk: an indexer walks the tree you pointed it at,
117
118
  stores the text with its line ranges. What an agent *does* write is the corpus's **definition** —
118
119
  the name, description, root and filters it passes to `zikaron_knowledge_add`, of which
119
120
  `zikaron_knowledge_rename` changes the name alone, and the name and description come back on every
120
- search as the label on each group — plus a build's own metadata and the four search counters
121
+ search as the label on each group — plus a build's own metadata and the search counters
121
122
  described under [Files and logs](#files-and-logs). The agent reaches them through
122
123
  `zikaron_knowledge_search` and a handful of management verbs — every tool name carries its
123
124
  subsystem, `zikaron_memory_*` or `zikaron_knowledge_*`, so a model choosing between the two stores
@@ -696,7 +697,8 @@ If a run ever seems stuck, ask again: a second invocation takes the abandoned ru
696
697
  Memory holds the **tribal** knowledge agents learned by working here. A **knowledge base** is the
697
698
  **institutional** half: a named, indexed corpus of text files the project already has — a docs tree,
698
699
  a directory of run books, a vendored dependency's documentation. The agent searches it and gets back
699
- fragments with line ranges, quoted verbatim, so it can read further or quote them as they stand.
700
+ fragments with line ranges, quoted verbatim, so it can read further or quote them as they stand —
701
+ the best few in full, and the rest by path and line range, to read when it wants them.
700
702
 
701
703
  Ask the agent to create one and it will, without leaving the session: *"index the docs directory as
702
704
  a knowledge base called design docs"*. It has tools to list, create, rename, refresh, inspect and
@@ -923,6 +925,7 @@ idle_timeout = 1800 # seconds of inactivity before the service stops itse
923
925
  | `retrieval` | `fts_query_max_terms` | `64` | 1–512 | the largest full-text query built from one prompt |
924
926
  | `retrieval` | `knowledge_max_chunks_per_file` | `2` | 1–20 | **knowledge bases:** how many fragments one file may contribute to a result set |
925
927
  | `retrieval` | `knowledge_snippet_max_chars` | `1200` | 80–24000 | **knowledge bases:** how much text a single returned fragment carries, counted in code points |
928
+ | `retrieval` | `knowledge_whole_results` | `3` | 1–20 | **knowledge bases:** how many of each corpus's results come back as fragments; the rest are named by path, line range and how the file opens, for the agent to read when it wants them. 20 returns every result as a fragment |
926
929
  | `retrieval` | `knowledge_reminder_interval` | `300` | 0–86400 | **code knowledge, Claude Code:** seconds an agent goes unreminded after a search of a documented module reminds it; `0` reminds on every such search |
927
930
  | `dedup` | `dedup_threshold` | `0.8` | 0.0–1.0 | how similar a new record must be to be offered back as a near-duplicate |
928
931
  | `dedup` | `dedup_max` | `3` | 0–20 | how many near-duplicates are handed back at once |
@@ -19,7 +19,8 @@ this as they go and read it back in later sessions.
19
19
 
20
20
  **Institutional knowledge — knowledge bases.** What the project *did* write down, indexed and made
21
21
  searchable: a docs tree, a directory of run books, design records, a vendored dependency's manual.
22
- The agent searches a named corpus and gets fragments back with real line ranges, quoted verbatim.
22
+ The agent searches a named corpus and gets fragments back with real line ranges, quoted verbatim —
23
+ the best few in full and the rest named, to read when it wants them.
23
24
 
24
25
  The two differ in where they come from and therefore in who maintains them. Memory accumulates
25
26
  without anybody curating it, and goes stale when the code moves under it — so the agent that a memory
@@ -88,7 +89,7 @@ comes only from the files on disk: an indexer walks the tree you pointed it at,
88
89
  stores the text with its line ranges. What an agent *does* write is the corpus's **definition** —
89
90
  the name, description, root and filters it passes to `zikaron_knowledge_add`, of which
90
91
  `zikaron_knowledge_rename` changes the name alone, and the name and description come back on every
91
- search as the label on each group — plus a build's own metadata and the four search counters
92
+ search as the label on each group — plus a build's own metadata and the search counters
92
93
  described under [Files and logs](#files-and-logs). The agent reaches them through
93
94
  `zikaron_knowledge_search` and a handful of management verbs — every tool name carries its
94
95
  subsystem, `zikaron_memory_*` or `zikaron_knowledge_*`, so a model choosing between the two stores
@@ -667,7 +668,8 @@ If a run ever seems stuck, ask again: a second invocation takes the abandoned ru
667
668
  Memory holds the **tribal** knowledge agents learned by working here. A **knowledge base** is the
668
669
  **institutional** half: a named, indexed corpus of text files the project already has — a docs tree,
669
670
  a directory of run books, a vendored dependency's documentation. The agent searches it and gets back
670
- fragments with line ranges, quoted verbatim, so it can read further or quote them as they stand.
671
+ fragments with line ranges, quoted verbatim, so it can read further or quote them as they stand —
672
+ the best few in full, and the rest by path and line range, to read when it wants them.
671
673
 
672
674
  Ask the agent to create one and it will, without leaving the session: *"index the docs directory as
673
675
  a knowledge base called design docs"*. It has tools to list, create, rename, refresh, inspect and
@@ -894,6 +896,7 @@ idle_timeout = 1800 # seconds of inactivity before the service stops itse
894
896
  | `retrieval` | `fts_query_max_terms` | `64` | 1–512 | the largest full-text query built from one prompt |
895
897
  | `retrieval` | `knowledge_max_chunks_per_file` | `2` | 1–20 | **knowledge bases:** how many fragments one file may contribute to a result set |
896
898
  | `retrieval` | `knowledge_snippet_max_chars` | `1200` | 80–24000 | **knowledge bases:** how much text a single returned fragment carries, counted in code points |
899
+ | `retrieval` | `knowledge_whole_results` | `3` | 1–20 | **knowledge bases:** how many of each corpus's results come back as fragments; the rest are named by path, line range and how the file opens, for the agent to read when it wants them. 20 returns every result as a fragment |
897
900
  | `retrieval` | `knowledge_reminder_interval` | `300` | 0–86400 | **code knowledge, Claude Code:** seconds an agent goes unreminded after a search of a documented module reminds it; `0` reminds on every such search |
898
901
  | `dedup` | `dedup_threshold` | `0.8` | 0.0–1.0 | how similar a new record must be to be offered back as a near-duplicate |
899
902
  | `dedup` | `dedup_max` | `3` | 0–20 | how many near-duplicates are handed back at once |
@@ -8,7 +8,7 @@ name = "zikaron"
8
8
  # cannot open a store an earlier one wrote says so in its number. Every other change is a patch, a
9
9
  # changed installed artifact included; a release that needs an existing install refreshed says so
10
10
  # in its release note. `design/distribution.md` §"The version scheme" is normative.
11
- version = "0.4.1"
11
+ version = "0.4.2"
12
12
  # What a package index renders as the one-line summary, so it must name both stores: the memory
13
13
  # store, for what was learned by working here, and the knowledge index, for what the project already
14
14
  # wrote down. The guards, which ship on request, are the README's to describe.
@@ -168,6 +168,17 @@ def test_logging_specifically_is_not_among_the_critical_path_modules_imports() -
168
168
  assert "logging" not in added, module_name
169
169
 
170
170
 
171
+ def test_sqlite3_is_not_among_the_critical_path_modules_imports() -> None:
172
+ """The hook is never a reader of the store (`architecture.md` §"Degraded modes"), and a reader
173
+ built on `sqlite3` passes the sweep above, since `sqlite3` is stdlib — so it is named, as
174
+ `logging` is. `warm_helper` stays outside this too: it imports the service's lifecycle, which
175
+ brings `aiosqlite` and so `sqlite3`, and opens no store.
176
+ """
177
+ for module_name in sorted(_CRITICAL_PATH_MODULES):
178
+ added = _sys_modules_after_import(module_name)
179
+ assert not {"sqlite3", "_sqlite3"} & added, module_name
180
+
181
+
171
182
  def test_a_hypothetical_third_party_import_would_be_caught(tmp_path: Path) -> None:
172
183
  """The enforcement claim this whole file exists to make, proven rather than assumed: a
173
184
  genuinely arbitrary, previously-unlisted third-party-shaped import must fail
@@ -0,0 +1,136 @@
1
+ """What a named result shows of its file: the opening, read from the first chunk alone.
2
+
3
+ The opening parses no markdown (`knowledge-index.md` §1.1); the one structure it skips is the
4
+ link front matter the index already reads, found by the same line reader as `read_link`, so the
5
+ two cannot split a block's lines differently.
6
+ """
7
+
8
+ from pathlib import Path
9
+ from typing import Final
10
+
11
+ import pytest
12
+ from hypothesis import given
13
+ from hypothesis import strategies as st
14
+
15
+ from zikaron.core.knowledge import excerpts
16
+ from zikaron.core.knowledge.links import (
17
+ LINK_PREFIX_CHARS,
18
+ SourceLink,
19
+ front_matter_end,
20
+ read_link,
21
+ )
22
+
23
+ _SHA1: Final = "0123456789abcdef0123456789abcdef01234567"
24
+ _LINKED: Final = f"---\nzikaron-source: lib/foo.py\nzikaron-source-blob: {_SHA1}\n---\n"
25
+ _BODY: Final = "# `lib/foo.py`\n\nParses the frobnicator's config.\n\n## Purpose\n"
26
+
27
+
28
+ @pytest.fixture
29
+ def limit() -> int:
30
+ return excerpts.OPENING_MAX_CHARS
31
+
32
+
33
+ class TestTheOpening:
34
+ def test_a_linked_document_opens_after_its_front_matter(self) -> None:
35
+ assert excerpts.opening_of(_LINKED + _BODY) == (
36
+ "# `lib/foo.py` Parses the frobnicator's config. ## Purpose"
37
+ )
38
+
39
+ def test_an_unlinked_document_opens_at_its_first_character(self) -> None:
40
+ assert excerpts.opening_of(_BODY) == (
41
+ "# `lib/foo.py` Parses the frobnicator's config. ## Purpose"
42
+ )
43
+
44
+ def test_front_matter_of_another_kind_is_the_file_s_own_text(self) -> None:
45
+ assert excerpts.opening_of("---\ntitle: a page\n---\nbody\n") == (
46
+ "--- title: a page --- body"
47
+ )
48
+
49
+ def test_a_malformed_link_block_within_the_chunk_is_skipped(self) -> None:
50
+ malformed = "---\nzikaron-source: lib/foo.py\n---\nbody text\n"
51
+ assert read_link(malformed) is not None
52
+ assert excerpts.opening_of(malformed) == "body text"
53
+
54
+ def test_a_block_that_closes_past_the_prefix_stays_in(self) -> None:
55
+ padding = "".join(f"note: {index}\n" for index in range(LINK_PREFIX_CHARS // 8))
56
+ unclosed = f"---\nzikaron-source: lib/foo.py\n{padding}---\nbody\n"
57
+ opening = excerpts.opening_of(unclosed)
58
+ assert opening.startswith("--- zikaron-source: lib/foo.py note: 0")
59
+
60
+ def test_a_block_still_open_at_the_chunk_s_end_stays_in(self) -> None:
61
+ assert excerpts.opening_of("---\nzikaron-source: lib/foo.py\n") == (
62
+ "--- zikaron-source: lib/foo.py"
63
+ )
64
+
65
+ def test_nothing_but_front_matter_opens_as_the_empty_string(self) -> None:
66
+ assert excerpts.opening_of(_LINKED + "\n \n") == ""
67
+
68
+ def test_the_cut_falls_on_the_last_space_that_leaves_room(self, limit: int) -> None:
69
+ kept = limit // len("word ")
70
+ opening = excerpts.opening_of(" ".join(["word"] * limit))
71
+ assert opening == " ".join(["word"] * kept) + "…"
72
+ assert len(opening) <= limit
73
+
74
+ def test_a_space_just_inside_the_room_is_where_it_cuts(self, limit: int) -> None:
75
+ room = limit - 1
76
+ text = "a" * (room - 1) + " " + "b" * 10
77
+ assert excerpts.opening_of(text) == "a" * (room - 1) + "…"
78
+
79
+ def test_a_space_just_past_the_room_is_not_used(self, limit: int) -> None:
80
+ room = limit - 1
81
+ text = "a" * (room + 1) + " " + "b" * 10
82
+ assert excerpts.opening_of(text) == "a" * room + "…"
83
+
84
+ def test_with_no_space_the_cut_lands_at_the_limit(self, limit: int) -> None:
85
+ opening = excerpts.opening_of("x" * (limit * 3))
86
+ assert opening == "x" * (limit - 1) + "…"
87
+ assert len(opening) == limit
88
+
89
+ def test_a_text_at_the_limit_is_not_cut(self, limit: int) -> None:
90
+ assert excerpts.opening_of("y" * limit) == "y" * limit
91
+
92
+ def test_the_limit_is_read_where_the_opening_is_cut(
93
+ self, monkeypatch: pytest.MonkeyPatch
94
+ ) -> None:
95
+ monkeypatch.setattr(excerpts, "OPENING_MAX_CHARS", 10)
96
+ assert excerpts.opening_of("abcdefghijklmnop") == "abcdefghi…"
97
+
98
+
99
+ _LINES: Final = (
100
+ "---",
101
+ "zikaron-source: lib/foo.py",
102
+ f"zikaron-source-blob: {_SHA1}",
103
+ "title: a page",
104
+ "body",
105
+ "",
106
+ )
107
+
108
+
109
+ @given(
110
+ st.lists(st.sampled_from(_LINES), max_size=8),
111
+ st.sampled_from(["\n", "\r\n"]),
112
+ )
113
+ def test_only_a_block_that_declares_a_link_is_skipped(lines: list[str], newline: str) -> None:
114
+ """The opening skips a block exactly where `read_link` reads a declaration from one that
115
+ closed, so the two cannot disagree about which text is the file's own."""
116
+ text = newline.join(lines)
117
+ end = front_matter_end(text)
118
+ declared = read_link(text)
119
+ if end:
120
+ assert declared is not None
121
+ assert text[:end].rstrip("\r\n").endswith("---")
122
+ assert text[:end].count("---") == 2
123
+ if isinstance(declared, SourceLink):
124
+ assert end > 0
125
+
126
+
127
+ def test_the_limit_is_what_the_prose_about_it_says() -> None:
128
+ """Two design sentences state the limit, and it is a number set from a measurement, so a new
129
+ value reaching the code and not the prose is the drift this catches."""
130
+ repo = Path(__file__).resolve().parent.parent
131
+ for relative, phrase in (
132
+ ("design/knowledge-index.md", f"`OPENING_MAX_CHARS` ({excerpts.OPENING_MAX_CHARS} code"),
133
+ ("design/code-knowledge.md", f"an opening of at most {excerpts.OPENING_MAX_CHARS}"),
134
+ ):
135
+ body = " ".join((repo / relative).read_text(encoding="utf-8").split())
136
+ assert phrase in body, relative
@@ -28,7 +28,7 @@ from tests.knowledge_fixtures import (
28
28
  from zikaron.core.config.keys import CONFIG_KEYS_BY_NAME, IntBounds
29
29
  from zikaron.core.config.resolution import EffectiveConfig
30
30
  from zikaron.core.knowledge import database as knowledge_database
31
- from zikaron.core.knowledge import groups, lifecycle, lock, paths, registry, reporting
31
+ from zikaron.core.knowledge import groups, lifecycle, lock, paths, registry, reporting, search
32
32
  from zikaron.core.knowledge import pending as knowledge_pending
33
33
  from zikaron.core.knowledge.database import KnowledgeDatabase
34
34
  from zikaron.core.knowledge.groups import Group, SearchRequest, SearchResponse, UnknownGroup
@@ -113,6 +113,13 @@ class TestTheAssemblyRules:
113
113
  assert isinstance(bounds, IntBounds)
114
114
  assert bounds.maximum == groups.LIMIT_PER_KB_CAP
115
115
 
116
+ def test_the_cap_is_the_largest_whole_result_count(self) -> None:
117
+ """At the output cap every result is whole, which is what turns naming off; a larger
118
+ count could never bind."""
119
+ bounds = CONFIG_KEYS_BY_NAME["knowledge_whole_results"].bounds
120
+ assert isinstance(bounds, IntBounds)
121
+ assert bounds.maximum == groups.LIMIT_PER_KB_CAP
122
+
116
123
 
117
124
  class TestTheResponseCap:
118
125
  def _oversized(self, name: str, *, results: int = 10) -> Group:
@@ -273,6 +280,63 @@ async def _search_all(
273
280
  return await groups.search_all(store_dir, db, config, asked, encoder=using, migrate=True)
274
281
 
275
282
 
283
+ class TestNamedEntriesInGroups:
284
+ """What named entries change about the assembled answer: what a result past the cutoff
285
+ carries, and nothing about which corpora answer or in what order."""
286
+
287
+ _LAYOUTS: Final = {
288
+ "docs": {f"d{index}.md": _PROTOBUF for index in range(6)},
289
+ "runbooks": {f"r{index}.md": b"protobuf runbook step\n" for index in range(6)},
290
+ }
291
+
292
+ async def test_a_named_entry_carries_its_address_and_opening_and_no_fragment(
293
+ self, tmp_path: Path
294
+ ) -> None:
295
+ response = await _search_all(tmp_path, {"docs": self._LAYOUTS["docs"]})
296
+ (group,) = response.groups
297
+ assert isinstance(group, Group)
298
+ results = [groups._result_payload(result) for result in group.results]
299
+ assert {"snippet", "truncated", "score"} <= set(results[0])
300
+ named = results[3]
301
+ assert set(named) == {"path", "start_line", "end_line", "opening", "stale"}
302
+ assert named["opening"] == "the protobuf step fails silently"
303
+
304
+ async def test_the_cutoff_does_not_change_which_corpora_answer(self, tmp_path: Path) -> None:
305
+ named = await _search_all(
306
+ tmp_path / "named", self._LAYOUTS, request=_asking(limit_per_kb=6)
307
+ )
308
+ (tmp_path / "whole").mkdir()
309
+ write_config(tmp_path / "whole", "[retrieval]\nknowledge_whole_results = 20\n")
310
+ whole = await _search_all(
311
+ tmp_path / "whole", self._LAYOUTS, request=_asking(limit_per_kb=6)
312
+ )
313
+ assert [group.knowledge_base for group in named.groups] == [
314
+ group.knowledge_base for group in whole.groups
315
+ ]
316
+
317
+ def test_a_named_entry_s_cosine_orders_its_group(self) -> None:
318
+ """A cosine is not monotone down a fused list, so a group's best one can be a named
319
+ entry's, and leaving `score` out of its payload must not leave it out of the order."""
320
+ named = search.NamedResult(
321
+ path="b.md", start_line=1, end_line=1, opening="", score=0.9, stale=False
322
+ )
323
+ group = Group(
324
+ knowledge_base="docs",
325
+ description="docs corpus",
326
+ state=KnowledgeState.OK,
327
+ files_remaining=None,
328
+ results=(_result(score=0.2), named),
329
+ )
330
+ assert group.order_key == 0.9
331
+
332
+ def test_a_named_entry_counts_as_a_result_and_as_stale(self) -> None:
333
+ named = search.NamedResult(
334
+ path="b.md", start_line=1, end_line=1, opening="", score=0.9, stale=True
335
+ )
336
+ tally = groups._tally((_result(), named))
337
+ assert (tally.results, tally.stale) == (2, 1)
338
+
339
+
276
340
  class TestWhichCorporaAnswer:
277
341
  async def test_every_registered_corpus_answers_when_none_is_named(self, tmp_path: Path) -> None:
278
342
  response = await _search_all(
@@ -28,6 +28,7 @@ from zikaron.core.knowledge import disposal, groups, lifecycle, vectors
28
28
  from zikaron.core.knowledge.chunking import FileChunkPlan, plan_file_chunks
29
29
  from zikaron.core.knowledge.groups import Group, SearchRequest
30
30
  from zikaron.core.knowledge.meta import GitMode
31
+ from zikaron.core.knowledge.search import Result
31
32
 
32
33
  pytestmark = pytest.mark.integration
33
34
 
@@ -137,6 +138,7 @@ async def test_a_real_corpus_answers_a_real_query(
137
138
  assert isinstance(group, Group)
138
139
  assert group.results
139
140
  best = group.results[0]
141
+ assert isinstance(best, Result)
140
142
  assert best.path == "design/retrieval.md"
141
143
  assert "reciprocal rank" in best.snippet or "dense arm" in best.snippet
142
144
  assert -1.0 <= best.score <= 1.0
@@ -157,7 +159,9 @@ async def test_a_real_snippet_reads_back_off_the_file(
157
159
  )
158
160
  (group,) = response.groups
159
161
  assert isinstance(group, Group)
160
- for result in group.results:
162
+ whole = [result for result in group.results if isinstance(result, Result)]
163
+ assert whole
164
+ for result in whole:
161
165
  text = (corpus.root / result.path).read_bytes().decode("utf-8")
162
166
  lines = text.split("\n")
163
167
  kept = [f"{line}\n" for line in lines[:-1]]
@@ -25,13 +25,29 @@ from tests.knowledge_fixtures import (
25
25
  )
26
26
  from zikaron.core.knowledge import arms, pending, search
27
27
  from zikaron.core.knowledge.chunking import plan_file_chunks
28
+ from zikaron.core.knowledge.excerpts import cut_to_snippet
28
29
  from zikaron.core.knowledge.meta import GitMode
29
- from zikaron.core.knowledge.search import Result, SearchSettings, cut_to_snippet
30
+ from zikaron.core.knowledge.search import NamedResult, Result, SearchSettings
30
31
  from zikaron.core.knowledge.source_hash import HashBudget
31
32
 
32
- _DEFAULT_SETTINGS: Final = SearchSettings(
33
- limit_per_kb=5, max_chunks_per_file=2, snippet_max_chars=1200
34
- )
33
+
34
+ def _settings(
35
+ *,
36
+ limit_per_kb: int = 5,
37
+ max_chunks_per_file: int = 2,
38
+ snippet_max_chars: int = 1200,
39
+ whole_results: int = 20,
40
+ ) -> SearchSettings:
41
+ """Search settings with every result whole unless a test names some."""
42
+ return SearchSettings(
43
+ limit_per_kb=limit_per_kb,
44
+ max_chunks_per_file=max_chunks_per_file,
45
+ snippet_max_chars=snippet_max_chars,
46
+ whole_results=whole_results,
47
+ )
48
+
49
+
50
+ _DEFAULT_SETTINGS: Final = _settings()
35
51
 
36
52
 
37
53
  def read_lines(path: Path, start_line: int, end_line: int) -> str:
@@ -53,13 +69,13 @@ def read_lines(path: Path, start_line: int, end_line: int) -> str:
53
69
  return "".join(kept[start_line - 1 : end_line])
54
70
 
55
71
 
56
- async def _search(
72
+ async def _results(
57
73
  corpus: Corpus,
58
74
  query: str,
59
75
  *,
60
76
  encoder: FakeEncoder | None = None,
61
77
  settings_used: SearchSettings = _DEFAULT_SETTINGS,
62
- ) -> tuple[Result, ...]:
78
+ ) -> tuple[Result | NamedResult, ...]:
63
79
  """Run one query against one built corpus, the way the service does."""
64
80
  using = encoder if encoder is not None else FakeEncoder()
65
81
  config = config_for(corpus.store_dir.parent)
@@ -79,6 +95,20 @@ async def _search(
79
95
  )
80
96
 
81
97
 
98
+ async def _search(
99
+ corpus: Corpus,
100
+ query: str,
101
+ *,
102
+ encoder: FakeEncoder | None = None,
103
+ settings_used: SearchSettings = _DEFAULT_SETTINGS,
104
+ ) -> tuple[Result, ...]:
105
+ """`_results` under settings that keep every one whole."""
106
+ results = await _results(corpus, query, encoder=encoder, settings_used=settings_used)
107
+ whole = tuple(result for result in results if isinstance(result, Result))
108
+ assert len(whole) == len(results)
109
+ return whole
110
+
111
+
82
112
  #: Files whose shape a chunker that normalizes anything would get wrong, each by a different
83
113
  #: mechanism. Shared by the round-trip test and available to any other that needs a corpus with
84
114
  #: something other than tidy prose in it.
@@ -164,7 +194,7 @@ class TestTheRoundTripProperty:
164
194
  results = await _search(
165
195
  corpus,
166
196
  query,
167
- settings_used=SearchSettings(
197
+ settings_used=_settings(
168
198
  limit_per_kb=20, max_chunks_per_file=20, snippet_max_chars=120
169
199
  ),
170
200
  )
@@ -190,9 +220,7 @@ class TestTheSnippetCap:
190
220
  (result,) = await _search(
191
221
  corpus,
192
222
  "protobuf",
193
- settings_used=SearchSettings(
194
- limit_per_kb=5, max_chunks_per_file=2, snippet_max_chars=60
195
- ),
223
+ settings_used=_settings(snippet_max_chars=60),
196
224
  )
197
225
  assert result.truncated is True
198
226
  assert result.snippet.endswith("\n")
@@ -248,9 +276,7 @@ class TestWhatOneFileMayFill:
248
276
  results = await _search(
249
277
  corpus,
250
278
  "protobuf",
251
- settings_used=SearchSettings(
252
- limit_per_kb=5, max_chunks_per_file=2, snippet_max_chars=1200
253
- ),
279
+ settings_used=_settings(),
254
280
  )
255
281
  assert sum(1 for result in results if result.path == "big.md") == 2
256
282
  assert "small.md" in {result.path for result in results}
@@ -262,9 +288,7 @@ class TestWhatOneFileMayFill:
262
288
  results = await _search(
263
289
  corpus,
264
290
  "protobuf",
265
- settings_used=SearchSettings(
266
- limit_per_kb=3, max_chunks_per_file=2, snippet_max_chars=1200
267
- ),
291
+ settings_used=_settings(limit_per_kb=3),
268
292
  )
269
293
  assert len(results) == 3
270
294
 
@@ -462,3 +486,140 @@ class TestDeterminism:
462
486
  first = await _search(corpus, "protobuf step")
463
487
  second = await _search(corpus, "protobuf step")
464
488
  assert first == second
489
+
490
+ async def test_named_entries_twice_are_identical(self, tmp_path: Path) -> None:
491
+ async with _corpus(tmp_path, _NAMED_LAYOUT) as corpus:
492
+ await build_index(corpus)
493
+ settings_used = _settings(limit_per_kb=10, whole_results=3)
494
+ first = await _results(corpus, "protobuf", settings_used=settings_used)
495
+ second = await _results(corpus, "protobuf", settings_used=settings_used)
496
+ assert any(isinstance(result, NamedResult) for result in first)
497
+ assert first == second
498
+
499
+
500
+ _SHA1: Final = "0123456789abcdef0123456789abcdef01234567"
501
+
502
+ #: Enough files that a search asking for twenty gets more than ten, so the limits the invariant is
503
+ #: checked at mostly end in named entries; files whose chunk is longer than the snippet
504
+ #: cap one test sets, one whose only line is cut inside it and the rest cut at a line boundary; one
505
+ #: that spans two chunks, so an opening is seen to come from the first; and two linked documents.
506
+ _NAMED_LAYOUT: Final[dict[str, bytes]] = {
507
+ **{f"doc{index:02}.md": f"protobuf topic {index}\n".encode() for index in range(10)},
508
+ **{
509
+ f"linked{index}.md": (
510
+ f"---\nzikaron-source: src/gone{index}.py\nzikaron-source-blob: {_SHA1}\n---\n"
511
+ f"# linked {index}\n\nprotobuf linked document\n"
512
+ ).encode()
513
+ for index in range(2)
514
+ },
515
+ "long.md": "".join(f"protobuf long line {index}\n" for index in range(130)).encode(),
516
+ "minified.md": b"protobuf " + b"x" * 100 + b"\n",
517
+ }
518
+
519
+
520
+ class TestNamedEntries:
521
+ """Each corpus's first results whole and the rest named, at the ranks they hold
522
+ (`knowledge-index.md` §8.3, K15)."""
523
+
524
+ async def test_the_cutoff_changes_what_is_shown_never_what_is_ranked(
525
+ self, tmp_path: Path
526
+ ) -> None:
527
+ async with _corpus(tmp_path, _NAMED_LAYOUT) as corpus:
528
+ await build_index(corpus)
529
+ for limit in range(1, 21):
530
+ every_one_whole = await _results(
531
+ corpus, "protobuf", settings_used=_settings(limit_per_kb=limit)
532
+ )
533
+ for cutoff in (1, 3):
534
+ results = await _results(
535
+ corpus,
536
+ "protobuf",
537
+ settings_used=_settings(limit_per_kb=limit, whole_results=cutoff),
538
+ )
539
+ assert [(r.path, r.start_line) for r in results] == [
540
+ (r.path, r.start_line) for r in every_one_whole
541
+ ]
542
+ assert [isinstance(r, Result) for r in results] == [
543
+ position < cutoff for position in range(len(results))
544
+ ]
545
+ for got, want in zip(results, every_one_whole, strict=True):
546
+ if isinstance(got, Result):
547
+ assert got == want
548
+ assert len(every_one_whole) > 10
549
+
550
+ async def test_a_named_entry_reports_its_chunk_s_own_lines_and_its_source(
551
+ self, tmp_path: Path
552
+ ) -> None:
553
+ async with _corpus(tmp_path, _NAMED_LAYOUT) as corpus:
554
+ await build_index(corpus)
555
+ whole = await _results(
556
+ corpus,
557
+ "protobuf",
558
+ settings_used=_settings(limit_per_kb=20, snippet_max_chars=60, whole_results=20),
559
+ )
560
+ named = await _results(
561
+ corpus,
562
+ "protobuf",
563
+ settings_used=_settings(limit_per_kb=20, snippet_max_chars=60, whole_results=1),
564
+ )
565
+ pairs = list(zip(whole[1:], named[1:], strict=True))
566
+ assert any(isinstance(full, Result) and full.truncated for full, _ in pairs)
567
+ assert any(entry.source is not None for _, entry in pairs)
568
+ for full, entry in pairs:
569
+ assert isinstance(full, Result)
570
+ assert isinstance(entry, NamedResult)
571
+ assert (entry.path, entry.start_line, entry.stale) == (
572
+ full.path,
573
+ full.start_line,
574
+ full.stale,
575
+ )
576
+ assert entry.source == full.source
577
+ assert entry.end_line >= full.end_line
578
+ if not full.truncated:
579
+ assert entry.end_line == full.end_line
580
+ elif full.snippet.endswith("\n"):
581
+ assert entry.end_line > full.end_line
582
+ else:
583
+ assert entry.end_line == full.end_line
584
+ cut_inside_a_line = [
585
+ full
586
+ for full, _ in pairs
587
+ if isinstance(full, Result) and full.truncated and not full.snippet.endswith("\n")
588
+ ]
589
+ assert cut_inside_a_line
590
+
591
+ async def test_a_named_entry_opens_with_its_file_s_first_chunk(self, tmp_path: Path) -> None:
592
+ async with _corpus(tmp_path, _NAMED_LAYOUT) as corpus:
593
+ await build_index(corpus)
594
+ results = await _results(
595
+ corpus, "linked document", settings_used=_settings(limit_per_kb=20, whole_results=1)
596
+ )
597
+ openings = {
598
+ entry.path: entry.opening for entry in results if isinstance(entry, NamedResult)
599
+ }
600
+ linked = {path: text for path, text in openings.items() if path.startswith("linked")}
601
+ assert linked
602
+ for path, opening in linked.items():
603
+ index = path.removeprefix("linked").removesuffix(".md")
604
+ assert opening == f"# linked {index} protobuf linked document"
605
+ assert any(
606
+ entry.path == "long.md" and entry.start_line > 1
607
+ for entry in results
608
+ if isinstance(entry, NamedResult)
609
+ )
610
+ assert openings["long.md"].startswith("protobuf long line 0 protobuf long line 1")
611
+
612
+ async def test_a_named_entry_s_stale_is_its_file_s_own(self, tmp_path: Path) -> None:
613
+ async with _corpus(tmp_path, _NAMED_LAYOUT) as corpus:
614
+ await build_index(corpus)
615
+ for index in range(10):
616
+ (corpus.root / f"doc{index:02}.md").write_bytes(
617
+ b"protobuf topic, grown since the build\n"
618
+ )
619
+ results = await _results(
620
+ corpus, "protobuf", settings_used=_settings(limit_per_kb=20, whole_results=1)
621
+ )
622
+ named = [result for result in results if isinstance(result, NamedResult)]
623
+ assert {entry.stale for entry in named} == {True, False}
624
+ for entry in named:
625
+ assert entry.stale is entry.path.startswith("doc")
@@ -304,6 +304,14 @@ CONFIG_KEYS: Final[tuple[ConfigKey, ...]] = (
304
304
  IntBounds(80, 24_000),
305
305
  1_200,
306
306
  ),
307
+ ConfigKey(
308
+ ConfigSection.RETRIEVAL,
309
+ "knowledge_whole_results",
310
+ # The maximum is the same per-corpus result cap as above: at 20 every result carries its
311
+ # snippet, which is what turns naming off.
312
+ IntBounds(1, 20),
313
+ 3,
314
+ ),
307
315
  ConfigKey(
308
316
  ConfigSection.RETRIEVAL,
309
317
  "knowledge_reminder_interval",