tensorfs 0.3.81__tar.gz → 0.3.82__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.

Potentially problematic release.


This version of tensorfs might be problematic. Click here for more details.

Files changed (184) hide show
  1. {tensorfs-0.3.81 → tensorfs-0.3.82}/Cargo.lock +2 -2
  2. {tensorfs-0.3.81 → tensorfs-0.3.82}/Cargo.toml +1 -1
  3. {tensorfs-0.3.81 → tensorfs-0.3.82}/PKG-INFO +1 -1
  4. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/catalog.rs +18 -4
  5. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/ensure/flight.rs +54 -0
  6. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/ensure.rs +39 -9
  7. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/gc.rs +1 -0
  8. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/meta.rs +1 -4
  9. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/store.rs +31 -7
  10. tensorfs-0.3.82/crates/tensorfs-core/src/transport/decisions.rs +37 -0
  11. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/transport/http.rs +21 -3
  12. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/transport/ledger.rs +6 -2
  13. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/transport/mod.rs +1 -0
  14. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/transport/pull.rs +25 -3
  15. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/transport/ranged.rs +56 -35
  16. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/transport/speculate.rs +223 -65
  17. tensorfs-0.3.82/crates/tensorfs-core/src/transport/tests/tail.rs +461 -0
  18. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/transport/tests.rs +52 -1
  19. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/fetch_faults.rs +207 -6
  20. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/hub_tls.rs +47 -5
  21. {tensorfs-0.3.81 → tensorfs-0.3.82}/pyproject.toml +1 -1
  22. tensorfs-0.3.81/crates/tensorfs-core/src/transport/tests/tail.rs +0 -225
  23. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/Cargo.toml +0 -0
  24. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/build.rs +0 -0
  25. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/examples/h3-swiglu-layout.md +0 -0
  26. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/examples/optional-cache-backfill.md +0 -0
  27. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/examples/resident-conversion.md +0 -0
  28. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/examples/resident_conversion_profile.rs +0 -0
  29. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/asset_update.rs +0 -0
  30. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/b64.rs +0 -0
  31. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/bin/tfs/ckpt.rs +0 -0
  32. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/bin/tfs/conform.rs +0 -0
  33. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/bin/tfs/ensure.rs +0 -0
  34. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/bin/tfs/fetch.rs +0 -0
  35. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/bin/tfs/ingest.rs +0 -0
  36. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/bin/tfs/main.rs +0 -0
  37. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/bin/tfs/rd.rs +0 -0
  38. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/bin/tfs/repo.rs +0 -0
  39. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/bin/tfs/snap.rs +0 -0
  40. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/bin/tfs/watch.rs +0 -0
  41. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/cache_roots.rs +0 -0
  42. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/canon.rs +0 -0
  43. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/capability.rs +0 -0
  44. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/catalog/lock.rs +0 -0
  45. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/cbor.rs +0 -0
  46. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/checkpoint.rs +0 -0
  47. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/checkpoint_root.rs +0 -0
  48. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/corpus.rs +0 -0
  49. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/derived/adoption.rs +0 -0
  50. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/derived/companion_tests.rs +0 -0
  51. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/derived/estimate.rs +0 -0
  52. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/derived/graft_tests.rs +0 -0
  53. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/derived/group_commit_tests.rs +0 -0
  54. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/derived/history_cost_tests.rs +0 -0
  55. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/derived/part_rows_tests.rs +0 -0
  56. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/derived/progress.rs +0 -0
  57. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/derived/resume_tests.rs +0 -0
  58. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/derived/retention.rs +0 -0
  59. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/derived/roots.rs +0 -0
  60. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/derived.rs +0 -0
  61. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/descriptors.rs +0 -0
  62. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/disk.rs +0 -0
  63. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/dtype.rs +0 -0
  64. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/durability.rs +0 -0
  65. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/ensure/admission.rs +0 -0
  66. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/err.rs +0 -0
  67. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/fetch.rs +0 -0
  68. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/filesystem_identity.rs +0 -0
  69. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/fill.rs +0 -0
  70. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/fit.rs +0 -0
  71. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/header.rs +0 -0
  72. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/home.rs +0 -0
  73. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/ids.rs +0 -0
  74. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/ingest/carrier.rs +0 -0
  75. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/ingest/convert.rs +0 -0
  76. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/ingest/custody.rs +0 -0
  77. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/ingest/fingerprint.rs +0 -0
  78. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/ingest/gguf.rs +0 -0
  79. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/ingest/h3_lora.rs +0 -0
  80. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/ingest/journal.rs +0 -0
  81. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/ingest/mod.rs +0 -0
  82. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/ingest/narrow.rs +0 -0
  83. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/ingest/preflight.rs +0 -0
  84. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/ingest/routes/anima.routes.json +0 -0
  85. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/ingest/routes/anima.spec.json +0 -0
  86. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/ingest/routes/sdxl.routes.json +0 -0
  87. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/ingest/routes/sdxl.spec.json +0 -0
  88. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/ingest/routes.rs +0 -0
  89. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/ingest/source.rs +0 -0
  90. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/ingest/stamp.rs +0 -0
  91. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/ingest/transaction.rs +0 -0
  92. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/jcs.rs +0 -0
  93. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/lib.rs +0 -0
  94. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/limits.rs +0 -0
  95. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/machine.rs +0 -0
  96. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/manifest.rs +0 -0
  97. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/project.rs +0 -0
  98. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/providers.rs +0 -0
  99. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/read.rs +0 -0
  100. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/receipt.rs +0 -0
  101. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/reclaim.rs +0 -0
  102. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/registry.rs +0 -0
  103. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/relation.rs +0 -0
  104. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/repo_cache.rs +0 -0
  105. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/repository.rs +0 -0
  106. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/sha256.rs +0 -0
  107. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/source_artifact.rs +0 -0
  108. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/spec.rs +0 -0
  109. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/staging.rs +0 -0
  110. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/stats.rs +0 -0
  111. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/storage.rs +0 -0
  112. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/transport/api.rs +0 -0
  113. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/transport/http_reuse_tests.rs +0 -0
  114. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/transport/hub.rs +0 -0
  115. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/transport/memory.rs +0 -0
  116. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/transport/pace.rs +0 -0
  117. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/transport/policy.rs +0 -0
  118. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/transport/prefix.rs +0 -0
  119. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/transport/push.rs +0 -0
  120. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/unsynced.rs +0 -0
  121. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/src/vectors.rs +0 -0
  122. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/additive_fields.rs +0 -0
  123. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/anima_hf_profile.rs +0 -0
  124. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/as_is.rs +0 -0
  125. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/catalog_owner_probe.c +0 -0
  126. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/checkpoint_roots.rs +0 -0
  127. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/civitai_anima.rs +0 -0
  128. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/civitai_sdxl_profile.rs +0 -0
  129. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/ensure.rs +0 -0
  130. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/fd_budget.rs +0 -0
  131. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/fd_headroom.rs +0 -0
  132. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/fetch_url_progress.rs +0 -0
  133. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/fit.rs +0 -0
  134. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/fixtures/repo_apply/blobs.jsonl +0 -0
  135. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/fixtures/repo_apply/expected_list.jsonl +0 -0
  136. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/fixtures/repo_apply/expected_repository.json +0 -0
  137. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/fixtures/repo_apply/expected_rows.jsonl +0 -0
  138. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/fixtures/repo_apply/header.cbor +0 -0
  139. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/fixtures/repo_apply/manifest.json +0 -0
  140. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/fixtures/repo_apply/mutation.json +0 -0
  141. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/foreign_json.rs +0 -0
  142. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/h3_lora.rs +0 -0
  143. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/h3_swiglu.rs +0 -0
  144. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/home.rs +0 -0
  145. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/import_tree.rs +0 -0
  146. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/instrument_profiles.rs +0 -0
  147. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/liveness.rs +0 -0
  148. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/qwen_image21_profile.rs +0 -0
  149. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/read_plan.rs +0 -0
  150. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/reclaim.rs +0 -0
  151. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/reclaim_run.rs +0 -0
  152. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/repo_cache.rs +0 -0
  153. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/repo_store.rs +0 -0
  154. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/resident_admission.rs +0 -0
  155. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/routed_single_file.rs +0 -0
  156. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/sha256_backends.rs +0 -0
  157. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/sharded_cas.rs +0 -0
  158. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/source_artifacts.rs +0 -0
  159. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/source_download.rs +0 -0
  160. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/source_plan.rs +0 -0
  161. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/source_prefixes.rs +0 -0
  162. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/source_preflight.rs +0 -0
  163. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/staging.rs +0 -0
  164. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/store_boundaries.rs +0 -0
  165. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/tensor_schema.rs +0 -0
  166. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/transfer_memory.rs +0 -0
  167. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/trust_index.rs +0 -0
  168. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/version.rs +0 -0
  169. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-core/tests/write_through.rs +0 -0
  170. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-py/Cargo.toml +0 -0
  171. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-py/src/docs.rs +0 -0
  172. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-py/src/ensure.rs +0 -0
  173. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-py/src/errors.rs +0 -0
  174. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-py/src/ingest.rs +0 -0
  175. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-py/src/lib.rs +0 -0
  176. {tensorfs-0.3.81 → tensorfs-0.3.82}/crates/tensorfs-py/src/store.rs +0 -0
  177. {tensorfs-0.3.81 → tensorfs-0.3.82}/python/tensorfs/__init__.py +0 -0
  178. {tensorfs-0.3.81 → tensorfs-0.3.82}/python/tensorfs/_derived_channel.py +0 -0
  179. {tensorfs-0.3.81 → tensorfs-0.3.82}/python/tensorfs/_ext.pyi +0 -0
  180. {tensorfs-0.3.81 → tensorfs-0.3.82}/python/tensorfs/_source_channel.py +0 -0
  181. {tensorfs-0.3.81 → tensorfs-0.3.82}/python/tensorfs/_tensors.py +0 -0
  182. {tensorfs-0.3.81 → tensorfs-0.3.82}/python/tensorfs/derived.py +0 -0
  183. {tensorfs-0.3.81 → tensorfs-0.3.82}/python/tensorfs/errors.py +0 -0
  184. {tensorfs-0.3.81 → tensorfs-0.3.82}/python/tensorfs/py.typed +0 -0
