@feltdb/core 0.15.0 → 0.16.0

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 (247) hide show
  1. package/dist/agent-state.d.ts +20 -0
  2. package/dist/agent-state.d.ts.map +1 -1
  3. package/dist/agent-state.js +36 -0
  4. package/dist/build-identity.json +12 -4
  5. package/dist/cli/commands.js +187 -4
  6. package/dist/cli/publish-engine.js +116 -16
  7. package/dist/collection.d.ts.map +1 -1
  8. package/dist/collection.js +3 -0
  9. package/dist/create/build-identity.json +12 -4
  10. package/dist/create/managed-account.js +93 -35
  11. package/dist/create/package-versions.js +1 -1
  12. package/dist/create/server-source/Cargo.lock +6 -509
  13. package/dist/create/server-source/Cargo.toml +2 -13
  14. package/dist/create/server-source/crates/feltdb-client/Cargo.toml +1 -1
  15. package/dist/create/server-source/crates/feltdb-server/Cargo.toml +1 -1
  16. package/dist/create/server-source/crates/feltdb-server/src/main.rs +255 -12
  17. package/dist/create/server-source/crates/feltdb-wasm/Cargo.toml +1 -1
  18. package/dist/db.d.ts +11 -1
  19. package/dist/db.d.ts.map +1 -1
  20. package/dist/db.js +15 -2
  21. package/dist/error-codes.d.ts +5 -0
  22. package/dist/error-codes.d.ts.map +1 -1
  23. package/dist/error-codes.js +9 -1
  24. package/dist/http-db.d.ts +16 -0
  25. package/dist/http-db.d.ts.map +1 -1
  26. package/dist/http-db.js +36 -6
  27. package/dist/managed-recovery.d.ts +6 -0
  28. package/dist/managed-recovery.d.ts.map +1 -1
  29. package/dist/managed-recovery.js +9 -0
  30. package/dist/studio-app/assets/{feltdb_wasm-BjM1ylL3.js → feltdb_wasm-DtybUY0q.js} +1 -1
  31. package/dist/studio-app/assets/feltdb_wasm_bg-DsgIUwaB.wasm +0 -0
  32. package/dist/studio-app/assets/index-C4OffsZl.js +37 -0
  33. package/dist/studio-app/index.html +1 -1
  34. package/dist/wasm/feltdb_wasm_bg.wasm +0 -0
  35. package/dist/wasm/package.json +1 -1
  36. package/dist/workload.d.ts +55 -3
  37. package/dist/workload.d.ts.map +1 -1
  38. package/dist/workload.js +23 -0
  39. package/dist/workspace/workspace-connection.d.ts.map +1 -1
  40. package/dist/workspace/workspace-connection.js +14 -3
  41. package/package.json +1 -1
  42. package/dist/create/server-source/crates/feltdb/Cargo.lock +0 -175
  43. package/dist/create/server-source/crates/feltdb/Cargo.toml +0 -102
  44. package/dist/create/server-source/crates/feltdb/LICENSE +0 -21
  45. package/dist/create/server-source/crates/feltdb/README.md +0 -75
  46. package/dist/create/server-source/crates/feltdb/benches/baselines/gate-13-redux.json +0 -370
  47. package/dist/create/server-source/crates/feltdb/benches/gate13_baseline.rs +0 -589
  48. package/dist/create/server-source/crates/feltdb/benches/gate13_phase_7_1_release_economics.rs +0 -247
  49. package/dist/create/server-source/crates/feltdb/benches/gate_13_redux.rs +0 -440
  50. package/dist/create/server-source/crates/feltdb/benches/gate_13_regression_runner.rs +0 -275
  51. package/dist/create/server-source/crates/feltdb/benches/gate_14a_concurrent_writer_scaling.rs +0 -381
  52. package/dist/create/server-source/crates/feltdb/benches/gate_14a_production_admission_revalidation.rs +0 -467
  53. package/dist/create/server-source/crates/feltdb/benches/gate_14a_rc2_admission_contract.rs +0 -489
  54. package/dist/create/server-source/crates/feltdb/benches/gate_14a_rc_root_cause.rs +0 -281
  55. package/dist/create/server-source/crates/feltdb/benches/gate_14a_sync1_queued_prototype.rs +0 -606
  56. package/dist/create/server-source/crates/feltdb/benches/gate_14a_sync_economics.rs +0 -531
  57. package/dist/create/server-source/crates/feltdb/benches/gate_14b_causal_backlog_scaling.rs +0 -462
  58. package/dist/create/server-source/crates/feltdb/benches/gate_14c_replication_contract_test.rs +0 -505
  59. package/dist/create/server-source/crates/feltdb/benches/gate_14c_replication_scaling.rs +0 -484
  60. package/dist/create/server-source/crates/feltdb/benches/gate_14d_combined_dimension_scaling.rs +0 -758
  61. package/dist/create/server-source/crates/feltdb/benches/phase_7_1_2_optimization_benchmark.rs +0 -421
  62. package/dist/create/server-source/crates/feltdb/benches/phase_7_1_3_crossover_analysis.rs +0 -329
  63. package/dist/create/server-source/crates/feltdb/src/acceptance_tests.rs +0 -1705
  64. package/dist/create/server-source/crates/feltdb/src/acquisition.rs +0 -286
  65. package/dist/create/server-source/crates/feltdb/src/admission.rs +0 -185
  66. package/dist/create/server-source/crates/feltdb/src/admission_contract_tests.rs +0 -507
  67. package/dist/create/server-source/crates/feltdb/src/adversarial_transport.rs +0 -539
  68. package/dist/create/server-source/crates/feltdb/src/agent_state.rs +0 -320
  69. package/dist/create/server-source/crates/feltdb/src/agent_transition_contract.rs +0 -1545
  70. package/dist/create/server-source/crates/feltdb/src/analytics.rs +0 -521
  71. package/dist/create/server-source/crates/feltdb/src/application.rs +0 -2674
  72. package/dist/create/server-source/crates/feltdb/src/application_runtime.rs +0 -1070
  73. package/dist/create/server-source/crates/feltdb/src/authority.rs +0 -479
  74. package/dist/create/server-source/crates/feltdb/src/authority_failover.rs +0 -847
  75. package/dist/create/server-source/crates/feltdb/src/authorization.rs +0 -1030
  76. package/dist/create/server-source/crates/feltdb/src/authorization_security_tests.rs +0 -1122
  77. package/dist/create/server-source/crates/feltdb/src/bin/feltdb-authority-client.rs +0 -32
  78. package/dist/create/server-source/crates/feltdb/src/bin/feltdb-authority.rs +0 -19
  79. package/dist/create/server-source/crates/feltdb/src/bin/feltdb_node.rs +0 -1474
  80. package/dist/create/server-source/crates/feltdb/src/capabilities/mod.rs +0 -8
  81. package/dist/create/server-source/crates/feltdb/src/capabilities/search.rs +0 -418
  82. package/dist/create/server-source/crates/feltdb/src/capabilities/vector.rs +0 -482
  83. package/dist/create/server-source/crates/feltdb/src/capability.rs +0 -903
  84. package/dist/create/server-source/crates/feltdb/src/cardinality_diagnostics.rs +0 -263
  85. package/dist/create/server-source/crates/feltdb/src/cardinality_endpoint.rs +0 -77
  86. package/dist/create/server-source/crates/feltdb/src/causal_backlog_bound.rs +0 -496
  87. package/dist/create/server-source/crates/feltdb/src/causal_dependency_barrier.rs +0 -2574
  88. package/dist/create/server-source/crates/feltdb/src/causal_dependency_barrier_phase_7_1.rs +0 -212
  89. package/dist/create/server-source/crates/feltdb/src/concurrency_fuzzing.rs +0 -422
  90. package/dist/create/server-source/crates/feltdb/src/consistency_contract.rs +0 -445
  91. package/dist/create/server-source/crates/feltdb/src/content_distribution.rs +0 -465
  92. package/dist/create/server-source/crates/feltdb/src/convergence.rs +0 -634
  93. package/dist/create/server-source/crates/feltdb/src/crash_atomic_boundary.rs +0 -427
  94. package/dist/create/server-source/crates/feltdb/src/crash_injection.rs +0 -376
  95. package/dist/create/server-source/crates/feltdb/src/crash_recovery_tests.rs +0 -365
  96. package/dist/create/server-source/crates/feltdb/src/cron.rs +0 -294
  97. package/dist/create/server-source/crates/feltdb/src/dedup_bound_investigation.rs +0 -483
  98. package/dist/create/server-source/crates/feltdb/src/distributed_indexing.rs +0 -477
  99. package/dist/create/server-source/crates/feltdb/src/distributed_tests.rs +0 -1003
  100. package/dist/create/server-source/crates/feltdb/src/distributed_transactions.rs +0 -1334
  101. package/dist/create/server-source/crates/feltdb/src/durability_guarantees.rs +0 -368
  102. package/dist/create/server-source/crates/feltdb/src/durable_dedup_set.rs +0 -231
  103. package/dist/create/server-source/crates/feltdb/src/durable_operation_identity.rs +0 -482
  104. package/dist/create/server-source/crates/feltdb/src/durable_operation_log.rs +0 -203
  105. package/dist/create/server-source/crates/feltdb/src/durable_sync.rs +0 -317
  106. package/dist/create/server-source/crates/feltdb/src/equality_index.rs +0 -595
  107. package/dist/create/server-source/crates/feltdb/src/execution.rs +0 -426
  108. package/dist/create/server-source/crates/feltdb/src/in_process_transport.rs +0 -214
  109. package/dist/create/server-source/crates/feltdb/src/indexing.rs +0 -776
  110. package/dist/create/server-source/crates/feltdb/src/lib.rs +0 -7365
  111. package/dist/create/server-source/crates/feltdb/src/managed_cas_tests.rs +0 -234
  112. package/dist/create/server-source/crates/feltdb/src/materialization.rs +0 -184
  113. package/dist/create/server-source/crates/feltdb/src/metrics.rs +0 -266
  114. package/dist/create/server-source/crates/feltdb/src/multi_node_convergence.rs +0 -310
  115. package/dist/create/server-source/crates/feltdb/src/multi_operation_transaction.rs +0 -736
  116. package/dist/create/server-source/crates/feltdb/src/observability.rs +0 -379
  117. package/dist/create/server-source/crates/feltdb/src/operation.rs +0 -290
  118. package/dist/create/server-source/crates/feltdb/src/operation_algebra.rs +0 -439
  119. package/dist/create/server-source/crates/feltdb/src/operation_log.rs +0 -349
  120. package/dist/create/server-source/crates/feltdb/src/p1_application_atomicity.rs +0 -332
  121. package/dist/create/server-source/crates/feltdb/src/p1_atomicity_acceptance.rs +0 -718
  122. package/dist/create/server-source/crates/feltdb/src/partition_reconciliation.rs +0 -487
  123. package/dist/create/server-source/crates/feltdb/src/peer_registry.rs +0 -166
  124. package/dist/create/server-source/crates/feltdb/src/permutation_scheduler.rs +0 -289
  125. package/dist/create/server-source/crates/feltdb/src/persistence_reality.rs +0 -566
  126. package/dist/create/server-source/crates/feltdb/src/phase1b_acceptance.rs +0 -3391
  127. package/dist/create/server-source/crates/feltdb/src/phase1c1_acceptance.rs +0 -203
  128. package/dist/create/server-source/crates/feltdb/src/phase1c2_acceptance.rs +0 -261
  129. package/dist/create/server-source/crates/feltdb/src/phase1c3_acceptance.rs +0 -502
  130. package/dist/create/server-source/crates/feltdb/src/phase1c_atomicity_proof.rs +0 -216
  131. package/dist/create/server-source/crates/feltdb/src/phase5_integration.rs +0 -303
  132. package/dist/create/server-source/crates/feltdb/src/phase5_scenarios.rs +0 -323
  133. package/dist/create/server-source/crates/feltdb/src/phase6_adversarial_scenarios.rs +0 -531
  134. package/dist/create/server-source/crates/feltdb/src/phase6_convergence_validator.rs +0 -406
  135. package/dist/create/server-source/crates/feltdb/src/phase6_persistence.rs +0 -436
  136. package/dist/create/server-source/crates/feltdb/src/phase_1c_real_tcp.rs +0 -387
  137. package/dist/create/server-source/crates/feltdb/src/phase_2a_failures.rs +0 -378
  138. package/dist/create/server-source/crates/feltdb/src/phase_2b_network.rs +0 -359
  139. package/dist/create/server-source/crates/feltdb/src/phase_2c_cascading.rs +0 -372
  140. package/dist/create/server-source/crates/feltdb/src/phase_3_durability.rs +0 -404
  141. package/dist/create/server-source/crates/feltdb/src/phase_4_baseline.rs +0 -376
  142. package/dist/create/server-source/crates/feltdb/src/phase_5_soak.rs +0 -461
  143. package/dist/create/server-source/crates/feltdb/src/policy_evaluation.rs +0 -2125
  144. package/dist/create/server-source/crates/feltdb/src/production_api.rs +0 -418
  145. package/dist/create/server-source/crates/feltdb/src/provenance.rs +0 -207
  146. package/dist/create/server-source/crates/feltdb/src/query_execution_diagnostics.rs +0 -126
  147. package/dist/create/server-source/crates/feltdb/src/query_performance.rs +0 -218
  148. package/dist/create/server-source/crates/feltdb/src/read_basis.rs +0 -257
  149. package/dist/create/server-source/crates/feltdb/src/references.rs +0 -404
  150. package/dist/create/server-source/crates/feltdb/src/replay_fuzzing.rs +0 -401
  151. package/dist/create/server-source/crates/feltdb/src/replica_acknowledgements.rs +0 -501
  152. package/dist/create/server-source/crates/feltdb/src/replica_membership.rs +0 -680
  153. package/dist/create/server-source/crates/feltdb/src/replication_manager.rs +0 -163
  154. package/dist/create/server-source/crates/feltdb/src/replication_protocol.rs +0 -133
  155. package/dist/create/server-source/crates/feltdb/src/routing.rs +0 -409
  156. package/dist/create/server-source/crates/feltdb/src/semantic_decision.rs +0 -2029
  157. package/dist/create/server-source/crates/feltdb/src/semantic_query.rs +0 -599
  158. package/dist/create/server-source/crates/feltdb/src/sharding.rs +0 -549
  159. package/dist/create/server-source/crates/feltdb/src/state_conflict_contract.rs +0 -516
  160. package/dist/create/server-source/crates/feltdb/src/state_contract.rs +0 -6003
  161. package/dist/create/server-source/crates/feltdb/src/state_diff_contract.rs +0 -222
  162. package/dist/create/server-source/crates/feltdb/src/state_facade.rs +0 -320
  163. package/dist/create/server-source/crates/feltdb/src/state_hash.rs +0 -291
  164. package/dist/create/server-source/crates/feltdb/src/state_model.rs +0 -4158
  165. package/dist/create/server-source/crates/feltdb/src/state_transition_store.rs +0 -379
  166. package/dist/create/server-source/crates/feltdb/src/state_trigger.rs +0 -673
  167. package/dist/create/server-source/crates/feltdb/src/storage.rs +0 -273
  168. package/dist/create/server-source/crates/feltdb/src/submission.rs +0 -471
  169. package/dist/create/server-source/crates/feltdb/src/sync.rs +0 -495
  170. package/dist/create/server-source/crates/feltdb/src/sync_contract.rs +0 -822
  171. package/dist/create/server-source/crates/feltdb/src/tcp_transport.rs +0 -433
  172. package/dist/create/server-source/crates/feltdb/src/transaction_api.rs +0 -462
  173. package/dist/create/server-source/crates/feltdb/src/transaction_invariants.rs +0 -965
  174. package/dist/create/server-source/crates/feltdb/src/transaction_preconditions.rs +0 -1120
  175. package/dist/create/server-source/crates/feltdb/src/transactions.rs +0 -643
  176. package/dist/create/server-source/crates/feltdb/src/trigger.rs +0 -390
  177. package/dist/create/server-source/crates/feltdb/src/trigger_contract.rs +0 -749
  178. package/dist/create/server-source/crates/feltdb/src/versioned_object_substrate.rs +0 -708
  179. package/dist/create/server-source/crates/feltdb/src/worker_mesh.rs +0 -1269
  180. package/dist/create/server-source/crates/feltdb/src/workflow.rs +0 -713
  181. package/dist/create/server-source/crates/feltdb/src/workflow_acceptance_tests.rs +0 -510
  182. package/dist/create/server-source/crates/feltdb/src/workflow_integration.rs +0 -354
  183. package/dist/create/server-source/crates/feltdb/src/workflow_runtime.rs +0 -594
  184. package/dist/create/server-source/crates/feltdb/src/workload.rs +0 -4222
  185. package/dist/create/server-source/crates/feltdb/src/workload_diagnostics.rs +0 -456
  186. package/dist/create/server-source/crates/feltdb/tests/agent_state_native.rs +0 -1188
  187. package/dist/create/server-source/crates/feltdb/tests/agent_transition_contract_conformance.rs +0 -2884
  188. package/dist/create/server-source/crates/feltdb/tests/authority_process.rs +0 -297
  189. package/dist/create/server-source/crates/feltdb/tests/authority_transaction_identity.rs +0 -534
  190. package/dist/create/server-source/crates/feltdb/tests/bounded_read_contract.rs +0 -132
  191. package/dist/create/server-source/crates/feltdb/tests/branching_evidence.rs +0 -299
  192. package/dist/create/server-source/crates/feltdb/tests/common/mod.rs +0 -96
  193. package/dist/create/server-source/crates/feltdb/tests/compaction_stall_contract.rs +0 -272
  194. package/dist/create/server-source/crates/feltdb/tests/crash_durability_contract.rs +0 -467
  195. package/dist/create/server-source/crates/feltdb/tests/current_revision_authority_evidence.rs +0 -309
  196. package/dist/create/server-source/crates/feltdb/tests/durable_backup_contract.rs +0 -445
  197. package/dist/create/server-source/crates/feltdb/tests/durable_corruption_contract.rs +0 -518
  198. package/dist/create/server-source/crates/feltdb/tests/durable_format_compatibility.rs +0 -392
  199. package/dist/create/server-source/crates/feltdb/tests/feltdb_state_boundary_tests.rs +0 -850
  200. package/dist/create/server-source/crates/feltdb/tests/fixtures/agent_transition_corpus.json +0 -23340
  201. package/dist/create/server-source/crates/feltdb/tests/fixtures/state_conflict_contract_corpus.json +0 -1916
  202. package/dist/create/server-source/crates/feltdb/tests/fixtures/state_diff_contract_corpus.json +0 -1878
  203. package/dist/create/server-source/crates/feltdb/tests/fixtures/trigger_contract_corpus.json +0 -1862
  204. package/dist/create/server-source/crates/feltdb/tests/generalized_version_control_evidence.rs +0 -123
  205. package/dist/create/server-source/crates/feltdb/tests/generalized_version_control_substrate_completion.rs +0 -299
  206. package/dist/create/server-source/crates/feltdb/tests/local_process_ownership.rs +0 -69
  207. package/dist/create/server-source/crates/feltdb/tests/managed_incident_regression.rs +0 -191
  208. package/dist/create/server-source/crates/feltdb/tests/operational_health_contract.rs +0 -278
  209. package/dist/create/server-source/crates/feltdb/tests/pr34_query_collection.rs +0 -234
  210. package/dist/create/server-source/crates/feltdb/tests/pr35_equality_index.rs +0 -947
  211. package/dist/create/server-source/crates/feltdb/tests/pr7_self_authorization_proof.rs +0 -404
  212. package/dist/create/server-source/crates/feltdb/tests/pr8_vocabulary_assessment.rs +0 -916
  213. package/dist/create/server-source/crates/feltdb/tests/pr9_phase2_boundary_tests.rs +0 -1045
  214. package/dist/create/server-source/crates/feltdb/tests/pr9_phase3a_path_a_tests.rs +0 -347
  215. package/dist/create/server-source/crates/feltdb/tests/pr9_phase3c_authorized_mutations.rs +0 -361
  216. package/dist/create/server-source/crates/feltdb/tests/pr9_phase3c_role_based_authorization.rs +0 -330
  217. package/dist/create/server-source/crates/feltdb/tests/pr9_phase3c_simple_auth_delete.rs +0 -93
  218. package/dist/create/server-source/crates/feltdb/tests/pr9_phase3c_team_delete_role_authorization.rs +0 -622
  219. package/dist/create/server-source/crates/feltdb/tests/pr9_teams_role_based_access.rs +0 -517
  220. package/dist/create/server-source/crates/feltdb/tests/production_certification.rs +0 -1153
  221. package/dist/create/server-source/crates/feltdb/tests/production_contract.rs +0 -771
  222. package/dist/create/server-source/crates/feltdb/tests/production_readiness_contract.rs +0 -1383
  223. package/dist/create/server-source/crates/feltdb/tests/reconciliation_application.rs +0 -868
  224. package/dist/create/server-source/crates/feltdb/tests/reconciliation_wire_format_evidence.rs +0 -221
  225. package/dist/create/server-source/crates/feltdb/tests/replicated_history_contract.rs +0 -417
  226. package/dist/create/server-source/crates/feltdb/tests/resource_scoped_revisions.rs +0 -338
  227. package/dist/create/server-source/crates/feltdb/tests/revision_identity_contract.rs +0 -1039
  228. package/dist/create/server-source/crates/feltdb/tests/revision_model_decision.rs +0 -739
  229. package/dist/create/server-source/crates/feltdb/tests/revision_retention_boundary_evidence.rs +0 -452
  230. package/dist/create/server-source/crates/feltdb/tests/saas_authorization_integration.rs +0 -81
  231. package/dist/create/server-source/crates/feltdb/tests/saas_invitation_lifecycle.rs +0 -438
  232. package/dist/create/server-source/crates/feltdb/tests/semantic_decision.rs +0 -1165
  233. package/dist/create/server-source/crates/feltdb/tests/semantic_query.rs +0 -767
  234. package/dist/create/server-source/crates/feltdb/tests/semantic_query_contract.rs +0 -363
  235. package/dist/create/server-source/crates/feltdb/tests/state_conflict_contract_conformance.rs +0 -1799
  236. package/dist/create/server-source/crates/feltdb/tests/state_diff_contract_conformance.rs +0 -1316
  237. package/dist/create/server-source/crates/feltdb/tests/state_model_integration.rs +0 -358
  238. package/dist/create/server-source/crates/feltdb/tests/state_persistence_integration.rs +0 -365
  239. package/dist/create/server-source/crates/feltdb/tests/state_ref_authority.rs +0 -918
  240. package/dist/create/server-source/crates/feltdb/tests/state_store_boundary_evidence.rs +0 -299
  241. package/dist/create/server-source/crates/feltdb/tests/storage_independent_versioned_object_substrate.rs +0 -328
  242. package/dist/create/server-source/crates/feltdb/tests/sync_divergence_evidence.rs +0 -255
  243. package/dist/create/server-source/crates/feltdb/tests/three_way_input_boundary_evidence.rs +0 -249
  244. package/dist/create/server-source/crates/feltdb/tests/trigger_contract_conformance.rs +0 -994
  245. package/dist/create/server-source/crates/feltdb/tests/workload_envelope_contract.rs +0 -484
  246. package/dist/studio-app/assets/feltdb_wasm_bg-TseJn2Ax.wasm +0 -0
  247. package/dist/studio-app/assets/index-1wd0uKua.js +0 -30
