tensorfs 0.3.70__tar.gz → 0.3.73__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 (169) hide show
  1. {tensorfs-0.3.70 → tensorfs-0.3.73}/Cargo.lock +2 -2
  2. {tensorfs-0.3.70 → tensorfs-0.3.73}/Cargo.toml +1 -1
  3. {tensorfs-0.3.70 → tensorfs-0.3.73}/PKG-INFO +1 -1
  4. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/bin/tfs/ingest.rs +15 -7
  5. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/bin/tfs/main.rs +0 -13
  6. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/derived/companion_tests.rs +44 -0
  7. tensorfs-0.3.73/crates/tensorfs-core/src/derived/history_cost_tests.rs +149 -0
  8. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/derived/part_rows_tests.rs +6 -23
  9. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/derived/retention.rs +4 -21
  10. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/derived.rs +95 -44
  11. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/fill.rs +95 -0
  12. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/gc.rs +39 -20
  13. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/home.rs +0 -102
  14. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/ingest/convert.rs +148 -5
  15. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/ingest/fingerprint.rs +5 -2
  16. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/ingest/journal.rs +10 -0
  17. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/ingest/mod.rs +2 -0
  18. tensorfs-0.3.73/crates/tensorfs-core/src/ingest/narrow.rs +178 -0
  19. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/ingest/preflight.rs +3 -3
  20. tensorfs-0.3.73/crates/tensorfs-core/src/ingest/routes/sdxl.routes.json +1 -0
  21. tensorfs-0.3.73/crates/tensorfs-core/src/ingest/routes/sdxl.spec.json +51 -0
  22. tensorfs-0.3.73/crates/tensorfs-core/src/ingest/routes.rs +382 -0
  23. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/ingest/source.rs +184 -16
  24. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/ingest/transaction.rs +76 -21
  25. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/providers.rs +93 -4
  26. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/store.rs +2 -8
  27. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/transport/hub.rs +37 -70
  28. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/transport/pull.rs +9 -32
  29. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/transport/tests.rs +44 -41
  30. tensorfs-0.3.73/crates/tensorfs-core/tests/as_is.rs +334 -0
  31. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/civitai_sdxl_profile.rs +18 -2
  32. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/home.rs +3 -121
  33. tensorfs-0.3.73/crates/tensorfs-core/tests/routed_single_file.rs +297 -0
  34. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/source_plan.rs +35 -14
  35. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-py/src/ingest.rs +27 -0
  36. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-py/src/lib.rs +2 -0
  37. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-py/src/store.rs +29 -54
  38. {tensorfs-0.3.70 → tensorfs-0.3.73}/pyproject.toml +1 -1
  39. {tensorfs-0.3.70 → tensorfs-0.3.73}/python/tensorfs/__init__.py +4 -0
  40. {tensorfs-0.3.70 → tensorfs-0.3.73}/python/tensorfs/_ext.pyi +14 -12
  41. {tensorfs-0.3.70 → tensorfs-0.3.73}/python/tensorfs/errors.py +1 -10
  42. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/Cargo.toml +0 -0
  43. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/build.rs +0 -0
  44. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/examples/h3-swiglu-layout.md +0 -0
  45. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/examples/optional-cache-backfill.md +0 -0
  46. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/examples/resident-conversion.md +0 -0
  47. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/examples/resident_conversion_profile.rs +0 -0
  48. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/asset_update.rs +0 -0
  49. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/b64.rs +0 -0
  50. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/bin/tfs/ckpt.rs +0 -0
  51. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/bin/tfs/conform.rs +0 -0
  52. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/bin/tfs/fetch.rs +0 -0
  53. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/bin/tfs/rd.rs +0 -0
  54. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/bin/tfs/repo.rs +0 -0
  55. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/bin/tfs/snap.rs +0 -0
  56. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/bin/tfs/watch.rs +0 -0
  57. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/cache_roots.rs +0 -0
  58. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/canon.rs +0 -0
  59. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/capability.rs +0 -0
  60. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/catalog/lock.rs +0 -0
  61. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/catalog.rs +0 -0
  62. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/cbor.rs +0 -0
  63. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/checkpoint.rs +0 -0
  64. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/checkpoint_root.rs +0 -0
  65. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/corpus.rs +0 -0
  66. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/derived/adoption.rs +0 -0
  67. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/derived/estimate.rs +0 -0
  68. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/derived/graft_tests.rs +0 -0
  69. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/derived/group_commit_tests.rs +0 -0
  70. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/derived/progress.rs +0 -0
  71. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/derived/resume_tests.rs +0 -0
  72. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/derived/roots.rs +0 -0
  73. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/descriptors.rs +0 -0
  74. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/disk.rs +0 -0
  75. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/dtype.rs +0 -0
  76. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/durability.rs +0 -0
  77. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/err.rs +0 -0
  78. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/fetch.rs +0 -0
  79. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/fit.rs +0 -0
  80. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/header.rs +0 -0
  81. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/ids.rs +0 -0
  82. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/ingest/carrier.rs +0 -0
  83. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/ingest/custody.rs +0 -0
  84. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/ingest/gguf.rs +0 -0
  85. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/ingest/h3_lora.rs +0 -0
  86. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/ingest/stamp.rs +0 -0
  87. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/jcs.rs +0 -0
  88. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/lib.rs +0 -0
  89. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/limits.rs +0 -0
  90. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/machine.rs +0 -0
  91. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/manifest.rs +0 -0
  92. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/meta.rs +0 -0
  93. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/project.rs +0 -0
  94. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/read.rs +0 -0
  95. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/receipt.rs +0 -0
  96. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/reclaim.rs +0 -0
  97. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/registry.rs +0 -0
  98. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/relation.rs +0 -0
  99. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/repo_cache/identity.rs +0 -0
  100. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/repo_cache.rs +0 -0
  101. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/repository.rs +0 -0
  102. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/sha256.rs +0 -0
  103. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/source_artifact.rs +0 -0
  104. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/spec.rs +0 -0
  105. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/staging.rs +0 -0
  106. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/stats.rs +0 -0
  107. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/storage.rs +0 -0
  108. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/transport/api.rs +0 -0
  109. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/transport/http.rs +0 -0
  110. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/transport/http_reuse_tests.rs +0 -0
  111. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/transport/ledger.rs +0 -0
  112. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/transport/memory.rs +0 -0
  113. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/transport/mod.rs +0 -0
  114. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/transport/pace.rs +0 -0
  115. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/transport/policy.rs +0 -0
  116. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/transport/prefix.rs +0 -0
  117. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/transport/push.rs +0 -0
  118. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/transport/ranged.rs +0 -0
  119. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/transport/speculate.rs +0 -0
  120. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/unsynced.rs +0 -0
  121. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/src/vectors.rs +0 -0
  122. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/additive_fields.rs +0 -0
  123. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/anima_hf_profile.rs +0 -0
  124. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/checkpoint_roots.rs +0 -0
  125. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/fd_budget.rs +0 -0
  126. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/fd_headroom.rs +0 -0
  127. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/fetch_url_progress.rs +0 -0
  128. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/fit.rs +0 -0
  129. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/fixtures/repo_apply/blobs.jsonl +0 -0
  130. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/fixtures/repo_apply/expected_list.jsonl +0 -0
  131. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/fixtures/repo_apply/expected_repository.json +0 -0
  132. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/fixtures/repo_apply/expected_rows.jsonl +0 -0
  133. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/fixtures/repo_apply/header.cbor +0 -0
  134. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/fixtures/repo_apply/manifest.json +0 -0
  135. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/fixtures/repo_apply/mutation.json +0 -0
  136. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/foreign_json.rs +0 -0
  137. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/h3_lora.rs +0 -0
  138. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/h3_swiglu.rs +0 -0
  139. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/import_tree.rs +0 -0
  140. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/instrument_profiles.rs +0 -0
  141. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/liveness.rs +0 -0
  142. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/qwen_image21_profile.rs +0 -0
  143. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/read_plan.rs +0 -0
  144. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/reclaim.rs +0 -0
  145. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/reclaim_run.rs +0 -0
  146. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/repo_cache.rs +0 -0
  147. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/repo_store.rs +0 -0
  148. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/resident_admission.rs +0 -0
  149. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/sha256_backends.rs +0 -0
  150. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/sharded_cas.rs +0 -0
  151. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/source_artifacts.rs +0 -0
  152. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/source_download.rs +0 -0
  153. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/source_prefixes.rs +0 -0
  154. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/source_preflight.rs +0 -0
  155. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/staging.rs +0 -0
  156. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/store_boundaries.rs +0 -0
  157. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/tensor_schema.rs +0 -0
  158. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/transfer_memory.rs +0 -0
  159. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/trust_index.rs +0 -0
  160. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/version.rs +0 -0
  161. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-core/tests/write_through.rs +0 -0
  162. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-py/Cargo.toml +0 -0
  163. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-py/src/docs.rs +0 -0
  164. {tensorfs-0.3.70 → tensorfs-0.3.73}/crates/tensorfs-py/src/errors.rs +0 -0
  165. {tensorfs-0.3.70 → tensorfs-0.3.73}/python/tensorfs/_derived_channel.py +0 -0
  166. {tensorfs-0.3.70 → tensorfs-0.3.73}/python/tensorfs/_source_channel.py +0 -0
  167. {tensorfs-0.3.70 → tensorfs-0.3.73}/python/tensorfs/_tensors.py +0 -0
  168. {tensorfs-0.3.70 → tensorfs-0.3.73}/python/tensorfs/derived.py +0 -0
  169. {tensorfs-0.3.70 → tensorfs-0.3.73}/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.70"
