cc-transcript 14.45.22__tar.gz → 14.45.23__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 (212) hide show
  1. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/PKG-INFO +1 -1
  2. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/pyproject.toml +1 -1
  3. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot.rs +38 -65
  4. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_activity.rs +130 -11
  5. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_codex_append.rs +7 -2
  6. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_ledger_tests.rs +4 -0
  7. cc_transcript-14.45.23/rust/crates/core/src/snapshot_load_charge_audit_tests.rs +124 -0
  8. cc_transcript-14.45.23/rust/crates/core/src/snapshot_load_charge_work_tests.rs +50 -0
  9. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_spine.rs +3 -1
  10. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/Cargo.lock +0 -0
  11. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/Cargo.toml +0 -0
  12. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/LICENSE +0 -0
  13. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/README.md +0 -0
  14. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/__init__.py +0 -0
  15. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/__init__.pyi +0 -0
  16. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/_native.pyi +0 -0
  17. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/activity.py +0 -0
  18. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/activity_probe.py +0 -0
  19. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/builders.py +0 -0
  20. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/codex.py +0 -0
  21. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/command.py +0 -0
  22. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/context.py +0 -0
  23. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/corrections.py +0 -0
  24. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/cost.py +0 -0
  25. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/decision_store.py +0 -0
  26. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/decisions.py +0 -0
  27. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/discovery.py +0 -0
  28. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/disktruth.py +0 -0
  29. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/evidence.py +0 -0
  30. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/extract/__init__.py +0 -0
  31. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/extract/correct.py +0 -0
  32. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/facts.py +0 -0
  33. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/filterspec.py +0 -0
  34. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/heartbeats.py +0 -0
  35. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/ids.py +0 -0
  36. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/judge/__init__.py +0 -0
  37. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/judge/llm.py +0 -0
  38. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/judge/similar.py +0 -0
  39. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/judge/verdicts.py +0 -0
  40. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/ledger.py +0 -0
  41. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/literals.py +0 -0
  42. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/mining/__init__.py +0 -0
  43. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/mining/candidates.py +0 -0
  44. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/mining/confidence.py +0 -0
  45. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/mining/engine.py +0 -0
  46. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/mining/formats.py +0 -0
  47. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/mining/sampling.py +0 -0
  48. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/mining/signals.py +0 -0
  49. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/mining/sourcekind.py +0 -0
  50. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/mining/spec.py +0 -0
  51. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/mining/store.py +0 -0
  52. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/models.py +0 -0
  53. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/nlp.py +0 -0
  54. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/notifications.py +0 -0
  55. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/parser.py +0 -0
  56. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/py.typed +0 -0
  57. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/query.py +0 -0
  58. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/render.py +0 -0
  59. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/sentiment/__init__.py +0 -0
  60. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/sentiment/buckets.py +0 -0
  61. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/sentiment/data/afinn-en-165.tsv +0 -0
  62. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/sentiment/data/domain_overrides.tsv +0 -0
  63. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/sentiment/data/en-ewt.udpipe +0 -0
  64. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/sentiment/engine.py +0 -0
  65. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/sentiment/lexicon.py +0 -0
  66. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/sentiment/scorespec.py +0 -0
  67. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/snapshot_schema/config.schema.json +0 -0
  68. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/snapshot_schema/context.schema.json +0 -0
  69. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/snapshot_schema/request.schema.json +0 -0
  70. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/snapshot_schema/response.schema.json +0 -0
  71. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/snapshot_schema/tool_registry.schema.json +0 -0
  72. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/snapshots.py +0 -0
  73. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/synthetic.py +0 -0
  74. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/tools.py +0 -0
  75. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/cc_transcript/watch.py +0 -0
  76. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/cli/Cargo.toml +0 -0
  77. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/cli/src/commands/blame.rs +0 -0
  78. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/cli/src/commands/corpus.rs +0 -0
  79. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/cli/src/commands/corrections.rs +0 -0
  80. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/cli/src/commands/digest.rs +0 -0
  81. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/cli/src/commands/facts.rs +0 -0
  82. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/cli/src/commands/grep.rs +0 -0
  83. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/cli/src/commands/list.rs +0 -0
  84. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/cli/src/commands/mod.rs +0 -0
  85. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/cli/src/commands/scratchpad.rs +0 -0
  86. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/cli/src/commands/show.rs +0 -0
  87. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/cli/src/commands/slice.rs +0 -0
  88. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/cli/src/commands/stats.rs +0 -0
  89. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/cli/src/commands/watch.rs +0 -0
  90. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/cli/src/lib.rs +0 -0
  91. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/cli/src/output.rs +0 -0
  92. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/cli/src/target.rs +0 -0
  93. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/cli/src/timearg.rs +0 -0
  94. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/Cargo.toml +0 -0
  95. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/benches/parse.rs +0 -0
  96. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/benches/render.rs +0 -0
  97. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/benches/toolcall.rs +0 -0
  98. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/build.rs +0 -0
  99. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/activity.rs +0 -0
  100. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/actor.rs +0 -0
  101. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/blame.rs +0 -0
  102. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/buckets.rs +0 -0
  103. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/codex/discovery.rs +0 -0
  104. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/codex/lower.rs +0 -0
  105. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/codex/mod.rs +0 -0
  106. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/codex/parse.rs +0 -0
  107. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/codex/probe.rs +0 -0
  108. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/codex/protocol.rs +0 -0
  109. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/codex/types.rs +0 -0
  110. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/command.rs +0 -0
  111. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/context.rs +0 -0
  112. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/corrections.rs +0 -0
  113. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/cost.rs +0 -0
  114. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/discovery.rs +0 -0
  115. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/facts.rs +0 -0
  116. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/feedback.rs +0 -0
  117. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/filter.rs +0 -0
  118. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/gateway.rs +0 -0
  119. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/ids.rs +0 -0
  120. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/judge.rs +0 -0
  121. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/lib.rs +0 -0
  122. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/literals/command.rs +0 -0
  123. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/literals/corrections.rs +0 -0
  124. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/literals/feedback.rs +0 -0
  125. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/literals/mining.rs +0 -0
  126. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/literals/mod.rs +0 -0
  127. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/literals/protocol.rs +0 -0
  128. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/notifications.rs +0 -0
  129. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/parse.rs +0 -0
  130. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/protocol.rs +0 -0
  131. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/pystr.rs +0 -0
  132. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/query.rs +0 -0
  133. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/render.rs +0 -0
  134. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/request_body.rs +0 -0
  135. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/rng.rs +0 -0
  136. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/scan.rs +0 -0
  137. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/scan_checkpoint.rs +0 -0
  138. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/scan_grep.rs +0 -0
  139. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/scan_grep_stream.rs +0 -0
  140. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/scan_grep_stream_tests.rs +0 -0
  141. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/scan_index.rs +0 -0
  142. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/scan_projection.rs +0 -0
  143. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/scan_regressions.rs +0 -0
  144. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/scan_stream.rs +0 -0
  145. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/schema.rs +0 -0
  146. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_admission_report_tests.rs +0 -0
  147. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_cache.rs +0 -0
  148. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_cache_tests.rs +0 -0
  149. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_catalog.rs +0 -0
  150. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_catalog_owner.rs +0 -0
  151. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_catalog_tests.rs +0 -0
  152. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_codec.rs +0 -0
  153. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_common_borrowed_parent_tests.rs +0 -0
  154. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_labels.rs +0 -0
  155. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_ledger.rs +0 -0
  156. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_memory.rs +0 -0
  157. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_owned.rs +0 -0
  158. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_prepared.rs +0 -0
  159. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_prepared_disk.rs +0 -0
  160. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_prepared_service.rs +0 -0
  161. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_projection.rs +0 -0
  162. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_regressions.rs +0 -0
  163. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_root_warm.rs +0 -0
  164. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_source_cache_index_tests.rs +0 -0
  165. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_spine_tests.rs +0 -0
  166. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_symlink_proof.rs +0 -0
  167. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/snapshot_text.rs +0 -0
  168. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/sqlite.rs +0 -0
  169. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/toolcall.rs +0 -0
  170. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/types.rs +0 -0
  171. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/value.rs +0 -0
  172. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/src/watch.rs +0 -0
  173. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/tests/sonic_arena_model.rs +0 -0
  174. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/core/tests/std_allocation_model.rs +0 -0
  175. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/Cargo.toml +0 -0
  176. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/build.rs +0 -0
  177. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/data/command_prefix_pins.tsv +0 -0
  178. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/actor_bridge.rs +0 -0
  179. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/bin/stub_gen.rs +0 -0
  180. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/codex.rs +0 -0
  181. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/command.rs +0 -0
  182. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/context.rs +0 -0
  183. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/corrections.rs +0 -0
  184. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/discovery.rs +0 -0
  185. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/feedback.rs +0 -0
  186. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/judge.rs +0 -0
  187. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/lexicon.rs +0 -0
  188. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/lib.rs +0 -0
  189. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/mining.rs +0 -0
  190. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/nlp.rs +0 -0
  191. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/python.rs +0 -0
  192. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/render.rs +0 -0
  193. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/score.rs +0 -0
  194. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/snapshot_decode.rs +0 -0
  195. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/snapshots.rs +0 -0
  196. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/sqlite.rs +0 -0
  197. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/toolcall.rs +0 -0
  198. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/views/attachment.rs +0 -0
  199. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/views/blocks.rs +0 -0
  200. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/views/command.rs +0 -0
  201. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/views/convert.rs +0 -0
  202. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/views/dunder.rs +0 -0
  203. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/views/events.rs +0 -0
  204. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/views/meta.rs +0 -0
  205. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/views/mod.rs +0 -0
  206. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/views/print.rs +0 -0
  207. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/views/store.rs +0 -0
  208. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/views/system.rs +0 -0
  209. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/views/toolcall.rs +0 -0
  210. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/views/toolresult.rs +0 -0
  211. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/rust/crates/py/src/views/transcript.rs +0 -0
  212. {cc_transcript-14.45.22 → cc_transcript-14.45.23}/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.22