@@ -1,221 +0,0 @@
1
- //! Evidence for the reconciliation reachability audit
2
- //! (`docs/audits/RECONCILIATION-REACHABILITY-AUDIT.md`).
3
- //!
4
- //! This file adds **no capability and no product surface**. It exists to settle
5
- //! one constructive question the audit had to answer before it could report a
6
- //! blockage honestly:
7
- //!
8
- //! > If a `ReconciliationPlan` cannot be serialized to JSON, can it cross a
9
- //! > wire at all?
10
- //!
11
- //! It can. The recorded limitation is narrower than it first appeared, and the
12
- //! difference matters, because "the plan cannot be transmitted" would have been
13
- //! a reason no API could exist. That is not the reason. The reason is in the
14
- //! audit, and it is about where state lives, not about encoding.
15
- //!
16
- //! The DTO below is written here rather than in `src/` deliberately: proving a
17
- //! shape works is not the same as committing the product to it, and this PR
18
- //! adds no API.
19
-
20
- use feltdb::state_model::PathComponent;
21
- use serde::{Deserialize, Serialize};
22
- use serde_json::{json, Value};
23
- use std::collections::BTreeMap;
24
-
25
- fn key(name: &str) -> PathComponent {
26
- PathComponent::Key(name.to_string())
27
- }
28
-
29
- /// One override as it would appear on a wire: a *structural* path and a value.
30
- #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
31
- struct WireOverride {
32
- path: Vec<PathComponent>,
33
- value: Value,
34
- }
35
-
36
- /// A plan as it would appear on a wire.
37
- ///
38
- /// The one difference from `ReconciliationPlan` is that `path_overrides` is a
39
- /// **list**, not a map, because JSON object keys must be strings and a path is
40
- /// not one. Everything else is carried unchanged.
41
- #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
42
- struct WirePlan {
43
- left_id: String,
44
- right_id: String,
45
- base_id: String,
46
- parent_choice: bool,
47
- path_overrides: Vec<WireOverride>,
48
- }
49
-
50
- // ---------------------------------------------------------------------------
51
- // The limitation is about maps, not about paths
52
- // ---------------------------------------------------------------------------
53
-
54
- /// A path is JSON-encodable, structurally, with no invented syntax.
55
- ///
56
- /// `ReconciliationPlan` cannot be serialized because `path_overrides` is keyed
57
- /// by `Vec<PathComponent>` and JSON object keys must be strings. That is a
58
- /// property of using a path as a *map key*. `PathComponent` itself derives
59
- /// `Serialize`/`Deserialize` and encodes as a tagged object, so a path is
60
- /// perfectly transmissible as a JSON array.
61
- #[test]
62
- fn a_path_survives_json_as_a_structural_array() {
63
- let path = vec![key("o"), PathComponent::Index(0), key("a")];
64
- let text = serde_json::to_string(&path).expect("a path serializes");
65
- assert_eq!(text, r#"[{"Key":"o"},{"Index":0},{"Key":"a"}]"#);
66
-
67
- let back: Vec<PathComponent> = serde_json::from_str(&text).expect("and parses");
68
- assert_eq!(back, path, "and round trips exactly");
69
- }
70
-
71
- /// The two traps the conflict work rejected flattened renderings over survive.
72
- ///
73
- /// This is the reason the encoding is an array of tagged components rather than
74
- /// a string. Under `"a.b"` / `"a.bc"` one path is a prefix of the other and the
75
- /// overlap check would report a containment that does not exist; under any
76
- /// string rendering an object member named `0` and array index `0` collide.
77
- #[test]
78
- fn the_encoding_preserves_the_distinctions_a_flattened_one_would_lose() {
79
- let a_b = vec![key("a"), key("b")];
80
- let a_bc = vec![key("a"), key("bc")];
81
- assert_ne!(
82
- serde_json::to_string(&a_b).unwrap(),
83
- serde_json::to_string(&a_bc).unwrap(),
84
- "['a','b'] and ['a','bc'] stay distinct, so neither contains the other"
85
- );
86
-
87
- let member_zero = vec![key("0")];
88
- let index_zero = vec![PathComponent::Index(0)];
89
- assert_eq!(
90
- serde_json::to_string(&member_zero).unwrap(),
91
- r#"[{"Key":"0"}]"#
92
- );
93
- assert_eq!(
94
- serde_json::to_string(&index_zero).unwrap(),
95
- r#"[{"Index":0}]"#
96
- );
97
- assert_ne!(
98
- serde_json::to_string(&member_zero).unwrap(),
99
- serde_json::to_string(&index_zero).unwrap(),
100
- "an object member named 0 and the first array element stay different places"
101
- );
102
- }
103
-
104
- /// A whole plan crosses a wire when overrides are a list rather than a map.
105
- #[test]
106
- fn a_plan_crosses_a_wire_when_its_overrides_are_a_list() {
107
- let plan = WirePlan {
108
- left_id: "aa".into(),
109
- right_id: "bb".into(),
110
- base_id: "cc".into(),
111
- parent_choice: true,
112
- path_overrides: vec![
113
- WireOverride {
114
- path: vec![key("o"), key("a")],
115
- value: json!(9),
116
- },
117
- WireOverride {
118
- path: vec![key("xs"), PathComponent::Index(1)],
119
- value: json!("x"),
120
- },
121
- ],
122
- };
123
-
124
- let text = serde_json::to_string(&plan).expect("a wire plan serializes");
125
- let back: WirePlan = serde_json::from_str(&text).expect("and parses");
126
- assert_eq!(back, plan, "and round trips exactly");
127
- }
128
-
129
- // ---------------------------------------------------------------------------
130
- // What the list costs
131
- // ---------------------------------------------------------------------------
132
-
133
- /// The wire form reintroduces a hazard the in-memory type forecloses.
134
- ///
135
- /// `ReconciliationPlan::path_overrides` is a `BTreeMap`, so two overrides at the
136
- /// same path cannot exist — the type makes the question unaskable, and
137
- /// `a_repeated_override_path_is_impossible_by_construction` records that. A
138
- /// *list* has no such property: a client can send the same path twice.
139
- ///
140
- /// The danger is not that duplicates are possible. It is that collecting the
141
- /// list into the map **silently resolves them, last-wins**, which is exactly the
142
- /// shape of defect this sequence has twice corrected: a plausible-looking
143
- /// collapse that quietly discards one of two competing decisions. An API built
144
- /// on this DTO must reject duplicates explicitly, and this test exists so that
145
- /// obligation is recorded before any API exists rather than discovered after.
146
- #[test]
147
- fn collecting_a_wire_list_into_a_map_silently_drops_a_duplicate_path() {
148
- let duplicated = vec![
149
- WireOverride {
150
- path: vec![key("o")],
151
- value: json!("first"),
152
- },
153
- WireOverride {
154
- path: vec![key("o")],
155
- value: json!("second"),
156
- },
157
- ];
158
-
159
- // The list carries both decisions.
160
- assert_eq!(duplicated.len(), 2);
161
-
162
- // The naive conversion keeps one, without erroring.
163
- let collapsed: BTreeMap<Vec<PathComponent>, Value> = duplicated
164
- .iter()
165
- .map(|entry| (entry.path.clone(), entry.value.clone()))
166
- .collect();
167
- assert_eq!(collapsed.len(), 1, "one decision was dropped");
168
- assert_eq!(
169
- collapsed[&vec![key("o")]],
170
- json!("second"),
171
- "silently, and last-wins"
172
- );
173
-
174
- // What an API must do instead: detect the duplicate and refuse.
175
- let mut seen: BTreeMap<Vec<PathComponent>, Value> = BTreeMap::new();
176
- let mut rejected = false;
177
- for entry in &duplicated {
178
- if seen
179
- .insert(entry.path.clone(), entry.value.clone())
180
- .is_some()
181
- {
182
- rejected = true;
183
- }
184
- }
185
- assert!(
186
- rejected,
187
- "a duplicate path is detectable, and must be refused"
188
- );
189
- }
190
-
191
- /// Ordering is not information the wire form may carry.
192
- ///
193
- /// The in-memory map has one iteration order, sorted structurally. A list has
194
- /// whatever order the client wrote. Since overlapping override paths are
195
- /// rejected, no two overrides can affect each other, so order cannot change the
196
- /// result — and an API must therefore not let a client believe it can.
197
- #[test]
198
- fn wire_order_carries_no_meaning() {
199
- let one = WireOverride {
200
- path: vec![key("a")],
201
- value: json!(1),
202
- };
203
- let two = WireOverride {
204
- path: vec![key("b")],
205
- value: json!(2),
206
- };
207
-
208
- let forward: BTreeMap<_, _> = [one.clone(), two.clone()]
209
- .iter()
210
- .map(|e| (e.path.clone(), e.value.clone()))
211
- .collect();
212
- let reversed: BTreeMap<_, _> = [two, one]
213
- .iter()
214
- .map(|e| (e.path.clone(), e.value.clone()))
215
- .collect();
216
-
217
- assert_eq!(
218
- forward, reversed,
219
- "the map both lists produce is the same, so wire order is not a decision"
220
- );
221
- }
@@ -1,417 +0,0 @@
1
- //! Replicated revision history.
2
- //!
3
- //! The question:
4
- //!
5
- //! > **When a remote operation is applied, does FeltDB reconstruct the same
6
- //! > historical revision the originating authority committed, or does
7
- //! > replication only reproduce current state?**
8
- //!
9
- //! It used to be the latter. A replica received the same records and no history
10
- //! at all, so two authorities agreed about what *is* while disagreeing about
11
- //! what *happened* — and reconciliation on a replica had no `base`.
12
- //!
13
- //! The target invariant:
14
- //!
15
- //! > **Replication preserves authoritative revision history, not merely
16
- //! > materialized state.**
17
- //!
18
- //! # Two independent equivalences
19
- //!
20
- //! State equivalence and historical equivalence are checked separately and must
21
- //! stay separate. Two databases can hold identical current records and
22
- //! completely different histories — one that recorded every step, one that only
23
- //! ever saw the last. `state_digest` answers the first question and
24
- //! `history_digest` the second, and
25
- //! `same_state_with_different_history_is_detected` proves the second is not the
26
- //! first wearing a different name.
27
- //!
28
- //! # What is not done here
29
- //!
30
- //! A peer does **not** mint a local revision for the resulting state. That
31
- //! would give `origin: A → B → C` and `replica: A' → B' → C'` — the same shape
32
- //! and different facts. The operation carries the revision it produced, and the
33
- //! peer rebuilds it, checking that the identity follows from its own parts.
34
- //!
35
- //! See `docs/architecture/replicated-history.md`.
36
-
37
- use feltdb::state_model::{ParentLookup, StateStore};
38
- use feltdb::{FeltDb, Operation};
39
- use serde_json::{json, Value};
40
- use std::collections::HashMap;
41
- use std::sync::Arc;
42
- use tempfile::TempDir;
43
-
44
- struct Pair {
45
- _directory: TempDir,
46
- origin: Arc<FeltDb>,
47
- replica: Arc<FeltDb>,
48
- }
49
-
50
- fn pair() -> Pair {
51
- let directory = TempDir::new().unwrap();
52
- let origin = Arc::new(FeltDb::open(directory.path().join("origin.log")).unwrap());
53
- let replica = Arc::new(FeltDb::open(directory.path().join("replica.log")).unwrap());
54
- Pair {
55
- _directory: directory,
56
- origin,
57
- replica,
58
- }
59
- }
60
-
61
- fn store(db: &Arc<FeltDb>) -> StateStore {
62
- StateStore::with_feltdb(db.clone()).unwrap()
63
- }
64
-
65
- fn operations(db: &Arc<FeltDb>) -> Vec<Operation> {
66
- db.operations_since(&HashMap::new()).unwrap()
67
- }
68
-
69
- fn replicate(from: &Arc<FeltDb>, to: &Arc<FeltDb>) {
70
- for operation in operations(from) {
71
- to.apply_remote_operation(operation).unwrap();
72
- }
73
- }
74
-
75
- /// Everything about one resource's history that must survive replication.
76
- fn history(db: &Arc<FeltDb>, resource: &str) -> Vec<(String, Option<String>, u64, String, String)> {
77
- store(db)
78
- .history_of(resource)
79
- .into_iter()
80
- .map(|revision| {
81
- (
82
- revision.id.as_hex().to_string(),
83
- revision
84
- .parent_id
85
- .as_ref()
86
- .map(|id| id.as_hex().to_string()),
87
- revision.sequence,
88
- revision.content_id.as_hex().to_string(),
89
- revision.authority,
90
- )
91
- })
92
- .collect()
93
- }
94
-
95
- // ---------------------------------------------------------------------------
96
- // The flagship regression
97
- // ---------------------------------------------------------------------------
98
-
99
- /// **The test #307 was written to make fail.**
100
- ///
101
- /// Three writes on the origin, replicated. The replica must hold the same three
102
- /// revisions — identities, parents, sequences, resource and provenance — not
103
- /// the same final value with no history.
104
- #[test]
105
- fn replication_preserves_revision_history_and_ancestry() {
106
- let pair = pair();
107
- pair.origin.insert("tasks:1", json!({"n": 1})).unwrap();
108
- pair.origin.update("tasks:1", json!({"n": 2})).unwrap();
109
- pair.origin.update("tasks:1", json!({"n": 3})).unwrap();
110
-
111
- replicate(&pair.origin, &pair.replica);
112
-
113
- // All three, identical in every historical field.
114
- let origin_history = history(&pair.origin, "tasks:1");
115
- let replica_history = history(&pair.replica, "tasks:1");
116
- assert_eq!(origin_history.len(), 3);
117
- assert_eq!(replica_history, origin_history);
118
-
119
- // The chain traverses the same way.
120
- let replica_store = store(&pair.replica);
121
- let chain = replica_store.history_of("tasks:1");
122
- assert_eq!(chain[0].parent_id, None);
123
- assert_eq!(chain[1].parent_id.as_ref(), Some(&chain[0].id));
124
- assert_eq!(chain[2].parent_id.as_ref(), Some(&chain[1].id));
125
- for revision in &chain[1..] {
126
- assert!(matches!(
127
- replica_store.parent_of(&revision.id),
128
- Some(ParentLookup::Revision(_))
129
- ));
130
- }
131
-
132
- // Resource identity and current state.
133
- assert!(chain.iter().all(|revision| revision.resource == "tasks:1"));
134
- let current: Value = pair.replica.get("tasks:1").unwrap().unwrap();
135
- assert_eq!(current["n"], json!(3));
136
-
137
- // And the two independent equivalences, both holding.
138
- assert_eq!(
139
- pair.replica.state_digest().unwrap(),
140
- pair.origin.state_digest().unwrap()
141
- );
142
- assert_eq!(
143
- replica_store.history_digest(),
144
- store(&pair.origin).history_digest(),
145
- "the replica holds the same history, not merely the same values"
146
- );
147
- }
148
-
149
- /// **R10, the mandatory negative control.**
150
- ///
151
- /// Two databases with the same current state and different histories must not
152
- /// compare equal. If `history_digest` could not tell these apart, "history
153
- /// preserved" would silently mean "current values happen to match", and every
154
- /// other test in this file would be worthless.
155
- #[test]
156
- fn same_state_with_different_history_is_detected() {
157
- let directory = TempDir::new().unwrap();
158
-
159
- // Recorded every step.
160
- let full = Arc::new(FeltDb::open(directory.path().join("full.log")).unwrap());
161
- full.insert("tasks:1", json!({"n": 1})).unwrap();
162
- full.update("tasks:1", json!({"n": 2})).unwrap();
163
- full.update("tasks:1", json!({"n": 3})).unwrap();
164
-
165
- // Only ever saw the last one.
166
- let shallow = Arc::new(FeltDb::open(directory.path().join("shallow.log")).unwrap());
167
- shallow.insert("tasks:1", json!({"n": 3})).unwrap();
168
-
169
- assert_eq!(
170
- full.state_digest().unwrap(),
171
- shallow.state_digest().unwrap(),
172
- "the fixture requires identical current state"
173
- );
174
- assert_ne!(
175
- store(&full).history_digest(),
176
- store(&shallow).history_digest(),
177
- "identical state must not be mistaken for identical history"
178
- );
179
- assert_eq!(store(&full).history_of("tasks:1").len(), 3);
180
- assert_eq!(store(&shallow).history_of("tasks:1").len(), 1);
181
- }
182
-
183
- // ---------------------------------------------------------------------------
184
- // The individual guarantees
185
- // ---------------------------------------------------------------------------
186
-
187
- /// **R6.** A replicated revision keeps the authority that committed the fact.
188
- ///
189
- /// The replica must not rewrite provenance to itself, as though it had authored
190
- /// the history it received.
191
- #[test]
192
- fn authority_provenance_is_not_rewritten_by_the_replica() {
193
- let pair = pair();
194
- pair.origin.insert("tasks:1", json!({"n": 1})).unwrap();
195
- replicate(&pair.origin, &pair.replica);
196
-
197
- let origin_authority = store(&pair.origin).head_of("tasks:1").unwrap().authority;
198
- let replica_authority = store(&pair.replica).head_of("tasks:1").unwrap().authority;
199
- assert_eq!(replica_authority, origin_authority);
200
-
201
- // And that authority is the origin's identity, not the replica's own.
202
- pair.replica
203
- .insert("tasks:2", json!({"local": true}))
204
- .unwrap();
205
- let local_authority = store(&pair.replica).head_of("tasks:2").unwrap().authority;
206
- assert_ne!(
207
- replica_authority, local_authority,
208
- "a replicated revision is not attributed to the replica"
209
- );
210
- }
211
-
212
- /// **R4.** Sequences are authoritative, not reassigned locally.
213
- ///
214
- /// A replica with its own unrelated history must not renumber what it receives.
215
- #[test]
216
- fn sequences_are_preserved_not_renumbered() {
217
- let pair = pair();
218
-
219
- // The replica has its own busy history first.
220
- for n in 0..5 {
221
- pair.replica
222
- .insert(&format!("local:{n}"), json!({ "n": n }))
223
- .unwrap();
224
- }
225
- pair.replica.insert("other:1", json!({"a": 1})).unwrap();
226
- pair.replica.update("other:1", json!({"a": 2})).unwrap();
227
-
228
- pair.origin.insert("tasks:1", json!({"n": 1})).unwrap();
229
- pair.origin.update("tasks:1", json!({"n": 2})).unwrap();
230
- replicate(&pair.origin, &pair.replica);
231
-
232
- let sequences: Vec<u64> = store(&pair.replica)
233
- .history_of("tasks:1")
234
- .iter()
235
- .map(|revision| revision.sequence)
236
- .collect();
237
- assert_eq!(sequences, vec![0, 1], "a resource's history starts at zero");
238
- }
239
-
240
- /// **R7.** Replaying the whole operation stream changes nothing.
241
- #[test]
242
- fn replication_is_idempotent() {
243
- let pair = pair();
244
- pair.origin.insert("tasks:1", json!({"n": 1})).unwrap();
245
- pair.origin.update("tasks:1", json!({"n": 2})).unwrap();
246
-
247
- replicate(&pair.origin, &pair.replica);
248
- let state_once = pair.replica.state_digest().unwrap();
249
- let history_once = store(&pair.replica).history_digest();
250
- let count_once = store(&pair.replica).history_of("tasks:1").len();
251
-
252
- // Again, twice.
253
- replicate(&pair.origin, &pair.replica);
254
- replicate(&pair.origin, &pair.replica);
255
-
256
- assert_eq!(pair.replica.state_digest().unwrap(), state_once);
257
- assert_eq!(store(&pair.replica).history_digest(), history_once);
258
- assert_eq!(
259
- store(&pair.replica).history_of("tasks:1").len(),
260
- count_once,
261
- "no duplicate history, and no new revision identities"
262
- );
263
- }
264
-
265
- /// **R8.** Causal ordering is not weakened to make history easier to rebuild.
266
- ///
267
- /// An operation delivered before its causal predecessor is still refused, and
268
- /// the history is reconstructed once the prerequisites arrive.
269
- #[test]
270
- fn out_of_order_delivery_is_refused_and_then_converges() {
271
- let pair = pair();
272
- pair.origin.insert("tasks:1", json!({"n": 1})).unwrap();
273
- pair.origin.update("tasks:1", json!({"n": 2})).unwrap();
274
- pair.origin.update("tasks:1", json!({"n": 3})).unwrap();
275
- let ops = operations(&pair.origin);
276
-
277
- // The third first: refused, and nothing partial is left behind.
278
- assert!(pair.replica.apply_remote_operation(ops[2].clone()).is_err());
279
- assert!(store(&pair.replica).history_of("tasks:1").is_empty());
280
-
281
- // In order: the same history as the origin.
282
- for operation in &ops {
283
- pair.replica
284
- .apply_remote_operation(operation.clone())
285
- .unwrap();
286
- }
287
- assert_eq!(
288
- store(&pair.replica).history_digest(),
289
- store(&pair.origin).history_digest()
290
- );
291
- }
292
-
293
- /// **R5 and R9.** Concurrent writes on two authorities produce a fork, and the
294
- /// fork survives replication with both branches and their shared base.
295
- ///
296
- /// This is the payoff: the replica ends up holding the historical information a
297
- /// three-way reconciliation needs — two heads and the common ancestor they
298
- /// descend from. Before, it held one value and no `base` at all.
299
- #[test]
300
- fn concurrent_authorities_produce_a_fork_that_survives_replication() {
301
- let pair = pair();
302
-
303
- // A shared starting point, replicated both ways.
304
- pair.origin.insert("tasks:1", json!({"n": 0})).unwrap();
305
- replicate(&pair.origin, &pair.replica);
306
- let base = store(&pair.origin).head_of("tasks:1").unwrap();
307
-
308
- // Now each authority writes independently.
309
- pair.origin
310
- .update("tasks:1", json!({"side": "left"}))
311
- .unwrap();
312
- pair.replica
313
- .update("tasks:1", json!({"side": "right"}))
314
- .unwrap();
315
-
316
- let left = store(&pair.origin).head_of("tasks:1").unwrap();
317
- let right = store(&pair.replica).head_of("tasks:1").unwrap();
318
- assert_ne!(left.id, right.id, "two authorities, two revisions");
319
- assert_eq!(left.parent_id.as_ref(), Some(&base.id));
320
- assert_eq!(right.parent_id.as_ref(), Some(&base.id), "a real fork");
321
-
322
- // Exchange. Each side must end up holding both branches.
323
- replicate(&pair.origin, &pair.replica);
324
- replicate(&pair.replica, &pair.origin);
325
-
326
- for db in [&pair.origin, &pair.replica] {
327
- let ids: Vec<String> = store(db)
328
- .history_of("tasks:1")
329
- .iter()
330
- .map(|revision| revision.id.as_hex().to_string())
331
- .collect();
332
- assert!(ids.contains(&base.id.as_hex().to_string()), "the base");
333
- assert!(ids.contains(&left.id.as_hex().to_string()), "the left head");
334
- assert!(
335
- ids.contains(&right.id.as_hex().to_string()),
336
- "the right head"
337
- );
338
-
339
- // The information reconciliation needs: both heads resolve to the same
340
- // common ancestor.
341
- let store = store(db);
342
- for head in [&left, &right] {
343
- match store.parent_of(&head.id) {
344
- Some(ParentLookup::Revision(parent)) => assert_eq!(parent.id, base.id),
345
- other => panic!("a fork head must resolve to the shared base, got {other:?}"),
346
- }
347
- }
348
- }
349
-
350
- // Both sides now hold the same history, whatever their current values.
351
- assert_eq!(
352
- store(&pair.origin).history_digest(),
353
- store(&pair.replica).history_digest(),
354
- "the authorities converged on the same historical facts"
355
- );
356
- }
357
-
358
- // ---------------------------------------------------------------------------
359
- // What replication refuses
360
- // ---------------------------------------------------------------------------
361
-
362
- /// A revision whose stated identity does not follow from its own parts is
363
- /// refused rather than turned into a plausible local history.
364
- #[test]
365
- fn a_tampered_revision_identity_is_refused() {
366
- let pair = pair();
367
- pair.origin.insert("tasks:1", json!({"n": 1})).unwrap();
368
- let mut ops = operations(&pair.origin);
369
-
370
- let provenance = ops[0].revision.as_mut().expect("the operation carries one");
371
- provenance.id = "0".repeat(64);
372
-
373
- assert!(
374
- pair.replica.apply_remote_operation(ops[0].clone()).is_err(),
375
- "a stated identity that does not follow from the parts is refused"
376
- );
377
- assert!(store(&pair.replica).history_of("tasks:1").is_empty());
378
- }
379
-
380
- /// A revision that does not match the value it arrived with is refused.
381
- #[test]
382
- fn a_revision_that_disagrees_with_its_value_is_refused() {
383
- let pair = pair();
384
- pair.origin.insert("tasks:1", json!({"n": 1})).unwrap();
385
- let mut ops = operations(&pair.origin);
386
-
387
- // The content identity no longer matches the operation's value.
388
- let provenance = ops[0].revision.as_mut().unwrap();
389
- provenance.content_id = "1".repeat(64);
390
-
391
- assert!(pair.replica.apply_remote_operation(ops[0].clone()).is_err());
392
- }
393
-
394
- /// An operation from a build that sends no revision still replicates state, and
395
- /// carries no history.
396
- ///
397
- /// The field is additive and outside the content hash, so an older peer's
398
- /// operations still verify and apply. What they cannot do is contribute
399
- /// history, and that is a bounded, stated consequence rather than a silent one.
400
- #[test]
401
- fn an_operation_without_provenance_replicates_state_only() {
402
- let pair = pair();
403
- pair.origin.insert("tasks:1", json!({"n": 1})).unwrap();
404
- let mut ops = operations(&pair.origin);
405
- ops[0].revision = None;
406
-
407
- pair.replica
408
- .apply_remote_operation(ops[0].clone())
409
- .expect("it still verifies and applies");
410
-
411
- let current: Value = pair.replica.get("tasks:1").unwrap().unwrap();
412
- assert_eq!(current["n"], json!(1), "state arrived");
413
- assert!(
414
- store(&pair.replica).history_of("tasks:1").is_empty(),
415
- "and no history was invented for it"
416
- );
417
- }