cc-transcript 14.45.34__tar.gz → 14.45.36__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 (242) hide show
  1. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/PKG-INFO +1 -1
  2. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/pyproject.toml +1 -1
  3. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot.rs +44 -12
  4. cc_transcript-14.45.36/rust/crates/core/src/snapshot_graph_anchor_tests.rs +208 -0
  5. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_prepared_service.rs +5 -4
  6. cc_transcript-14.45.36/rust/crates/core/src/snapshot_publication_shared_admission_tests.rs +274 -0
  7. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/Cargo.lock +0 -0
  8. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/Cargo.toml +0 -0
  9. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/LICENSE +0 -0
  10. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/README.md +0 -0
  11. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/__init__.py +0 -0
  12. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/__init__.pyi +0 -0
  13. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/_native.pyi +0 -0
  14. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/activity.py +0 -0
  15. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/activity_probe.py +0 -0
  16. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/builders.py +0 -0
  17. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/codex.py +0 -0
  18. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/command.py +0 -0
  19. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/context.py +0 -0
  20. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/corrections.py +0 -0
  21. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/cost.py +0 -0
  22. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/decision_store.py +0 -0
  23. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/decisions.py +0 -0
  24. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/discovery.py +0 -0
  25. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/disktruth.py +0 -0
  26. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/evidence.py +0 -0
  27. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/extract/__init__.py +0 -0
  28. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/extract/correct.py +0 -0
  29. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/facts.py +0 -0
  30. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/filterspec.py +0 -0
  31. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/heartbeats.py +0 -0
  32. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/ids.py +0 -0
  33. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/judge/__init__.py +0 -0
  34. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/judge/llm.py +0 -0
  35. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/judge/similar.py +0 -0
  36. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/judge/verdicts.py +0 -0
  37. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/ledger.py +0 -0
  38. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/literals.py +0 -0
  39. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/mining/__init__.py +0 -0
  40. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/mining/candidates.py +0 -0
  41. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/mining/confidence.py +0 -0
  42. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/mining/engine.py +0 -0
  43. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/mining/formats.py +0 -0
  44. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/mining/sampling.py +0 -0
  45. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/mining/signals.py +0 -0
  46. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/mining/sourcekind.py +0 -0
  47. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/mining/spec.py +0 -0
  48. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/mining/store.py +0 -0
  49. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/models.py +0 -0
  50. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/nlp.py +0 -0
  51. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/notifications.py +0 -0
  52. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/parser.py +0 -0
  53. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/py.typed +0 -0
  54. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/query.py +0 -0
  55. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/render.py +0 -0
  56. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/sentiment/__init__.py +0 -0
  57. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/sentiment/buckets.py +0 -0
  58. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/sentiment/data/afinn-en-165.tsv +0 -0
  59. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/sentiment/data/domain_overrides.tsv +0 -0
  60. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/sentiment/data/en-ewt.udpipe +0 -0
  61. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/sentiment/engine.py +0 -0
  62. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/sentiment/lexicon.py +0 -0
  63. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/sentiment/scorespec.py +0 -0
  64. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/snapshot_schema/config.schema.json +0 -0
  65. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/snapshot_schema/context.schema.json +0 -0
  66. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/snapshot_schema/request.schema.json +0 -0
  67. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/snapshot_schema/response.schema.json +0 -0
  68. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/snapshot_schema/tool_registry.schema.json +0 -0
  69. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/snapshots.py +0 -0
  70. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/synthetic.py +0 -0
  71. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/tools.py +0 -0
  72. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/cc_transcript/watch.py +0 -0
  73. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/Cargo.toml +0 -0
  74. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/blame.rs +0 -0
  75. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/corpus.rs +0 -0
  76. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/corrections.rs +0 -0
  77. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/digest.rs +0 -0
  78. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/facts.rs +0 -0
  79. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/grep.rs +0 -0
  80. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/list.rs +0 -0
  81. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/mod.rs +0 -0
  82. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/scratchpad.rs +0 -0
  83. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/show.rs +0 -0
  84. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/slice.rs +0 -0
  85. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/stats.rs +0 -0
  86. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/commands/watch.rs +0 -0
  87. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/lib.rs +0 -0
  88. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/output.rs +0 -0
  89. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/target.rs +0 -0
  90. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/cli/src/timearg.rs +0 -0
  91. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/Cargo.toml +0 -0
  92. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/benches/parse.rs +0 -0
  93. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/benches/render.rs +0 -0
  94. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/benches/toolcall.rs +0 -0
  95. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/build.rs +0 -0
  96. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/activity.rs +0 -0
  97. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/actor.rs +0 -0
  98. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/blame.rs +0 -0
  99. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/buckets.rs +0 -0
  100. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/codex/discovery.rs +0 -0
  101. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/codex/lower.rs +0 -0
  102. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/codex/mod.rs +0 -0
  103. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/codex/parse.rs +0 -0
  104. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/codex/probe.rs +0 -0
  105. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/codex/protocol.rs +0 -0
  106. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/codex/types.rs +0 -0
  107. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/command.rs +0 -0
  108. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/context.rs +0 -0
  109. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/corrections.rs +0 -0
  110. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/cost.rs +0 -0
  111. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/discovery.rs +0 -0
  112. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/facts.rs +0 -0
  113. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/feedback.rs +0 -0
  114. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/filter.rs +0 -0
  115. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/gateway.rs +0 -0
  116. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/ids.rs +0 -0
  117. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/judge.rs +0 -0
  118. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/lib.rs +0 -0
  119. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/literals/command.rs +0 -0
  120. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/literals/corrections.rs +0 -0
  121. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/literals/feedback.rs +0 -0
  122. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/literals/mining.rs +0 -0
  123. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/literals/mod.rs +0 -0
  124. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/literals/protocol.rs +0 -0
  125. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/notifications.rs +0 -0
  126. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/parse.rs +0 -0
  127. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/protocol.rs +0 -0
  128. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/pystr.rs +0 -0
  129. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/query.rs +0 -0
  130. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/render.rs +0 -0
  131. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/request_body.rs +0 -0
  132. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/rng.rs +0 -0
  133. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/scan.rs +0 -0
  134. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/scan_checkpoint.rs +0 -0
  135. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/scan_grep.rs +0 -0
  136. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/scan_grep_stream.rs +0 -0
  137. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/scan_grep_stream_tests.rs +0 -0
  138. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/scan_index.rs +0 -0
  139. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/scan_projection.rs +0 -0
  140. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/scan_regressions.rs +0 -0
  141. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/scan_stream.rs +0 -0
  142. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/schema.rs +0 -0
  143. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_activity.rs +0 -0
  144. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_admission_report_tests.rs +0 -0
  145. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_cache.rs +0 -0
  146. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_cache_tests.rs +0 -0
  147. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_catalog.rs +0 -0
  148. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_catalog_owner.rs +0 -0
  149. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_catalog_tests.rs +0 -0
  150. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_codec.rs +0 -0
  151. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_codex_append.rs +0 -0
  152. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_common_borrowed_parent_tests.rs +0 -0
  153. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_compact_codex.rs +0 -0
  154. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_compact_codex_tests.rs +0 -0
  155. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_direct_tail.rs +0 -0
  156. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_direct_tail_tests.rs +0 -0
  157. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_graph_validation_tests.rs +0 -0
  158. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_hydrate_budget_tests.rs +0 -0
  159. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_hydration_observations.rs +0 -0
  160. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_interaction_api.rs +0 -0
  161. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_interaction_api_tests.rs +0 -0
  162. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_interactions.rs +0 -0
  163. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_interactions_tests.rs +0 -0
  164. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_labels.rs +0 -0
  165. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_ledger.rs +0 -0
  166. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_ledger_tests.rs +0 -0
  167. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_load_charge_audit_tests.rs +0 -0
  168. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_load_charge_work_tests.rs +0 -0
  169. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_membership_progress.rs +0 -0
  170. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_membership_progress_controls.rs +0 -0
  171. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_membership_progress_tests.rs +0 -0
  172. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_memory.rs +0 -0
  173. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_owned.rs +0 -0
  174. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_prepared.rs +0 -0
  175. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_prepared_disk.rs +0 -0
  176. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_projection.rs +0 -0
  177. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_query_hydration_tests.rs +0 -0
  178. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_raw_materialization.rs +0 -0
  179. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_raw_projection.rs +0 -0
  180. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_raw_projection_tests.rs +0 -0
  181. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_raw_scope.rs +0 -0
  182. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_raw_scope_tests.rs +0 -0
  183. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_raw_tail_tests.rs +0 -0
  184. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_raw_window.rs +0 -0
  185. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_regressions.rs +0 -0
  186. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_root_warm.rs +0 -0
  187. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_sidechain_absence.rs +0 -0
  188. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_sidechain_absence_tests.rs +0 -0
  189. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_skill_demand_controls.rs +0 -0
  190. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_skill_demand_tests.rs +0 -0
  191. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_skill_framing.rs +0 -0
  192. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_skills.rs +0 -0
  193. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_source_cache_index_tests.rs +0 -0
  194. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_spine.rs +0 -0
  195. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_spine_tests.rs +0 -0
  196. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_symlink_proof.rs +0 -0
  197. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/snapshot_text.rs +0 -0
  198. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/sqlite.rs +0 -0
  199. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/toolcall.rs +0 -0
  200. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/types.rs +0 -0
  201. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/value.rs +0 -0
  202. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/src/watch.rs +0 -0
  203. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/tests/sonic_arena_model.rs +0 -0
  204. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/core/tests/std_allocation_model.rs +0 -0
  205. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/Cargo.toml +0 -0
  206. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/build.rs +0 -0
  207. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/data/command_prefix_pins.tsv +0 -0
  208. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/actor_bridge.rs +0 -0
  209. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/bin/stub_gen.rs +0 -0
  210. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/codex.rs +0 -0
  211. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/command.rs +0 -0
  212. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/context.rs +0 -0
  213. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/corrections.rs +0 -0
  214. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/discovery.rs +0 -0
  215. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/feedback.rs +0 -0
  216. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/judge.rs +0 -0
  217. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/lexicon.rs +0 -0
  218. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/lib.rs +0 -0
  219. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/mining.rs +0 -0
  220. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/nlp.rs +0 -0
  221. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/python.rs +0 -0
  222. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/render.rs +0 -0
  223. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/score.rs +0 -0
  224. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/snapshot_decode.rs +0 -0
  225. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/snapshots.rs +0 -0
  226. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/sqlite.rs +0 -0
  227. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/toolcall.rs +0 -0
  228. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/attachment.rs +0 -0
  229. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/blocks.rs +0 -0
  230. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/command.rs +0 -0
  231. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/convert.rs +0 -0
  232. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/dunder.rs +0 -0
  233. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/events.rs +0 -0
  234. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/meta.rs +0 -0
  235. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/mod.rs +0 -0
  236. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/print.rs +0 -0
  237. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/store.rs +0 -0
  238. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/system.rs +0 -0
  239. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/toolcall.rs +0 -0
  240. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/toolresult.rs +0 -0
  241. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/views/transcript.rs +0 -0
  242. {cc_transcript-14.45.34 → cc_transcript-14.45.36}/rust/crates/py/src/watch.rs +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cc-transcript
