memleaf 0.2.68__tar.gz → 0.2.70__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 (240) hide show
  1. {memleaf-0.2.68 → memleaf-0.2.70}/CHANGELOG.md +18 -0
  2. {memleaf-0.2.68 → memleaf-0.2.70}/MANIFEST.in +0 -1
  3. {memleaf-0.2.68/src/memleaf.egg-info → memleaf-0.2.70}/PKG-INFO +2 -2
  4. {memleaf-0.2.68 → memleaf-0.2.70}/README.en.md +1 -1
  5. {memleaf-0.2.68 → memleaf-0.2.70}/README.md +1 -1
  6. {memleaf-0.2.68 → memleaf-0.2.70}/docs/immutable-release-assets.md +6 -6
  7. {memleaf-0.2.68 → memleaf-0.2.70}/docs/incremental-planner-preview.md +4 -11
  8. memleaf-0.2.70/docs/installed-artifact-verification.md +57 -0
  9. {memleaf-0.2.68 → memleaf-0.2.70}/docs/memory-state-contract.md +3 -6
  10. {memleaf-0.2.68 → memleaf-0.2.70}/docs/processing-quality-acceptance.md +6 -7
  11. {memleaf-0.2.68 → memleaf-0.2.70}/pyproject.toml +1 -1
  12. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/__init__.py +1 -1
  13. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/hermes_provider/plugin.yaml +1 -1
  14. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/incremental_protocol.py +86 -16
  15. {memleaf-0.2.68 → memleaf-0.2.70/src/memleaf.egg-info}/PKG-INFO +2 -2
  16. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf.egg-info/SOURCES.txt +1 -67
  17. memleaf-0.2.68/docs/installed-artifact-verification.md +0 -131
  18. memleaf-0.2.68/tests_public/acceptance_oracles.py +0 -2
  19. memleaf-0.2.68/tests_public/candidate_update_fixtures.py +0 -8
  20. memleaf-0.2.68/tests_public/incremental_test_support.py +0 -62
  21. memleaf-0.2.68/tests_public/platform_smoke.py +0 -70
  22. memleaf-0.2.68/tests_public/release_assets.py +0 -176
  23. memleaf-0.2.68/tests_public/run_contracts.py +0 -102
  24. memleaf-0.2.68/tests_public/test_a083_regressions.py +0 -370
  25. memleaf-0.2.68/tests_public/test_a47_regressions.py +0 -440
  26. memleaf-0.2.68/tests_public/test_acceptance.py +0 -250
  27. memleaf-0.2.68/tests_public/test_acceptance_boundaries.py +0 -239
  28. memleaf-0.2.68/tests_public/test_artifact_verification.py +0 -178
  29. memleaf-0.2.68/tests_public/test_body_compaction.py +0 -287
  30. memleaf-0.2.68/tests_public/test_candidate_reconciliation.py +0 -161
  31. memleaf-0.2.68/tests_public/test_contract_reporter.py +0 -66
  32. memleaf-0.2.68/tests_public/test_control_absence_contract.py +0 -91
  33. memleaf-0.2.68/tests_public/test_create_memory_contract.py +0 -207
  34. memleaf-0.2.68/tests_public/test_development_closeout.py +0 -193
  35. memleaf-0.2.68/tests_public/test_explicit_memory_update.py +0 -553
  36. memleaf-0.2.68/tests_public/test_explicit_update_contract.py +0 -205
  37. memleaf-0.2.68/tests_public/test_g1_memory_contract.py +0 -171
  38. memleaf-0.2.68/tests_public/test_g2_source_contract.py +0 -402
  39. memleaf-0.2.68/tests_public/test_hermes_native_provision.py +0 -91
  40. memleaf-0.2.68/tests_public/test_hermes_source_metadata.py +0 -188
  41. memleaf-0.2.68/tests_public/test_incremental_commit.py +0 -194
  42. memleaf-0.2.68/tests_public/test_incremental_configured_runtime.py +0 -110
  43. memleaf-0.2.68/tests_public/test_incremental_dates.py +0 -119
  44. memleaf-0.2.68/tests_public/test_incremental_execution.py +0 -367
  45. memleaf-0.2.68/tests_public/test_incremental_execution_recovery.py +0 -302
  46. memleaf-0.2.68/tests_public/test_incremental_native.py +0 -428
  47. memleaf-0.2.68/tests_public/test_incremental_partial.py +0 -177
  48. memleaf-0.2.68/tests_public/test_incremental_partial_boundaries.py +0 -180
  49. memleaf-0.2.68/tests_public/test_incremental_partial_recovery.py +0 -277
  50. memleaf-0.2.68/tests_public/test_incremental_preview.py +0 -190
  51. memleaf-0.2.68/tests_public/test_incremental_protocol.py +0 -418
  52. memleaf-0.2.68/tests_public/test_incremental_recovery.py +0 -263
  53. memleaf-0.2.68/tests_public/test_incremental_remember.py +0 -231
  54. memleaf-0.2.68/tests_public/test_incremental_remember_recovery.py +0 -238
  55. memleaf-0.2.68/tests_public/test_incremental_scope_recovery.py +0 -332
  56. memleaf-0.2.68/tests_public/test_incremental_scopes.py +0 -203
  57. memleaf-0.2.68/tests_public/test_inspection_read_budget.py +0 -171
  58. memleaf-0.2.68/tests_public/test_mcp_retrieval_fallback.py +0 -140
  59. memleaf-0.2.68/tests_public/test_migration_backup.py +0 -374
  60. memleaf-0.2.68/tests_public/test_migration_runtime.py +0 -111
  61. memleaf-0.2.68/tests_public/test_native_read_stability.py +0 -196
  62. memleaf-0.2.68/tests_public/test_planner_provenance_contract.py +0 -117
  63. memleaf-0.2.68/tests_public/test_platform_contracts.py +0 -103
  64. memleaf-0.2.68/tests_public/test_processed_state_contract.py +0 -98
  65. memleaf-0.2.68/tests_public/test_processing_entrypoints.py +0 -266
  66. memleaf-0.2.68/tests_public/test_processing_route.py +0 -278
  67. memleaf-0.2.68/tests_public/test_processing_route_recovery.py +0 -159
  68. memleaf-0.2.68/tests_public/test_provider_compatibility.py +0 -567
  69. memleaf-0.2.68/tests_public/test_public_query_integrity.py +0 -267
  70. memleaf-0.2.68/tests_public/test_query_benchmark.py +0 -68
  71. memleaf-0.2.68/tests_public/test_query_clock.py +0 -89
  72. memleaf-0.2.68/tests_public/test_query_progress.py +0 -140
  73. memleaf-0.2.68/tests_public/test_query_scan_reuse.py +0 -234
  74. memleaf-0.2.68/tests_public/test_release_assets.py +0 -283
  75. memleaf-0.2.68/tests_public/test_remember_route.py +0 -274
  76. memleaf-0.2.68/tests_public/test_remember_route_recovery.py +0 -232
  77. memleaf-0.2.68/tests_public/test_revision_target_integrity.py +0 -262
  78. memleaf-0.2.68/tests_public/test_runtime_retention.py +0 -329
  79. memleaf-0.2.68/tests_public/test_runtime_retention_observation.py +0 -174
  80. memleaf-0.2.68/tests_public/test_runtime_retention_recovery.py +0 -230
  81. memleaf-0.2.68/tests_public/test_source_followup_contract.py +0 -160
  82. memleaf-0.2.68/tests_public/test_vault_binding_contract.py +0 -97
  83. memleaf-0.2.68/tests_public/verify_distribution.py +0 -363
  84. {memleaf-0.2.68 → memleaf-0.2.70}/LICENSE +0 -0
  85. {memleaf-0.2.68 → memleaf-0.2.70}/docs/acceptance-evidence-guide.md +0 -0
  86. {memleaf-0.2.68 → memleaf-0.2.70}/docs/automatic-processing-route.md +0 -0
  87. {memleaf-0.2.68 → memleaf-0.2.70}/docs/body-compaction.md +0 -0
  88. {memleaf-0.2.68 → memleaf-0.2.70}/docs/candidate-reconciliation.md +0 -0
  89. {memleaf-0.2.68 → memleaf-0.2.70}/docs/capture-budget-design.md +0 -0
  90. {memleaf-0.2.68 → memleaf-0.2.70}/docs/config-migrations.md +0 -0
  91. {memleaf-0.2.68 → memleaf-0.2.70}/docs/core-refactor.md +0 -0
  92. {memleaf-0.2.68 → memleaf-0.2.70}/docs/development-closeout.md +0 -0
  93. {memleaf-0.2.68 → memleaf-0.2.70}/docs/evidence-retention.md +0 -0
  94. {memleaf-0.2.68 → memleaf-0.2.70}/docs/explicit-memory-update.md +0 -0
  95. {memleaf-0.2.68 → memleaf-0.2.70}/docs/extraction-latency.md +0 -0
  96. {memleaf-0.2.68 → memleaf-0.2.70}/docs/gate-evidence-boundary.md +0 -0
  97. {memleaf-0.2.68 → memleaf-0.2.70}/docs/general-processing.md +0 -0
  98. {memleaf-0.2.68 → memleaf-0.2.70}/docs/hermes-mcp-runtime.md +0 -0
  99. {memleaf-0.2.68 → memleaf-0.2.70}/docs/hermes-provider-compatibility.md +0 -0
  100. {memleaf-0.2.68 → memleaf-0.2.70}/docs/host-acceptance-runbook.md +0 -0
  101. {memleaf-0.2.68 → memleaf-0.2.70}/docs/incremental-commit-contract.md +0 -0
  102. {memleaf-0.2.68 → memleaf-0.2.70}/docs/incremental-execution.md +0 -0
  103. {memleaf-0.2.68 → memleaf-0.2.70}/docs/incremental-native-comparison.md +0 -0
  104. {memleaf-0.2.68 → memleaf-0.2.70}/docs/incremental-partial-recovery.md +0 -0
  105. {memleaf-0.2.68 → memleaf-0.2.70}/docs/incremental-runtime-contract.md +0 -0
  106. {memleaf-0.2.68 → memleaf-0.2.70}/docs/incremental-scope-registration.md +0 -0
  107. {memleaf-0.2.68 → memleaf-0.2.70}/docs/incremental-selected-retention.md +0 -0
  108. {memleaf-0.2.68 → memleaf-0.2.70}/docs/migration-preflight.md +0 -0
  109. {memleaf-0.2.68 → memleaf-0.2.70}/docs/public-query-integrity.md +0 -0
  110. {memleaf-0.2.68 → memleaf-0.2.70}/docs/query-performance.md +0 -0
  111. {memleaf-0.2.68 → memleaf-0.2.70}/docs/remember-incremental-route.md +0 -0
  112. {memleaf-0.2.68 → memleaf-0.2.70}/docs/runtime-state-retention.md +0 -0
  113. {memleaf-0.2.68 → memleaf-0.2.70}/docs/semantic-extraction-protocol.md +0 -0
  114. {memleaf-0.2.68 → memleaf-0.2.70}/docs/source-work-contract.md +0 -0
  115. {memleaf-0.2.68 → memleaf-0.2.70}/docs/v0.2.26-processing-status.md +0 -0
  116. {memleaf-0.2.68 → memleaf-0.2.70}/examples/README.md +0 -0
  117. {memleaf-0.2.68 → memleaf-0.2.70}/examples/basic_usage.py +0 -0
  118. {memleaf-0.2.68 → memleaf-0.2.70}/examples/incremental_acceptance.json +0 -0
  119. {memleaf-0.2.68 → memleaf-0.2.70}/examples/mcp_stdio.ndjson +0 -0
  120. {memleaf-0.2.68 → memleaf-0.2.70}/examples/query_benchmark.py +0 -0
  121. {memleaf-0.2.68 → memleaf-0.2.70}/install.ps1 +0 -0
  122. {memleaf-0.2.68 → memleaf-0.2.70}/install.sh +0 -0
  123. {memleaf-0.2.68 → memleaf-0.2.70}/setup.cfg +0 -0
  124. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/__main__.py +0 -0
  125. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/acceptance.py +0 -0
  126. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/adapters/__init__.py +0 -0
  127. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/adapters/antigravity.py +0 -0
  128. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/adapters/base.py +0 -0
  129. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/adapters/codex.py +0 -0
  130. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/adapters/hermes.py +0 -0
  131. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/admission.py +0 -0
  132. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/batch_review.py +0 -0
  133. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/budget.py +0 -0
  134. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/capture.py +0 -0
  135. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/cli.py +0 -0
  136. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/compaction.py +0 -0
  137. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/config.py +0 -0
  138. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/create_coordinator.py +0 -0
  139. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/credentials.py +0 -0
  140. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/evidence_budget.py +0 -0
  141. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/evidence_policy.py +0 -0
  142. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/evidence_structure.py +0 -0
  143. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/evidence_syntax.py +0 -0
  144. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/explicit_text_source.py +0 -0
  145. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/extraction_budget.py +0 -0
  146. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/extraction_capability.py +0 -0
  147. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/extraction_work_state.py +0 -0
  148. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/frontmatter.py +0 -0
  149. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/hermes_provider/README.md +0 -0
  150. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/hermes_provider/__init__.py +0 -0
  151. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/hermes_provider/_mcp_client.py +0 -0
  152. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/hermes_provider/_provider.py +0 -0
  153. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/hermes_provider/_shared.py +0 -0
  154. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/hermes_provider/evidence_budget.py +0 -0
  155. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/hermes_provider/provider_compatibility.py +0 -0
  156. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/hermes_runtime.py +0 -0
  157. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/host_events.py +0 -0
  158. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/host_runtime.py +0 -0
  159. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/inbox.py +0 -0
  160. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/incremental_commit.py +0 -0
  161. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/incremental_dates.py +0 -0
  162. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/incremental_execution.py +0 -0
  163. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/incremental_journal.py +0 -0
  164. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/incremental_native.py +0 -0
  165. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/incremental_partial.py +0 -0
  166. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/incremental_preview.py +0 -0
  167. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/incremental_prompts.py +0 -0
  168. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/incremental_recovery.py +0 -0
  169. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/incremental_run_state.py +0 -0
  170. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/incremental_runtime.py +0 -0
  171. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/incremental_scopes.py +0 -0
  172. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/incremental_selection.py +0 -0
  173. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/index.py +0 -0
  174. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/inspection.py +0 -0
  175. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/installer.py +0 -0
  176. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/legacy_update_journal.py +0 -0
  177. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/llm/__init__.py +0 -0
  178. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/llm/base.py +0 -0
  179. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/llm/claude_compatible.py +0 -0
  180. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/llm/gemini.py +0 -0
  181. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/llm/openai_compatible.py +0 -0
  182. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/llm/router.py +0 -0
  183. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/llm/thinking.py +0 -0
  184. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/locking.py +0 -0
  185. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/mcp_server.py +0 -0
  186. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/memory_commit.py +0 -0
  187. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/memory_planner.py +0 -0
  188. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/memory_retraction.py +0 -0
  189. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/memory_update.py +0 -0
  190. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/memory_writer.py +0 -0
  191. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/migration.py +0 -0
  192. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/model_capabilities.py +0 -0
  193. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/model_discovery.py +0 -0
  194. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/model_execution.py +0 -0
  195. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/models.py +0 -0
  196. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/native_index.py +0 -0
  197. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/native_registration.py +0 -0
  198. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/parallel_model.py +0 -0
  199. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/planning_context.py +0 -0
  200. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/process_common.py +0 -0
  201. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/process_jobs.py +0 -0
  202. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/process_journal.py +0 -0
  203. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/process_owner.py +0 -0
  204. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/processing.py +0 -0
  205. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/processing_route.py +0 -0
  206. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/prompts.py +0 -0
  207. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/provenance.py +0 -0
  208. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/provider_compatibility.py +0 -0
  209. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/query_clock.py +0 -0
  210. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/query_progress.py +0 -0
  211. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/query_scan.py +0 -0
  212. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/receipt_codec.py +0 -0
  213. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/recording_policy.py +0 -0
  214. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/redaction.py +0 -0
  215. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/remember_route.py +0 -0
  216. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/retention.py +0 -0
  217. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/retrieval.py +0 -0
  218. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/retrieval_gate.py +0 -0
  219. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/runtime_retention.py +0 -0
  220. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/scope_maintenance.py +0 -0
  221. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/scope_state.py +0 -0
  222. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/semantic_maintenance.py +0 -0
  223. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/semantic_protocol.py +0 -0
  224. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/service.py +0 -0
  225. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/single_pass_memory_planner.py +0 -0
  226. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/single_pass_plan.py +0 -0
  227. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/source_policy.py +0 -0
  228. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/state_layout.py +0 -0
  229. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/subprocess_flags.py +0 -0
  230. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/summary_batch.py +0 -0
  231. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/target_reconciliation.py +0 -0
  232. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/turn_audit.py +0 -0
  233. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/turn_plan.py +0 -0
  234. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/update_coordinator.py +0 -0
  235. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/update_review.py +0 -0
  236. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/validation.py +0 -0
  237. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf/vault.py +0 -0
  238. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf.egg-info/dependency_links.txt +0 -0
  239. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf.egg-info/entry_points.txt +0 -0
  240. {memleaf-0.2.68 → memleaf-0.2.70}/src/memleaf.egg-info/top_level.txt +0 -0
