cc-transcript 14.34.0__tar.gz → 14.35.0__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 (196) hide show
  1. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/Cargo.lock +1 -0
  2. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/PKG-INFO +1 -1
  3. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/pyproject.toml +1 -1
  4. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/Cargo.toml +1 -0
  5. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/lib.rs +2 -0
  6. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/render.rs +1 -1
  7. cc_transcript-14.35.0/rust/crates/core/src/scan_checkpoint.rs +606 -0
  8. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/scan_grep.rs +67 -28
  9. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/scan_grep_stream.rs +359 -81
  10. cc_transcript-14.35.0/rust/crates/core/src/scan_grep_stream_tests.rs +3145 -0
  11. cc_transcript-14.35.0/rust/crates/core/src/scan_index.rs +937 -0
  12. cc_transcript-14.35.0/rust/crates/core/src/scan_projection.rs +223 -0
  13. cc_transcript-14.34.0/rust/crates/core/src/scan_checkpoint.rs +0 -371
  14. cc_transcript-14.34.0/rust/crates/core/src/scan_grep_stream_tests.rs +0 -1616
  15. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/Cargo.toml +0 -0
  16. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/LICENSE +0 -0
  17. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/README.md +0 -0
  18. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/__init__.py +0 -0
  19. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/__init__.pyi +0 -0
  20. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/_native.pyi +0 -0
  21. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/activity.py +0 -0
  22. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/activity_probe.py +0 -0
  23. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/builders.py +0 -0
  24. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/codex.py +0 -0
  25. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/command.py +0 -0
  26. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/context.py +0 -0
  27. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/corrections.py +0 -0
  28. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/cost.py +0 -0
  29. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/decision_store.py +0 -0
  30. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/decisions.py +0 -0
  31. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/discovery.py +0 -0
  32. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/disktruth.py +0 -0
  33. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/evidence.py +0 -0
  34. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/extract/__init__.py +0 -0
  35. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/extract/correct.py +0 -0
  36. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/facts.py +0 -0
  37. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/filterspec.py +0 -0
  38. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/heartbeats.py +0 -0
  39. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/ids.py +0 -0
  40. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/judge/__init__.py +0 -0
  41. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/judge/llm.py +0 -0
  42. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/judge/similar.py +0 -0
  43. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/judge/verdicts.py +0 -0
  44. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/ledger.py +0 -0
  45. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/literals.py +0 -0
  46. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/mining/__init__.py +0 -0
  47. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/mining/candidates.py +0 -0
  48. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/mining/confidence.py +0 -0
  49. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/mining/engine.py +0 -0
  50. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/mining/formats.py +0 -0
  51. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/mining/sampling.py +0 -0
  52. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/mining/signals.py +0 -0
  53. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/mining/sourcekind.py +0 -0
  54. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/mining/spec.py +0 -0
  55. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/mining/store.py +0 -0
  56. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/models.py +0 -0
  57. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/nlp.py +0 -0
  58. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/notifications.py +0 -0
  59. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/parser.py +0 -0
  60. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/py.typed +0 -0
  61. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/query.py +0 -0
  62. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/render.py +0 -0
  63. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/sentiment/__init__.py +0 -0
  64. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/sentiment/buckets.py +0 -0
  65. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/sentiment/data/afinn-en-165.tsv +0 -0
  66. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/sentiment/data/domain_overrides.tsv +0 -0
  67. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/sentiment/data/en-ewt.udpipe +0 -0
  68. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/sentiment/engine.py +0 -0
  69. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/sentiment/lexicon.py +0 -0
  70. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/sentiment/scorespec.py +0 -0
  71. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/snapshot_schema/config.schema.json +0 -0
  72. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/snapshot_schema/context.schema.json +0 -0
  73. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/snapshot_schema/request.schema.json +0 -0
  74. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/snapshot_schema/response.schema.json +0 -0
  75. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/snapshot_schema/tool_registry.schema.json +0 -0
  76. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/snapshots.py +0 -0
  77. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/synthetic.py +0 -0
  78. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/tools.py +0 -0
  79. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/cc_transcript/watch.py +0 -0
  80. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/cli/Cargo.toml +0 -0
  81. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/cli/src/commands/blame.rs +0 -0
  82. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/cli/src/commands/corpus.rs +0 -0
  83. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/cli/src/commands/corrections.rs +0 -0
  84. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/cli/src/commands/digest.rs +0 -0
  85. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/cli/src/commands/facts.rs +0 -0
  86. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/cli/src/commands/grep.rs +0 -0
  87. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/cli/src/commands/list.rs +0 -0
  88. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/cli/src/commands/mod.rs +0 -0
  89. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/cli/src/commands/scratchpad.rs +0 -0
  90. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/cli/src/commands/show.rs +0 -0
  91. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/cli/src/commands/slice.rs +0 -0
  92. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/cli/src/commands/stats.rs +0 -0
  93. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/cli/src/commands/watch.rs +0 -0
  94. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/cli/src/lib.rs +0 -0
  95. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/cli/src/main.rs +0 -0
  96. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/cli/src/output.rs +0 -0
  97. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/cli/src/target.rs +0 -0
  98. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/cli/src/timearg.rs +0 -0
  99. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/benches/parse.rs +0 -0
  100. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/benches/render.rs +0 -0
  101. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/benches/toolcall.rs +0 -0
  102. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/activity.rs +0 -0
  103. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/actor.rs +0 -0
  104. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/blame.rs +0 -0
  105. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/buckets.rs +0 -0
  106. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/codex/discovery.rs +0 -0
  107. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/codex/lower.rs +0 -0
  108. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/codex/mod.rs +0 -0
  109. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/codex/parse.rs +0 -0
  110. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/codex/probe.rs +0 -0
  111. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/codex/protocol.rs +0 -0
  112. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/codex/types.rs +0 -0
  113. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/command.rs +0 -0
  114. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/context.rs +0 -0
  115. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/corrections.rs +0 -0
  116. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/cost.rs +0 -0
  117. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/discovery.rs +0 -0
  118. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/facts.rs +0 -0
  119. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/feedback.rs +0 -0
  120. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/filter.rs +0 -0
  121. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/gateway.rs +0 -0
  122. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/ids.rs +0 -0
  123. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/judge.rs +0 -0
  124. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/literals/command.rs +0 -0
  125. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/literals/corrections.rs +0 -0
  126. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/literals/feedback.rs +0 -0
  127. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/literals/mining.rs +0 -0
  128. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/literals/mod.rs +0 -0
  129. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/literals/protocol.rs +0 -0
  130. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/notifications.rs +0 -0
  131. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/parse.rs +0 -0
  132. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/protocol.rs +0 -0
  133. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/pystr.rs +0 -0
  134. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/query.rs +0 -0
  135. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/rng.rs +0 -0
  136. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/scan.rs +0 -0
  137. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/scan_regressions.rs +0 -0
  138. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/scan_stream.rs +0 -0
  139. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/schema.rs +0 -0
  140. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/snapshot.rs +0 -0
  141. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/snapshot_activity.rs +0 -0
  142. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/snapshot_codec.rs +0 -0
  143. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/snapshot_codex_append.rs +0 -0
  144. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/snapshot_labels.rs +0 -0
  145. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/snapshot_memory.rs +0 -0
  146. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/snapshot_owned.rs +0 -0
  147. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/snapshot_prepared.rs +0 -0
  148. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/snapshot_prepared_disk.rs +0 -0
  149. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/snapshot_prepared_service.rs +0 -0
  150. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/snapshot_projection.rs +0 -0
  151. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/snapshot_regressions.rs +0 -0
  152. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/snapshot_root_warm.rs +0 -0
  153. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/snapshot_text.rs +0 -0
  154. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/sqlite.rs +0 -0
  155. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/toolcall.rs +0 -0
  156. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/types.rs +0 -0
  157. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/value.rs +0 -0
  158. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/core/src/watch.rs +0 -0
  159. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/Cargo.toml +0 -0
  160. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/build.rs +0 -0
  161. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/data/command_prefix_pins.tsv +0 -0
  162. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/actor_bridge.rs +0 -0
  163. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/bin/stub_gen.rs +0 -0
  164. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/codex.rs +0 -0
  165. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/command.rs +0 -0
  166. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/context.rs +0 -0
  167. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/corrections.rs +0 -0
  168. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/discovery.rs +0 -0
  169. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/feedback.rs +0 -0
  170. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/judge.rs +0 -0
  171. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/lexicon.rs +0 -0
  172. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/lib.rs +0 -0
  173. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/mining.rs +0 -0
  174. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/nlp.rs +0 -0
  175. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/python.rs +0 -0
  176. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/render.rs +0 -0
  177. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/score.rs +0 -0
  178. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/snapshot_decode.rs +0 -0
  179. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/snapshots.rs +0 -0
  180. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/sqlite.rs +0 -0
  181. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/toolcall.rs +0 -0
  182. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/views/attachment.rs +0 -0
  183. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/views/blocks.rs +0 -0
  184. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/views/command.rs +0 -0
  185. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/views/convert.rs +0 -0
  186. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/views/dunder.rs +0 -0
  187. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/views/events.rs +0 -0
  188. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/views/meta.rs +0 -0
  189. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/views/mod.rs +0 -0
  190. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/views/print.rs +0 -0
  191. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/views/store.rs +0 -0
  192. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/views/system.rs +0 -0
  193. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/views/toolcall.rs +0 -0
  194. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/views/toolresult.rs +0 -0
  195. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/views/transcript.rs +0 -0
  196. {cc_transcript-14.34.0 → cc_transcript-14.35.0}/rust/crates/py/src/watch.rs +0 -0