3
+ Version: 14.45.23
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.22" # informational — releases stamp the version from the git tag
3
+ version = "14.45.23" # 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"
@@ -649,6 +649,10 @@ struct SourceChunkSpan {
649
649
  }
650
650
 
651
651
  struct Load {
652
+ charge_work: Work,
653
+ fresh_chunk_bytes: usize,
654
+ activity_from_previous: bool,
655
+ codex_append_bytes: usize,
652
656
  file: File,
653
657
  offset: u64,
654
658
  pending: Vec<u8>,
@@ -8084,6 +8088,10 @@ impl NativeStore {
8084
8088
  attached: AtomicBool::new(false),
8085
8089
  deadline: AtomicU64::new(now + self.config.preparation),
8086
8090
  work: Mutex::new(Load {
8091
+ charge_work: Work::default(),
8092
+ fresh_chunk_bytes: 0,
8093
+ activity_from_previous: false,
8094
+ codex_append_bytes: 0,
8087
8095
  file,
8088
8096
  offset: 0,
8089
8097
  pending: Vec::new(),
@@ -8613,28 +8621,15 @@ impl NativeStore {
8613
8621
  }
8614
8622
 
8615
8623
  fn unpublished_load_charge(load: &Load) -> usize {
8616
- let shared: HashSet<_> = load
8617
- .previous
8618
- .as_ref()
8619
- .into_iter()
8620
- .flat_map(|snapshot| {
8621
- snapshot
8622
- .chunks
8623
- .iter()
8624
- .map(|chunk| Arc::as_ptr(&chunk.entries) as usize)
8625
- })
8626
- .collect();
8627
- let shared_metadata: HashSet<_> = load
8628
- .previous
8629
- .iter()
8630
- .flat_map(|snapshot| {
8631
- snapshot
8632
- .chunks
8633
- .iter()
8634
- .map(|chunk| Arc::as_ptr(chunk) as usize)
8635
- })
8636
- .collect();
8637
- let charge = load.pending.capacity()
8624
+ load.charge_work.tick(1);
8625
+ let previous_activity = load.activity_from_previous.then(|| {
8626
+ load.previous
8627
+ .as_ref()
8628
+ .expect("inherited activity")
8629
+ .activity
8630
+ .as_ref()
8631
+ });
8632
+ load.pending.capacity()
8638
8633
  + load.codex_raw.as_ref().map_or(0, |raw| {
8639
8634
  if load
8640
8635
  .previous
@@ -8647,18 +8642,7 @@ impl NativeStore {
8647
8642
  arc_bytes::<Vec<u8>>() + raw.capacity()
8648
8643
  }
8649
8644
  })
8650
- + load.codex_append.as_ref().map_or(0, |index| {
8651
- if load
8652
- .previous
8653
- .as_ref()
8654
- .and_then(|previous| previous.codex_append.as_ref())
8655
- .is_some_and(|previous| Arc::ptr_eq(previous, index))
8656
- {
8657
- 0
8658
- } else {
8659
- index.accounted_bytes()
8660
- }
8661
- })
8645
+ + load.codex_append_bytes
8662
8646
  + load.origin_fence.capacity()
8663
8647
  + load.seal_fence.capacity()
8664
8648
  + load.prefix_fence.capacity()
@@ -8666,33 +8650,8 @@ impl NativeStore {
8666
8650
  + load.session_id.as_ref().map_or(0, String::capacity)
8667
8651
  + load.chunks.capacity() * size_of::<Arc<EntryChunk>>()
8668
8652
  + load.source_chunks.capacity() * size_of::<SourceChunkSpan>()
8669
- + load
8670
- .chunks
8671
- .iter()
8672
- .map(|chunk| {
8673
- let rows = chunk.rows_charge();
8674
- usize::from(!shared_metadata.contains(&(Arc::as_ptr(chunk) as usize)))
8675
- * chunk.metadata_bytes()
8676
- + if shared.contains(&(Arc::as_ptr(&chunk.entries) as usize)) {
8677
- 0
8678
- } else {
8679
- rows.owned_capacity_bytes + rows.opaque_dom_accounted_bytes
8680
- }
8681
- })
8682
- .sum::<usize>();
8683
- let prior_indexes: HashSet<_> = load
8684
- .previous
8685
- .as_ref()
8686
- .into_iter()
8687
- .flat_map(|snapshot| snapshot.activity.heap_allocations().map(|(id, _)| id))
8688
- .collect();
8689
- let index_charge: usize = load
8690
- .activity
8691
- .heap_allocations()
8692
- .filter(|(id, _)| !prior_indexes.contains(id))
8693
- .map(|(_, bytes)| bytes)
8694
- .sum();
8695
- charge + index_charge
8653
+ + load.fresh_chunk_bytes
8654
+ + load.activity.heap_bytes_since(previous_activity)
8696
8655
  }
8697
8656
 
8698
8657
  fn restart_unpublished_build(slot: &LoadSlot, load: &mut Load) {
@@ -8701,14 +8660,17 @@ impl NativeStore {
8701
8660
  load.pending_start = 0;
8702
8661
  load.provider = None;
8703
8662
  load.chunks = Vec::new();
8663
+ load.fresh_chunk_bytes = 0;
8704
8664
  load.source_chunks = Vec::new();
8705
8665
  load.published_chunks = None;
8706
8666
  load.reuse_next = None;
8707
8667
  load.reuse_prepared = false;
8708
8668
  load.codex_raw = None;
8709
8669
  load.codex_append = None;
8670
+ load.codex_append_bytes = 0;
8710
8671
  load.count = 0;
8711
8672
  load.activity = ActivityIndex::default();
8673
+ load.activity_from_previous = false;
8712
8674
  load.indexed = 0;
8713
8675
  load.decoded = false;
8714
8676
  load.session_id = None;
@@ -9034,8 +8996,10 @@ impl NativeStore {
9034
8996
  load.count = previous.event_count;
9035
8997
  load.codex_raw = previous.codex_raw.clone();
9036
8998
  load.codex_append = previous.codex_append.clone();
8999
+ load.codex_append_bytes = 0;
9037
9000
  if load.previous_index_compatible {
9038
9001
  load.activity = previous.activity.as_ref().clone();
9002
+ load.activity_from_previous = true;
9039
9003
  load.indexed = previous.event_count;
9040
9004
  }
9041
9005
  } else {
@@ -9061,6 +9025,7 @@ impl NativeStore {
9061
9025
  load.session_id = Some(previous.session_id.clone());
9062
9026
  if !previous.provisional_tail && load.previous_index_compatible {
9063
9027
  load.activity = previous.activity.as_ref().clone();
9028
+ load.activity_from_previous = true;
9064
9029
  load.indexed = previous.event_count;
9065
9030
  }
9066
9031
  load.fence = fence;
@@ -9313,8 +9278,10 @@ impl NativeStore {
9313
9278
  start: load.pending_start,
9314
9279
  end: load.pending_start + consumed as u64,
9315
9280
  });
9316
- load.chunks
9317
- .push(Arc::new(EntryChunk::retaining(load.count, entries, arenas)));
9281
+ let chunk = Arc::new(EntryChunk::retaining(load.count, entries, arenas));
9282
+ load.fresh_chunk_bytes +=
9283
+ chunk.charge.owned_capacity_bytes + chunk.charge.opaque_dom_accounted_bytes;
9284
+ load.chunks.push(chunk);
9318
9285
  load.count += count;
9319
9286
  }
9320
9287
  if consumed > 0 {
@@ -9381,8 +9348,10 @@ impl NativeStore {
9381
9348
  start: load.pending_start,
9382
9349
  end: slot.stamp.size,
9383
9350
  });
9384
- load.chunks
9385
- .push(Arc::new(EntryChunk::retaining(load.count, tail, arenas)));
9351
+ let chunk = Arc::new(EntryChunk::retaining(load.count, tail, arenas));
9352
+ load.fresh_chunk_bytes +=
9353
+ chunk.charge.owned_capacity_bytes + chunk.charge.opaque_dom_accounted_bytes;
9354
+ load.chunks.push(chunk);
9386
9355
  load.count += count;
9387
9356
  load.provisional = true;
9388
9357
  load.pending.clear();
@@ -9471,6 +9440,7 @@ impl NativeStore {
9471
9440
  }));
9472
9441
  load.pending = Vec::new();
9473
9442
  load.chunks = Vec::new();
9443
+ load.fresh_chunk_bytes = 0;
9474
9444
  load.fence = Vec::new();
9475
9445
  load.origin_fence = Vec::new();
9476
9446
  load.seal_fence = Vec::new();
@@ -22082,4 +22052,7 @@ mod tests {
22082
22052
  include!("snapshot_spine_tests.rs");
22083
22053
  include!("snapshot_cache_tests.rs");
22084
22054
  include!("snapshot_source_cache_index_tests.rs");
22055
+
22056
+ include!("snapshot_load_charge_work_tests.rs");
22057
+ include!("snapshot_load_charge_audit_tests.rs");
22085
22058
  }
@@ -46,6 +46,8 @@ pub(crate) struct CachedTurn {
46
46
  started: Option<usize>,
47
47
  ended: Option<usize>,
48
48
  calls: Vec<Arc<CachedCall>>,
49
+ prefix_turn_bytes: usize,
50
+ prefix_call_bytes: usize,
49
51
  }
50
52
 
51
53
  #[derive(Debug, Clone, Copy)]
@@ -122,7 +124,11 @@ pub struct ActivityIndex {
122
124
  entries: usize,
123
125
  turns: Arc<Vec<Arc<CachedTurn>>>,
124
126
  uuids: Arc<HashMap<String, usize>>,
127
+ uuid_key_bytes: usize,
128
+ uuid_key_lens: usize,
125
129
  results: Arc<HashMap<String, ResultPosition>>,
130
+ result_key_bytes: usize,
131
+ result_key_lens: usize,
126
132
  shape: ActivityShape,
127
133
  started_unix_ms: Option<i64>,
128
134
  last_model_event: Option<usize>,
@@ -177,8 +183,12 @@ impl ActivityIndex {
177
183
  if !next.uuids.contains_key(&meta.uuid) {
178
184
  if Arc::strong_count(&next.uuids) > 1 {
179
185
  next.work.copied_index_entries += next.uuids.len();
186
+ next.uuid_key_bytes = next.uuid_key_lens;
180
187
  }
181
- Arc::make_mut(&mut next.uuids).insert(meta.uuid.clone(), event);
188
+ let key = meta.uuid.clone();
189
+ next.uuid_key_bytes += key.capacity();
190
+ next.uuid_key_lens += key.len();
191
+ Arc::make_mut(&mut next.uuids).insert(key, event);
182
192
  }
183
193
  }
184
194
  if matches!(entry, Entry::Assistant(assistant) if assistant.model != crate::types::SYNTHETIC_MODEL)
@@ -192,9 +202,15 @@ impl ActivityIndex {
192
202
  };
193
203
  if Arc::strong_count(&next.results) > 1 {
194
204
  next.work.copied_index_entries += next.results.len();
205
+ next.result_key_bytes = next.result_key_lens;
206
+ }
207
+ let key = result.tool_use_id.clone();
208
+ if !next.results.contains_key(&key) {
209
+ next.result_key_bytes += key.capacity();
210
+ next.result_key_lens += key.len();
195
211
  }
196
212
  Arc::make_mut(&mut next.results).insert(
197
- result.tool_use_id.clone(),
213
+ key,
198
214
  ResultPosition {
199
215
  event,
200
216
  ordinal,
@@ -209,6 +225,7 @@ impl ActivityIndex {
209
225
  }
210
226
  for (position, indexed) in tail.turns.into_iter().enumerate() {
211
227
  let mut calls = Vec::new();
228
+ let mut fresh_call_bytes = 0;
212
229
  for (local, entry) in entries
213
230
  .iter()
214
231
  .enumerate()
@@ -241,6 +258,7 @@ impl ActivityIndex {
241
258
  .sum::<usize>()
242
259
  })
243
260
  .sum::<usize>();
261
+ fresh_call_bytes += arc_control_bytes::<CachedCall>() + accounted_bytes;
244
262
  calls.push(Arc::new(CachedCall {
245
263
  event: first_new_index + local,
246
264
  ordinal,
@@ -252,7 +270,9 @@ impl ActivityIndex {
252
270
  next.work.parsed_tool_calls += 1;
253
271
  }
254
272
  }
255
- let turn = CachedTurn {
273
+ let prefix_turn_bytes = next.turns.last().map_or(0, |turn| turn.prefix_turn_bytes);
274
+ let prefix_call_bytes = next.turns.last().map_or(0, |turn| turn.prefix_call_bytes);
275
+ let mut turn = CachedTurn {
256
276
  prompt_count: next.prompt_count_before(next.turn_count())
257
277
  + usize::from(!indexed.prompt.is_empty()),
258
278
  prompt: indexed.prompt,
@@ -260,8 +280,15 @@ impl ActivityIndex {
260
280
  started: indexed.started_idx.map(|i| first_new_index + i),
261
281
  ended: indexed.ended_idx.map(|i| first_new_index + i),
262
282
  calls,
283
+ prefix_turn_bytes,
284
+ prefix_call_bytes: prefix_call_bytes + fresh_call_bytes,
263
285
  };
264
286
  if position == 0 && tail.continued {
287
+ let stable_turn_bytes = next
288
+ .turns
289
+ .len()
290
+ .checked_sub(2)
291
+ .map_or(0, |at| next.turns[at].prefix_turn_bytes);
265
292
  let prior = Arc::make_mut(&mut next.turns).last_mut().unwrap();
266
293
  if Arc::strong_count(prior) > 1 {
267
294
  next.work.copied_index_entries += prior.calls.len();
@@ -271,13 +298,62 @@ impl ActivityIndex {
271
298
  prior.started = prior.started.or(turn.started);
272
299
  prior.ended = turn.ended.or(prior.ended);
273
300
  prior.calls.extend(turn.calls);
301
+ prior.prefix_turn_bytes = stable_turn_bytes
302
+ + arc_bytes::<CachedTurn>()
303
+ + prior.prompt.capacity()
304
+ + prior.calls.capacity() * size_of::<Arc<CachedCall>>();
305
+ prior.prefix_call_bytes = prefix_call_bytes + fresh_call_bytes;
274
306
  } else {
307
+ turn.prefix_turn_bytes += arc_bytes::<CachedTurn>()
308
+ + turn.prompt.capacity()
309
+ + turn.calls.capacity() * size_of::<Arc<CachedCall>>();
275
310
  Arc::make_mut(&mut next.turns).push(Arc::new(turn));
276
311
  }
277
312
  }
278
313
  next
279
314
  }
280
315
 
316
+ pub(crate) fn heap_bytes_since(&self, previous: Option<&Self>) -> usize {
317
+ let shared_turns = previous.map_or(0, |prior| {
318
+ assert!(self.entries >= prior.entries);
319
+ prior.turns.len().checked_sub(1).map_or(0, |last| {
320
+ if Arc::ptr_eq(&self.turns[last], &prior.turns[last]) {
321
+ prior.turns[last].prefix_turn_bytes
322
+ } else {
323
+ last.checked_sub(1)
324
+ .map_or(0, |at| prior.turns[at].prefix_turn_bytes)
325
+ }
326
+ })
327
+ });
328
+ let shared_calls = previous
329
+ .and_then(|prior| prior.turns.last())
330
+ .map_or(0, |turn| turn.prefix_call_bytes);
331
+ let turns = if previous.is_some_and(|prior| Arc::ptr_eq(&self.turns, &prior.turns)) {
332
+ 0
333
+ } else {
334
+ arc_bytes::<Vec<Arc<CachedTurn>>>()
335
+ + self.turns.capacity() * size_of::<Arc<CachedTurn>>()
336
+ };
337
+ let uuids = if previous.is_some_and(|prior| Arc::ptr_eq(&self.uuids, &prior.uuids)) {
338
+ 0
339
+ } else {
340
+ arc_bytes::<HashMap<String, usize>>()
341
+ + self.uuids.capacity() * size_of::<(String, usize)>()
342
+ + self.uuid_key_bytes
343
+ };
344
+ let results = if previous.is_some_and(|prior| Arc::ptr_eq(&self.results, &prior.results)) {
345
+ 0
346
+ } else {
347
+ arc_bytes::<HashMap<String, ResultPosition>>()
348
+ + self.results.capacity() * size_of::<(String, ResultPosition)>()
349
+ + self.result_key_bytes
350
+ };
351
+ let payload = self.turns.last().map_or(0, |turn| {
352
+ turn.prefix_turn_bytes - shared_turns + turn.prefix_call_bytes - shared_calls
353
+ });
354
+ turns + uuids + results + payload
355
+ }
356
+
281
357
  pub fn entry_count(&self) -> usize {
282
358
  self.entries
283
359
  }
@@ -521,13 +597,13 @@ impl ActivityIndex {
521
597
  Arc::as_ptr(&self.uuids) as usize,
522
598
  arc_bytes::<HashMap<String, usize>>()
523
599
  + self.uuids.capacity() * size_of::<(String, usize)>()
524
- + self.uuids.keys().map(String::capacity).sum::<usize>(),
600
+ + self.uuid_key_bytes,
525
601
  ),
526
602
  (
527
603
  Arc::as_ptr(&self.results) as usize,
528
604
  arc_bytes::<HashMap<String, ResultPosition>>()
529
605
  + self.results.capacity() * size_of::<(String, ResultPosition)>()
530
- + self.results.keys().map(String::capacity).sum::<usize>(),
606
+ + self.result_key_bytes,
531
607
  ),
532
608
  ]
533
609
  .into_iter()
@@ -567,7 +643,11 @@ impl ActivityIndex {
567
643
  entries: _,
568
644
  turns,
569
645
  uuids,
646
+ uuid_key_bytes: _,
647
+ uuid_key_lens: _,
570
648
  results,
649
+ result_key_bytes: _,
650
+ result_key_lens: _,
571
651
  shape: _,
572
652
  started_unix_ms: _,
573
653
  last_model_event: _,
@@ -608,6 +688,8 @@ impl ActivityIndex {
608
688
  started: _,
609
689
  ended: _,
610
690
  calls,
691
+ prefix_turn_bytes: _,
692
+ prefix_call_bytes: _,
611
693
  } = &**turn;
612
694
  allocations.push((
613
695
  Arc::as_ptr(turn) as usize,
@@ -635,10 +717,7 @@ impl ActivityIndex {
635
717
  }
636
718
 
637
719
  pub fn accounted_bytes(&self) -> usize {
638
- self.accounted_allocations()
639
- .iter()
640
- .map(|(_, bytes)| bytes)
641
- .sum()
720
+ size_of::<Self>() + self.heap_bytes_since(None)
642
721
  }
643
722
 
644
723
  pub fn append_container_reservation_bytes(
@@ -661,14 +740,14 @@ impl ActivityIndex {
661
740
  let uuid_copy = if Arc::strong_count(&self.uuids) > 1 {
662
741
  arc_bytes::<HashMap<String, usize>>()
663
742
  + self.uuids.capacity() * size_of::<(String, usize)>()
664
- + self.uuids.keys().map(String::capacity).sum::<usize>()
743
+ + self.uuid_key_bytes
665
744
  } else {
666
745
  0
667
746
  };
668
747
  let result_copy = if Arc::strong_count(&self.results) > 1 {
669
748
  arc_bytes::<HashMap<String, ResultPosition>>()
670
749
  + self.results.capacity() * size_of::<(String, ResultPosition)>()
671
- + self.results.keys().map(String::capacity).sum::<usize>()
750
+ + self.result_key_bytes
672
751
  } else {
673
752
  0
674
753
  };
@@ -1141,6 +1220,46 @@ mod tests {
1141
1220
  assert_eq!(format!("{projected:?}"), format!("{expected:?}"));
1142
1221
  }
1143
1222
 
1223
+ #[test]
1224
+ fn load_charge_activity_summaries_match_independent_allocations() {
1225
+ let entries = [
1226
+ user("u", "first"),
1227
+ tools(),
1228
+ results(),
1229
+ user("v", "second"),
1230
+ tools(),
1231
+ results(),
1232
+ ];
1233
+ let refs: Vec<_> = entries.iter().collect();
1234
+ let mut previous = ActivityIndex::default();
1235
+ for end in 1..=entries.len() {
1236
+ let prior: std::collections::HashSet<_> = previous
1237
+ .audited_heap_allocations()
1238
+ .into_iter()
1239
+ .map(|(id, _)| id)
1240
+ .collect();
1241
+ let old = previous.audited_heap_allocations();
1242
+ let next = previous.append(&refs[..end], end - 1, None);
1243
+ let actual: usize = next
1244
+ .audited_heap_allocations()
1245
+ .into_iter()
1246
+ .filter(|(id, _)| !prior.contains(id))
1247
+ .map(|(_, bytes)| bytes)
1248
+ .sum();
1249
+ assert_eq!(next.heap_bytes_since(Some(&previous)), actual);
1250
+ assert_eq!(
1251
+ next.heap_bytes_since(None),
1252
+ next.audited_heap_allocations()
1253
+ .into_iter()
1254
+ .map(|(_, bytes)| bytes)
1255
+ .sum::<usize>()
1256
+ );
1257
+ assert_eq!(previous.audited_heap_allocations(), old);
1258
+ parity(&next, &refs[..end], None);
1259
+ previous = next;
1260
+ }
1261
+ }
1262
+
1144
1263
  #[test]
1145
1264
  fn repeated_result_charge_counts_each_owned_result_copy() {
1146
1265
  let mut calls = tools();
@@ -313,7 +313,9 @@ impl NativeStore {
313
313
  ));
314
314
  }
315
315
  load.chunks.clear();
316
+ load.fresh_chunk_bytes = 0;
316
317
  load.activity = ActivityIndex::default();
318
+ load.activity_from_previous = false;
317
319
  load.indexed = 0;
318
320
  load.session_id = None;
319
321
  let arenas = session_arenas(&session, &entries);
@@ -347,8 +349,10 @@ impl NativeStore {
347
349
  .last()
348
350
  .map_or(0, |chunk| chunk.start + chunk.entries.len());
349
351
  if !entries.is_empty() {
350
- load.chunks
351
- .push(Arc::new(EntryChunk::retaining(start, entries, arenas)));
352
+ let chunk = Arc::new(EntryChunk::retaining(start, entries, arenas));
353
+ load.fresh_chunk_bytes += chunk.charge.owned_capacity_bytes
354
+ + chunk.charge.opaque_dom_accounted_bytes;
355
+ load.chunks.push(chunk);
352
356
  }
353
357
  load.count = load.chunks.iter().map(|chunk| chunk.entries.len()).sum();
354
358
  let committed = raw
@@ -360,6 +364,7 @@ impl NativeStore {
360
364
  load.fence = raw[committed.saturating_sub(64)..committed].to_vec();
361
365
  let cached = raw.len() <= 64 * 1024 * 1024;
362
366
  load.codex_append = cached.then(|| Arc::new(index));
367
+ load.codex_append_bytes = load.codex_append.as_ref().map_or(0, |index| index.accounted_bytes());
363
368
  load.codex_raw = cached.then(|| Arc::new(raw));
364
369
  load.pending.clear();
365
370
  Ok(())
@@ -9017,6 +9017,10 @@ fn cold_acquire(fixture: &Fixture) -> bool {
9017
9017
  fn cold_load_walk(slot: &LoadSlot) -> usize {
9018
9018
  let load = slot.work.lock().unwrap();
9019
9019
  let Load {
9020
+ charge_work: _,
9021
+ fresh_chunk_bytes: _,
9022
+ activity_from_previous: _,
9023
+ codex_append_bytes: _,
9020
9024
  file: _,
9021
9025
  offset: _,
9022
9026
  pending,
@@ -0,0 +1,124 @@
1
+ fn load_charge_audit(load: &Load) -> usize {
2
+ let mut rows = HashSet::new();
3
+ let mut wrappers = HashSet::new();
4
+ let mut activity = HashSet::new();
5
+ if let Some(previous) = &load.previous {
6
+ rows.extend(previous.chunks.iter().map(|chunk| Arc::as_ptr(&chunk.entries) as usize));
7
+ wrappers.extend(previous.chunks.iter().map(|chunk| Arc::as_ptr(chunk) as usize));
8
+ activity.extend(previous.activity.audited_heap_allocations().into_iter().map(|(id, _)| id));
9
+ }
10
+ let chunks = load.chunks.iter().map(|chunk| {
11
+ let row_bytes = if rows.insert(Arc::as_ptr(&chunk.entries) as usize) {
12
+ NativeStore::audit_chunk_rows_bytes(&chunk.entries)
13
+ } else {
14
+ 0
15
+ };
16
+ let wrapper_bytes = if wrappers.insert(Arc::as_ptr(chunk) as usize) {
17
+ NativeStore::audit_chunk_metadata_bytes(chunk)
18
+ } else {
19
+ 0
20
+ };
21
+ row_bytes + wrapper_bytes
22
+ }).sum::<usize>();
23
+ let raw = load.codex_raw.as_ref().map_or(0, |raw| {
24
+ if load.previous.as_ref().and_then(|previous| previous.codex_raw.as_ref())
25
+ .is_some_and(|previous| Arc::ptr_eq(previous, raw)) {
26
+ 0
27
+ } else {
28
+ arc_mirror::<Vec<u8>>() + raw.capacity()
29
+ }
30
+ });
31
+ let codex = load.codex_append.as_ref().map_or(0, |index| {
32
+ if load.previous.as_ref().and_then(|previous| previous.codex_append.as_ref())
33
+ .is_some_and(|previous| Arc::ptr_eq(previous, index)) {
34
+ 0
35
+ } else {
36
+ NativeStore::audit_codex_index_bytes(index)
37
+ }
38
+ });
39
+ load.pending.capacity() + raw + codex
40
+ + load.origin_fence.capacity() + load.seal_fence.capacity()
41
+ + load.prefix_fence.capacity() + load.fence.capacity()
42
+ + load.session_id.as_ref().map_or(0, String::capacity)
43
+ + load.chunks.capacity() * size_of::<Arc<EntryChunk>>()
44
+ + load.source_chunks.capacity() * size_of::<SourceChunkSpan>()
45
+ + chunks
46
+ + load.activity.audited_heap_allocations().into_iter()
47
+ .filter(|(id, _)| !activity.contains(id)).map(|(_, bytes)| bytes).sum::<usize>()
48
+ }
49
+
50
+ fn finish_with_load_charge_audit(store: &NativeStore, mut response: Value, owner: &Value) -> Value {
51
+ for _ in 0..4096 {
52
+ let slots: Vec<_> = store.lock_state().loads.values().cloned().collect();
53
+ for slot in slots {
54
+ let load = slot.work.lock().unwrap();
55
+ if load.result.is_none() {
56
+ assert_eq!(NativeStore::unpublished_load_charge(&load), load_charge_audit(&load));
57
+ }
58
+ }
59
+ store.assert_conserved();
60
+ if response["status"].as_str() != Some("incomplete") {
61
+ return response;
62
+ }
63
+ response = store.request(
64
+ &json!({"schema":SCHEMA,"id":"audit-resume","operation":"resume","cursor":response["cursor"].as_str().unwrap()}),
65
+ owner,
66
+ &Cancellation::default(),
67
+ );
68
+ }
69
+ panic!("audited preparation did not finish")
70
+ }
71
+
72
+ #[test]
73
+ fn load_charge_audit_cold_append_provisional_and_shared_window() {
74
+ for provisional in [false, true] {
75
+ let text = users(0..40);
76
+ let initial = if provisional { text.trim_end_matches('\n') } else { &text };
77
+ let source = Source::new(initial);
78
+ let store = NativeStore::new(&json!({
79
+ "max_read_bytes_per_step": 256,
80
+ "max_events_per_step": 1,
81
+ "max_retained_bytes": 128 * 1024 * 1024,
82
+ "reserved_hook_accounted_bytes": 4096
83
+ })).unwrap();
84
+ let owner = context("load-charge-audit");
85
+ let full = finish_with_load_charge_audit(&store,
86
+ store.request(&acquire(&source.path), &owner, &Cancellation::default()), &owner);
87
+ assert_eq!(full["status"].as_str(), Some("ok"), "{full:?}");
88
+ source.append(&format!("\n{}\n", user("next")));
89
+ let appended = finish_with_load_charge_audit(&store,
90
+ store.request(&acquire(&source.path), &owner, &Cancellation::default()), &owner);
91
+ assert_eq!(appended["status"].as_str(), Some("ok"), "{appended:?}");
92
+ let tail = finish_with_load_charge_audit(&store,
93
+ store.request(&windowed_acquire(&source.path, 2048), &owner, &Cancellation::default()), &owner);
94
+ assert_eq!(tail["status"].as_str(), Some("ok"), "{tail:?}");
95
+ std::fs::write(&source.path, users(80..90)).unwrap();
96
+ let rewritten = finish_with_load_charge_audit(&store,
97
+ store.request(&acquire(&source.path), &owner, &Cancellation::default()), &owner);
98
+ assert_eq!(rewritten["status"].as_str(), Some("ok"), "{rewritten:?}");
99
+ }
100
+ }
101
+
102
+ #[test]
103
+ fn load_charge_audit_codex_append_and_nonincremental_reset() {
104
+ let first = r#"{"timestamp":"2026-01-02T03:04:05Z","type":"session_meta","payload":{"id":"s","cwd":"/tmp"}}"#;
105
+ let message = |value: &str| format!(r#"{{"timestamp":"2026-01-02T03:04:06Z","type":"event_msg","payload":{{"type":"agent_message","message":"{value}"}}}}"#);
106
+ let source = Source::new(&format!("{first}\n{}\n", message("first")));
107
+ let store = NativeStore::new(&json!({
108
+ "max_read_bytes_per_step": 128,
109
+ "max_events_per_step": 1,
110
+ "max_retained_bytes": 128 * 1024 * 1024,
111
+ "reserved_hook_accounted_bytes": 4096
112
+ })).unwrap();
113
+ let owner = context("codex-load-charge");
114
+ for value in ["initial", "append", "reset"] {
115
+ match value {
116
+ "append" => source.append(&format!("{}\n", message("second"))),
117
+ "reset" => std::fs::write(&source.path, format!("{first}\n{}\n", message("replacement"))).unwrap(),
118
+ _ => {}
119
+ }
120
+ let response = finish_with_load_charge_audit(&store,
121
+ store.request(&acquire(&source.path), &owner, &Cancellation::default()), &owner);
122
+ assert_eq!(response["status"].as_str(), Some("ok"), "{response:?}");
123
+ }
124
+ }