@@ -4,6 +4,24 @@ All notable changes to memleaf are documented here.
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 0.2.70 — 2026-09-21
8
+
9
+ ### Public repository and artifact hygiene
10
+
11
+ - Remove test files from the public `main` tree and keep them ignored locally.
12
+ - Stop including test files in source distributions and keep CI focused on
13
+ source syntax, isolated package installation and release-asset integrity.
14
+ - Preserve the runtime package and public API while ensuring new artifacts do
15
+ not contain the former test fixtures.
16
+
17
+ ## 0.2.69 — 2026-09-21
18
+
19
+ ### Incremental protocol compatibility hardening
20
+
21
+ - Advance the incremental semantic protocol to `incremental-turn-v5` and expose precise field-shape details for fail-closed rows.
22
+ - Normalize only unambiguous model serialization variants: null placeholders from other branches, a null CREATE wrapper, a single-item `scopes` alias, default `validity`, and flattened CREATE fields. Ambiguous aliases and unknown fields remain rejected.
23
+ - Keep the new normalization behavior covered by the public protocol and provider-compatibility tests.
24
+
7
25
  ## 0.2.68 — 2026-09-20
8
26
 
9
27
  ### Hermes live-path hardening
@@ -7,7 +7,6 @@ include README.en.md
7
7
  recursive-include examples *.md *.ndjson *.py