@@ -439,7 +439,7 @@ checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
439
439
 
440
440
  [[package]]
441
441
  name = "tensorfs-core"
442
- version = "0.3.81"
442
+ version = "0.3.82"
443
443
  dependencies = [
444
444
  "fs2",
445
445
  "libc",
@@ -454,7 +454,7 @@ dependencies = [
454
454
 
455
455
  [[package]]
456
456
  name = "tensorfs-py"
457
- version = "0.3.81"
457
+ version = "0.3.82"
458
458
  dependencies = [
459
459
  "pyo3",
460
460
  "tensorfs-core",
@@ -3,5 +3,5 @@ resolver = "2"
3
3
  members = ["crates/tensorfs-core", "crates/tensorfs-py"]
4
4
 
5
5
  [workspace.package]
6
- version = "0.3.81"
6
+ version = "0.3.82"
7
7
  edition = "2021"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tensorfs
3
- Version: 0.3.81
3
+ Version: 0.3.82
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Rust
@@ -52,10 +52,7 @@ const SCHEMA: &[(&str, &[&str])] = &[
52
52
  ];
53
53
 
54
54
  fn sql(what: impl AsRef<str>, error: rusqlite::Error) -> Refusal {
55
- Refusal {
56
- code: Code::IO_FAILED,
57
- detail: format!("{}: {error}", what.as_ref()),
58
- }
55
+ crate::store::classify_sql(what, error)
59
56
  }
60
57
 
61
58
  fn io(what: impl AsRef<str>, error: std::io::Error) -> Refusal {
@@ -1639,6 +1636,23 @@ impl Drop for WriterGuard {
1639
1636
  mod tests {
1640
1637
  use super::*;
1641
1638
 
1639
+ #[test]
1640
+ fn a_full_database_is_a_capacity_verdict_not_an_io_failure() {
1641
+ let db = Connection::open_in_memory().unwrap();
1642
+ db.execute_batch(
1643
+ "PRAGMA page_size = 512; CREATE TABLE t (x BLOB); PRAGMA max_page_count = 3;",
1644
+ )
1645
+ .unwrap();
1646
+ let full = db
1647
+ .execute("INSERT INTO t VALUES (zeroblob(65536))", [])
1648
+ .unwrap_err();
1649
+ assert_eq!(sql("record", full).code, Code::CAPACITY_EXHAUSTED);
1650
+ let other = db
1651
+ .execute("INSERT INTO missing VALUES (1)", [])
1652
+ .unwrap_err();
1653
+ assert_eq!(sql("record", other).code, Code::IO_FAILED);
1654
+ }
1655
+
1642
1656
  fn temporary(name: &str) -> PathBuf {
1643
1657
  std::env::temp_dir().join(format!(
1644
1658
  "tensorfs-catalog-{name}-{}-{}",
@@ -13,6 +13,8 @@ use fs2::FileExt;
13
13
 
14
14
  use crate::canon::{self, Fields, Value};
15
15
  use crate::err::{refuse, Code, Refusal, Result};
16
+ use crate::ids::ObjectRef;
17
+ use crate::storage::{self, HeldKey};
16
18
  use crate::store::Store;
17
19
  use crate::transport::PullCancellation;
18
20
 
@@ -123,6 +125,8 @@ impl Record {
123
125
  pub(super) struct Flight {
124
126
  _lock: File,
125
127
  record: PathBuf,
128
+ /// The closure this flight holds from GC (see [`held_objects`]).
129
+ objects: PathBuf,
126
130
  pub manifest: String,
127
131
  /// Another process's flight for this manifest was running when this one asked.
128
132
  pub joined: bool,
@@ -155,12 +159,22 @@ impl Flight {
155
159
  }
156
160
  Ok(Flight {
157
161
  _lock: lock,
162
+ objects: record.with_extension("objects"),
158
163
  record,
159
164
  manifest: manifest.to_string(),
160
165
  joined,
161
166
  })
162
167
  }
163
168
 
169
+ /// Hold `objects` (the closure, manifest included) from GC for the life of the flight.
170
+ pub fn hold(&self, objects: &[ObjectRef]) -> Result<()> {
171
+ let lines: String = objects
172
+ .iter()
173
+ .map(|o| format!("{} {}\n", o.sha256, o.length))
174
+ .collect();
175
+ fs::write(&self.objects, lines).map_err(|e| io("write held objects", e))
176
+ }
177
+
164
178
  pub fn record(&self, record: &Record) -> Result<()> {
165
179
  let temp = self
166
180
  .record
@@ -178,6 +192,7 @@ impl Drop for Flight {
178
192
  fn drop(&mut self) {
179
193
  // The record goes first: once the lock is free, nothing may read a stale one.
180
194
  let _ = fs::remove_file(&self.record);
195
+ let _ = fs::remove_file(&self.objects);
181
196
  }
182
197
  }
183
198
 
@@ -214,3 +229,42 @@ pub(super) fn live(store: &Store, except: &str) -> Result<Vec<(String, Option<Re
214
229
  }
215
230
  Ok(flights)
216
231
  }
232
+
233
+ /// Every resident object a live flight's closure names, as GC holds. An ensure counts the
234
+ /// objects already resident as held when it plans, and lands the rest unreferenced until its
235
+ /// pull is recorded; a collection in between (its own admission's, or another process's)
236
+ /// must not take either, or the pull re-buys them past the space it was admitted for.
237
+ pub(crate) fn held_objects(store: &Store) -> Result<Vec<HeldKey>> {
238
+ if !store.root().join("tmp/ensure").is_dir() {
239
+ return Ok(Vec::new());
240
+ }
241
+ let dir = dir(store)?;
242
+ let mut holds = Vec::new();
243
+ for (manifest, _) in live(store, "")? {
244
+ let Ok(lines) = fs::read_to_string(dir.join(format!("{manifest}.objects"))) else {
245
+ continue;
246
+ };
247
+ for line in lines.lines() {
248
+ let Some((hex, length)) = line.split_once(' ') else {
249
+ continue;
250
+ };
251
+ let Ok(length) = length.parse() else {
252
+ continue;
253
+ };
254
+ let (kind, key) = if store.manifest_path(hex).is_file() {
255
+ ("manifest", storage::manifest_key(hex)?)
256
+ } else if store.contains(hex) {
257
+ ("blob", storage::blob_key(hex)?)
258
+ } else {
259
+ continue;
260
+ };
261
+ holds.push(HeldKey {
262
+ key,
263
+ kind: kind.into(),
264
+ length,
265
+ sha256: hex.to_string(),
266
+ });
267
+ }
268
+ }
269
+ Ok(holds)
270
+ }
@@ -2,10 +2,11 @@
2
2
  //! the Runtime (`tensorfs.ensure`) use for model download.
3
3
  //!
4
4
  //! Resolve the closure; lead or join the Store's one flight for its manifest; admit the new
5
- //! bytes against the disk, running the GC policy when short; pull, re-attempting only an
6
- //! attempt that landed something. Events sample bytes and rate while it runs; the answer is
7
- //! an [`Ensured`] or a typed refusal. Nothing here is a timer: a retry is earned by
8
- //! measured progress, and a stalled stream is judged by the transport's own ledger.
5
+ //! bytes against the disk, running the GC policy when short; pull, re-attempting on the
6
+ //! link's weather until no object has landed for the ledger's floor. Events sample bytes and
7
+ //! rate while it runs; the answer is an [`Ensured`] or a typed refusal. Nothing here is a
8
+ //! timer: giving up is earned by measured stillness, and a stalled stream is judged by the
9
+ //! transport's own ledger.
9
10
  //!
10
11
  //! The Hub CA is process trust ([`crate::transport::trust_roots`]); callers name it once.
11
12
 
@@ -13,6 +14,7 @@ mod admission;
13
14
  mod flight;
14
15
 
15
16
  pub use admission::{relieve, Relief};
17
+ pub(crate) use flight::held_objects;
16
18
 
17
19
  use std::sync::atomic::{AtomicU32, AtomicU64, Ordering};
18
20
  use std::sync::{Arc, Condvar, Mutex};
@@ -190,6 +192,11 @@ impl store::Progress for Meter {
190
192
  self.moved.fetch_add(bytes, Ordering::Relaxed);
191
193
  }
192
194
  fn admitted(&self) {}
195
+ fn discarded(&self, bytes: u64) {
196
+ let _ = (self.moved).fetch_update(Ordering::Relaxed, Ordering::Relaxed, |moved| {
197
+ Some(moved.saturating_sub(bytes))
198
+ });
199
+ }
193
200
  }
194
201
 
195
202
  /// The fetch's live counters, shared by the pull's callbacks and the sampler.
@@ -239,6 +246,13 @@ pub fn ensure(request: &Request<'_>) -> Result<Ensured> {
239
246
  );
240
247
  },
241
248
  )?;
249
+ // A killed pull strands its partial `put-` temps, and GC, the only other reaper, never
250
+ // runs while a model is leased. Each temp carries its writer's lock, so this takes only
251
+ // the dead ones.
252
+ let _ = request.store.reap();
253
+ let mut closure_objects = closure.objects.clone();
254
+ closure_objects.push(closure.manifest.clone());
255
+ flight.hold(&closure_objects)?;
242
256
  let session = format!("ensure-{}", &closure.manifest.sha256[..12]);
243
257
  let (plan, _) = FetchPlan::of(request.store, &session, &closure.manifest, &closure.objects)?;
244
258
  let total = plan.declared_bytes();
@@ -332,8 +346,9 @@ pub fn ensure(request: &Request<'_>) -> Result<Ensured> {
332
346
  })
333
347
  }
334
348
 
335
- /// Pull until done. An attempt that failed on the link is re-attempted only when it landed
336
- /// at least one object; one that landed nothing is `STALLED`.
349
+ /// Pull until done. A pull that failed on the link is re-attempted; one that landed nothing
350
+ /// waits a sample first. The ensure is `STALLED` only once no object has landed for the
351
+ /// ledger's own floor: a blip that spent one attempt's asks in milliseconds measured nothing.
337
352
  fn attempts(
338
353
  request: &Request<'_>,
339
354
  store: &Store,
@@ -342,6 +357,13 @@ fn attempts(
342
357
  on_plan: &(dyn Fn(&FetchPlan) + Sync),
343
358
  on_object: &(dyn Fn(&ObjectRef, u64, ObjectSource) + Sync),
344
359
  ) -> Result<transport::PullReport> {
360
+ let sample = Duration::from_secs_f64(request.sample_seconds);
361
+ let floor = sample * transport::STILL_SAMPLES;
362
+ let mut waits = transport::Ledger::with_resolution(sample);
363
+ if let Some(cancellation) = &request.cancellation {
364
+ waits = waits.with_cancellation(cancellation.clone());
365
+ }
366
+ let mut advanced = Instant::now();
345
367
  loop {
346
368
  let attempt = counters.attempt.fetch_add(1, Ordering::Relaxed) + 1;
347
369
  let landed = counters.landed_objects.load(Ordering::Relaxed);
@@ -352,13 +374,21 @@ fn attempts(
352
374
  match transport::pull(&pull) {
353
375
  Ok(report) => return Ok(report),
354
376
  Err(refusal) if request.cancelled() || !weather(refusal.code) => return Err(refusal),
355
- Err(refusal) if counters.landed_objects.load(Ordering::Relaxed) == landed => {
377
+ Err(_) if counters.landed_objects.load(Ordering::Relaxed) != landed => {
378
+ advanced = Instant::now();
379
+ }
380
+ Err(refusal) if advanced.elapsed() > floor => {
356
381
  return Err(Refusal {
357
382
  code: Code::STALLED,
358
- detail: format!("attempt {attempt} landed nothing: {refusal}"),
383
+ detail: format!(
384
+ "no object landed for {:.1} s over {attempt} attempt(s), past the \
385
+ {:.1} s floor: {refusal}",
386
+ advanced.elapsed().as_secs_f64(),
387
+ floor.as_secs_f64()
388
+ ),
359
389
  })
360
390
  }
361
- Err(_) => {}
391
+ Err(_) => waits.pause(sample, transport::Deadline::none())?,
362
392
  }
363
393
  }
364
394
  }
@@ -140,6 +140,7 @@ pub fn session_holds(store: &Store) -> Result<(Vec<HeldKey>, Vec<String>)> {
140
140
  holds.extend(crate::derived::retained_objects(store)?);
141
141
  holds.extend(crate::source_artifact::held_objects(store)?);
142
142
  holds.extend(crate::checkpoint_root::held_objects(store)?);
143
+ holds.extend(crate::ensure::held_objects(store)?);
143
144
  // A full snapshot obligation wins over a runtime-only pin of the same manifest.
144
145
  holds.sort_by(|left, right| {
145
146
  left.key
@@ -16,10 +16,7 @@ use crate::limits;
16
16
  use crate::store::Store;
17
17
 
18
18
  fn sql(what: impl AsRef<str>, error: rusqlite::Error) -> Refusal {
19
- Refusal {
20
- code: Code::IO_FAILED,
21
- detail: format!("{}: {error}", what.as_ref()),
22
- }
19
+ crate::store::classify_sql(what, error)
23
20
  }
24
21
 
25
22
  fn io(what: impl AsRef<str>, error: std::io::Error) -> Refusal {
@@ -185,6 +185,20 @@ pub(crate) fn classify_io(what: impl AsRef<str>, e: std::io::Error) -> Refusal {
185
185
  }
186
186
  }
187
187
 
188
+ /// SQLite's "database or disk is full" is the disk's verdict, exactly as ENOSPC is. As
189
+ /// IO_FAILED it read as a transient catalog fault and bought the object three more times.
190
+ pub(crate) fn classify_sql(what: impl AsRef<str>, e: rusqlite::Error) -> Refusal {
191
+ let full = matches!(&e, rusqlite::Error::SqliteFailure(f, _) if f.code == rusqlite::ErrorCode::DiskFull);
192
+ Refusal {
193
+ code: if full {
194
+ Code::CAPACITY_EXHAUSTED
195
+ } else {
196
+ Code::IO_FAILED
197
+ },
198
+ detail: format!("{}: {e}", what.as_ref()),
199
+ }
200
+ }
201
+
188
202
  /// The short local spelling used by every call site in this module.
189
203
  fn io(what: impl AsRef<str>, e: std::io::Error) -> Refusal {
190
204
  classify_io(what, e)
@@ -286,6 +300,10 @@ impl Fault {
286
300
  pub trait Progress: Send + Sync {
287
301
  fn moved(&self, bytes: u64);
288
302
  fn admitted(&self);
303
+ /// `bytes` already announced as moved were thrown away: the stream behind a candidate
304
+ /// failed or proved to be the wrong object. Progress that kept them would claim bytes
305
+ /// the store does not have, and a pull that re-asks would pass 100% before it ends.
306
+ fn discarded(&self, _bytes: u64) {}
289
307
  }
290
308
 
291
309
  #[derive(Clone)]
@@ -1453,15 +1471,21 @@ impl Store {
1453
1471
  let mut buf = vec![0u8; BUF];
1454
1472
  let mut len: u64 = 0;
1455
1473
  let mut first = true;
1474
+ let discard = |len: u64, refusal: Refusal| {
1475
+ if let Some(sink) = &self.progress {
1476
+ sink.discarded(len);
1477
+ }
1478
+ cleanup(&tmp, refusal)
1479
+ };
1456
1480
  loop {
1457
1481
  let n = match r.read(&mut buf) {
1458
1482
  Ok(0) => break,
1459
1483
  Ok(n) => n,
1460
- Err(e) => return cleanup(&tmp, io("read source", e)),
1484
+ Err(e) => return discard(len, io("read source", e)),
1461
1485
  };
1462
1486
  h.update(&buf[..n]);
1463
1487
  if let Err(e) = f.write_all(&buf[..n]) {
1464
- return cleanup(&tmp, io("write temp", e));
1488
+ return discard(len, io("write temp", e));
1465
1489
  }
1466
1490
  len += n as u64;
1467
1491
  self.moved(n as u64);
@@ -1473,7 +1497,7 @@ impl Store {
1473
1497
  fault.hit("written");
1474
1498
  if self.flushes() {
1475
1499
  if let Err(e) = f.sync_all() {
1476
- return cleanup(&tmp, io("fsync temp", e));
1500
+ return discard(len, io("fsync temp", e));
1477
1501
  }
1478
1502
  }
1479
1503
  fault.hit("fsync");
@@ -1481,8 +1505,8 @@ impl Store {
1481
1505
  let hex = sha256::hex(&h.finish());
1482
1506
  if let Some(want) = expect {
1483
1507
  if want.length != len {
1484
- return cleanup(
1485
- &tmp,
1508
+ return discard(
1509
+ len,
1486
1510
  Refusal {
1487
1511
  code: Code::LENGTH_MISMATCH,
1488
1512
  detail: format!("expected {} bytes, streamed {len}", want.length),
@@ -1490,8 +1514,8 @@ impl Store {
1490
1514
  );
1491
1515
  }
1492
1516
  if want.sha256 != hex {
1493
- return cleanup(
1494
- &tmp,
1517
+ return discard(
1518
+ len,
1495
1519
  Refusal {
1496
1520
  code: Code::OBJECT_ID_MISMATCH,
1497
1521
  detail: format!("expected sha256:{}, streamed sha256:{hex}", want.sha256),
@@ -0,0 +1,37 @@
1
+ //! One line per transport decision (a hedge, a replacement, a win), appended to the
2
+ //! Store's own bounded log so a slow tail is visible after the fact: run 2322 and sasori
3
+ //! left nothing on disk to say whether a hedge fired. Never per chunk, never fatal.
4
+ use crate::ids::ObjectRef;
5
+ use crate::store::Store;
6
+ use std::fs::{self, OpenOptions};
7
+ use std::io::Write;
8
+ use std::time::{SystemTime, UNIX_EPOCH};
9
+
10
+ /// Past this the log rotates to `transport.log.1`, so it holds at most twice this.
11
+ const ROTATE_BYTES: u64 = 4 << 20;
12
+
13
+ /// How a line names one object: its digest prefix and length.
14
+ pub(super) fn object(object: &ObjectRef) -> String {
15
+ format!(
16
+ "{} {}",
17
+ &object.sha256[..object.sha256.len().min(16)],
18
+ object.length
19
+ )
20
+ }
21
+
22
+ pub(super) fn record(store: &Store, kind: &str, subject: &str, detail: &str) {
23
+ let dir = store.root().join("logs");
24
+ let path = dir.join("transport.log");
25
+ let _ = fs::create_dir_all(&dir);
26
+ if fs::metadata(&path).is_ok_and(|meta| meta.len() > ROTATE_BYTES) {
27
+ let _ = fs::rename(&path, dir.join("transport.log.1"));
28
+ }
29
+ let at = SystemTime::now()
30
+ .duration_since(UNIX_EPOCH)
31
+ .map(|since| since.as_secs_f64())
32
+ .unwrap_or(0.0);
33
+ let line = format!("{at:.3} {kind} {subject} {detail}\n");
34
+ if let Ok(mut file) = OpenOptions::new().create(true).append(true).open(&path) {
35
+ let _ = file.write_all(line.as_bytes());
36
+ }
37
+ }
@@ -503,7 +503,13 @@ fn connect(
503
503
  // sample. Cancellation and existing silence rules remain active
504
504
  // without imposing a new total connection deadline.
505
505
  transfer_verdict(judge, ledger, since, "a TCP connection")?;
506
- stream_verdict(judge, ledger, since, "TCP connect")?;
506
+ // A silent address is that address's verdict, not the URL's: an IPv6 route
507
+ // that drops SYNs while IPv4 answers must not stall every ask of a pull.
508
+ if let Err(silent) = stream_verdict(judge, ledger, since, "TCP connect") {
509
+ ledger.check_running()?;
510
+ last = Some(std::io::Error::new(ErrorKind::TimedOut, silent.detail));
511
+ continue 'addresses;
512
+ }
507
513
  let tick = deadline
508
514
  .remaining()?
509
515
  .map_or(ledger.sample(), |left| left.min(ledger.sample()));
@@ -587,10 +593,22 @@ fn tls_handshake(
587
593
  Ok(_) => {
588
594
  advanced = Instant::now();
589
595
  // A certificate or protocol verdict is this client's, and re-asking reaches
590
- // it again: refused typed, never retried as weather. The alert goes out so
591
- // the origin logs why.
596
+ // it again: refused typed, never retried as weather. The peer's own alert or
597
+ // a garbled record is the link's weather and is asked again. The alert goes
598
+ // out so the origin logs why.
592
599
  if let Err(e) = conn.process_new_packets() {
593
600
  let _ = conn.write_tls(sock);
601
+ let verdict = matches!(
602
+ e,
603
+ rustls::Error::InvalidCertificate(_)
604
+ | rustls::Error::NoCertificatesPresented
605
+ | rustls::Error::UnsupportedNameType
606
+ | rustls::Error::InvalidCertRevocationList(_)
607
+ | rustls::Error::PeerIncompatible(_)
608
+ );
609
+ if !verdict {
610
+ return refuse(fail, format!("{host}: TLS handshake failed: {e}"));
611
+ }
594
612
  return refuse(
595
613
  Code::TLS_UNTRUSTED,
596
614
  format!(
@@ -375,7 +375,9 @@ impl Ledger {
375
375
  /// which is not a failed attempt, or — when it states none — this pull's patience,
376
376
  /// which is (`true`). The hub's rule, applied to every origin.
377
377
  pub(crate) fn retry_wait(&self, stated: Option<Duration>) -> (Duration, bool) {
378
- match stated.filter(|wait| !wait.is_zero()) {
378
+ // A wait no clock can hold is no statement (and `Instant + wait` would panic).
379
+ let representable = |wait: &Duration| Instant::now().checked_add(*wait).is_some();
380
+ match stated.filter(|wait| !wait.is_zero() && representable(wait)) {
379
381
  Some(wait) => (wait, false),
380
382
  None => (self.patience(), true),
381
383
  }
@@ -383,7 +385,9 @@ impl Ledger {
383
385
 
384
386
  /// Sleep `wait` in sampling ticks; cancellation and the caller's deadline end it.
385
387
  pub(crate) fn pause(&self, wait: Duration, deadline: Deadline) -> Result<()> {
386
- let until = Instant::now() + wait;
388
+ let until = Instant::now()
389
+ .checked_add(wait)
390
+ .unwrap_or_else(|| Instant::now() + self.patience());
387
391
  loop {
388
392
  self.check_running()?;
389
393
  let now = Instant::now();
@@ -33,6 +33,7 @@
33
33
  //! to a loopback listener it starts itself, and nothing here reads the environment.
34
34
 
35
35
  mod api;
36
+ mod decisions;
36
37
  mod http;
37
38
  mod hub;
38
39
  mod ledger;
@@ -832,7 +832,11 @@ impl Leases<'_> {
832
832
  /// that owns it.
833
833
  fn mint_from(&self, at: usize, ledger: &Ledger) -> Result<()> {
834
834
  let mut digests: Vec<String> = Vec::new();
835
- for object in &self.wanted[at..] {
835
+ // From the asker's place onward, then the unminted objects before it: whichever
836
+ // worker reaches the hub first, one window covers every object it can hold. Starting
837
+ // at `at` alone left the objects of workers that started earlier but asked later for
838
+ // a second presign on a pull the window could have covered in one.
839
+ for object in self.wanted[at..].iter().chain(&self.wanted[..at]) {
836
840
  if digests.len() >= self.window {
837
841
  break;
838
842
  }
@@ -976,6 +980,7 @@ pub(super) fn fetch_wanted_bounded(
976
980
  streams.clamp(1, PULL_STREAMS),
977
981
  ));
978
982
  let recovery = super::speculate::Recovery::default();
983
+ let began = Instant::now();
979
984
  // A stream's
980
985
  // permit is released once its body is in, so its thread may still be fsyncing and
981
986
  // admitting while another thread uses the permit: twice the threads keeps the permits
@@ -1158,13 +1163,30 @@ pub(super) fn fetch_wanted_bounded(
1158
1163
  });
1159
1164
  }
1160
1165
  });
1161
- if let Some(refusal) = first.lock().unwrap().take() {
1166
+ let refusal = first.lock().unwrap().take();
1167
+ let (streams, levels, backoffs) = pace.outcome();
1168
+ super::decisions::record(
1169
+ store,
1170
+ "walk",
1171
+ &format!("{} {}", plan.wanted.len(), plan.wanted_bytes()),
1172
+ &format!(
1173
+ "fetched={} cached={} moved={} seconds={:.1} level={streams} hedges={} hedges_won={} \
1174
+ outcome={}",
1175
+ fetched.load(Ordering::Relaxed),
1176
+ cached.load(Ordering::Relaxed),
1177
+ bytes_moved.load(Ordering::Relaxed),
1178
+ began.elapsed().as_secs_f64(),
1179
+ recovery.hedges.load(Ordering::Relaxed),
1180
+ recovery.won.load(Ordering::Relaxed),
1181
+ refusal.as_ref().map_or("ok", |r| r.code.as_str()),
1182
+ ),
1183
+ );
1184
+ if let Some(refusal) = refusal {
1162
1185
  return Err(refusal);
1163
1186
  }
1164
1187
  if let Some(backfill) = backfill {
1165
1188
  backfill.finish_offers();
1166
1189
  }
1167
- let (streams, levels, backoffs) = pace.outcome();
1168
1190
  Ok(WalkOutcome {
1169
1191
  fetched: fetched.load(Ordering::Relaxed),
1170
1192
  bytes_moved: bytes_moved.load(Ordering::Relaxed),