3
- Version: 14.45.34
3
+ Version: 14.45.36
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: Environment :: Console
6
6
  Classifier: Intended Audience :: Developers
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "cc-transcript"
3
- version = "14.45.34" # informational — releases stamp the version from the git tag
3
+ version = "14.45.36" # informational — releases stamp the version from the git tag
4
4
  description = "Grep every Claude Code session you've ever run."
5
5
  readme = "README.md"
6
6
  license = "PolyForm-Noncommercial-1.0.0"
@@ -2034,13 +2034,33 @@ impl Charge<String> for Arc<Mutex<PreparedGraph>> {
2034
2034
  }
2035
2035
 
2036
2036
  impl PreparedGraph {
2037
- fn anchors(&self) -> impl Iterator<Item = Anchor> + '_ {
2037
+ fn input_anchors(&self) -> [Anchor; 3] {
2038
+ #[cfg(test)]
2039
+ tests::record_prepared_graph_input_anchors(self.sources.len(), self.sidechain_dirs.len());
2040
+ [
2041
+ graph_header_anchor(&self.header),
2042
+ sources_anchor(&self.sources),
2043
+ sidechain_dirs_anchor(&self.sidechain_dirs),
2044
+ ]
2045
+ }
2046
+
2047
+ fn anchors_with(&self, inputs: [Anchor; 3]) -> impl Iterator<Item = Anchor> + '_ {
2038
2048
  std::iter::once(facts_anchor(&self.root_facts))
2039
2049
  .chain(self.root_slices.values().map(facts_anchor))
2050
+ .chain(inputs)
2051
+ }
2052
+
2053
+ fn anchors(&self) -> impl Iterator<Item = Anchor> + '_ {
2054
+ self.anchors_with(self.input_anchors())
2055
+ }
2056
+
2057
+ fn anchor_ids(&self) -> impl Iterator<Item = usize> + '_ {
2058
+ std::iter::once(facts_key(&self.root_facts))
2059
+ .chain(self.root_slices.values().map(facts_key))
2040
2060
  .chain([
2041
- graph_header_anchor(&self.header),
2042
- sources_anchor(&self.sources),
2043
- sidechain_dirs_anchor(&self.sidechain_dirs),
2061
+ Arc::as_ptr(&self.header) as usize,
2062
+ slice_key(&self.sources),
2063
+ slice_key(&self.sidechain_dirs),
2044
2064
  ])