8
8
  recursive-exclude examples *_acceptance.py
9
9
  prune tests
10
- recursive-include tests_public *.py
11
10
 
12
11
  include docs/*.md
13
12
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: memleaf
3
- Version: 0.2.68
3
+ Version: 0.2.70
4
4
  Summary: A local-first Markdown memory core for AI agents
5
5
  Author: memleaf contributors
6
6
  License-Expression: MIT
@@ -23,7 +23,7 @@ Dynamic: license-file
23
23
 
24
24
  [English](README.en.md) · [PyPI](https://pypi.org/project/memleaf/) · [GitHub](https://github.com/miffyblueboo/memleaf)
25
25
 
26
- > **版本:0.2.65。**
26
+ > **版本:0.2.70。**
27
27
  > 自动提炼和复核共用同一条“未来记忆价值”标准:模型综合未来复用、信息增量、再次读取时的直接可用性和忘记成本,只保留对未来理解、判断或行动有实质影响的最小核心;没有明确价值的信息不提炼,不按具体业务场景硬编码排除。
28
28
  > 提炼契约现在只有一份中文语义契约(旧版英文 B3 提示词已删除),首轮、主题选择、候选修复和 `semantic_maintenance` 使用同一套保留价值判断;同一件事只写一次。
29
29
  > Core 不再因为归属、日期、任务依据或跨项目而丢弃整条候选:归属缺失会归一到证据里唯一被点名的项目、否则落 `global`;日期只接受能在本候选证据里找到出处、且能锚定成 ISO 的写法(`明天`、`周五`、`月底` 都会被解析),无法解析时只丢掉日期字段,记忆照常写入;未获授权的改归属沿用目标原归属。
@@ -4,7 +4,7 @@
4
4
 
5
5
  [中文](README.md) · [PyPI](https://pypi.org/project/memleaf/) · [GitHub](https://github.com/miffyblueboo/memleaf)
6
6
 
7
- > **Version: 0.2.65.**
7
+ > **Version: 0.2.70.**
8
8
  > Automatic extraction and review share one future-value standard: the model weighs likely reuse, information gain, direct usability when read again, and the cost of forgetting. It keeps only the smallest core that can materially help future understanding, decisions, or actions; information without clear value is not extracted, and no business-specific exclusion rule is hard-coded.
9
9
  > A single Chinese semantic contract is sent for extraction, topic selection, candidate repair, and `semantic_maintenance`; the older English B3 prompt has been deleted and B3 remains only as a compatibility read format. One topic is written once.
10
10
  > Core no longer discards a whole candidate over ownership, dates, task basis or cross-project wording. A missing owner normalizes to the single project named by that candidate's own evidence, otherwise `global`. A deadline is accepted only when it appears in the candidate's own evidence and can be anchored to ISO (`明天`, `周五`, `月底` all resolve); when it cannot, only the date field is dropped and the memory is still written. An unauthorized ownership change keeps the target's existing scope.
@@ -4,7 +4,7 @@
4
4
 
5
5
  [English](README.en.md) · [PyPI](https://pypi.org/project/memleaf/) · [GitHub](https://github.com/miffyblueboo/memleaf)
6
6
 
7
- > **版本:0.2.65。**
7
+ > **版本:0.2.70。**
8
8
  > 自动提炼和复核共用同一条“未来记忆价值”标准:模型综合未来复用、信息增量、再次读取时的直接可用性和忘记成本,只保留对未来理解、判断或行动有实质影响的最小核心;没有明确价值的信息不提炼,不按具体业务场景硬编码排除。
9
9
  > 提炼契约现在只有一份中文语义契约(旧版英文 B3 提示词已删除),首轮、主题选择、候选修复和 `semantic_maintenance` 使用同一套保留价值判断;同一件事只写一次。
10
10
  > Core 不再因为归属、日期、任务依据或跨项目而丢弃整条候选:归属缺失会归一到证据里唯一被点名的项目、否则落 `global`;日期只接受能在本候选证据里找到出处、且能锚定成 ISO 的写法(`明天`、`周五`、`月底` 都会被解析),无法解析时只丢掉日期字段,记忆照常写入;未获授权的改归属沿用目标原归属。
@@ -14,14 +14,14 @@ that the bytes were unchanged: rebuilding an archive can produce different
14
14
  compressed bytes from equivalent source. A retry must use the **original verified
15
15
  artifacts**, not a rebuild presented as the same published package.
16
16
 
17
- `tests_public/release_assets.py` checks the tag's resolved commit and release ID,
18
- then downloads all existing expected assets by their asset IDs. Sizes and SHA-256
19
- must match the local wheel, source archive and deterministic `SHA256SUMS` before
20
- any missing attachment is uploaded. A mismatch fails without deleting, renaming,
17
+ The release workflow checks the tag's resolved commit and release metadata, then
18
+ downloads all existing expected assets by their asset IDs. Sizes and SHA-256 must
19
+ match the local wheel, source archive and deterministic `SHA256SUMS` before any
20
+ missing attachment is uploaded. A mismatch fails without deleting, renaming,
21
21
  overwriting or repairing the published asset. Unrelated release attachments stay
22
22
  untouched. Duplicate expected names, unfinished uploads and malformed metadata
23
- fail visibly. This helper is CI-only and is included with the public tests, not
24
- imported by the Memleaf runtime.
23
+ fail visibly. The check is kept inline in the workflow; no test helper is stored
24
+ in the public repository.
25
25
 
26
26
  Uploads are create-only and bounded to one attempt per missing name. When another
27
27
  uploader wins, the helper rereads and verifies the resulting bytes; a failed
@@ -150,17 +150,10 @@ bytes, LF newlines and a trailing LF; fences and dynamic inputs are excluded.
150
150
  Size is checked by the public tests against half of the v3.0 baseline. The old
151
151
  production prompts and model settings are not replaced.
152
152
 
153
- Run the source contract tests with:
154
-
155
- ```sh
156
- PYTHONPATH=src python -m unittest discover -s tests_public -p 'test_*.py'
157
- ```
158
-
159
- These tests cover the parser/compiler, calendar conversion, immutable snapshots,
160
- read-only service boundary and old 110 regressions. They are not live semantic
161
- or native Hermes/Windows/macOS acceptance. Before G3 production activation, finish
162
- commit/recovery integration and bounded dispatch, test the installed artifacts,
163
- and run the agreed isolated multi-turn Flash acceptance set.
153
+ The public repository intentionally does not store or execute test files. Before
154
+ G3 production activation, finish commit/recovery integration and bounded dispatch,
155
+ verify the installed artifacts through CI, and run the agreed isolated multi-turn
156
+ Flash acceptance set from its separate acceptance environment.
164
157
 
165
158
  ## Development closeout: bounded identity and provenance
166
159
 
@@ -0,0 +1,57 @@
1
+ # Installed artifact and native-platform verification
2
+
3
+ This is a deterministic packaging gate, not a runtime subsystem or live-model
4
+ acceptance gate. The public repository intentionally contains no test files.
5
+ CI therefore validates the source and the built artifacts without checking out
6
+ or executing an in-repository test suite.
7
+
8
+ ## Build once, install the same bytes
9
+
10
+ The build job:
11
+
12
+ 1. compiles `src/` with Python's standard-library compiler;
13
+ 2. builds one wheel and one source distribution;
14
+ 3. uploads only those two distributions as the workflow artifact.
15
+
16
+ The `verify-artifacts` job downloads those exact bytes and installs each artifact
17
+ in its own fresh virtual environment. It imports `memleaf` and checks the
18
+ reported package version. It does not read a source-tree checkout, run a model,
19
+ access a production Vault or create a release.
20
+
21
+ The matrix is:
22
+
23
+ | Native runner | Python |
24
+ |---|---|
25
+ | Ubuntu | 3.11, 3.12, 3.13 |
26
+ | Windows | 3.12 |
27
+ | macOS | 3.12 |
28
+
29
+ The source distribution is installed with its declared build backend. The
30
+ wheel and source distribution are checked separately so a successful wheel
31
+ install cannot hide a broken source package. `fail-fast: false` lets every
32
+ native cell report its own result; it does not relax the aggregate dependency.
33
+
34
+ ## Release dependency
35
+
36
+ The release job still requires the build and every installed-artifact cell.
37
+ Only an explicitly authorized `release: v<version>` commit on `main` can create
38
+ a GitHub Release. Existing release assets are checked against the local bytes
39
+ before a missing asset is uploaded; existing assets are never replaced.
40
+
41
+ Ordinary commits do not create tags, GitHub Releases or PyPI uploads. These
42
+ checks do not establish live provider behavior, Hermes host installation,
43
+ Windows process semantics, migration safety or semantic quality.
44
+
45
+ ## Local reproduction
46
+
47
+ From a clean checkout with the declared build backend available:
48
+
49
+ ```sh
50
+ python -m compileall -q src
51
+ python -m build --wheel --sdist
52
+ ```
53
+
54
+ For an isolated local import check, create a temporary virtual environment and
55
+ install the wheel and source archive separately with `--no-deps`. Do not add
56
+ local test files to this repository; they are intentionally ignored and are not
57
+ part of the release artifacts.
@@ -134,12 +134,9 @@ use the controlled stop-write upgrade procedure before resuming pending work.
134
134
  Malformed validity types raise controlled validation errors. Existing scanning
135
135
  can skip the invalid record and keep unrelated records usable; the public integrity envelope reports malformed and conflicting records with
136
136
  bounded snapshot validation. Explicit writes need a provably unique target and
137
- can conservatively block where ordinary reads continue with incomplete diagnostics. Public tests are included in the source distribution and use temporary
138
- Vaults only, with no model or network access:
139
-
140
- ```bash
141
- PYTHONPATH=src python -m unittest discover -s tests_public -p 'test_*.py' -v
142
- ```
137
+ can conservatively block where ordinary reads continue with incomplete diagnostics.
138
+ The public repository does not store test files; package installation and source
139
+ syntax are checked by CI, while semantic acceptance runs in a separate environment.
143
140
 
144
141
  ## Current revision-target integrity (unreleased)
145
142
 
@@ -5,9 +5,9 @@ The online candidate path uses one incremental planner and at most two durable
5
5
  request reservations per source/authorization work. It does not retain the old
6
6
  Gate -> summary -> semantic-review tail as an acceptance requirement. Legacy
7
7
  routes remain available for compatibility and deliberately stay the default
8
- until separately authorized migration. This document replaces the obsolete
9
- statement that deterministic tests are local-only: `tests_public/` is committed,
10
- in the sdist, and exercised by CI. A green CI is not live-model acceptance.
8
+ until separately authorized migration. The public repository keeps deterministic
9
+ test inputs and test code outside the tracked source tree. CI validates source
10
+ syntax and installed package artifacts; a green CI is not live-model acceptance.
11
11
 
12
12
  ## What runs, and what does not
13
13
 
@@ -157,10 +157,9 @@ Its OS matrix and explicit import/skip checks strengthen gate 1, not gates 2 or
157
157
  A workflow definition alone is not a passed native run; retain the per-commit
158
158
  reports and keep actual Hermes installation and live semantics separate.
159
159
 
160
- 1. **Deterministic contracts and artifact consistency.** Run `tests_public/` on
161
- source, sdist and an actually installed wheel, verifying import paths. Fixed
162
- oracle responses test the harness/runtime, not the model. Source and artifact
163
- implementation fingerprints must match before comparing results.
160
+ 1. **Artifact consistency.** Build the wheel and sdist once, then install both
161
+ exact artifacts in isolated native environments and verify package imports.
162
+ This does not replace semantic review or live host acceptance.
164
163
  2. **Live semantic judgement.** A structurally passing live run still records
165
164
  `semantic_status:not_reviewed`. Review each repetition against its own source
166
165
  and checklist: future value, non-invention, correct subject/scope, independent
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "memleaf"
7
- version = "0.2.68"
7
+ version = "0.2.70"
8
8
  description = "A local-first Markdown memory core for AI agents"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -1,6 +1,6 @@
1
1
  """Local-first Markdown memory core for AI agents."""
2
2
 
3
- __version__ = "0.2.68"
3
+ __version__ = "0.2.70"
4
4
 
5
5
  from .config import DEFAULT_CONFIG, default_config, load_config, save_config
6
6
  from .frontmatter import FrontmatterError, dump_frontmatter, dump_yaml, load_yaml, parse_frontmatter
@@ -1,5 +1,5 @@
1
1
  name: memleaf
2
- version: 0.2.68
2
+ version: 0.2.70
3
3
  description: "Hermes-native external MemoryProvider for local-first Markdown memory shared with the memleaf MCP server."
4
4
  hooks:
5
5
  - prefetch
@@ -22,7 +22,7 @@ from .turn_plan import revision_digest
22
22
  from .validation import ModelOutputError, parse_strict_json
23
23
 
24
24
  PROTOCOL_VERSION = "incremental-items-v1"
25
- SEMANTIC_PROTOCOL = "incremental-turn-v4"
25
+ SEMANTIC_PROTOCOL = "incremental-turn-v5"
26
26
  MAX_BYTES = 128 * 1024
27
27
  MAX_ITEMS = 64
28
28
  _TYPES = frozenset(("fact", "todo", "preference", "project", "event", "identity", "other"))
@@ -38,6 +38,64 @@ _BRANCHES = {
38
38
  }
39
39
 
40
40
  _CREATE_ROW_META = frozenset(("action", "evidence", "at", "effective"))
41
+ _ROW_FIELDS = frozenset(
42
+ {"action", "evidence"}.union(*(required | optional for required, optional in _BRANCHES.values()))
43
+ )
44
+
45
+
46
+ class _FieldShapeError(ValueError):
47
+ def __init__(self, detail: str):
48
+ super().__init__("invalid_fields")
49
+ self.detail = detail
50
+
51
+
52
+ def _normalize_create_fields(fields: Any) -> tuple[Any, list[str]]:
53
+ """Normalize model serialization aliases that preserve one exact meaning."""
54
+ if not isinstance(fields, dict):
55
+ return fields, []
56
+ normalized = deepcopy(fields)
57
+ warnings = []
58
+ if "scope" not in normalized and isinstance(normalized.get("scopes"), list):
59
+ scopes = normalized["scopes"]
60
+ if len(scopes) == 1 and isinstance(scopes[0], str):
61
+ normalized["scope"] = scopes[0]
62
+ normalized.pop("scopes")
63
+ warnings.append("create_single_scope_alias_normalized")
64
+ if normalized.get("validity") == "valid":
65
+ normalized.pop("validity")
66
+ warnings.append("create_default_validity_normalized")
67
+ return normalized, warnings
68
+
69
+
70
+ def _normalize_model_row(row: Any) -> tuple[Any, list[str]]:
71
+ """Remove only semantically empty branch placeholders and normalize CREATE aliases."""
72
+ if not isinstance(row, dict) or not isinstance(row.get("action"), str):
73
+ return row, []
74
+ action = row["action"].strip().upper()
75
+ if action not in _BRANCHES:
76
+ return row, []
77
+ normalized = deepcopy(row)
78
+ warnings = []
79
+ required, optional = _BRANCHES[action]
80
+ allowed = {"action", "evidence"} | required | optional
81
+ for key in sorted(_ROW_FIELDS - allowed):
82
+ if key in normalized and normalized[key] is None:
83
+ normalized.pop(key)
84
+ warnings.append("null_branch_placeholder_normalized")
85
+ if action == "CREATE":
86
+ if "memory" in normalized and normalized["memory"] is None:
87
+ normalized.pop("memory")
88
+ warnings.append("null_memory_wrapper_normalized")
89
+ if "memory" in normalized:
90
+ normalized["memory"], field_warnings = _normalize_create_fields(normalized["memory"])
91
+ warnings.extend(field_warnings)
92
+ else:
93
+ normalized, field_warnings = _normalize_create_fields(normalized)
94
+ warnings.extend(field_warnings)
95
+ normalized, flattened = _normalize_flat_create_row(normalized)
96
+ if flattened:
97
+ warnings.append("create_memory_wrapper_normalized")
98
+ return normalized, list(dict.fromkeys(warnings))
41
99
 
42
100
 
43
101
  def _normalize_flat_create_row(row: Any) -> tuple[Any, bool]:
@@ -55,8 +113,6 @@ def _normalize_flat_create_row(row: Any) -> tuple[Any, bool]:
55
113
  required = {"type", "scope", "title", "body"}
56
114
  if not required <= memory_keys:
57
115
  return row, False
58
- if set(row) - (_CREATE_ROW_META | set(_CREATE)):
59
- return row, False
60
116
  normalized = {key: deepcopy(value) for key, value in row.items() if key not in _CREATE}
61
117
  normalized["memory"] = {key: deepcopy(row[key]) for key in row if key in _CREATE}
62
118
  return normalized, True
@@ -75,9 +131,18 @@ def _text(value: Any, maximum: int = 16384, *, empty: bool = False) -> str:
75
131
  return value
76
132
 
77
133
 
78
- def _keys(value: Any, required: set[str], allowed: set[str] | frozenset[str]) -> None:
79
- if not isinstance(value, dict) or not required <= value.keys() or value.keys() - allowed:
80
- raise ValueError("invalid_fields")
134
+ def _keys(value: Any, required: set[str], allowed: set[str] | frozenset[str], *, path: str) -> None:
135
+ if not isinstance(value, dict):
136
+ raise _FieldShapeError(f"{path}:not_object")
137
+ missing = sorted(required - value.keys())
138
+ unexpected = sorted(value.keys() - allowed)
139
+ if missing or unexpected:
140
+ parts = []
141
+ if missing:
142
+ parts.append("missing=" + ",".join(missing))
143
+ if unexpected:
144
+ parts.append("unexpected=" + ",".join(unexpected))
145
+ raise _FieldShapeError(path + ":" + ";".join(parts))
81
146
 
82
147
 
83
148
  def _ref(value: Any, table: Mapping[str, Any]) -> str:
@@ -305,7 +370,7 @@ def _selected(value: Any, evidence: Mapping[str, Any], refs: list[str], *, clear
305
370
  if ref not in refs or evidence[ref]["use"] != "new":
306
371
  raise ValueError("invalid_reference")
307
372
  return {"clear": True, "anchor": source_basis(evidence[ref])}
308
- _keys(value, {"ref", "text"}, {"ref", "text"})
373
+ _keys(value, {"ref", "text"}, {"ref", "text"}, path="selected_time")
309
374
  ref = _ref(value["ref"], evidence)
310
375
  if ref not in refs:
311
376
  raise ValueError("invalid_reference")
@@ -369,7 +434,7 @@ def _parse_row(row: Any, state: Mapping[str, Any]) -> dict[str, Any]:
369
434
  required_keys = {"action"} | required
370
435
  if action != "NO_MEMORY":
371
436
  required_keys.add("evidence")
372
- _keys(row, required_keys, {"action", "evidence"} | optional)
437
+ _keys(row, required_keys, {"action", "evidence"} | optional, path="row")
373
438
  evidence = {e["ref"]: e for e in state["evidence"]}
374
439
  if action == "NO_MEMORY" and state["request_kind"] == "explicit_remember":
375
440
  raise ValueError("explicit_retention_required")
@@ -412,7 +477,8 @@ def _parse_row(row: Any, state: Mapping[str, Any]) -> dict[str, Any]:
412
477
  if action in {"CREATE", "UPDATE"}:
413
478
  fields = deepcopy(row["memory"] if action == "CREATE" else row["patch"])
414
479
  _keys(fields, {"type", "scope", "title", "body"} if action == "CREATE" else set(),
415
- _CREATE if action == "CREATE" else _PATCH)
480
+ _CREATE if action == "CREATE" else _PATCH,
481
+ path="memory" if action == "CREATE" else "patch")
416
482
  if not fields:
417
483
  raise ValueError("empty_patch")
418
484
  if action == "CREATE":
@@ -564,26 +630,30 @@ def compile_incremental(raw: str, snapshot: PlanningSnapshot) -> dict[str, Any]:
564
630
  value = parse_strict_json(raw)
565
631
  except (ModelOutputError, RecursionError) as error:
566
632
  raise ValueError("invalid_json") from error
567
- _keys(value, {"items"}, {"items"})
633
+ _keys(value, {"items"}, {"items"}, path="root")
568
634
  if not isinstance(value["items"], list) or len(value["items"]) > MAX_ITEMS:
569
635
  raise ValueError("invalid_items")
570
636
  state = snapshot.state()
571
637
  known = {e["ref"] for e in state["evidence"]}
572
638
  new = {e["ref"] for e in state["evidence"] if e["use"] == "new"}
573
639
  parsed, issues, poisoned = [], [], set()
574
- def problem(index: int | None, code: str, row: Any) -> None:
640
+ def problem(index: int | None, code: str, row: Any, detail: str | None = None) -> None:
575
641
  refs = row.get("evidence", []) if isinstance(row, dict) else []
576
642
  refs = [r.strip() for r in refs if isinstance(r, str) and r.strip() in known] if isinstance(refs, list) else []
577
- issues.append({"row": index, "code": code, "evidence": list(dict.fromkeys(refs))})
643
+ issue = {"row": index, "code": code, "evidence": list(dict.fromkeys(refs))}
644
+ if detail:
645
+ issue["detail"] = detail
646
+ issues.append(issue)
578
647
  for index, row in enumerate(value["items"]):
579
648
  try:
580
- normalized_row, normalized = _normalize_flat_create_row(row)
649
+ normalized_row, warnings = _normalize_model_row(row)
581
650
  parsed_row = _parse_row(normalized_row, state)
582
- if normalized:
583
- parsed_row.setdefault("warnings", []).append("create_memory_wrapper_normalized")
651
+ if warnings:
652
+ parsed_row.setdefault("warnings", []).extend(warnings)
584
653
  parsed.append((index, parsed_row))
585
654
  except (ValueError, TypeError) as error:
586
- problem(index, str(error) if isinstance(error, ValueError) else "invalid_fields", row)
655
+ problem(index, str(error) if isinstance(error, ValueError) else "invalid_fields", row,
656
+ getattr(error, "detail", None))
587
657
  if isinstance(row, dict) and isinstance(row.get("target"), str) and row["target"].strip() in state["targets"]:
588
658
  poisoned.add(row["target"].strip())
589
659
  groups: dict[str, list[tuple[int, dict[str, Any]]]] = defaultdict(list)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: memleaf
3
- Version: 0.2.68
3
+ Version: 0.2.70
4
4
  Summary: A local-first Markdown memory core for AI agents
5
5
  Author: memleaf contributors
6
6
  License-Expression: MIT
@@ -23,7 +23,7 @@ Dynamic: license-file
23
23
 
24
24
  [English](README.en.md) · [PyPI](https://pypi.org/project/memleaf/) · [GitHub](https://github.com/miffyblueboo/memleaf)
25
25
 
26
- > **版本:0.2.65。**
26
+ > **版本:0.2.70。**
27
27
  > 自动提炼和复核共用同一条“未来记忆价值”标准:模型综合未来复用、信息增量、再次读取时的直接可用性和忘记成本,只保留对未来理解、判断或行动有实质影响的最小核心;没有明确价值的信息不提炼,不按具体业务场景硬编码排除。
28
28
  > 提炼契约现在只有一份中文语义契约(旧版英文 B3 提示词已删除),首轮、主题选择、候选修复和 `semantic_maintenance` 使用同一套保留价值判断;同一件事只写一次。
29
29
  > Core 不再因为归属、日期、任务依据或跨项目而丢弃整条候选:归属缺失会归一到证据里唯一被点名的项目、否则落 `global`;日期只接受能在本候选证据里找到出处、且能锚定成 ISO 的写法(`明天`、`周五`、`月底` 都会被解析),无法解析时只丢掉日期字段,记忆照常写入;未获授权的改归属沿用目标原归属。
@@ -168,70 +168,4 @@ src/memleaf/llm/claude_compatible.py
168
168
  src/memleaf/llm/gemini.py
169
169
  src/memleaf/llm/openai_compatible.py
170
170
  src/memleaf/llm/router.py
171
- src/memleaf/llm/thinking.py
172
- tests_public/acceptance_oracles.py
173
- tests_public/candidate_update_fixtures.py
174
- tests_public/incremental_test_support.py
175
- tests_public/platform_smoke.py
176
- tests_public/release_assets.py
177
- tests_public/run_contracts.py
178
- tests_public/test_a083_regressions.py
179
- tests_public/test_a47_regressions.py
180
- tests_public/test_acceptance.py
181
- tests_public/test_acceptance_boundaries.py
182
- tests_public/test_artifact_verification.py
183
- tests_public/test_body_compaction.py
184
- tests_public/test_candidate_reconciliation.py
185
- tests_public/test_contract_reporter.py
186
- tests_public/test_control_absence_contract.py
187
- tests_public/test_create_memory_contract.py
188
- tests_public/test_development_closeout.py
189
- tests_public/test_explicit_memory_update.py
190
- tests_public/test_explicit_update_contract.py
191
- tests_public/test_g1_memory_contract.py
192
- tests_public/test_g2_source_contract.py
193
- tests_public/test_hermes_native_provision.py
194
- tests_public/test_hermes_source_metadata.py
195
- tests_public/test_incremental_commit.py
196
- tests_public/test_incremental_configured_runtime.py
197
- tests_public/test_incremental_dates.py
198
- tests_public/test_incremental_execution.py
199
- tests_public/test_incremental_execution_recovery.py
200
- tests_public/test_incremental_native.py
201
- tests_public/test_incremental_partial.py
202
- tests_public/test_incremental_partial_boundaries.py
203
- tests_public/test_incremental_partial_recovery.py
204
- tests_public/test_incremental_preview.py
205
- tests_public/test_incremental_protocol.py
206
- tests_public/test_incremental_recovery.py
207
- tests_public/test_incremental_remember.py
208
- tests_public/test_incremental_remember_recovery.py
209
- tests_public/test_incremental_scope_recovery.py
210
- tests_public/test_incremental_scopes.py
211
- tests_public/test_inspection_read_budget.py
212
- tests_public/test_mcp_retrieval_fallback.py
213
- tests_public/test_migration_backup.py
214
- tests_public/test_migration_runtime.py
215
- tests_public/test_native_read_stability.py
216
- tests_public/test_planner_provenance_contract.py
217
- tests_public/test_platform_contracts.py
218
- tests_public/test_processed_state_contract.py
219
- tests_public/test_processing_entrypoints.py
220
- tests_public/test_processing_route.py
221
- tests_public/test_processing_route_recovery.py
222
- tests_public/test_provider_compatibility.py
223
- tests_public/test_public_query_integrity.py
224
- tests_public/test_query_benchmark.py
225
- tests_public/test_query_clock.py
226
- tests_public/test_query_progress.py
227
- tests_public/test_query_scan_reuse.py
228
- tests_public/test_release_assets.py
229
- tests_public/test_remember_route.py
230
- tests_public/test_remember_route_recovery.py
231
- tests_public/test_revision_target_integrity.py
232
- tests_public/test_runtime_retention.py
233
- tests_public/test_runtime_retention_observation.py
234
- tests_public/test_runtime_retention_recovery.py
235
- tests_public/test_source_followup_contract.py
236
- tests_public/test_vault_binding_contract.py
237
- tests_public/verify_distribution.py
171
+ src/memleaf/llm/thinking.py
@@ -1,131 +0,0 @@
1
- # Installed artifact and native-platform verification (G5c)
2
-
3
- This is a deterministic CI gate, not a new runtime subsystem or live-model
4
- acceptance. It follows FS183, FS185-194 and the installation/process portions
5
- of E10/E17/E19. Existing extraction defaults, prompts, budgets, public interfaces
6
- and package version are unchanged. Running these checks does not install a real
7
- Hermes host, read a production Vault, create a release or authorize migration.
8
-
9
- ## Build once, test the same distribution bytes
10
-
11
- The build job runs the complete public source suite and records the discovered
12
- case inventory. It builds one wheel and one sdist, verifies that **all** packaged
13
- Memleaf files match (including the Provider resources), and creates a manifest
14
- binding artifact sizes/hashes, test assets, inventory and the current commit.
15
- Verification inputs (manifest and test-only dependencies) use a separate
16
- artifact; `memleaf-distributions` continues to contain only the release wheel
17
- and sdist, so downstream PyPI publishing cannot ingest test data. The build job
18
- exposes the manifest hash separately as a job output. A verification
19
- job must match that hash and commit before installing the downloaded artifacts.
20
- This catches accidental cross-run/mixed artifacts; it is not a signed supply-chain
21
- attestation against replacement of the workflow and its own evidence together.
22
-
23
- `verify-artifacts` covers five cells:
24
-
25
- | Native runner | Python |
26
- |---|---|
27
- | Ubuntu | 3.11, 3.12, 3.13 |
28
- | Windows | 3.12 |
29
- | macOS | 3.12 |
30
-
31
- This is not a full OS/Python/architecture Cartesian matrix. Every cell downloads
32
- the same build artifact. The sdist is rebuilt locally on that runner, and the
33
- resulting Memleaf payload must equal the original wheel before it is tested.
34
- Archive timestamps and packaging metadata may differ; implementation/resource
35
- bytes must not. Neither cell rebuilds from a different checkout and calls that
36
- the originally tested binary.
37
-
38
- Each cell creates **two fresh virtual environments**, one for the original wheel
39
- and one for the sdist-built wheel. Only public test assets and examples are copied
40
- to a separate temporary workspace. The extracted source directory is removed
41
- before either suite runs. The test Python uses isolated mode; inherited
42
- `PYTHONPATH`, Python home settings and product/model configuration variables are
43
- removed. Child crash/restart tests use that environment's Python too.
44
-
45
- Before and after discovery/execution the reporter verifies that `memleaf` and
46
- its loaded submodules come from that environment's site-packages. It compares
47
- installed test IDs and count to the source-job inventory, fails on empty/missing
48
- cases, errors, failures, skips or expected failures, and verifies installed
49
- package bytes after execution. It does not report success just because a help
50
- command returned zero, or because a source-tree import masked a broken install.
51
-
52
- ## Reuse existing contracts; add native-process evidence
53
-
54
- The existing complete public suite remains the main acceptance surface. Added
55
- focused checks exercise Unicode/spaces in Vault paths, exact UTF-8 and LF/CRLF
56
- file handling, real process lock contention, OS process-exit lock release,
57
- case-insensitive identity collisions and missing timezone data. These checks do
58
- not patch `os.name` to pretend Linux is Windows.
59
-
60
- The installed smoke check starts the actual generated `memleaf-mcp` executable
61
- through byte pipes twice and uses the packaged Hermes MCP client for a
62
- `scope_catalog -> search -> read` exchange. It overrides the child environment to
63
- `PYTHONUTF8=0` and `PYTHONIOENCODING=cp1252`; the MCP transport must still exchange
64
- UTF-8, including Chinese and emoji. Both actual console scripts also run directly.
65
-
66
- Hermes' two base-interface classes are stubbed solely to load the bundled client.
67
- Transport, executable, process boundary and Vault operations are real; a running
68
- Hermes installation, Provider registration, installed-host lifecycle and user
69
- configuration are **not** tested by this stub. The report leaves installed
70
- Hermes/live semantic acceptance `not_run` and `switch_authorized=false`.
71
-
72
- The suite's old POSIX-only exclusion for one symlink test is removed. Hosted
73
- runners must support the filesystem primitives under test. Capability failures or
74
- other skips make the gate fail rather than becoming a green reduced suite. A
75
- separate native setup issue can then be diagnosed explicitly; assertions must
76
- not be disabled merely to obtain a green matrix.
77
-
78
- ## Encoding and timezone fixtures
79
-
80
- The general test runner explicitly enables UTF-8 for test-file I/O on all
81
- platforms; historical tests contain Unicode fixtures. That harness setting is
82
- not evidence that a user terminal has UTF-8 enabled. The separate stdio tests
83
- intentionally disable it, so protocol correctness does not depend on the harness.
84
-
85
- Windows does not necessarily have an IANA zoneinfo database. The build job obtains
86
- `tzdata` as a **test-only wheel**, hashes it in the same manifest, and verification
87
- jobs install only that bound wheel offline into the disposable test environments.
88
- Memleaf runtime dependencies and its behavior when timezone data is unavailable
89
- remain unchanged. No dependency is silently installed into a user's environment.
90
- The negative missing-zone test still checks explicit failure and UTC fallback.
91
- Build tools and runners can evolve; reports retain Python/OS/architecture and
92
- artifact hashes, not a claim of hermetic or bit-reproducible build infrastructure.
93
-
94
- ## Reports, failure and release dependency
95
-
96
- The source report and each cell's stage JSON/logs are uploaded separately. Reports
97
- include actual test count and skips, test-inventory hash, package import root,
98
- Python/OS/architecture, durations and the candidate manifest. An interrupted or
99
- failed command fails the job; available earlier-stage reports remain available.
100
- A wheel pass followed by an sdist failure is not a platform pass. `fail-fast:false`
101
- allows other cells to finish without hiding their results; it does not relax the
102
- aggregate dependency.
103
-
104
- The existing release job now requires **build and all installed-artifact cells**.
105
- Existing release conditions and explicit `release: v...` authorization remain.
106
- Ordinary development commits do not create tags, GitHub Releases or PyPI uploads.
107
- This change only adds a deterministic prerequisite; it cannot replace live Flash,
108
- held-out multi-turn review, real host testing, backup/Forget checks or operator
109
- switch authorization. Until a commit's matrix has actually run, its native
110
- platform results are `not_run`, not inferred from a written workflow.
111
-
112
- ## Local reproduction
113
-
114
- From a clean candidate source directory, with its declared build backend available:
115
-
116
- ```sh
117
- python -I -X utf8 tests_public/run_contracts.py --tests tests_public --source-root src --report source-results.json
118
- python -m build --wheel --sdist
119
- python -m pip download --only-binary=:all: --no-deps --dest dist/test-dependencies tzdata
120
- python tests_public/verify_distribution.py manifest --dist dist --source-report source-results.json --commit <candidate-sha>
121
- python tests_public/verify_distribution.py verify --dist dist --output <new-output-directory> --commit <candidate-sha> --manifest-sha256 <printed-manifest-sha256>
122
- ```
123
-
124
- `build`/setuptools are developer tools. The verifier itself uses the standard
125
- library and the explicitly installed backend for the sdist build. It never
126
- implicitly fetches a model or a package at runtime: artifact installations use
127
- `--no-index --no-deps`. On a machine with system IANA data, a local manifest may
128
- omit the test dependency; record that difference rather than claiming the local
129
- run used CI's identical dependency set. Existing output is refused. Reports and
130
- logs here contain synthetic test data only; real-model trace packages follow the
131
- separate private acceptance contract and must not be uploaded by this job.