@@ -226,6 +226,7 @@ dependencies = [
226
226
  "once_cell",
227
227
  "rable",
228
228
  "regex",
229
+ "regex-syntax",
229
230
  "rusqlite",
230
231
  "ryu-js",
231
232
  "serde",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cc-transcript
3
- Version: 14.34.0
3
+ Version: 14.35.0
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.34.0" # informational — releases stamp the version from the git tag
3
+ version = "14.35.0" # 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"
@@ -15,6 +15,7 @@ chrono = { version = "0.4", default-features = false, features = ["std", "serde"
15
15
  memchr = "2.7"
16
16
  once_cell = "1"
17
17
  regex = "1"
18
+ regex-syntax = "0.8"
18
19
  # Gated behind `command`: a real bash AST (rable) backs the command parser. The Swift/CI build
19
20
  # takes core with default-features off, so this stays out of the python-free path.
20
21
  rable = { version = "0.2.1", optional = true }
@@ -31,6 +31,8 @@ pub mod rng;
31
31
  pub mod scan;
32
32
  pub mod scan_checkpoint;
33
33
  pub mod scan_grep;
34
+ pub mod scan_index;
35
+ pub mod scan_projection;
34
36
  pub mod scan_stream;
35
37
  #[cfg(feature = "sqlite")]
36
38
  pub mod schema;
@@ -834,7 +834,7 @@ fn search_limit() -> crate::snapshot::SnapshotError {
834
834
  )
835
835
  }
836
836
 
837
- fn search_add(
837
+ pub(crate) fn search_add(
838
838
  total: &mut usize,
839
839
  bytes: usize,
840
840
  limit: usize,
@@ -0,0 +1,606 @@
1
+ use std::collections::HashSet;
2
+ use std::fs::{DirBuilder, File, OpenOptions};
3
+ use std::hash::{DefaultHasher, Hash, Hasher};
4
+ use std::io::{Read, Write};
5
+ use std::os::fd::AsRawFd;
6
+ use std::os::unix::fs::{DirBuilderExt, MetadataExt, OpenOptionsExt};
7
+ use std::path::{Path, PathBuf};
8
+ use std::sync::atomic::{AtomicUsize, Ordering};
9
+
10
+ use serde::{Deserialize, Serialize};
11
+ use sha2::{Digest, Sha256};
12
+ use sonic_rs::Value;
13
+
14
+ use crate::scan_index::{open_private, IndexLayer, MIN_SOURCE_BYTES};
15
+ use crate::scan_stream::LineSpan;
16
+
17
+ pub const MAX_RECORD_BYTES: usize = 8 * 1024 * 1024;
18
+ pub const PREFIX_SEGMENT: u64 = 4 * 1024 * 1024;
19
+ pub const MAX_RECORDS: usize = 256;
20
+ pub const LOCK_STRIPES: usize = 1024;
21
+ pub const PROTOCOL_DIR: &str = "stripes-1";
22
+ const MAX_LISTED: usize = 4096;
23
+ const MAX_QUERIES: usize = 16;
24
+ const MAX_INDEX_BYTES: u64 = 2 * 1024 * 1024 * 1024;
25
+
26
+ pub struct GrepCheckpoints {
27
+ dir: PathBuf,
28
+ producer: String,
29
+ segment: u64,
30
+ index_from: u64,
31
+ }
32
+
33
+ pub struct Prefix {
34
+ span: u64,
35
+ whole: Vec<(u64, u64)>,
36
+ open: DefaultHasher,
37
+ start: u64,
38
+ end: u64,
39
+ unread: Option<u64>,
40
+ }
41
+
42
+ #[derive(Serialize, Deserialize, Clone, Copy, Debug, PartialEq, Eq)]
43
+ pub struct Span {
44
+ pub offset: u64,
45
+ pub len: usize,
46
+ pub terminated: bool,
47
+ pub digest: u64,
48
+ }
49
+
50
+ impl From<Span> for LineSpan {
51
+ fn from(span: Span) -> Self {
52
+ Self {
53
+ offset: span.offset,
54
+ len: span.len,
55
+ terminated: span.terminated,
56
+ }
57
+ }
58
+ }
59
+
60
+ #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
61
+ pub struct Replayed {
62
+ pub index: usize,
63
+ pub span: Span,
64
+ pub pattern_ids: Option<Vec<usize>>,
65
+ pub opens_window: bool,
66
+ }
67
+
68
+ #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
69
+ pub struct Queued {
70
+ pub index: usize,
71
+ pub span: Option<Span>,
72
+ pub pattern_ids: Option<Vec<usize>>,
73
+ }
74
+
75
+ #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
76
+ pub struct ReducerState {
77
+ pub counts: Vec<usize>,
78
+ pub matched_items: usize,
79
+ pub coverage_complete: bool,
80
+ }
81
+
82
+ #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
83
+ pub struct FileLayer {
84
+ pub committed: u64,
85
+ pub fence: Vec<u8>,
86
+ pub sniffed: bool,
87
+ pub events: usize,
88
+ pub names: Vec<(String, String)>,
89
+ pub prefix: Vec<(u64, u64)>,
90
+ pub index: Option<IndexLayer>,
91
+ }
92
+
93
+ #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
94
+ pub struct QueryLayer {
95
+ pub key: String,
96
+ pub indexed: bool,
97
+ pub committed: u64,
98
+ pub parsed: usize,
99
+ pub decided: usize,
100
+ pub emitted: usize,
101
+ pub last_emitted: Option<usize>,
102
+ pub last_hit: Option<usize>,
103
+ pub stopped: Option<usize>,
104
+ pub reducer: ReducerState,
105
+ pub referenced: Vec<(String, String)>,
106
+ pub replay: Vec<Replayed>,
107
+ pub queue: Vec<Queued>,
108
+ }
109
+
110
+ #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
111
+ pub struct SourceRecord {
112
+ pub key: String,
113
+ pub size: u64,
114
+ pub revision: String,
115
+ pub file: FileLayer,
116
+ pub queries: Vec<QueryLayer>,
117
+ }
118
+
119
+ #[derive(Clone, Copy, Debug, PartialEq, Eq)]
120
+ struct Version {
121
+ inode: u64,
122
+ size: u64,
123
+ mtime: (i64, i64),
124
+ ctime: (i64, i64),
125
+ }
126
+
127
+ pub struct Loaded {
128
+ pub record: SourceRecord,
129
+ version: Version,
130
+ }
131
+
132
+ pub struct Saved {
133
+ pub published: bool,
134
+ pub read: usize,
135
+ }
136
+
137
+ pub fn digest(bytes: &[u8]) -> u64 {
138
+ let mut hasher = std::hash::DefaultHasher::new();
139
+ bytes.hash(&mut hasher);
140
+ hasher.finish()
141
+ }
142
+
143
+ fn lock(file: &File) -> bool {
144
+ unsafe { libc::flock(file.as_raw_fd(), libc::LOCK_EX | libc::LOCK_NB) == 0 }
145
+ }
146
+
147
+ fn try_lock(path: &Path) -> Option<File> {
148
+ open_private(path, true).ok().filter(lock)
149
+ }
150
+
151
+ fn stripe(key: &str) -> usize {
152
+ let digest = Sha256::digest(key.as_bytes());
153
+ usize::from(u16::from_be_bytes([digest[0], digest[1]])) % LOCK_STRIPES
154
+ }
155
+
156
+ fn version(metadata: &std::fs::Metadata) -> Version {
157
+ Version {
158
+ inode: metadata.ino(),
159
+ size: metadata.size(),
160
+ mtime: (metadata.mtime(), metadata.mtime_nsec()),
161
+ ctime: (metadata.ctime(), metadata.ctime_nsec()),
162
+ }
163
+ }
164
+
165
+ fn private(path: &Path) -> bool {
166
+ DirBuilder::new()
167
+ .recursive(true)
168
+ .mode(0o700)
169
+ .create(path)
170
+ .and_then(|()| std::fs::symlink_metadata(path))
171
+ .is_ok_and(|metadata| {
172
+ metadata.is_dir()
173
+ && metadata.uid() == unsafe { libc::geteuid() }
174
+ && metadata.mode() & 0o077 == 0
175
+ })
176
+ }
177
+
178
+ fn dir_bytes(path: &Path) -> u64 {
179
+ std::fs::read_dir(path).map_or(0, |entries| {
180
+ entries
181
+ .take(MAX_LISTED)
182
+ .flatten()
183
+ .filter_map(|entry| entry.metadata().ok())
184
+ .map(|metadata| metadata.len())
185
+ .sum()
186
+ })
187
+ }
188
+
189
+ impl FileLayer {
190
+ fn proven(&self) -> bool {
191
+ self.prefix.last().map_or(0, |(end, _)| *end) == self.committed
192
+ }
193
+
194
+ fn agreed(&self, other: &Self) -> u64 {
195
+ self.prefix
196
+ .iter()
197
+ .zip(&other.prefix)
198
+ .take_while(|(ours, theirs)| ours == theirs)
199
+ .last()
200
+ .map_or(0, |((end, _), _)| *end)
201
+ }
202
+ }
203
+
204
+ impl SourceRecord {
205
+ pub fn merge(latest: Option<Self>, trusted: bool, ours: Self, builds: bool) -> Option<Self> {
206
+ let Some(latest) = latest else {
207
+ return ours.file.proven().then_some(ours);
208
+ };
209
+ let shared = (!trusted).then(|| ours.file.agreed(&latest.file));
210
+ let crosses = |layer: &QueryLayer| {
211
+ shared.is_none_or(|shared| !layer.indexed && layer.committed <= shared)
212
+ };
213
+ let query = ours
214
+ .queries
215
+ .first()
216
+ .cloned()
217
+ .expect("a saved record carries its query layer");
218
+ let ours_wins = ours.file.committed > latest.file.committed && ours.file.proven();
219
+ let (mut record, other) = if ours_wins {
220
+ (ours, latest)
221
+ } else {
222
+ (latest, ours)
223
+ };
224
+ if builds != ours_wins {
225
+ if let Some(index) = other
226
+ .file
227
+ .index
228
+ .filter(|index| shared.is_none_or(|shared| index.committed <= shared))
229
+ {
230
+ record.file.index = Some(index);
231
+ }
232
+ }
233
+ let carried = ours_wins || crosses(&query);
234
+ let mut queries: Vec<QueryLayer> = std::mem::take(&mut record.queries)
235
+ .into_iter()
236
+ .chain(other.queries.into_iter().filter(|layer| crosses(layer)))
237
+ .filter(|layer| !carried || layer.key != query.key)
238
+ .collect();
239
+ if carried {
240
+ queries.insert(0, query);
241
+ }
242
+ queries.truncate(MAX_QUERIES);
243
+ record.queries = queries;
244
+ Some(record)
245
+ }
246
+ }
247
+
248
+ impl Prefix {
249
+ pub fn new(span: u64) -> Self {
250
+ Self {
251
+ span,
252
+ whole: Vec::new(),
253
+ open: DefaultHasher::new(),
254
+ start: 0,
255
+ end: 0,
256
+ unread: None,
257
+ }
258
+ }
259
+
260
+ pub fn adopt(span: u64, segments: &[(u64, u64)]) -> Self {
261
+ let open = segments
262
+ .split_last()
263
+ .map(|(&(end, sum), rest)| (end, sum, rest.last().map_or(0, |(end, _)| *end)))
264
+ .filter(|(end, _, start)| end - start < span);
265
+ let whole = segments[..segments.len() - usize::from(open.is_some())].to_vec();
266
+ let start = whole.last().map_or(0, |(end, _)| *end);
267
+ Self {
268
+ span,
269
+ whole,
270
+ open: DefaultHasher::new(),
271
+ start,
272
+ end: open.map_or(start, |(end, _, _)| end),
273
+ unread: open.map(|(_, sum, _)| sum),
274
+ }
275
+ }
276
+
277
+ pub fn span(&self) -> u64 {
278
+ self.span
279
+ }
280
+
281
+ pub fn end(&self) -> u64 {
282
+ self.end
283
+ }
284
+
285
+ pub fn room(&self) -> u64 {
286
+ self.start + self.span - self.end
287
+ }
288
+
289
+ pub fn unread(&self) -> Option<LineSpan> {
290
+ self.unread.map(|_| LineSpan {
291
+ offset: self.start,
292
+ len: (self.end - self.start) as usize,
293
+ terminated: false,
294
+ })
295
+ }
296
+
297
+ pub fn seed(&mut self, bytes: &[u8]) -> bool {
298
+ self.open.write(bytes);
299
+ self.unread.take() == Some(self.open.finish())
300
+ }
301
+
302
+ pub fn write(&mut self, mut bytes: &[u8]) {
303
+ while !bytes.is_empty() {
304
+ let (head, rest) = bytes.split_at((self.room() as usize).min(bytes.len()));
305
+ self.open.write(head);
306
+ self.end += head.len() as u64;
307
+ if self.room() == 0 {
308
+ self.whole.push((self.end, self.open.finish()));
309
+ self.open = DefaultHasher::new();
310
+ self.start = self.end;
311
+ }
312
+ bytes = rest;
313
+ }
314
+ }
315
+
316
+ pub fn agrees(&self, segments: &[(u64, u64)]) -> bool {
317
+ self.whole
318
+ .iter()
319
+ .zip(segments)
320
+ .all(|(ours, theirs)| ours == theirs)
321
+ }
322
+
323
+ pub fn segments(&self) -> Vec<(u64, u64)> {
324
+ self.whole
325
+ .iter()
326
+ .copied()
327
+ .chain(
328
+ (self.end > self.start)
329
+ .then(|| (self.end, self.unread.unwrap_or_else(|| self.open.finish()))),
330
+ )
331
+ .collect()
332
+ }
333
+ }
334
+
335
+ impl GrepCheckpoints {
336
+ pub fn new(dir: PathBuf, producer: String) -> Self {
337
+ Self {
338
+ dir: dir.join(PROTOCOL_DIR),
339
+ producer,
340
+ segment: PREFIX_SEGMENT,
341
+ index_from: MIN_SOURCE_BYTES,
342
+ }
343
+ }
344
+
345
+ pub fn segmented(self, segment: u64) -> Self {
346
+ Self { segment, ..self }
347
+ }
348
+
349
+ pub fn segment(&self) -> u64 {
350
+ self.segment
351
+ }
352
+
353
+ pub fn indexing_from(self, index_from: u64) -> Self {
354
+ Self { index_from, ..self }
355
+ }
356
+
357
+ pub fn indexes(&self, size: u64) -> bool {
358
+ size >= self.index_from
359
+ }
360
+
361
+ pub fn key(&self, binding: Value) -> Result<String, String> {
362
+ let binding = sonic_rs::json!({
363
+ "version": "grep-checkpoint/5",
364
+ "parser": crate::snapshot::PARSER_VERSION,
365
+ "producer": self.producer,
366
+ "binding": binding,
367
+ });
368
+ Ok(format!(
369
+ "{:x}",
370
+ Sha256::digest(crate::ids::canonical_json(&binding)?.as_bytes())
371
+ ))
372
+ }
373
+
374
+ fn path(&self, key: &str) -> PathBuf {
375
+ self.dir.join(format!("{key}.json"))
376
+ }
377
+
378
+ pub fn index_dir(&self, key: &str) -> PathBuf {
379
+ self.dir.join(format!("{key}.idx"))
380
+ }
381
+
382
+ fn lock_dir(&self) -> PathBuf {
383
+ self.dir.join("locks")
384
+ }
385
+
386
+ fn build_lock_path(&self, key: &str) -> PathBuf {
387
+ self.lock_dir()
388
+ .join(format!("build-{:03x}.lock", stripe(key)))
389
+ }
390
+
391
+ fn record_lock_path(&self, key: &str) -> PathBuf {
392
+ self.lock_dir()
393
+ .join(format!("record-{:03x}.lock", stripe(key)))
394
+ }
395
+
396
+ fn private_dir(&self) -> bool {
397
+ private(&self.dir)
398
+ }
399
+
400
+ fn locks(&self) -> bool {
401
+ self.private_dir() && private(&self.lock_dir())
402
+ }
403
+
404
+ pub fn build_lock(&self, key: &str) -> Option<File> {
405
+ self.locks()
406
+ .then(|| try_lock(&self.build_lock_path(key)))
407
+ .flatten()
408
+ .filter(|_| private(&self.index_dir(key)))
409
+ }
410
+
411
+ pub fn load(&self, key: &str, limit: usize) -> (Option<Loaded>, usize) {
412
+ if !self.private_dir() {
413
+ return (None, 0);
414
+ }
415
+ let (loaded, bytes, corrupt) = self.read(key, limit);
416
+ if corrupt {
417
+ self.discard(key);
418
+ }
419
+ (loaded, bytes)
420
+ }
421
+
422
+ fn read(&self, key: &str, limit: usize) -> (Option<Loaded>, usize, bool) {
423
+ let Ok(mut file) = OpenOptions::new()
424
+ .read(true)
425
+ .custom_flags(libc::O_NOFOLLOW)
426
+ .open(self.path(key))
427
+ else {
428
+ return (None, 0, false);
429
+ };
430
+ let Ok(metadata) = file.metadata() else {
431
+ return (None, 0, false);
432
+ };
433
+ if !metadata.is_file()
434
+ || metadata.uid() != unsafe { libc::geteuid() }
435
+ || metadata.len() > MAX_RECORD_BYTES.min(limit) as u64
436
+ {
437
+ return (None, 0, false);
438
+ }
439
+ let mut bytes = Vec::with_capacity(metadata.len() as usize);
440
+ if (&mut file)
441
+ .take(metadata.len())
442
+ .read_to_end(&mut bytes)
443
+ .is_err()
444
+ {
445
+ return (None, bytes.len(), false);
446
+ }
447
+ match sonic_rs::from_slice::<SourceRecord>(&bytes) {
448
+ Ok(record) if record.key == key => (
449
+ Some(Loaded {
450
+ record,
451
+ version: version(&metadata),
452
+ }),
453
+ bytes.len(),
454
+ false,
455
+ ),
456
+ _ => (None, bytes.len(), true),
457
+ }
458
+ }
459
+
460
+ pub fn discard(&self, key: &str) {
461
+ let _ = std::fs::remove_file(self.path(key));
462
+ self.discard_index(key);
463
+ }
464
+
465
+ pub fn discard_index(&self, key: &str) {
466
+ let _ = std::fs::remove_dir_all(self.index_dir(key));
467
+ }
468
+
469
+ pub fn save(
470
+ &self,
471
+ ours: SourceRecord,
472
+ builds: bool,
473
+ basis: Option<&Loaded>,
474
+ limit: usize,
475
+ ) -> std::io::Result<Saved> {
476
+ static NEXT: AtomicUsize = AtomicUsize::new(0);
477
+ if !self.locks() {
478
+ return Ok(Saved {
479
+ published: false,
480
+ read: 0,
481
+ });
482
+ }
483
+ let Some(guard) = try_lock(&self.record_lock_path(&ours.key)) else {
484
+ return Ok(Saved {
485
+ published: false,
486
+ read: 0,
487
+ });
488
+ };
489
+ let current = std::fs::symlink_metadata(self.path(&ours.key))
490
+ .ok()
491
+ .map(|metadata| version(&metadata));
492
+ let (latest, trusted, read) = match basis {
493
+ Some(basis) if current == Some(basis.version) => (Some(basis.record.clone()), true, 0),
494
+ _ => match self.read(&ours.key, limit) {
495
+ (None, read, false) if current.is_some() => {
496
+ return Ok(Saved {
497
+ published: false,
498
+ read,
499
+ })
500
+ }
501
+ (latest, read, _) => (latest.map(|loaded| loaded.record), false, read),
502
+ },
503
+ };
504
+ let fresh = ours.file.index.clone();
505
+ let Some(record) = SourceRecord::merge(latest, trusted, ours, builds) else {
506
+ return Ok(Saved {
507
+ published: false,
508
+ read,
509
+ });
510
+ };
511
+ let bytes = sonic_rs::to_vec(&record).map_err(std::io::Error::other)?;
512
+ if bytes.len() > MAX_RECORD_BYTES {
513
+ return Ok(Saved {
514
+ published: false,
515
+ read,
516
+ });
517
+ }
518
+ let staged = self.dir.join(format!(
519
+ "{}.{}.{}.tmp",
520
+ record.key,
521
+ std::process::id(),
522
+ NEXT.fetch_add(1, Ordering::Relaxed)
523
+ ));
524
+ let written = OpenOptions::new()
525
+ .write(true)
526
+ .create_new(true)
527
+ .mode(0o600)
528
+ .custom_flags(libc::O_NOFOLLOW)
529
+ .open(&staged)
530
+ .and_then(|mut file| file.write_all(&bytes))
531
+ .and_then(|()| std::fs::rename(&staged, self.path(&record.key)));
532
+ if written.is_err() {
533
+ let _ = std::fs::remove_file(&staged);
534
+ }
535
+ written?;
536
+ drop(guard);
537
+ self.evict(builds.then_some(record.key.as_str()));
538
+ Ok(Saved {
539
+ published: record.file.index == fresh,
540
+ read,
541
+ })
542
+ }
543
+
544
+ fn victim(&self, key: &str, holder: Option<&str>) -> Option<(Option<File>, File)> {
545
+ let build = if holder.is_some_and(|holder| stripe(holder) == stripe(key)) {
546
+ None
547
+ } else {
548
+ Some(try_lock(&self.build_lock_path(key))?)
549
+ };
550
+ Some((build, try_lock(&self.record_lock_path(key))?))
551
+ }
552
+
553
+ fn evict(&self, holder: Option<&str>) {
554
+ let Ok(entries) = std::fs::read_dir(&self.dir) else {
555
+ return;
556
+ };
557
+ let mut records = Vec::new();
558
+ let mut dirs = Vec::new();
559
+ for entry in entries.take(MAX_LISTED).flatten() {
560
+ let path = entry.path();
561
+ let (Some(extension), Some(key)) = (
562
+ path.extension().and_then(|extension| extension.to_str()),
563
+ path.file_stem().and_then(|stem| stem.to_str()),
564
+ ) else {
565
+ continue;
566
+ };
567
+ match extension {
568
+ "json" => {
569
+ if let Ok(modified) = entry.metadata().and_then(|metadata| metadata.modified())
570
+ {
571
+ records.push((modified, key.to_owned()));
572
+ }
573
+ }
574
+ "idx" => dirs.push(key.to_owned()),
575
+ _ => {}
576
+ }
577
+ }
578
+ records.sort();
579
+ let excess = records.len().saturating_sub(MAX_RECORDS);
580
+ for (_, key) in records.drain(..excess) {
581
+ if let Some(_held) = self.victim(&key, holder) {
582
+ self.discard(&key);
583
+ }
584
+ }
585
+ if holder.is_none() {
586
+ return;
587
+ }
588
+ let kept: HashSet<&str> = records.iter().map(|(_, key)| key.as_str()).collect();
589
+ for key in dirs.iter().filter(|key| !kept.contains(key.as_str())) {
590
+ if let Some(_held) = self.victim(key, holder) {
591
+ self.discard_index(key);
592
+ }
593
+ }
594
+ let mut total = 0u64;
595
+ for (_, key) in records.iter().rev() {
596
+ match total.saturating_add(dir_bytes(&self.index_dir(key))) {
597
+ within if within <= MAX_INDEX_BYTES => total = within,
598
+ _ => {
599
+ if let Some(_held) = self.victim(key, holder) {
600
+ self.discard_index(key);
601
+ }
602
+ }
603
+ }
604
+ }
605
+ }
606
+ }