442
+ version = "0.3.73"
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.70"
457
+ version = "0.3.73"
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.70"
6
+ version = "0.3.73"
7
7
  edition = "2021"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tensorfs
3
- Version: 0.3.70
3
+ Version: 0.3.73
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Rust
@@ -445,7 +445,7 @@ pub fn cmd_bank(dialect: &str, converter: &str, f: &Flags) -> ExitCode {
445
445
  let mut reviewed = Vec::new();
446
446
  for (component, path) in &srcs {
447
447
  let (full, raw) = ok!(source_core::read_carrier_at(path));
448
- let h = if conv.name == "single_file.identity/1" {
448
+ let h = if conv.dialect == "safetensors.single_file" {
449
449
  ok!(convert::single_file_component(component, &full))
450
450
  } else {
451
451
  full
@@ -584,11 +584,11 @@ pub fn cmd_bank(dialect: &str, converter: &str, f: &Flags) -> ExitCode {
584
584
  .collect::<Vec<_>>()
585
585
  .join(",");
586
586
  let variant = flag(f, "spec-variant").and_then(|value| value.parse().ok());
587
- let mut prepared = match source_core::prepare_with_registry(
587
+ let mut prepared = match source_core::prepare(
588
588
  &target,
589
589
  &unnamed(&srcs),
590
590
  &CarrierSet::default(),
591
- &reg,
591
+ Some(&reg),
592
592
  variant,
593
593
  ) {
594
594
  Ok(prepared) => prepared,
@@ -849,17 +849,22 @@ fn prepare_closed_source_plan(
849
849
  if closed.registry != BUILTIN_REGISTRY {
850
850
  flags.push(("registry".to_string(), closed.registry.clone()));
851
851
  }
852
+ let as_is = closed.converter == convert::IDENTITY;
853
+ if as_is {
854
+ flags.push(("source-profile".to_string(), source_core::AS_IS.to_string()));
855
+ }
852
856
  for (component, source) in &closed.sources {
853
857
  flags.push((
854
858
  "source".to_string(),
855
859
  format!("{component}={}", source.path.to_string_lossy()),
856
860
  ));
857
861
  }
858
- let mut prepared = source_core::prepare_with_registry(
862
+ // The plan was re-derived above, so its converter is the planner's: as-is has no registry.
863
+ let mut prepared = source_core::prepare(
859
864
  &closed.target,
860
865
  &closed.sources,
861
866
  &closed.set,
862
- &registry,
867
+ (!as_is).then_some(&registry),
863
868
  None,
864
869
  )
865
870
  .map_err(bail)?;
@@ -989,15 +994,17 @@ pub(crate) fn construction_order(f: &Flags) -> Result<Vec<(String, String)>, Exi
989
994
 
990
995
  /// Headers in, plan out. The one function `plan`, `run` and the worker all go through, so
991
996
  /// a preview and a run cannot disagree about what was going to happen.
997
+ /// `--source-profile as-is/1` stores the sources as they are, unclassified.
992
998
  fn prepare(f: &Flags, target: &str) -> Result<Prepared, ExitCode> {
993
999
  let sources = sources(f)?;
994
1000
  let registry = load_registry(f)?;
995
1001
  let variant = flag(f, "spec-variant").and_then(|value| value.parse().ok());
996
- source_core::prepare_with_registry(
1002
+ let as_is = flag(f, "source-profile") == Some(source_core::AS_IS);
1003
+ source_core::prepare(
997
1004
  target,
998
1005
  &unnamed(&sources),
999
1006
  &CarrierSet::default(),
1000
- &registry,
1007
+ (!as_is).then_some(&registry),
1001
1008
  variant,
1002
1009
  )
1003
1010
  .map_err(bail)
@@ -1206,6 +1213,7 @@ pub fn cmd_run(root: &Path, target: &str, f: &Flags) -> ExitCode {
1206
1213
  | "tenant"
1207
1214
  | "isolation-tier"
1208
1215
  | "checkpoint-bytes"
1216
+ | "source-profile"
1209
1217
  ) {
1210
1218
  argv.push(format!("--{k}"));
1211
1219
  argv.push(v.clone());
@@ -22,7 +22,6 @@
22
22
  //! tfs store prepare-readers [<root>]
23
23
  //! tfs store complete-cozytensors [<root>]
24
24
  //! tfs home print TENSORFS_HOME or ~/.tensorfs
25
- //! tfs home migrate <old-root> [--to <new-root>]
26
25
  //! tfs store rebuild <census> --rows <jsonl> [--sqlite <tensorfs.sqlite>]
27
26
  //! tfs store admit-file <store> blob|manifest <id> <length> <source>
28
27
  //! tfs repo-cache admit <cache> <store> blob|manifest <id> <length>
@@ -208,7 +207,6 @@ fn main() -> ExitCode {
208
207
  match a.as_slice() {
209
208
  ["version"] => cmd_version(),
210
209
  ["home"] => cmd_home(None),
211
- ["home", "migrate", source] => cmd_home_migrate(Path::new(source), &flags),
212
210
  ["home", r] => cmd_home(Some(Path::new(r))),
213
211
  ["store", "init"] => cmd_store_default("init", &flags),
214
212
  ["store", "info"] => cmd_store_default("info", &flags),
@@ -817,17 +815,6 @@ fn cmd_home(explicit: Option<&Path>) -> ExitCode {
817
815
  ExitCode::SUCCESS
818
816
  }
819
817
 
820
- fn cmd_home_migrate(source: &Path, flags: &Flags) -> ExitCode {
821
- let destination = flag(flags, "to").map(Path::new);
822
- let report = ok!(tensorfs_core::home::move_store(source, destination));
823
- println!(
824
- "moved {} -> {} (device/inode/mtime preserved by same-filesystem rename)",
825
- report.source.display(),
826
- report.destination.display(),
827
- );
828
- ExitCode::SUCCESS
829
- }
830
-
831
818
  /// The no-root spelling of a `store` verb. It uses `TENSORFS_HOME`, or an existing
832
819
  /// `$HOME/.tensorfs` — never a Store it would have to invent (tfs-053).
833
820
  fn cmd_store_default(verb: &str, flags: &Flags) -> ExitCode {
@@ -196,6 +196,50 @@ fn ordinary_companions_survive_derivation_without_copying_tensor_backing_files()
196
196
  std::fs::remove_dir_all(store.root()).unwrap();
197
197
  }
198
198
 
199
+ #[test]
200
+ fn a_verified_store_object_is_a_companion_by_reference_and_never_a_new_byte() {
201
+ let (store, meta, id) = fixture();
202
+ let vocab = vec![0x7b; 256 << 10]; // over the inline bound: references have none
203
+ let object = store
204
+ .put_stream(
205
+ &mut vocab.as_slice(),
206
+ Some(&ObjectRef::of(&vocab)),
207
+ &Fault::default(),
208
+ )
209
+ .unwrap()
210
+ .obj;
211
+ let mut d = super::tests::created_declaration();
212
+ d.objects = vec![("tokenizer/vocab.json".into(), object.clone())];
213
+ let encoded = d.canonical_work_bytes().unwrap();
214
+ assert_eq!(
215
+ Declaration::parse_text(std::str::from_utf8(&encoded).unwrap()).unwrap(),
216
+ d
217
+ );
218
+ let writer = begin(&store, &meta, &id, 1, d.clone(), None).unwrap();
219
+ write_weight(&store, &meta, &id);
220
+ let receipt = commit(&store, &meta, &id, 1).unwrap();
221
+ release(&meta, writer);
222
+ assert!(!receipt.added_objects.contains(&object));
223
+ let header = checkpoint::load_header(&store, &receipt.header).unwrap();
224
+ let (name, asset) = &header.assets[0];
225
+ assert_eq!(
226
+ (name.as_str(), &asset.segments),
227
+ ("tokenizer/vocab.json", &vec![object])
228
+ );
229
+ let mut read = Vec::new();
230
+ checkpoint::read_asset(&store, name, asset, &mut read).unwrap();
231
+ assert_eq!(read, vocab);
232
+
233
+ // An object this Store does not hold is refused at commit, never published.
234
+ let next = format!("sha256:{}", "c3".repeat(32));
235
+ d.objects = vec![("tokenizer/vocab.json".into(), ObjectRef::of(b"absent"))];
236
+ let writer = begin(&store, &meta, &next, 1, d, None).unwrap();
237
+ write_weight(&store, &meta, &next);
238
+ assert!(commit(&store, &meta, &next, 1).is_err());
239
+ release(&meta, writer);
240
+ std::fs::remove_dir_all(store.root()).unwrap();
241
+ }
242
+
199
243
  #[test]
200
244
  fn companion_paths_size_count_and_quotas_are_native_refusals() {
201
245
  for path in [
@@ -0,0 +1,149 @@
1
+ //! A derivation costs the same however many derivations the Store already retains (finding
2
+ //! 50): proving its source rooted walked every retained checkpoint chain, so each lane on a
3
+ //! conversion pod took longer than the one before.
4
+
5
+ use std::time::{Duration, Instant};
6
+
7
+ use super::tests::created_declaration;
8
+ use super::*;
9
+ use crate::repository::{Mutation, RepositoryName};
10
+ use crate::store::Fault;
11
+
12
+ const PARTS: usize = 32;
13
+ const CONVERSIONS: usize = 60;
14
+ const WINDOW: usize = 10;
15
+
16
+ /// A source-inheriting derivation that adds PARTS tensors and checkpoints after each, as a
17
+ /// quantization lane does: its source inspection, writer, chain and pending root.
18
+ fn convert(store: &Store, meta: &Meta, index: usize, source: &ObjectRef) -> Duration {
19
+ let started = Instant::now();
20
+ inspect_source(
21
+ store,
22
+ meta,
23
+ source.clone(),
24
+ vec!["model".into()],
25
+ Vec::new(),
26
+ )
27
+ .unwrap();
28
+ let prototype = created_declaration().components.remove(0).add.remove(0);
29
+ let add: Vec<_> = (0..PARTS)
30
+ .map(|part| TensorDeclaration {
31
+ key: format!("added_{part}"),
32
+ ..prototype.clone()
33
+ })
34
+ .collect();
35
+ let mut order = vec![("model".to_string(), "weight".to_string())];
36
+ order.extend(
37
+ add.iter()
38
+ .map(|tensor| ("model".to_string(), tensor.key.clone())),
39
+ );
40
+ let declaration = Declaration {
41
+ sources: vec![Source {
42
+ alias: "source".into(),
43
+ manifest: source.clone(),
44
+ }],
45
+ components: vec![ComponentDeclaration {
46
+ target: "model".into(),
47
+ source: Some("source".into()),
48
+ source_component: Some("model".into()),
49
+ drop: Vec::new(),
50
+ add,
51
+ }],
52
+ order,
53
+ max_new_bytes: (PARTS * 2048) as u64,
54
+ ..created_declaration()
55
+ };
56
+ let transaction = format!("sha256:{:064x}", index + 1);
57
+ let writer = begin(store, meta, &transaction, 1, declaration, None).unwrap();
58
+ let (mut cursor, mut head) = (None, None);
59
+ for part in 0..PARTS {
60
+ add_indexed_part(
61
+ store,
62
+ meta,
63
+ &transaction,
64
+ 1,
65
+ &writer.additions,
66
+ cursor.as_mut(),
67
+ ("model", &format!("added_{part}"), "value"),
68
+ &mut [(index * PARTS + part) as u8; 2048].as_slice(),
69
+ )
70
+ .unwrap();
71
+ let (_, next) = checkpoint_indexed(
72
+ store,
73
+ meta,
74
+ &transaction,
75
+ 1,
76
+ "lane",
77
+ "model",
78
+ head.as_ref(),
79
+ &mut cursor,
80
+ )
81
+ .unwrap();
82
+ head = next.head;
83
+ }
84
+ commit(store, meta, &transaction, 1).unwrap();
85
+ release_guards(meta, Some(writer.writer_hold), writer.source_leases);
86
+ started.elapsed()
87
+ }
88
+
89
+ #[test]
90
+ fn a_conversion_costs_the_same_after_many_retained_conversions() {
91
+ let scratch = std::path::Path::new("/dev/shm");
92
+ let root = if scratch.is_dir() {
93
+ scratch.to_path_buf()
94
+ } else {
95
+ std::env::temp_dir()
96
+ }
97
+ .join(format!(
98
+ "tensorfs-history-cost-{}-{}",
99
+ std::process::id(),
100
+ crate::meta::now_nanos_unique()
101
+ ));
102
+ let store = Store::init(&root).unwrap();
103
+ let meta = Meta::open(&store).unwrap();
104
+
105
+ // The source is a model checkpoint, rooted by its repository as a pulled model is.
106
+ let source_id = format!("sha256:{}", "5a".repeat(32));
107
+ let writer = begin(&store, &meta, &source_id, 1, created_declaration(), None).unwrap();
108
+ add_part(
109
+ &store,
110
+ &meta,
111
+ &source_id,
112
+ 1,
113
+ ("model", "weight", "value"),
114
+ &mut [0x21; 2048].as_slice(),
115
+ )
116
+ .unwrap();
117
+ let source = commit(&store, &meta, &source_id, 1).unwrap().manifest;
118
+ release_guards(&meta, Some(writer.writer_hold), writer.source_leases);
119
+ store
120
+ .apply_repository(
121
+ None,
122
+ &Mutation::PutCheckpoint {
123
+ repo: RepositoryName::new("org", "source").unwrap(),
124
+ manifest: source.clone(),
125
+ },
126
+ &Fault::default(),
127
+ )
128
+ .unwrap();
129
+
130
+ let costs: Vec<Duration> = (0..CONVERSIONS)
131
+ .map(|index| convert(&store, &meta, index, &source))
132
+ .collect();
133
+ let median = |window: &[Duration]| {
134
+ let mut sorted = window.to_vec();
135
+ sorted.sort();
136
+ sorted[sorted.len() / 2]
137
+ };
138
+ let (first, last) = (
139
+ median(&costs[..WINDOW]),
140
+ median(&costs[CONVERSIONS - WINDOW..]),
141
+ );
142
+ let _ = std::fs::remove_dir_all(&root);
143
+ // Retained history grew six-fold between the windows; the cost of one conversion may
144
+ // not follow it. Before the fix the last window cost several times the first.
145
+ assert!(
146
+ last.as_secs_f64() < 2.0 * first.as_secs_f64(),
147
+ "conversion cost grew with retained history: first {first:?}, last {last:?}"
148
+ );
149
+ }
@@ -333,40 +333,23 @@ fn a_digest_receipt_names_the_declaration_the_intent_bound() {
333
333
  for (index, key) in ["weight_0", "weight_1", "weight_2"].into_iter().enumerate() {
334
334
  add(&store, &meta, &id, &writer, key, index as u8 + 1).unwrap();
335
335
  }
336
- let receipt = commit(&store, &meta, &id, 1).unwrap();
337
- let inline = receipt.value(ReceiptDeclaration::Inline);
338
- let digest = receipt.value(ReceiptDeclaration::Digest);
339
- assert_eq!(inline, receipt.to_value());
340
- let field = |value: &Value, name: &str| {
341
- as_obj("receipt", "facts", value)
336
+ let receipt = commit(&store, &meta, &id, 1).unwrap().to_value();
337
+ let field = |name: &str| {
338
+ as_obj("receipt", "facts", &receipt)
342
339
  .unwrap()
343
340
  .iter()
344
341
  .find(|(key, _)| key == name)
345
342
  .map(|(_, value)| value.clone())
346
343
  };
344
+ assert!(field("declaration").is_none());
347
345
  assert_eq!(
348
- crate::canon::write(&field(&inline, "declaration").unwrap()),
349
- intent
350
- );
351
- assert!(field(&digest, "declaration").is_none());
352
- assert_eq!(
353
- field(&digest, "declaration_digest"),
346
+ field("declaration_digest"),
354
347
  Some(Value::str(ObjectRef::of(&intent).id()))
355
348
  );
356
349
  assert_eq!(
357
- field(&digest, "declaration_length"),
350
+ field("declaration_length"),
358
351
  Some(Value::uint(intent.len() as u64))
359
352
  );
360
- // Every other fact is identical in both forms.
361
- let others = |value: &Value| {
362
- as_obj("receipt", "facts", value)
363
- .unwrap()
364
- .iter()
365
- .filter(|(key, _)| !key.starts_with("declaration"))
366
- .cloned()
367
- .collect::<Vec<_>>()
368
- };
369
- assert_eq!(others(&inline), others(&digest));
370
353
  let _ = fence(&meta, &id, 1);
371
354
  release_guards(&meta, Some(writer.writer_hold), writer.source_leases);
372
355
  std::fs::remove_dir_all(store.root()).unwrap();
@@ -5,8 +5,7 @@ use std::io::{Read, Write};
5
5
  use std::path::PathBuf;
6
6
 
7
7
  use super::{
8
- checkpoint, receipt_from, require_payload_record, roots, Disposition, ReceiptDeclaration,
9
- TransactionState,
8
+ checkpoint, receipt_from, require_payload_record, roots, Disposition, TransactionState,
10
9
  };
11
10
  use crate::canon::{Fields, Value};
12
11
  use crate::catalog::WriterGuard;
@@ -218,12 +217,7 @@ pub fn retain_result(
218
217
  );
219
218
  }
220
219
  let facts = receipt_from(store, row)?;
221
- // A receipt's identity is the digest of whichever form its caller was handed.
222
- let forms = [ReceiptDeclaration::Inline, ReceiptDeclaration::Digest];
223
- if !forms
224
- .iter()
225
- .any(|form| object_id(&crate::canon::write(&facts.value(*form))) == receipt)
226
- {
220
+ if object_id(&crate::canon::write(&facts.to_value())) != receipt {
227
221
  return refuse(
228
222
  Code::OBJECT_ID_MISMATCH,
229
223
  "retained result receipt differs from committed computation",
@@ -376,20 +370,9 @@ mod tests {
376
370
  }
377
371
 
378
372
  #[test]
379
- fn a_result_is_retained_under_either_receipt_form_and_nothing_else() {
373
+ fn a_result_is_retained_under_its_receipt_and_nothing_else() {
380
374
  let f = fixture();
381
- let facts = derived::lookup(&f.store, &f.meta, &f.transaction).unwrap();
382
- let derived::Lookup::Committed(committed) = facts else {
383
- panic!("committed result expected")
384
- };
385
- let digest_form = object_id(&crate::canon::write(
386
- &committed.receipt().value(ReceiptDeclaration::Digest),
387
- ));
388
- assert_ne!(digest_form, f.receipt);
389
- let retained =
390
- retain_result(&f.store, &f.meta, &f.transaction, &digest_form, &id("b1")).unwrap();
391
- assert_eq!(retained.receipt_digest, digest_form);
392
- retain_result(&f.store, &f.meta, &f.transaction, &f.receipt, &id("b2")).unwrap();
375
+ retain_result(&f.store, &f.meta, &f.transaction, &f.receipt, &id("b1")).unwrap();
393
376
  assert_eq!(
394
377
  retain_result(&f.store, &f.meta, &f.transaction, &id("99"), &id("b3"))
395
378
  .unwrap_err()