2045
2065
  }
2046
2066
  }
@@ -3226,11 +3246,16 @@ impl StoreState {
3226
3246
  }
3227
3247
  }
3228
3248
 
3229
- fn insert_prepared_graph(&mut self, graph_id: String, graph: Arc<Mutex<PreparedGraph>>) {
3249
+ fn insert_prepared_graph(
3250
+ &mut self,
3251
+ graph_id: String,
3252
+ graph: Arc<Mutex<PreparedGraph>>,
3253
+ inputs: [Anchor; 3],
3254
+ ) {
3230
3255
  self.prepared_graphs.reserve_for(&graph_id);
3231
3256
  let prepared = graph.lock().expect("prepared graph");
3232
- self.ledger.shared.reserve(prepared.anchors());
3233
- for anchor in prepared.anchors() {
3257
+ self.ledger.shared.reserve(prepared.anchors_with(inputs));
3258
+ for anchor in prepared.anchors_with(inputs) {
3234
3259
  self.ledger.shared.acquire(anchor);
3235
3260
  }
3236
3261
  drop(prepared);
@@ -3240,8 +3265,8 @@ impl StoreState {
3240
3265
  }
3241
3266
 
3242
3267
  fn release_prepared_graph(&mut self, graph: &Mutex<PreparedGraph>) {
3243
- for anchor in graph.lock().expect("prepared graph").anchors() {
3244
- self.ledger.shared.release(anchor.id);
3268
+ for identity in graph.lock().expect("prepared graph").anchor_ids() {
3269
+ self.ledger.shared.release(identity);
3245
3270
  }
3246
3271
  }
3247
3272
 
@@ -8664,9 +8689,14 @@ impl NativeStore {
8664
8689
  let pledge = pledge.map(|(token, bytes)| (token, bytes + state.leases.growth(1)));
8665
8690
  let additional = generation.as_ref().map_or(0, |(snapshot, record)| {
8666
8691
  let key = snapshot_key(snapshot);
8667
- state.admission(&key, record, record.anchors())
8668
- + state.generations.growth_for(&key)
8669
- + state.escape_growth(&snapshot.chunks)
8692
+ state.admission(
8693
+ &key,
8694
+ record,
8695
+ record.anchors().chain(state.escaping(&snapshot.chunks)),
8696
+ ) + state.generations.growth_for(&key)
8697
+ + state
8698
+ .escaped_chunks
8699
+ .growth(state.escaping(&snapshot.chunks).count())
8670
8700
  }) + pledge.as_ref().map_or(0, |(_, bytes)| *bytes)
8671
8701
  + pending_charge;
8672
8702
  match self.admit_memory(
@@ -12376,6 +12406,7 @@ mod tests {
12376
12406
  include!("snapshot_membership_progress_controls.rs");
12377
12407
  include!("snapshot_sidechain_absence_tests.rs");
12378
12408
  include!("snapshot_common_borrowed_parent_tests.rs");
12409
+ include!("snapshot_graph_anchor_tests.rs");
12379
12410
 
12380
12411
  fn context(claimant: &str) -> Value {
12381
12412
  json!({"claimant":claimant,"admission":"hook","authority":{"kind":"user","effective_uid":unsafe { libc::geteuid() }.to_string()},"registry_generation":crate::toolcall::ToolRegistrySnapshot::from_specs(HashMap::new()).fingerprint()})
@@ -22483,4 +22514,5 @@ mod tests {
22483
22514
 
22484
22515
  include!("snapshot_load_charge_work_tests.rs");
22485
22516
  include!("snapshot_load_charge_audit_tests.rs");
22517
+ include!("snapshot_publication_shared_admission_tests.rs");
22486
22518
  }
@@ -0,0 +1,208 @@
1
+ #[derive(Clone, Copy, Debug, Default)]
2
+ struct PreparedGraphAnchorCost {
3
+ calls: usize,
4
+ fields: usize,
5
+ state_held: usize,
6
+ }
7
+
8
+ struct PreparedGraphAnchorTrace {
9
+ store: Arc<NativeStore>,
10
+ cost: PreparedGraphAnchorCost,
11
+ }
12
+
13
+ std::thread_local! {
14
+ static PREPARED_GRAPH_ANCHOR_TRACE: std::cell::RefCell<Option<PreparedGraphAnchorTrace>> = const { std::cell::RefCell::new(None) };
15
+ }
16
+
17
+ struct PreparedGraphAnchorRecording;
18
+
19
+ impl PreparedGraphAnchorRecording {
20
+ fn start(store: Arc<NativeStore>) -> Self {
21
+ PREPARED_GRAPH_ANCHOR_TRACE.with(|slot| {
22
+ assert!(slot.borrow().is_none());
23
+ *slot.borrow_mut() = Some(PreparedGraphAnchorTrace {
24
+ store,
25
+ cost: PreparedGraphAnchorCost::default(),
26
+ });
27
+ });
28
+ Self
29
+ }
30
+
31
+ fn finish(self) -> PreparedGraphAnchorCost {
32
+ PREPARED_GRAPH_ANCHOR_TRACE.with(|slot| slot.borrow_mut().take().unwrap().cost)
33
+ }
34
+ }
35
+
36
+ impl Drop for PreparedGraphAnchorRecording {
37
+ fn drop(&mut self) {
38
+ PREPARED_GRAPH_ANCHOR_TRACE.with(|slot| {
39
+ slot.borrow_mut().take();
40
+ });
41
+ }
42
+ }
43
+
44
+ pub(super) fn record_prepared_graph_input_anchors(sources: usize, directories: usize) {
45
+ PREPARED_GRAPH_ANCHOR_TRACE.with(|slot| {
46
+ if let Some(trace) = slot.borrow_mut().as_mut() {
47
+ trace.cost.calls += 1;
48
+ trace.cost.fields += sources + directories;
49
+ trace.cost.state_held += usize::from(trace.store.state.try_lock().is_err());
50
+ }
51
+ });
52
+ }
53
+
54
+ fn prepared_graph_anchor_cost_case(count: usize) -> (PreparedGraphAnchorCost, PreparedGraphAnchorCost) {
55
+ let source = Source::new(&format!("{}\n", user("anchor-root")));
56
+ let paths: Vec<_> = (0..count)
57
+ .map(|index| {
58
+ let path = source.directory.join(format!("member-{index:04}.jsonl"));
59
+ std::fs::write(&path, format!("{}\n", user(&format!("anchor-{index}")))).unwrap();
60
+ path.to_string_lossy().into_owned()
61
+ })
62
+ .collect();
63
+ let store = Arc::new(store());
64
+ let owner = context("anchor-cost");
65
+ let root = finish(
66
+ &store,
67
+ store.request(&acquire(&source.path), &owner, &Cancellation::default()),
68
+ &owner,
69
+ );
70
+ let mut request = prepare_request(&root);
71
+ request["direct_paths"] = json!(paths);
72
+ request["limits"]["max_sources"] = json!(count + 1);
73
+ let recording = PreparedGraphAnchorRecording::start(Arc::clone(&store));
74
+ let prepared = finish_prepared(
75
+ &store,
76
+ store.request(&request, &owner, &Cancellation::default()),
77
+ &owner,
78
+ );
79
+ let publication = recording.finish();
80
+ assert_eq!(prepared["status"].as_str(), Some("ok"), "{prepared:?}");
81
+ {
82
+ let state = store.lock_state();
83
+ let graph = state.prepared_graphs[prepared["data"]["handle"]["graph_id"].as_str().unwrap()]
84
+ .lock()
85
+ .unwrap();
86
+ assert_eq!(graph.sources.len(), count);
87
+ assert_eq!(graph.sidechain_dirs.len(), count + 1);
88
+ }
89
+ let recording = PreparedGraphAnchorRecording::start(Arc::clone(&store));
90
+ release_graph(&store, &prepared, &owner);
91
+ let release = recording.finish();
92
+ store.assert_conserved();
93
+ eprintln!(
94
+ "PREPARED_GRAPH_ANCHOR_COST sources={count} directories={} publication_calls={} publication_fields={} publication_state_held={} release_calls={} release_fields={} release_state_held={}",
95
+ count + 1,
96
+ publication.calls,
97
+ publication.fields,
98
+ publication.state_held,
99
+ release.calls,
100
+ release.fields,
101
+ release.state_held,
102
+ );
103
+ (publication, release)
104
+ }
105
+
106
+ fn assert_prepared_graph_anchor_cost(count: usize) {
107
+ let (publication, release) = prepared_graph_anchor_cost_case(count);
108
+ assert_eq!(
109
+ publication.calls + release.calls,
110
+ 1,
111
+ "prepared graph repeats immutable roster byte accounting"
112
+ );
113
+ assert_eq!(publication.fields, count + count + 1);
114
+ assert_eq!(release.fields, 0);
115
+ }
116
+
117
+ #[test]
118
+ fn prepared_graph_anchor_cost_zero() {
119
+ assert_prepared_graph_anchor_cost(0);
120
+ }
121
+
122
+ #[test]
123
+ fn prepared_graph_anchor_cost_small() {
124
+ assert_prepared_graph_anchor_cost(32);
125
+ }
126
+
127
+ #[test]
128
+ fn prepared_graph_anchor_cost_923() {
129
+ assert_prepared_graph_anchor_cost(923);
130
+ }
131
+
132
+ #[test]
133
+ fn prepared_graph_anchor_walks_do_not_hold_shared_state() {
134
+ let (publication, release) = prepared_graph_anchor_cost_case(923);
135
+ assert_eq!(
136
+ publication.state_held + release.state_held,
137
+ 0,
138
+ "prepared graph counts roster bytes under shared state"
139
+ );
140
+ }
141
+
142
+ #[test]
143
+ fn prepared_graph_anchor_owners_preserve_slice_aliases() {
144
+ let source = Source::new(&format!("{}\n", user("anchor-alias-root")));
145
+ let store = store();
146
+ let owner = context("anchor-alias");
147
+ let root = finish(
148
+ &store,
149
+ store.request(&acquire(&source.path), &owner, &Cancellation::default()),
150
+ &owner,
151
+ );
152
+ let prepared = finish_prepared(
153
+ &store,
154
+ store.request(&prepare_request(&root), &owner, &Cancellation::default()),
155
+ &owner,
156
+ );
157
+ assert_eq!(prepared["status"].as_str(), Some("ok"), "{prepared:?}");
158
+ let graph_id = prepared["data"]["handle"]["graph_id"].as_str().unwrap().to_owned();
159
+ let graph = store.lock_state().remove_prepared_graph(&graph_id).unwrap();
160
+ let Ok(graph) = Arc::try_unwrap(graph) else {
161
+ panic!("prepared graph has another owner");
162
+ };
163
+ let Ok(mut graph) = graph.into_inner() else {
164
+ panic!("prepared graph is poisoned");
165
+ };
166
+ for name in ["alias-one", "alias-two"] {
167
+ let key = name.to_owned();
168
+ graph.root_slices.reserve_for(&key);
169
+ graph.root_slices.insert(key, Arc::clone(&graph.root_facts));
170
+ }
171
+ let root_identity = facts_key(&graph.root_facts);
172
+ let root_bytes = graph.root_facts.accounted_bytes();
173
+ let root_weak = Arc::downgrade(&graph.root_facts);
174
+ assert_eq!(graph.anchors().filter(|anchor| anchor.id == root_identity).count(), 3);
175
+ let revision = graph.revision.clone();
176
+ let bytes = {
177
+ let state = store.lock_state();
178
+ charged_bytes(&graph_id, &graph)
179
+ + state.ledger.shared.unowned_bytes(graph.anchors())
180
+ + state.ledger.shared.growth(graph.anchors())
181
+ + state.prepared_graphs.growth_for(&graph_id)
182
+ };
183
+ let mut reservation = store.reserve_projection(&owner, bytes).unwrap();
184
+ let (data, cursor, load) = store
185
+ .publish_prepared_graph(graph_id, graph, revision, &owner, &mut reservation)
186
+ .unwrap();
187
+ assert!(cursor.is_none() && load.is_none());
188
+ drop(reservation);
189
+ store.assert_conserved();
190
+ release_graph(&store, &json!({"data": data}), &owner);
191
+ {
192
+ let mut state = store.lock_state();
193
+ let before = state.ledger.shared.facts();
194
+ let keys: Vec<_> = state
195
+ .prepared_facts
196
+ .iter()
197
+ .filter(|(_, cached)| facts_key(&cached.facts) == root_identity)
198
+ .map(|(key, _)| *key)
199
+ .collect();
200
+ assert!(!keys.is_empty());
201
+ for key in keys {
202
+ drop(state.remove_prepared_facts(&key).unwrap());
203
+ }
204
+ assert_eq!(state.ledger.shared.facts(), before - root_bytes);
205
+ }
206
+ assert!(root_weak.upgrade().is_none());
207
+ store.assert_conserved();
208
+ }
@@ -1722,6 +1722,7 @@ impl NativeStore {
1722
1722
  context: &Value,
1723
1723
  reservation: &mut ProjectionReservation<'_>,
1724
1724
  ) -> Result<(Value, Option<String>, Option<String>), SnapshotError> {
1725
+ let inputs = graph.input_anchors();
1725
1726
  let mut state = self.lock_state();
1726
1727
  Self::prune(&mut state);
1727
1728
  if state.prepared_graphs.len() >= self.lease_cap(context)? {
@@ -1730,16 +1731,16 @@ impl NativeStore {
1730
1731
  "prepared graph admission exhausted",
1731
1732
  ));
1732
1733
  }
1733
- let record =
1734
- charged_bytes(&graph_id, &graph) + state.ledger.shared.unowned_bytes(graph.anchors());
1734
+ let record = charged_bytes(&graph_id, &graph)
1735
+ + state.ledger.shared.unowned_bytes(graph.anchors_with(inputs));
1735
1736
  let covered = record.min(reservation.bytes);
1736
1737
  let fresh = record - covered
1737
- + state.ledger.shared.growth(graph.anchors())
1738
+ + state.ledger.shared.growth(graph.anchors_with(inputs))
1738
1739
  + state.prepared_graphs.growth_for(&graph_id);
1739
1740
  self.admit_memory(&mut state, context, fresh)?;
1740
1741
  state.transient_bytes -= covered;
1741
1742
  reservation.bytes -= covered;
1742
- state.insert_prepared_graph(graph_id.clone(), Arc::new(Mutex::new(graph)));
1743
+ state.insert_prepared_graph(graph_id.clone(), Arc::new(Mutex::new(graph)), inputs);
1743
1744
  Ok((
1744
1745
  json!({"kind":"prepared_graph","handle":{"graph_id":graph_id,"owner_epoch":self.owner_epoch,"revision":revision,"complete":true}}),
1745
1746
  None,
@@ -0,0 +1,274 @@
1
+ fn finish_shared_publication_fixture(
2
+ store: &NativeStore,
3
+ mut response: Value,
4
+ owner: &Value,
5
+ ) -> (Value, u64) {
6
+ let mut read = 0;
7
+ for _ in 0..256 {
8
+ read += response["usage"]["source_bytes_read"].as_u64().unwrap();
9
+ store.assert_conserved();
10
+ if response["status"].as_str() != Some("incomplete") {
11
+ return (response, read);
12
+ }
13
+ response = store.request(
14
+ &json!({"schema":SCHEMA,"id":"shared-publication-resume","operation":"resume","cursor":response["cursor"].as_str().unwrap()}),
15
+ owner,
16
+ &Cancellation::default(),
17
+ );
18
+ }
19
+ panic!("shared publication fixture did not finish")
20
+ }
21
+
22
+ #[test]
23
+ fn shared_publication_admission_counts_raw_allocations_once_and_reuses_source() {
24
+ let payload = "result payload ".repeat(8192);
25
+ let line = format!(
26
+ "{}\n",
27
+ json!({
28
+ "type":"user","uuid":"large-result","sessionId":"s","timestamp":"2026-01-02T03:04:05Z",
29
+ "message":{"role":"user","content":[{"type":"tool_result","tool_use_id":"call","content":payload}]}
30
+ })
31
+ );
32
+ let source = Source::new(&line);
33
+ let cap = 64 * 1024 * 1024;
34
+ let store = NativeStore::new(&json!({
35
+ "max_read_bytes_per_step":8192,"max_events_per_step":32,"max_entry_bytes":1024*1024,
36
+ "max_retained_bytes":cap,"reserved_hook_accounted_bytes":4096
37
+ }))
38
+ .unwrap();
39
+ let mut owner = context("shared-publication-admission");
40
+ owner["admission"] = json!("review");
41
+ let mut response = store.request(&acquire(&source.path), &owner, &Cancellation::default());
42
+ let mut first_read = 0;
43
+ let mut ready = false;
44
+ for _ in 0..128 {
45
+ first_read += response["usage"]["source_bytes_read"].as_u64().unwrap();
46
+ assert_eq!(
47
+ response["status"].as_str(),
48
+ Some("incomplete"),
49
+ "{response:?}"
50
+ );
51
+ let slot = store.lock_state().loads.values().next().cloned().unwrap();
52
+ let load = slot.work.lock().unwrap();
53
+ if load.decoded && load.indexed == load.count && load.count > 0 {
54
+ assert!(!load.sealed);
55
+ assert!(load.result.is_none());
56
+ ready = true;
57
+ break;
58
+ }
59
+ drop(load);
60
+ response = store.request(
61
+ &json!({"schema":SCHEMA,"id":"shared-publication-prime","operation":"resume","cursor":response["cursor"].as_str().unwrap()}),
62
+ &owner,
63
+ &Cancellation::default(),
64
+ );
65
+ }
66
+ assert!(ready);
67
+ let headroom = MAX_REPLY_BYTES * 2 + 96 * 1024;
68
+ let crowded = store
69
+ .reserve_projection(
70
+ &owner,
71
+ cap - 4096 - store.retained_accounted_bytes() - headroom,
72
+ )
73
+ .unwrap();
74
+ response = store.request(
75
+ &json!({"schema":SCHEMA,"id":"shared-publication-seal","operation":"resume","cursor":response["cursor"].as_str().unwrap()}),
76
+ &owner,
77
+ &Cancellation::default(),
78
+ );
79
+ let (first, read) = finish_shared_publication_fixture(&store, response, &owner);
80
+ first_read += read;
81
+ assert_eq!(
82
+ first["status"].as_str(),
83
+ Some("ok"),
84
+ "shared raw publication admission refused: {first:?}"
85
+ );
86
+ assert_eq!(first_read, line.len() as u64 + 128);
87
+ let handle = &first["data"]["description"]["handle"];
88
+ let snapshot = store
89
+ .renew_scope_for_work(handle, &owner, now_ms() + 30_000)
90
+ .unwrap()
91
+ .snapshot;
92
+ let Entry::User(result_user) = &snapshot.chunks[0].entries[0] else {
93
+ panic!("result entry changed")
94
+ };
95
+ assert_eq!(result_user.tool_results().next().unwrap().content, payload);
96
+ assert_eq!(snapshot.activity.entry_count(), 1);
97
+ for _ in 0..2 {
98
+ let (repeated, read) = finish_shared_publication_fixture(
99
+ &store,
100
+ store.request(&acquire(&source.path), &owner, &Cancellation::default()),
101
+ &owner,
102
+ );
103
+ assert_eq!(repeated["status"].as_str(), Some("ok"), "{repeated:?}");
104
+ assert_eq!(read, 0);
105
+ assert_eq!(
106
+ repeated["data"]["description"]["handle"]["generation"],
107
+ first["data"]["description"]["handle"]["generation"]
108
+ );
109
+ assert_eq!(
110
+ repeated["data"]["description"]["mtime_ns"],
111
+ first["data"]["description"]["mtime_ns"]
112
+ );
113
+ }
114
+ let appended = format!("{}\n", user("appended-owner-words"));
115
+ source.append(&appended);
116
+ let (grown, append_read) = finish_shared_publication_fixture(
117
+ &store,
118
+ store.request(&acquire(&source.path), &owner, &Cancellation::default()),
119
+ &owner,
120
+ );
121
+ assert_eq!(grown["status"].as_str(), Some("ok"), "{grown:?}");
122
+ assert_eq!(
123
+ grown["data"]["description"]["event_count"].as_u64(),
124
+ Some(2)
125
+ );
126
+ assert_eq!(append_read, appended.len() as u64 + 192);
127
+ eprintln!("SHARED_PUBLICATION_ADMISSION source_bytes={} first_read_bytes={} unchanged_calls=2 unchanged_read_bytes=0 event_count=1 payload_bytes={} headroom_bytes={headroom} append_bytes={} append_read_bytes={append_read}", line.len(), first_read, payload.len(), appended.len());
128
+ drop(crowded);
129
+ store.assert_conserved();
130
+ }
131
+
132
+ #[test]
133
+ fn shared_publication_admission_reuses_219mb_source_with_other_generations() {
134
+ let source = Source::new("");
135
+ let target_bytes = 219_081_957;
136
+ let payload = "r".repeat(16 * 1024);
137
+ let mut file = std::fs::OpenOptions::new()
138
+ .write(true)
139
+ .open(&source.path)
140
+ .unwrap();
141
+ let mut written = 0;
142
+ let mut count = 0;
143
+ loop {
144
+ let row = format!(
145
+ "{}\n",
146
+ json!({
147
+ "type":"user","uuid":format!("result-{count}"),"sessionId":"s",
148
+ "timestamp":"2026-01-02T03:04:05Z","isSidechain":true,
149
+ "toolUseResult":{"output":payload},
150
+ "message":{"role":"user","content":[{"type":"tool_result","tool_use_id":format!("call-{count}"),"content":payload}]}
151
+ })
152
+ );
153
+ if written + row.len() >= target_bytes {
154
+ break;
155
+ }
156
+ file.write_all(row.as_bytes()).unwrap();
157
+ written += row.len();
158
+ count += 1;
159
+ }
160
+ file.write_all(" ".repeat(target_bytes - written - 1).as_bytes())
161
+ .unwrap();
162
+ file.write_all(b"\n").unwrap();
163
+ drop(file);
164
+ assert_eq!(
165
+ std::fs::metadata(&source.path).unwrap().len(),
166
+ target_bytes as u64
167
+ );
168
+ let cap = 1408 * 1024 * 1024;
169
+ let reserved = 512 * 1024 * 1024;
170
+ let store = NativeStore::new(&json!({
171
+ "max_read_bytes_per_step":8*1024*1024,"max_events_per_step":100_000,
172
+ "max_entry_bytes":8*1024*1024,"max_source_bytes":512*1024*1024,
173
+ "max_retained_bytes":cap,"reserved_hook_accounted_bytes":reserved
174
+ }))
175
+ .unwrap();
176
+ let mut owner = context("shared-publication-219mb");
177
+ owner["admission"] = json!("review");
178
+ let prefixes = [Source::new(&users(0..32)), Source::new(&users(32..64))];
179
+ let pins: Vec<_> = prefixes
180
+ .iter()
181
+ .map(|prefix| {
182
+ let (response, _) = finish_shared_publication_fixture(
183
+ &store,
184
+ store.request(&acquire(&prefix.path), &owner, &Cancellation::default()),
185
+ &owner,
186
+ );
187
+ assert_eq!(response["status"].as_str(), Some("ok"), "{response:?}");
188
+ store
189
+ .pin(&response["data"]["description"]["handle"], &owner)
190
+ .unwrap()
191
+ })
192
+ .collect();
193
+ let mut request = acquire(&source.path);
194
+ request["limits"]["max_read_bytes"] = json!(512 * 1024 * 1024);
195
+ request["limits"]["max_source_read_bytes"] = json!(512 * 1024 * 1024);
196
+ request["limits"]["max_events"] = json!(1_000_000);
197
+ request["deadline_unix_ms"] = json!(now_ms() + 120_000);
198
+ let canonical_source = std::fs::canonicalize(&source.path).unwrap();
199
+ let mut response = store.request(&request, &owner, &Cancellation::default());
200
+ let mut first_read = 0;
201
+ let mut ready = false;
202
+ for _ in 0..256 {
203
+ first_read += response["usage"]["source_bytes_read"].as_u64().unwrap();
204
+ assert_eq!(
205
+ response["status"].as_str(),
206
+ Some("incomplete"),
207
+ "{response:?}"
208
+ );
209
+ let slot = store
210
+ .lock_state()
211
+ .loads
212
+ .values()
213
+ .find(|slot| slot.path == canonical_source)
214
+ .cloned()
215
+ .unwrap();
216
+ let load = slot.work.lock().unwrap();
217
+ if load.decoded && load.indexed == load.count && load.count > 0 {
218
+ assert!(!load.sealed);
219
+ assert!(load.result.is_none());
220
+ ready = true;
221
+ break;
222
+ }
223
+ drop(load);
224
+ response = store.request(
225
+ &json!({"schema":SCHEMA,"id":"shared-publication-219mb-prime","operation":"resume","cursor":response["cursor"].as_str().unwrap()}),
226
+ &owner, &Cancellation::default(),
227
+ );
228
+ }
229
+ assert!(ready);
230
+ let headroom = 64 * 1024 * 1024;
231
+ let crowded = store
232
+ .reserve_projection(
233
+ &owner,
234
+ cap - reserved - store.retained_accounted_bytes() - headroom,
235
+ )
236
+ .unwrap();
237
+ response = store.request(
238
+ &json!({"schema":SCHEMA,"id":"shared-publication-219mb-seal","operation":"resume","cursor":response["cursor"].as_str().unwrap()}),
239
+ &owner, &Cancellation::default(),
240
+ );
241
+ let (first, read) = finish_shared_publication_fixture(&store, response, &owner);
242
+ first_read += read;
243
+ assert_eq!(
244
+ first["status"].as_str(),
245
+ Some("ok"),
246
+ "shared raw publication admission refused: {first:?}"
247
+ );
248
+ assert_eq!(first_read, target_bytes as u64 + 128);
249
+ let snapshot = store
250
+ .pin(&first["data"]["description"]["handle"], &owner)
251
+ .unwrap();
252
+ assert_eq!(snapshot.event_count, count);
253
+ let Entry::User(result_user) = snapshot.entry(count - 1) else {
254
+ panic!("result entry changed")
255
+ };
256
+ assert_eq!(result_user.tool_results().next().unwrap().content, payload);
257
+ for _ in 0..2 {
258
+ let (repeated, read) = finish_shared_publication_fixture(
259
+ &store,
260
+ store.request(&request, &owner, &Cancellation::default()),
261
+ &owner,
262
+ );
263
+ assert_eq!(repeated["status"].as_str(), Some("ok"), "{repeated:?}");
264
+ assert_eq!(read, 0);
265
+ assert_eq!(
266
+ repeated["data"]["description"]["handle"]["generation"],
267
+ first["data"]["description"]["handle"]["generation"]
268
+ );
269
+ }
270
+ eprintln!("SHARED_PUBLICATION_ADMISSION source_bytes={target_bytes} first_read_bytes={first_read} unchanged_calls=2 unchanged_read_bytes=0 event_count={count} payload_bytes={} headroom_bytes={headroom} prefix_generations={}", payload.len(), pins.len());
271
+ drop(crowded);
272
+ drop(pins);
273
+ store.assert_conserved();
274
+ }