forge
Explore
Log in

Don't you dare go Hollow

Bump all dependencies to latest

Browse files at this commit

ea35e583ef0693c2ecdfba85b16716174c049aecAhmet Kaan GümüşParent: 54ec62d
  • chore
    • bump all dependencies to latest
Show full message
⬆️ chore: bump all dependencies to latest
Cargo.lockmodified+153 -75
@@ -134,9 +134,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
134 checksum = "3c3610892ee6e0cbce8ae2700349fcf8f98adb0dbfbee85aec3c9179d29cc072"134 checksum = "3c3610892ee6e0cbce8ae2700349fcf8f98adb0dbfbee85aec3c9179d29cc072"
135 dependencies = [135 dependencies = [
136 "base64ct",136 "base64ct",
137- "blake2",137+ "blake2 0.10.6",
138 "cpufeatures 0.2.17",138 "cpufeatures 0.2.17",
139- "password-hash",139+ "password-hash 0.5.0",
140+]
141+
142+[[package]]
143+name = "argon2"
144+version = "0.6.0"
145+source = "registry+https://github.com/rust-lang/crates.io-index"
146+checksum = "134c52ddac6d63c576bef8168db10c83c49c26444ecbc68060fef078925a901c"
147+dependencies = [
148+ "base64ct",
149+ "blake2 0.11.0",
150+ "cpufeatures 0.3.1",
151+ "password-hash 0.6.1",
140 ]152 ]
141 153
142 [[package]]154 [[package]]
@@ -250,7 +262,7 @@ checksum = "ae36dc4177970ef04fde5178d3e2429882def40e57a451f919c098f72baa6cec"
250 dependencies = [262 dependencies = [
251 "proc-macro2",263 "proc-macro2",
252 "quote",264 "quote",
253- "syn 3.0.3",265+ "syn 3.0.5",
254 ]266 ]
255 267
256 [[package]]268 [[package]]
@@ -390,9 +402,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
390 402
391 [[package]]403 [[package]]
392 name = "base64"404 name = "base64"
393-version = "0.23.0"405+version = "0.23.1"
394 source = "registry+https://github.com/rust-lang/crates.io-index"406 source = "registry+https://github.com/rust-lang/crates.io-index"
395-checksum = "b25655df2c3cdd83c5e5b293b88acd880332b2ddadd7c30ac43144fdc0033da9"407+checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5"
396 408
397 [[package]]409 [[package]]
398 name = "base64ct"410 name = "base64ct"
@@ -484,6 +496,15 @@ dependencies = [
484 "digest 0.10.7",496 "digest 0.10.7",
485 ]497 ]
486 498
499+[[package]]
500+name = "blake2"
501+version = "0.11.0"
502+source = "registry+https://github.com/rust-lang/crates.io-index"
503+checksum = "5b5d4d889834ee8ecfc0f8426ad30faf7cdcb10f741a8e6d7224d95325479f6f"
504+dependencies = [
505+ "digest 0.11.3",
506+]
507+
487 [[package]]508 [[package]]
488 name = "blake3"509 name = "blake3"
489 version = "1.8.5"510 version = "1.8.5"
@@ -495,7 +516,7 @@ dependencies = [
495 "cc",516 "cc",
496 "cfg-if",517 "cfg-if",
497 "constant_time_eq",518 "constant_time_eq",
498- "cpufeatures 0.3.0",519+ "cpufeatures 0.3.1",
499 ]520 ]
500 521
501 [[package]]522 [[package]]
@@ -636,9 +657,9 @@ dependencies = [
636 657
637 [[package]]658 [[package]]
638 name = "cc"659 name = "cc"
639-version = "1.3.0"660+version = "1.4.5"
640 source = "registry+https://github.com/rust-lang/crates.io-index"661 source = "registry+https://github.com/rust-lang/crates.io-index"
641-checksum = "c89588d05638b5b4594a3348a2d6c20277e43a7f5c5202b05cc56888475a47b8"662+checksum = "005ec2760ca554fae18df7a11195552ec576cd665632a881bc011d5bb2fd4d80"
642 dependencies = [663 dependencies = [
643 "find-msvc-tools",664 "find-msvc-tools",
644 "jobserver",665 "jobserver",
@@ -660,12 +681,12 @@ checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527"
660 681
661 [[package]]682 [[package]]
662 name = "chacha20"683 name = "chacha20"
663-version = "0.10.1"684+version = "0.10.2"
664 source = "registry+https://github.com/rust-lang/crates.io-index"685 source = "registry+https://github.com/rust-lang/crates.io-index"
665-checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81"686+checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06"
666 dependencies = [687 dependencies = [
667 "cfg-if",688 "cfg-if",
668- "cpufeatures 0.3.0",689+ "cpufeatures 0.3.1",
669 "rand_core 0.10.1",690 "rand_core 0.10.1",
670 ]691 ]
671 692
@@ -729,6 +750,12 @@ dependencies = [
729 "cc",750 "cc",
730 ]751 ]
731 752
753+[[package]]
754+name = "cmov"
755+version = "0.5.4"
756+source = "registry+https://github.com/rust-lang/crates.io-index"
757+checksum = "0c9ea0ac24bc397ab3c98583a3c9ba74fa56b09a4449bbe172b9b1ddb016027a"
758+
732 [[package]]759 [[package]]
733 name = "concurrent-queue"760 name = "concurrent-queue"
734 version = "2.5.0"761 version = "2.5.0"
@@ -802,9 +829,9 @@ dependencies = [
802 829
803 [[package]]830 [[package]]
804 name = "cpufeatures"831 name = "cpufeatures"
805-version = "0.3.0"832+version = "0.3.1"
806 source = "registry+https://github.com/rust-lang/crates.io-index"833 source = "registry+https://github.com/rust-lang/crates.io-index"
807-checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201"834+checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566"
808 dependencies = [835 dependencies = [
809 "libc",836 "libc",
810 ]837 ]
@@ -916,6 +943,15 @@ dependencies = [
916 "smallvec",943 "smallvec",
917 ]944 ]
918 945
946+[[package]]
947+name = "ctutils"
948+version = "0.4.2"
949+source = "registry+https://github.com/rust-lang/crates.io-index"
950+checksum = "7d5515a3834141de9eafb9717ad39eea8247b5674e6066c404e8c4b365d2a29e"
951+dependencies = [
952+ "cmov",
953+]
954+
919 [[package]]955 [[package]]
920 name = "curve25519-dalek"956 name = "curve25519-dalek"
921 version = "4.1.3"957 version = "4.1.3"
@@ -959,9 +995,9 @@ dependencies = [
959 995
960 [[package]]996 [[package]]
961 name = "data-encoding"997 name = "data-encoding"
962-version = "2.11.0"998+version = "2.11.1"
963 source = "registry+https://github.com/rust-lang/crates.io-index"999 source = "registry+https://github.com/rust-lang/crates.io-index"
964-checksum = "a4ae5f15dda3c708c0ade84bfee31ccab44a3da4f88015ed22f63732abe300c8"1000+checksum = "4583a4551df46e2792f82ceeac45e850d2e2d5debba0b91f102385cda5b11f06"
965 1001
966 [[package]]1002 [[package]]
967 name = "der"1003 name = "der"
@@ -1032,6 +1068,7 @@ dependencies = [
1032 "block-buffer 0.12.1",1068 "block-buffer 0.12.1",
1033 "const-oid 0.10.2",1069 "const-oid 0.10.2",
1034 "crypto-common 0.2.2",1070 "crypto-common 0.2.2",
1071+ "ctutils",
1035 ]1072 ]
1036 1073
1037 [[package]]1074 [[package]]
@@ -1094,13 +1131,13 @@ dependencies = [
1094 1131
1095 [[package]]1132 [[package]]
1096 name = "displaydoc"1133 name = "displaydoc"
1097-version = "0.2.6"1134+version = "0.2.7"
1098 source = "registry+https://github.com/rust-lang/crates.io-index"1135 source = "registry+https://github.com/rust-lang/crates.io-index"
1099-checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f"1136+checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8"
1100 dependencies = [1137 dependencies = [
1101 "proc-macro2",1138 "proc-macro2",
1102 "quote",1139 "quote",
1103- "syn 2.0.119",1140+ "syn 3.0.5",
1104 ]1141 ]
1105 1142
1106 [[package]]1143 [[package]]
@@ -1318,9 +1355,9 @@ checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d"
1318 1355
1319 [[package]]1356 [[package]]
1320 name = "find-msvc-tools"1357 name = "find-msvc-tools"
1321-version = "0.1.9"1358+version = "0.1.12"
1322 source = "registry+https://github.com/rust-lang/crates.io-index"1359 source = "registry+https://github.com/rust-lang/crates.io-index"
1323-checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"1360+checksum = "3e0f1c7c3a72c66fd80abe965175f7523475c0489a87d3ff9d6e8c87d87a9d2d"
1324 1361
1325 [[package]]1362 [[package]]
1326 name = "flatbuffers"1363 name = "flatbuffers"
@@ -1405,9 +1442,9 @@ dependencies = [
1405 1442
1406 [[package]]1443 [[package]]
1407 name = "futures-channel"1444 name = "futures-channel"
1408-version = "0.3.33"1445+version = "0.3.34"
1409 source = "registry+https://github.com/rust-lang/crates.io-index"1446 source = "registry+https://github.com/rust-lang/crates.io-index"
1410-checksum = "262590f4fe6afeb0bc83be1daa64e52657fe185690a958af7f3ad0e92085c5ae"1447+checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4"
1411 dependencies = [1448 dependencies = [
1412 "futures-core",1449 "futures-core",
1413 "futures-sink",1450 "futures-sink",
@@ -1415,9 +1452,9 @@ dependencies = [
1415 1452
1416 [[package]]1453 [[package]]
1417 name = "futures-core"1454 name = "futures-core"
1418-version = "0.3.33"1455+version = "0.3.34"
1419 source = "registry+https://github.com/rust-lang/crates.io-index"1456 source = "registry+https://github.com/rust-lang/crates.io-index"
1420-checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7"1457+checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e"
1421 1458
1422 [[package]]1459 [[package]]
1423 name = "futures-executor"1460 name = "futures-executor"
@@ -1432,38 +1469,38 @@ dependencies = [
1432 1469
1433 [[package]]1470 [[package]]
1434 name = "futures-io"1471 name = "futures-io"
1435-version = "0.3.33"1472+version = "0.3.34"
1436 source = "registry+https://github.com/rust-lang/crates.io-index"1473 source = "registry+https://github.com/rust-lang/crates.io-index"
1437-checksum = "4577ecaa3c4f96589d473f679a71b596316f6641bc350038b962a5daf0085d7a"1474+checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed"
1438 1475
1439 [[package]]1476 [[package]]
1440 name = "futures-macro"1477 name = "futures-macro"
1441-version = "0.3.33"1478+version = "0.3.34"
1442 source = "registry+https://github.com/rust-lang/crates.io-index"1479 source = "registry+https://github.com/rust-lang/crates.io-index"
1443-checksum = "2d6d3cde68c518367be28956066ddfef33813991b77a55005a69dae04bf3b10b"1480+checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44"
1444 dependencies = [1481 dependencies = [
1445 "proc-macro2",1482 "proc-macro2",
1446 "quote",1483 "quote",
1447- "syn 2.0.119",1484+ "syn 3.0.5",
1448 ]1485 ]
1449 1486
1450 [[package]]1487 [[package]]
1451 name = "futures-sink"1488 name = "futures-sink"
1452-version = "0.3.33"1489+version = "0.3.34"
1453 source = "registry+https://github.com/rust-lang/crates.io-index"1490 source = "registry+https://github.com/rust-lang/crates.io-index"
1454-checksum = "e34418ac499d6305c2fb5ad0ed2f6ac998c5f8ca209b4510f7f94242c647e307"1491+checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d"
1455 1492
1456 [[package]]1493 [[package]]
1457 name = "futures-task"1494 name = "futures-task"
1458-version = "0.3.33"1495+version = "0.3.34"
1459 source = "registry+https://github.com/rust-lang/crates.io-index"1496 source = "registry+https://github.com/rust-lang/crates.io-index"
1460-checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109"1497+checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd"
1461 1498
1462 [[package]]1499 [[package]]
1463 name = "futures-util"1500 name = "futures-util"
1464-version = "0.3.33"1501+version = "0.3.34"
1465 source = "registry+https://github.com/rust-lang/crates.io-index"1502 source = "registry+https://github.com/rust-lang/crates.io-index"
1466-checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa"1503+checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc"
1467 dependencies = [1504 dependencies = [
1468 "futures-channel",1505 "futures-channel",
1469 "futures-core",1506 "futures-core",
@@ -1788,10 +1825,10 @@ name = "hezarfen_backend"
1788 version = "0.1.0"1825 version = "0.1.0"
1789 dependencies = [1826 dependencies = [
1790 "anyhow",1827 "anyhow",
1791- "argon2",1828+ "argon2 0.6.0",
1792 "axum",1829 "axum",
1793 "axum-extra",1830 "axum-extra",
1794- "base64 0.23.0",1831+ "base64 0.23.1",
1795 "chrono",1832 "chrono",
1796 "dotenvy",1833 "dotenvy",
1797 "futures-util",1834 "futures-util",
@@ -1824,7 +1861,7 @@ dependencies = [
1824 "tracing",1861 "tracing",
1825 "tracing-opentelemetry",1862 "tracing-opentelemetry",
1826 "tracing-subscriber",1863 "tracing-subscriber",
1827- "ulid",1864+ "ulid 3.0.0",
1828 "utoipa",1865 "utoipa",
1829 "utoipa-axum",1866 "utoipa-axum",
1830 "utoipa-swagger-ui",1867 "utoipa-swagger-ui",
@@ -1912,9 +1949,9 @@ checksum = "15cdd26707701c53297e2fa6afb323d55fbc1d0810c3aec078ae3ef0424c3c15"
1912 1949
1913 [[package]]1950 [[package]]
1914 name = "hybrid-array"1951 name = "hybrid-array"
1915-version = "0.4.13"1952+version = "0.4.15"
1916 source = "registry+https://github.com/rust-lang/crates.io-index"1953 source = "registry+https://github.com/rust-lang/crates.io-index"
1917-checksum = "818356c5132c1fede50f837ca96afbe78ff42413047f4abb886217845e1b6c8c"1954+checksum = "27f864f10dfb56725ce5ce5472bc52252c8f93a4ab86327122cebf62c5f59a17"
1918 dependencies = [1955 dependencies = [
1919 "typenum",1956 "typenum",
1920 ]1957 ]
@@ -2242,7 +2279,7 @@ dependencies = [
2242 "js-sys",2279 "js-sys",
2243 "p256",2280 "p256",
2244 "p384",2281 "p384",
2245- "pem",2282+ "pem 3.0.6",
2246 "rand 0.8.7",2283 "rand 0.8.7",
2247 "rsa",2284 "rsa",
2248 "serde",2285 "serde",
@@ -2312,9 +2349,9 @@ dependencies = [
2312 2349
2313 [[package]]2350 [[package]]
2314 name = "log"2351 name = "log"
2315-version = "0.4.33"2352+version = "0.4.34"
2316 source = "registry+https://github.com/rust-lang/crates.io-index"2353 source = "registry+https://github.com/rust-lang/crates.io-index"
2317-checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad"2354+checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6"
2318 2355
2319 [[package]]2356 [[package]]
2320 name = "lru-slab"2357 name = "lru-slab"
@@ -2575,9 +2612,9 @@ checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441"
2575 2612
2576 [[package]]2613 [[package]]
2577 name = "num-integer"2614 name = "num-integer"
2578-version = "0.1.46"2615+version = "0.1.47"
2579 source = "registry+https://github.com/rust-lang/crates.io-index"2616 source = "registry+https://github.com/rust-lang/crates.io-index"
2580-checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"2617+checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b"
2581 dependencies = [2618 dependencies = [
2582 "num-traits",2619 "num-traits",
2583 ]2620 ]
@@ -2841,6 +2878,16 @@ dependencies = [
2841 "subtle",2878 "subtle",
2842 ]2879 ]
2843 2880
2881+[[package]]
2882+name = "password-hash"
2883+version = "0.6.1"
2884+source = "registry+https://github.com/rust-lang/crates.io-index"
2885+checksum = "aab41826031698d6ffcd9cff78ef56ef998e39dc7e5067cdfebe373842d4723b"
2886+dependencies = [
2887+ "getrandom 0.4.3",
2888+ "phc",
2889+]
2890+
2844 [[package]]2891 [[package]]
2845 name = "paste"2892 name = "paste"
2846 version = "1.0.15"2893 version = "1.0.15"
@@ -2861,7 +2908,7 @@ checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2"
2861 dependencies = [2908 dependencies = [
2862 "digest 0.10.7",2909 "digest 0.10.7",
2863 "hmac",2910 "hmac",
2864- "password-hash",2911+ "password-hash 0.5.0",
2865 "sha2 0.10.9",2912 "sha2 0.10.9",
2866 ]2913 ]
2867 2914
@@ -2881,6 +2928,16 @@ dependencies = [
2881 "serde_core",2928 "serde_core",
2882 ]2929 ]
2883 2930
2931+[[package]]
2932+name = "pem"
2933+version = "4.0.0"
2934+source = "registry+https://github.com/rust-lang/crates.io-index"
2935+checksum = "d354a98a3d1251555de99e8fdd8afda05573c31b82f59063a7b0a29b5527f120"
2936+dependencies = [
2937+ "base64 0.23.1",
2938+ "serde_core",
2939+]
2940+
2884 [[package]]2941 [[package]]
2885 name = "pem-rfc7468"2942 name = "pem-rfc7468"
2886 version = "0.7.0"2943 version = "0.7.0"
@@ -2896,6 +2953,17 @@ version = "2.3.2"
2896 source = "registry+https://github.com/rust-lang/crates.io-index"2953 source = "registry+https://github.com/rust-lang/crates.io-index"
2897 checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"2954 checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
2898 2955
2956+[[package]]
2957+name = "phc"
2958+version = "0.6.1"
2959+source = "registry+https://github.com/rust-lang/crates.io-index"
2960+checksum = "44dc769b75f93afdddd8c7fa12d685292ddeff1e66f7f0f3a234cf1818afe892"
2961+dependencies = [
2962+ "base64ct",
2963+ "ctutils",
2964+ "getrandom 0.4.3",
2965+]
2966+
2899 [[package]]2967 [[package]]
2900 name = "phf"2968 name = "phf"
2901 version = "0.13.1"2969 version = "0.13.1"
@@ -3402,11 +3470,11 @@ dependencies = [
3402 3470
3403 [[package]]3471 [[package]]
3404 name = "rcgen"3472 name = "rcgen"
3405-version = "0.14.8"3473+version = "0.14.10"
3406 source = "registry+https://github.com/rust-lang/crates.io-index"3474 source = "registry+https://github.com/rust-lang/crates.io-index"
3407-checksum = "57f6d249aad744e274e682777a50283a225a32705394ee6d5fcc01efa25e4055"3475+checksum = "8774e05a7d0de114588e6a28fe7e71694b82614ed569d86d8b389dfbc98b8ad8"
3408 dependencies = [3476 dependencies = [
3409- "pem",3477+ "pem 4.0.0",
3410 "ring",3478 "ring",
3411 "rustls-pki-types",3479 "rustls-pki-types",
3412 "time",3480 "time",
@@ -3800,9 +3868,9 @@ dependencies = [
3800 3868
3801 [[package]]3869 [[package]]
3802 name = "rustls"3870 name = "rustls"
3803-version = "0.23.42"3871+version = "0.23.44"
3804 source = "registry+https://github.com/rust-lang/crates.io-index"3872 source = "registry+https://github.com/rust-lang/crates.io-index"
3805-checksum = "3c54fcab019b409d04215d3a17cb438fd7fbf192ee61461f20f4fe18704bc138"3873+checksum = "6725596c3f2c3a0aef021139e145d4eafe314a6623e4680ca83852b2c67ab2ba"
3806 dependencies = [3874 dependencies = [
3807 "log",3875 "log",
3808 "once_cell",3876 "once_cell",
@@ -3834,9 +3902,9 @@ dependencies = [
3834 3902
3835 [[package]]3903 [[package]]
3836 name = "rustls-webpki"3904 name = "rustls-webpki"
3837-version = "0.103.13"3905+version = "0.103.15"
3838 source = "registry+https://github.com/rust-lang/crates.io-index"3906 source = "registry+https://github.com/rust-lang/crates.io-index"
3839-checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e"3907+checksum = "f3c3cf1d8b1e7d4927e2d154c3fcb02979afb9939629c62cd9048d4f07b60ac2"
3840 dependencies = [3908 dependencies = [
3841 "ring",3909 "ring",
3842 "rustls-pki-types",3910 "rustls-pki-types",
@@ -3897,7 +3965,7 @@ version = "0.11.0"
3897 source = "registry+https://github.com/rust-lang/crates.io-index"3965 source = "registry+https://github.com/rust-lang/crates.io-index"
3898 checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f"3966 checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f"
3899 dependencies = [3967 dependencies = [
3900- "password-hash",3968+ "password-hash 0.5.0",
3901 "pbkdf2",3969 "pbkdf2",
3902 "salsa20",3970 "salsa20",
3903 "sha2 0.10.9",3971 "sha2 0.10.9",
@@ -3970,7 +4038,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
3970 dependencies = [4038 dependencies = [
3971 "proc-macro2",4039 "proc-macro2",
3972 "quote",4040 "quote",
3973- "syn 3.0.3",4041+ "syn 3.0.5",
3974 ]4042 ]
3975 4043
3976 [[package]]4044 [[package]]
@@ -4027,7 +4095,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
4027 checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214"4095 checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214"
4028 dependencies = [4096 dependencies = [
4029 "cfg-if",4097 "cfg-if",
4030- "cpufeatures 0.3.0",4098+ "cpufeatures 0.3.1",
4031 "digest 0.11.3",4099 "digest 0.11.3",
4032 ]4100 ]
4033 4101
@@ -4049,7 +4117,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
4049 checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4"4117 checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4"
4050 dependencies = [4118 dependencies = [
4051 "cfg-if",4119 "cfg-if",
4052- "cpufeatures 0.3.0",4120+ "cpufeatures 0.3.1",
4053 "digest 0.11.3",4121 "digest 0.11.3",
4054 ]4122 ]
4055 4123
@@ -4301,7 +4369,7 @@ dependencies = [
4301 "ahash 0.8.12",4369 "ahash 0.8.12",
4302 "ammonia",4370 "ammonia",
4303 "anyhow",4371 "anyhow",
4304- "argon2",4372+ "argon2 0.5.3",
4305 "async-channel",4373 "async-channel",
4306 "async-stream",4374 "async-stream",
4307 "base64 0.22.1",4375 "base64 0.22.1",
@@ -4376,7 +4444,7 @@ dependencies = [
4376 "tokio",4444 "tokio",
4377 "tokio-util",4445 "tokio-util",
4378 "tracing",4446 "tracing",
4379- "ulid",4447+ "ulid 1.2.1",
4380 "unicase",4448 "unicase",
4381 "url",4449 "url",
4382 "uuid",4450 "uuid",
@@ -4446,7 +4514,7 @@ dependencies = [
4446 "surrealdb-protocol",4514 "surrealdb-protocol",
4447 "surrealdb-types-derive",4515 "surrealdb-types-derive",
4448 "tracing",4516 "tracing",
4449- "ulid",4517+ "ulid 1.2.1",
4450 "url",4518 "url",
4451 "uuid",4519 "uuid",
4452 ]4520 ]
@@ -4509,9 +4577,9 @@ dependencies = [
4509 4577
4510 [[package]]4578 [[package]]
4511 name = "syn"4579 name = "syn"
4512-version = "3.0.3"4580+version = "3.0.5"
4513 source = "registry+https://github.com/rust-lang/crates.io-index"4581 source = "registry+https://github.com/rust-lang/crates.io-index"
4514-checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3"4582+checksum = "12df2e0110f65b775f769bb17ef989067a1d931b2eb822bd4346631eeada89f9"
4515 dependencies = [4583 dependencies = [
4516 "proc-macro2",4584 "proc-macro2",
4517 "quote",4585 "quote",
@@ -4582,22 +4650,22 @@ dependencies = [
4582 4650
4583 [[package]]4651 [[package]]
4584 name = "thiserror"4652 name = "thiserror"
4585-version = "2.0.19"4653+version = "2.0.20"
4586 source = "registry+https://github.com/rust-lang/crates.io-index"4654 source = "registry+https://github.com/rust-lang/crates.io-index"
4587-checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9"4655+checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f"
4588 dependencies = [4656 dependencies = [
4589 "thiserror-impl",4657 "thiserror-impl",
4590 ]4658 ]
4591 4659
4592 [[package]]4660 [[package]]
4593 name = "thiserror-impl"4661 name = "thiserror-impl"
4594-version = "2.0.19"4662+version = "2.0.20"
4595 source = "registry+https://github.com/rust-lang/crates.io-index"4663 source = "registry+https://github.com/rust-lang/crates.io-index"
4596-checksum = "43cbfe0cf76104d42a574802844187e84a305e531ed54455f11fbde0f10541cd"4664+checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af"
4597 dependencies = [4665 dependencies = [
4598 "proc-macro2",4666 "proc-macro2",
4599 "quote",4667 "quote",
4600- "syn 3.0.3",4668+ "syn 3.0.5",
4601 ]4669 ]
4602 4670
4603 [[package]]4671 [[package]]
@@ -4611,9 +4679,9 @@ dependencies = [
4611 4679
4612 [[package]]4680 [[package]]
4613 name = "time"4681 name = "time"
4614-version = "0.3.54"4682+version = "0.3.55"
4615 source = "registry+https://github.com/rust-lang/crates.io-index"4683 source = "registry+https://github.com/rust-lang/crates.io-index"
4616-checksum = "3e1d5e639ff6bab73cb6885cc7e7b1de96c3f32c68ec55f3952614bec1092244"4684+checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134"
4617 dependencies = [4685 dependencies = [
4618 "deranged",4686 "deranged",
4619 "num-conv",4687 "num-conv",
@@ -5099,6 +5167,16 @@ dependencies = [
5099 "web-time",5167 "web-time",
5100 ]5168 ]
5101 5169
5170+[[package]]
5171+name = "ulid"
5172+version = "3.0.0"
5173+source = "registry+https://github.com/rust-lang/crates.io-index"
5174+checksum = "947dde63b6d514cc5e044edad4e0ca7261afd1099d16c83d942cb2b2f348689c"
5175+dependencies = [
5176+ "rand 0.10.2",
5177+ "web-time",
5178+]
5179+
5102 [[package]]5180 [[package]]
5103 name = "unarray"5181 name = "unarray"
5104 version = "0.1.4"5182 version = "0.1.4"
@@ -5222,9 +5300,9 @@ dependencies = [
5222 5300
5223 [[package]]5301 [[package]]
5224 name = "uuid"5302 name = "uuid"
5225-version = "1.26.0"5303+version = "1.26.1"
5226 source = "registry+https://github.com/rust-lang/crates.io-index"5304 source = "registry+https://github.com/rust-lang/crates.io-index"
5227-checksum = "b5772d71c9be8a8a6ac2117d949c5b224c1b72241bb611d9a3012edcf8af7812"5305+checksum = "2ef6dac1e96601b4fb3acccccff2139741fcb757cb9a36089bf5be91cfb285ce"
5228 dependencies = [5306 dependencies = [
5229 "getrandom 0.4.3",5307 "getrandom 0.4.3",
5230 "js-sys",5308 "js-sys",
@@ -5744,18 +5822,18 @@ dependencies = [
5744 5822
5745 [[package]]5823 [[package]]
5746 name = "zerocopy"5824 name = "zerocopy"
5747-version = "0.8.55"5825+version = "0.8.57"
5748 source = "registry+https://github.com/rust-lang/crates.io-index"5826 source = "registry+https://github.com/rust-lang/crates.io-index"
5749-checksum = "b5a105cd7b140f6eeec8acff2ea38135d3cab283ada58540f629fe51e46696eb"5827+checksum = "d35102a9f36d089ccae9e4c6802bc118be4487b80aaffc0ab4e0cf5ce92d2873"
5750 dependencies = [5828 dependencies = [
5751 "zerocopy-derive",5829 "zerocopy-derive",
5752 ]5830 ]
5753 5831
5754 [[package]]5832 [[package]]
5755 name = "zerocopy-derive"5833 name = "zerocopy-derive"
5756-version = "0.8.55"5834+version = "0.8.57"
5757 source = "registry+https://github.com/rust-lang/crates.io-index"5835 source = "registry+https://github.com/rust-lang/crates.io-index"
5758-checksum = "0fe976fb70c78cd64cccfe3a6fc142244e8a77b70959b30faf9d0ac37ee228eb"5836+checksum = "146c01f5ab44258da43cf276c74a2763db2ff3969c9c652c3f2de07041d0b2bc"
5759 dependencies = [5837 dependencies = [
5760 "proc-macro2",5838 "proc-macro2",
5761 "quote",5839 "quote",
Cargo.tomlmodified+6 -6
@@ -23,10 +23,10 @@ surrealdb = { version = "3.2", default-features = false, features = ["protocol-w
23 serde = { version = "1", features = ["derive"] }23 serde = { version = "1", features = ["derive"] }
24 serde_json = "1"24 serde_json = "1"
25 chrono = "0.4"25 chrono = "0.4"
26-argon2 = "0.5"26+argon2 = "0.6"
27 getrandom = "0.4"27 getrandom = "0.4"
28 hex = "0.4"28 hex = "0.4"
29-ulid = "1"29+ulid = "3"
30 thiserror = "2"30 thiserror = "2"
31 anyhow = "1"31 anyhow = "1"
32 tracing = "0.1"32 tracing = "0.1"
@@ -37,9 +37,9 @@ utoipa = { version = "5.5.0", features = ["axum_extras"] }
37 utoipa-axum = "0.2.0"37 utoipa-axum = "0.2.0"
38 utoipa-swagger-ui = { version = "9.0.2", features = ["axum"] }38 utoipa-swagger-ui = { version = "9.0.2", features = ["axum"] }
39 quinn = { version = "0.11.11", default-features = false, features = ["runtime-tokio", "rustls-ring", "log"] }39 quinn = { version = "0.11.11", default-features = false, features = ["runtime-tokio", "rustls-ring", "log"] }
40-rcgen = { version = "0.14.8", default-features = false, features = ["pem", "ring"] }40+rcgen = { version = "0.14.10", default-features = false, features = ["pem", "ring"] }
41 rustls-pemfile = "2.2.0"41 rustls-pemfile = "2.2.0"
42-rustls = { version = "0.23.42", default-features = false, features = ["logging", "ring", "std", "tls12"] }42+rustls = { version = "0.23.44", default-features = false, features = ["logging", "ring", "std", "tls12"] }
43 sha2 = "0.11.0"43 sha2 = "0.11.0"
44 base64 = "0.23"44 base64 = "0.23"
45 # `ServiceExt::oneshot`, which is how the AI bridge dispatches a service's api45 # `ServiceExt::oneshot`, which is how the AI bridge dispatches a service's api
@@ -49,7 +49,7 @@ tower = { version = "0.5", features = ["util"] }
49 opentelemetry = "0.32.0"49 opentelemetry = "0.32.0"
50 tracing-opentelemetry = "0.33.0"50 tracing-opentelemetry = "0.33.0"
51 opentelemetry-semantic-conventions = "0.32.1"51 opentelemetry-semantic-conventions = "0.32.1"
52-uuid = { version = "1.26.0", features = ["v4"] }52+uuid = { version = "1.26.1", features = ["v4"] }
53 opentelemetry_sdk = { version = "0.32.1", features = ["rt-tokio"] }53 opentelemetry_sdk = { version = "0.32.1", features = ["rt-tokio"] }
54 opentelemetry-otlp = { version = "0.32.0", default-features = false, features = ["trace", "metrics", "logs", "grpc-tonic", "http-proto", "reqwest-blocking-client", "internal-logs"] }54 opentelemetry-otlp = { version = "0.32.0", default-features = false, features = ["trace", "metrics", "logs", "grpc-tonic", "http-proto", "reqwest-blocking-client", "internal-logs"] }
55 opentelemetry-appender-tracing = "0.32.0"55 opentelemetry-appender-tracing = "0.32.0"
@@ -60,7 +60,7 @@ tokio = { version = "1", features = ["full", "test-util"] }
60 reqwest = { version = "0.13", default-features = false, features = ["json", "cookies"] }60 reqwest = { version = "0.13", default-features = false, features = ["json", "cookies"] }
61 tempfile = "3"61 tempfile = "3"
62 tokio-tungstenite = "0.30.0"62 tokio-tungstenite = "0.30.0"
63-futures-util = "0.3.32"63+futures-util = "0.3.34"
64 proptest = "1.11.0"64 proptest = "1.11.0"
65 # Compiles the pattern `GET /limits` publishes and runs it over the same inputs65 # Compiles the pattern `GET /limits` publishes and runs it over the same inputs
66 # the validator sees, so the published promise cannot drift from the accept set.66 # the validator sees, so the published promise cannot drift from the accept set.
src/ai/server.rsmodified+2 -2
@@ -260,7 +260,7 @@ impl AiBridge {
260 // function returns by any path, so an abandoned request frees the260 // function returns by any path, so an abandoned request frees the
261 // worker's slot rather than leaking it.261 // worker's slot rather than leaking it.
262 let lease = self.inner.registry.pick(capability)?;262 let lease = self.inner.registry.pick(capability)?;
263- let id = Ulid::new().to_string();263+ let id = Ulid::generate().to_string();
264 let deadline_ms = timeout.as_millis().min(u64::MAX as u128) as u64;264 let deadline_ms = timeout.as_millis().min(u64::MAX as u128) as u64;
265 let request = Request {265 let request = Request {
266 id: id.clone(),266 id: id.clone(),
@@ -995,7 +995,7 @@ async fn register(
995 return Err(());995 return Err(());
996 }996 }
997 997
998- let worker_id = Ulid::new().to_string();998+ let worker_id = Ulid::generate().to_string();
999 let max_concurrent = clamp_concurrency(hello.max_concurrent);999 let max_concurrent = clamp_concurrency(hello.max_concurrent);
1000 let greeting = Greeting::Welcome {1000 let greeting = Greeting::Welcome {
1001 worker_id: worker_id.clone(),1001 worker_id: worker_id.clone(),
src/db/badge.rsmodified+1 -1
@@ -184,7 +184,7 @@ mod tests {
184 184
185 /// A user row carrying `counters`, by column name.185 /// A user row carrying `counters`, by column name.
186 async fn a_user(counters: &[(&str, i64)], db: &Database) -> UserId {186 async fn a_user(counters: &[(&str, i64)], db: &Database) -> UserId {
187- let user = UserId::from_key(&ulid::Ulid::new().to_string());187+ let user = UserId::from_key(&ulid::Ulid::generate().to_string());
188 let sets: Vec<String> = counters188 let sets: Vec<String> = counters
189 .iter()189 .iter()
190 .map(|(field, value)| format!("{field} = {value}"))190 .map(|(field, value)| format!("{field} = {value}"))
src/db/builder.rsmodified+1 -1
@@ -41,7 +41,7 @@ pub async fn create_session(
41 db: &Database,41 db: &Database,
42 builder: &BuilderId,42 builder: &BuilderId,
43 ) -> Result<BuilderSession, AppError> {43 ) -> Result<BuilderSession, AppError> {
44- let key = RecordId::new(BUILDER_SESSION_TABLE, Ulid::new().to_string());44+ let key = RecordId::new(BUILDER_SESSION_TABLE, Ulid::generate().to_string());
45 let session = BuilderSession {45 let session = BuilderSession {
46 id: key.clone(),46 id: key.clone(),
47 builder: builder.clone(),47 builder: builder.clone(),
src/db/page.rsmodified+1 -1
@@ -206,7 +206,7 @@ mod tests {
206 #[tokio::test]206 #[tokio::test]
207 async fn the_window_walks_the_rows_and_total_stays_the_whole_list() {207 async fn the_window_walks_the_rows_and_total_stays_the_whole_list() {
208 let db = database::init_mem().await.unwrap();208 let db = database::init_mem().await.unwrap();
209- let user = UserId::from_key(&Ulid::new().to_string());209+ let user = UserId::from_key(&Ulid::generate().to_string());
210 for i in 0..5 {210 for i in 0..5 {
211 note::create(211 note::create(
212 &db,212 &db,
src/db/pomodoro.rsmodified+3 -3
@@ -282,7 +282,7 @@ mod tests {
282 /// touches a record that exists, so a fabricated id would silently store282 /// touches a record that exists, so a fabricated id would silently store
283 /// nothing. The tests above need no row — they read only the stint log.283 /// nothing. The tests above need no row — they read only the stint log.
284 async fn a_user(db: &Database) -> UserId {284 async fn a_user(db: &Database) -> UserId {
285- let user = UserId::from_key(&Ulid::new().to_string());285+ let user = UserId::from_key(&Ulid::generate().to_string());
286 db.query("CREATE $usr SET username = $name, password_hash = 'x'")286 db.query("CREATE $usr SET username = $name, password_hash = 'x'")
287 .bind(("usr", user.record()))287 .bind(("usr", user.record()))
288 .bind(("name", user.key().to_string()))288 .bind(("name", user.key().to_string()))
@@ -699,7 +699,7 @@ mod tests {
699 let db = database::init_mem().await.unwrap();699 let db = database::init_mem().await.unwrap();
700 // A `record<user>` column checks the table of the id, not row700 // A `record<user>` column checks the table of the id, not row
701 // existence — a fabricated id keeps this test free of user ceremony.701 // existence — a fabricated id keeps this test free of user ceremony.
702- let user = UserId::from_key(&Ulid::new().to_string());702+ let user = UserId::from_key(&Ulid::generate().to_string());
703 703
704 // Nothing running yet — finishing conflicts.704 // Nothing running yet — finishing conflicts.
705 assert!(matches!(705 assert!(matches!(
@@ -733,7 +733,7 @@ mod tests {
733 #[tokio::test]733 #[tokio::test]
734 async fn a_backwards_clock_records_a_zero_stint_not_a_negative_one() {734 async fn a_backwards_clock_records_a_zero_stint_not_a_negative_one() {
735 let db = database::init_mem().await.unwrap();735 let db = database::init_mem().await.unwrap();
736- let user = UserId::from_key(&Ulid::new().to_string());736+ let user = UserId::from_key(&Ulid::generate().to_string());
737 737
738 start(&db, &user, None).await.unwrap();738 start(&db, &user, None).await.unwrap();
739 // Stand in for the NTP step: push the running stint's start an hour739 // Stand in for the NTP step: push the running stint's start an hour
src/db/pool_question.rsmodified+12 -12
@@ -288,7 +288,7 @@ mod tests {
288 /// The two counter columns plus a row to carry them: the `user` table is288 /// The two counter columns plus a row to carry them: the `user` table is
289 /// SCHEMAFULL in production, and the counters are `option<int>` there.289 /// SCHEMAFULL in production, and the counters are `option<int>` there.
290 async fn a_user(db: &Database) -> UserId {290 async fn a_user(db: &Database) -> UserId {
291- let user = UserId::from_key(&Ulid::new().to_string());291+ let user = UserId::from_key(&Ulid::generate().to_string());
292 db.query(format!(292 db.query(format!(
293 "DEFINE FIELD IF NOT EXISTS {POOL_APPROVED_TOTAL_FIELD} ON user TYPE option<int>;293 "DEFINE FIELD IF NOT EXISTS {POOL_APPROVED_TOTAL_FIELD} ON user TYPE option<int>;
294 DEFINE FIELD IF NOT EXISTS {POOL_PUBLISHED_TOTAL_FIELD} ON user TYPE option<int>;294 DEFINE FIELD IF NOT EXISTS {POOL_PUBLISHED_TOTAL_FIELD} ON user TYPE option<int>;
@@ -336,8 +336,8 @@ mod tests {
336 #[tokio::test]336 #[tokio::test]
337 async fn approval_is_a_one_way_race_safe_transition() {337 async fn approval_is_a_one_way_race_safe_transition() {
338 let db = database::init_mem().await.unwrap();338 let db = database::init_mem().await.unwrap();
339- let asker = UserId::from_key(&Ulid::new().to_string());339+ let asker = UserId::from_key(&Ulid::generate().to_string());
340- let teacher = UserId::from_key(&Ulid::new().to_string());340+ let teacher = UserId::from_key(&Ulid::generate().to_string());
341 341
342 let q = insert(&db, question(&asker)).await.unwrap();342 let q = insert(&db, question(&asker)).await.unwrap();
343 assert_eq!(q.get_status(), STATUS_PENDING);343 assert_eq!(q.get_status(), STATUS_PENDING);
@@ -420,9 +420,9 @@ mod tests {
420 #[tokio::test]420 #[tokio::test]
421 async fn visibility_hides_others_pending_questions() {421 async fn visibility_hides_others_pending_questions() {
422 let db = database::init_mem().await.unwrap();422 let db = database::init_mem().await.unwrap();
423- let asker = UserId::from_key(&Ulid::new().to_string());423+ let asker = UserId::from_key(&Ulid::generate().to_string());
424- let other = UserId::from_key(&Ulid::new().to_string());424+ let other = UserId::from_key(&Ulid::generate().to_string());
425- let teacher = UserId::from_key(&Ulid::new().to_string());425+ let teacher = UserId::from_key(&Ulid::generate().to_string());
426 426
427 let pending = insert(&db, question(&asker)).await.unwrap();427 let pending = insert(&db, question(&asker)).await.unwrap();
428 let published = insert(&db, question(&other)).await.unwrap();428 let published = insert(&db, question(&other)).await.unwrap();
@@ -444,8 +444,8 @@ mod tests {
444 #[tokio::test]444 #[tokio::test]
445 async fn image_attaches_only_while_pending_and_reports_the_replaced_blob() {445 async fn image_attaches_only_while_pending_and_reports_the_replaced_blob() {
446 let db = database::init_mem().await.unwrap();446 let db = database::init_mem().await.unwrap();
447- let asker = UserId::from_key(&Ulid::new().to_string());447+ let asker = UserId::from_key(&Ulid::generate().to_string());
448- let teacher = UserId::from_key(&Ulid::new().to_string());448+ let teacher = UserId::from_key(&Ulid::generate().to_string());
449 let png = FileContentType::try_new("image/png").unwrap();449 let png = FileContentType::try_new("image/png").unwrap();
450 450
451 let q = insert(&db, question(&asker)).await.unwrap();451 let q = insert(&db, question(&asker)).await.unwrap();
@@ -491,8 +491,8 @@ mod tests {
491 #[tokio::test]491 #[tokio::test]
492 async fn delete_cascades_solutions_and_returns_the_row() {492 async fn delete_cascades_solutions_and_returns_the_row() {
493 let db = database::init_mem().await.unwrap();493 let db = database::init_mem().await.unwrap();
494- let asker = UserId::from_key(&Ulid::new().to_string());494+ let asker = UserId::from_key(&Ulid::generate().to_string());
495- let helper = UserId::from_key(&Ulid::new().to_string());495+ let helper = UserId::from_key(&Ulid::generate().to_string());
496 496
497 let q = insert(&db, question(&asker)).await.unwrap();497 let q = insert(&db, question(&asker)).await.unwrap();
498 let offered = crate::db::solution::insert(498 let offered = crate::db::solution::insert(
@@ -564,8 +564,8 @@ mod tests {
564 564
565 let (mut solutions, mut swept, mut delete_500) = (0, 0, 0);565 let (mut solutions, mut swept, mut delete_500) = (0, 0, 0);
566 for round in 0..4 {566 for round in 0..4 {
567- let asker = UserId::from_key(&Ulid::new().to_string());567+ let asker = UserId::from_key(&Ulid::generate().to_string());
568- let helper = UserId::from_key(&Ulid::new().to_string());568+ let helper = UserId::from_key(&Ulid::generate().to_string());
569 let q = insert(&db, question(&asker)).await.unwrap();569 let q = insert(&db, question(&asker)).await.unwrap();
570 let id = q.get_id().clone();570 let id = q.get_id().clone();
571 571
src/db/profile.rsmodified+5 -5
@@ -102,7 +102,7 @@ mod tests {
102 #[tokio::test]102 #[tokio::test]
103 async fn stats_are_zero_without_pomodoro_rows() {103 async fn stats_are_zero_without_pomodoro_rows() {
104 let db = crate::database::init_mem().await.unwrap();104 let db = crate::database::init_mem().await.unwrap();
105- let user = UserId::from_key(&ulid::Ulid::new().to_string());105+ let user = UserId::from_key(&ulid::Ulid::generate().to_string());
106 106
107 let stats = load(&db, &user, 3, 1).await.unwrap();107 let stats = load(&db, &user, 3, 1).await.unwrap();
108 // Derived counters: no rows is a true zero, never a null.108 // Derived counters: no rows is a true zero, never a null.
@@ -121,7 +121,7 @@ mod tests {
121 #[tokio::test]121 #[tokio::test]
122 async fn lifetime_totals_ride_the_same_query() {122 async fn lifetime_totals_ride_the_same_query() {
123 let db = crate::database::init_mem().await.unwrap();123 let db = crate::database::init_mem().await.unwrap();
124- let user = UserId::from_key(&ulid::Ulid::new().to_string());124+ let user = UserId::from_key(&ulid::Ulid::generate().to_string());
125 db.query(format!(125 db.query(format!(
126 "CREATE $usr SET username = $name, password_hash = 'x',126 "CREATE $usr SET username = $name, password_hash = 'x',
127 {} = 4, {} = 3",127 {} = 4, {} = 3",
@@ -148,8 +148,8 @@ mod tests {
148 #[tokio::test]148 #[tokio::test]
149 async fn stats_count_finished_stints_only() {149 async fn stats_count_finished_stints_only() {
150 let db = crate::database::init_mem().await.unwrap();150 let db = crate::database::init_mem().await.unwrap();
151- let user = UserId::from_key(&ulid::Ulid::new().to_string());151+ let user = UserId::from_key(&ulid::Ulid::generate().to_string());
152- let other = UserId::from_key(&ulid::Ulid::new().to_string());152+ let other = UserId::from_key(&ulid::Ulid::generate().to_string());
153 153
154 // Two finished stints (1000 ms + 2500 ms), one still running, and one154 // Two finished stints (1000 ms + 2500 ms), one still running, and one
155 // finished stint belonging to somebody else.155 // finished stint belonging to somebody else.
@@ -174,7 +174,7 @@ mod tests {
174 #[tokio::test]174 #[tokio::test]
175 async fn focus_time_never_reads_negative() {175 async fn focus_time_never_reads_negative() {
176 let db = crate::database::init_mem().await.unwrap();176 let db = crate::database::init_mem().await.unwrap();
177- let user = UserId::from_key(&ulid::Ulid::new().to_string());177+ let user = UserId::from_key(&ulid::Ulid::generate().to_string());
178 178
179 // One honest 1000 ms stint and one inverted row — what a backwards179 // One honest 1000 ms stint and one inverted row — what a backwards
180 // clock step left behind before `finish` grew its floor. The raw sum is180 // clock step left behind before `finish` grew its floor. The raw sum is
src/db/solution.rsmodified+6 -6
@@ -183,7 +183,7 @@ mod tests {
183 crate::db::pool_question::insert(183 crate::db::pool_question::insert(
184 db,184 db,
185 PoolQuestion::new(185 PoolQuestion::new(
186- &UserId::from_key(&Ulid::new().to_string()),186+ &UserId::from_key(&Ulid::generate().to_string()),
187 PoolQuestionTitle::try_new("soru").unwrap(),187 PoolQuestionTitle::try_new("soru").unwrap(),
188 PoolQuestionBody::try_new("neden").unwrap(),188 PoolQuestionBody::try_new("neden").unwrap(),
189 ),189 ),
@@ -199,7 +199,7 @@ mod tests {
199 let db = database::init_mem().await.unwrap();199 let db = database::init_mem().await.unwrap();
200 let question_a = question_row(&db).await;200 let question_a = question_row(&db).await;
201 let question_b = question_row(&db).await;201 let question_b = question_row(&db).await;
202- let author = UserId::from_key(&Ulid::new().to_string());202+ let author = UserId::from_key(&Ulid::generate().to_string());
203 203
204 // Distinct offer times so the assertion pins the real contract —204 // Distinct offer times so the assertion pins the real contract —
205 // older `offered_at` sorts first — not the same-millisecond `id`205 // older `offered_at` sorts first — not the same-millisecond `id`
@@ -257,7 +257,7 @@ mod tests {
257 async fn image_set_replace_clear_report_the_replaced_blob() {257 async fn image_set_replace_clear_report_the_replaced_blob() {
258 let db = database::init_mem().await.unwrap();258 let db = database::init_mem().await.unwrap();
259 let question = question_row(&db).await;259 let question = question_row(&db).await;
260- let author = UserId::from_key(&Ulid::new().to_string());260+ let author = UserId::from_key(&Ulid::generate().to_string());
261 let png = FileContentType::try_new("image/png").unwrap();261 let png = FileContentType::try_new("image/png").unwrap();
262 262
263 let solution = insert(263 let solution = insert(
@@ -318,7 +318,7 @@ mod tests {
318 async fn set_body_edits_in_place() {318 async fn set_body_edits_in_place() {
319 let db = database::init_mem().await.unwrap();319 let db = database::init_mem().await.unwrap();
320 let question = question_row(&db).await;320 let question = question_row(&db).await;
321- let author = UserId::from_key(&Ulid::new().to_string());321+ let author = UserId::from_key(&Ulid::generate().to_string());
322 322
323 let solution = insert(323 let solution = insert(
324 &db,324 &db,
@@ -346,7 +346,7 @@ mod tests {
346 assert!(346 assert!(
347 set_body(347 set_body(
348 &db,348 &db,
349- &SolutionId::from_key(&Ulid::new().to_string()),349+ &SolutionId::from_key(&Ulid::generate().to_string()),
350 &SolutionBody::try_new("boş").unwrap(),350 &SolutionBody::try_new("boş").unwrap(),
351 )351 )
352 .await352 .await
@@ -361,7 +361,7 @@ mod tests {
361 let two = question_row(&db).await;361 let two = question_row(&db).await;
362 let one = question_row(&db).await;362 let one = question_row(&db).await;
363 let none = question_row(&db).await;363 let none = question_row(&db).await;
364- let author = UserId::from_key(&Ulid::new().to_string());364+ let author = UserId::from_key(&Ulid::generate().to_string());
365 365
366 for (question, bodies) in [(&two, vec!["a", "b"]), (&one, vec!["c"])] {366 for (question, bodies) in [(&two, vec!["a", "b"]), (&one, vec!["c"])] {
367 for body in bodies {367 for body in bodies {
src/db/work_entry.rsmodified+1 -1
@@ -154,7 +154,7 @@ mod tests {
154 let db = database::init_mem().await.unwrap();154 let db = database::init_mem().await.unwrap();
155 // A `record<user>` column checks the table of the id, not row155 // A `record<user>` column checks the table of the id, not row
156 // existence — a fabricated id keeps this test free of user ceremony.156 // existence — a fabricated id keeps this test free of user ceremony.
157- let user = UserId::from_key(&Ulid::new().to_string());157+ let user = UserId::from_key(&Ulid::generate().to_string());
158 158
159 let open = check_in(&db, &user).await.unwrap();159 let open = check_in(&db, &user).await.unwrap();
160 assert!(open.is_open());160 assert!(open.is_open());
src/domain/answer_image.rsmodified+1 -1
@@ -85,7 +85,7 @@ impl AnswerImage {
85 question: question.clone(),85 question: question.clone(),
86 user: user.clone(),86 user: user.clone(),
87 seq,87 seq,
88- file: Ulid::new().to_string(),88+ file: Ulid::generate().to_string(),
89 content_type,89 content_type,
90 size,90 size,
91 }91 }
src/domain/appointment.rsmodified+1 -1
@@ -50,7 +50,7 @@ use crate::domain::user::UserId;
50 use crate::error::ValidationError;50 use crate::error::ValidationError;
51 use crate::validate::validate_required;51 use crate::validate::validate_required;
52 52
53-/// Mints booking ids in write order — `Ulid::new()`'s random low bits sort53+/// Mints booking ids in write order — `Ulid::generate()`'s random low bits sort
54 /// arbitrarily within one millisecond, which would scramble the `id` tie-break54 /// arbitrarily within one millisecond, which would scramble the `id` tie-break
55 /// of the newest-first listings ([`crate::db::appointment::list_for_requester`]).55 /// of the newest-first listings ([`crate::db::appointment::list_for_requester`]).
56 static IDS: LazyLock<std::sync::Mutex<Generator>> =56 static IDS: LazyLock<std::sync::Mutex<Generator>> =
src/domain/bank_question_image.rsmodified+1 -1
@@ -73,7 +73,7 @@ impl BankQuestionImage {
73 id: BankQuestionImageId::for_slot(question, slot),73 id: BankQuestionImageId::for_slot(question, slot),
74 bank_question: question.clone(),74 bank_question: question.clone(),
75 slot: slot.cloned(),75 slot: slot.cloned(),
76- file: Ulid::new().to_string(),76+ file: Ulid::generate().to_string(),
77 content_type,77 content_type,
78 size,78 size,
79 }79 }
src/domain/board.rsmodified+1 -1
@@ -25,7 +25,7 @@ use crate::validate::validate_required;
25 pub struct BoardId(RecordId);25 pub struct BoardId(RecordId);
26 26
27 impl BoardId {27 impl BoardId {
28- /// Monotonic, not `Ulid::new()`: boards list newest-first by id, and a28+ /// Monotonic, not `Ulid::generate()`: boards list newest-first by id, and a
29 /// random low half scrambles rows minted in the same millisecond.29 /// random low half scrambles rows minted in the same millisecond.
30 pub fn generate() -> Self {30 pub fn generate() -> Self {
31 Self(RecordId::new(BOARD_TABLE, next_ulid().to_string()))31 Self(RecordId::new(BOARD_TABLE, next_ulid().to_string()))
src/domain/board_stroke.rsmodified+1 -1
@@ -62,7 +62,7 @@ pub const REFUSALS: [&str; 5] = [
62 pub struct BoardStrokeId(RecordId);62 pub struct BoardStrokeId(RecordId);
63 63
64 impl BoardStrokeId {64 impl BoardStrokeId {
65- /// Monotonic, not `Ulid::new()`: this id *is* the board's total order, and65+ /// Monotonic, not `Ulid::generate()`: this id *is* the board's total order, and
66 /// a random low half scrambles every stroke drawn in the same millisecond —66 /// a random low half scrambles every stroke drawn in the same millisecond —
67 /// which is what a burst of drawing looks like.67 /// which is what a burst of drawing looks like.
68 pub fn generate() -> Self {68 pub fn generate() -> Self {
src/domain/builder.rsmodified+1 -1
@@ -24,7 +24,7 @@ pub struct BuilderId(RecordId);
24 24
25 impl BuilderId {25 impl BuilderId {
26 pub fn generate() -> Self {26 pub fn generate() -> Self {
27- Self(RecordId::new(BUILDER_TABLE, Ulid::new().to_string()))27+ Self(RecordId::new(BUILDER_TABLE, Ulid::generate().to_string()))
28 }28 }
29 29
30 pub fn from_key(key: &str) -> Self {30 pub fn from_key(key: &str) -> Self {
src/domain/chatbot_message.rsmodified+1 -1
@@ -23,7 +23,7 @@ use crate::domain::user::UserId;
23 use crate::error::ValidationError;23 use crate::error::ValidationError;
24 use crate::validate::validate_required;24 use crate::validate::validate_required;
25 25
26-/// Mints message ids in write order. Unlike `Ulid::new()`, whose 80 random26+/// Mints message ids in write order. Unlike `Ulid::generate()`, whose 80 random
27 /// low bits sort arbitrarily among ids minted in the same millisecond, this27 /// low bits sort arbitrarily among ids minted in the same millisecond, this
28 /// increments the previous id — so the `id` tie-break in the `ORDER BY` of28 /// increments the previous id — so the `id` tie-break in the `ORDER BY` of
29 /// [`list_for_thread`](crate::db::chatbot_message::list_for_thread) /29 /// [`list_for_thread`](crate::db::chatbot_message::list_for_thread) /
src/domain/chatbot_thread.rsmodified+1 -1
@@ -17,7 +17,7 @@ use crate::validate::validate_required;
17 pub struct ChatbotThreadId(RecordId);17 pub struct ChatbotThreadId(RecordId);
18 18
19 impl ChatbotThreadId {19 impl ChatbotThreadId {
20- /// Minted from the process-wide monotonic generator, not `Ulid::new()`:20+ /// Minted from the process-wide monotonic generator, not `Ulid::generate()`:
21 /// threads sort `updated_at DESC, id DESC` and the id breaks the tie21 /// threads sort `updated_at DESC, id DESC` and the id breaks the tie
22 /// between two threads last touched in the same millisecond,22 /// between two threads last touched in the same millisecond,
23 /// and a random low half sorts arbitrarily inside one millisecond.23 /// and a random low half sorts arbitrarily inside one millisecond.
src/domain/course.rsmodified+1 -1
@@ -11,7 +11,7 @@ use crate::validate::{validate_course_kind, validate_optional, validate_required
11 pub struct CourseId(RecordId);11 pub struct CourseId(RecordId);
12 12
13 impl CourseId {13 impl CourseId {
14- /// Minted from the process-wide monotonic generator, not `Ulid::new()`:14+ /// Minted from the process-wide monotonic generator, not `Ulid::generate()`:
15 /// courses list `id DESC` (newest first, [`crate::db::course::list_all`]),15 /// courses list `id DESC` (newest first, [`crate::db::course::list_all`]),
16 /// and a random low half scrambles rows minted in the same millisecond.16 /// and a random low half scrambles rows minted in the same millisecond.
17 pub fn generate() -> Self {17 pub fn generate() -> Self {
src/domain/course_note.rsmodified+1 -1
@@ -11,7 +11,7 @@ use crate::validate::{validate_optional, validate_required};
11 pub struct CourseNoteId(RecordId);11 pub struct CourseNoteId(RecordId);
12 12
13 impl CourseNoteId {13 impl CourseNoteId {
14- /// Minted from the process-wide monotonic generator, not `Ulid::new()`:14+ /// Minted from the process-wide monotonic generator, not `Ulid::generate()`:
15 /// a course's notes list `id DESC` (newest first,15 /// a course's notes list `id DESC` (newest first,
16 /// [`crate::db::course_note::list_for_course`]), and a random low half16 /// [`crate::db::course_note::list_for_course`]), and a random low half
17 /// scrambles rows minted in the same millisecond.17 /// scrambles rows minted in the same millisecond.
src/domain/course_note_file.rsmodified+1 -1
@@ -20,7 +20,7 @@ use crate::domain::monotonic_id::next_ulid;
20 pub struct CourseNoteFileId(RecordId);20 pub struct CourseNoteFileId(RecordId);
21 21
22 impl CourseNoteFileId {22 impl CourseNoteFileId {
23- /// Minted from the process-wide monotonic generator, not `Ulid::new()`:23+ /// Minted from the process-wide monotonic generator, not `Ulid::generate()`:
24 /// a note's files list `id DESC` (newest first,24 /// a note's files list `id DESC` (newest first,
25 /// [`crate::db::course_note_file::list_for`]), and a random low half25 /// [`crate::db::course_note_file::list_for`]), and a random low half
26 /// scrambles rows minted in the same millisecond.26 /// scrambles rows minted in the same millisecond.
src/domain/course_session.rsmodified+1 -1
@@ -12,7 +12,7 @@ use crate::validate::validate_optional;
12 pub struct CourseSessionId(RecordId);12 pub struct CourseSessionId(RecordId);
13 13
14 impl CourseSessionId {14 impl CourseSessionId {
15- /// Minted from the process-wide monotonic generator, not `Ulid::new()`:15+ /// Minted from the process-wide monotonic generator, not `Ulid::generate()`:
16 /// a course's sessions sort `starts_at DESC, id DESC` and the id breaks16 /// a course's sessions sort `starts_at DESC, id DESC` and the id breaks
17 /// the tie between two sessions starting at the same instant,17 /// the tie between two sessions starting at the same instant,
18 /// and a random low half sorts arbitrarily inside one millisecond.18 /// and a random low half sorts arbitrarily inside one millisecond.
src/domain/event.rsmodified+1 -1
@@ -16,7 +16,7 @@ use crate::validate::{validate_optional, validate_required};
16 pub struct EventId(RecordId);16 pub struct EventId(RecordId);
17 17
18 impl EventId {18 impl EventId {
19- /// Minted from the process-wide monotonic generator, not `Ulid::new()`:19+ /// Minted from the process-wide monotonic generator, not `Ulid::generate()`:
20 /// events list `id DESC` (newest first, [`crate::db::event::list_all`]),20 /// events list `id DESC` (newest first, [`crate::db::event::list_all`]),
21 /// and a random low half scrambles rows minted in the same millisecond.21 /// and a random low half scrambles rows minted in the same millisecond.
22 pub fn generate() -> Self {22 pub fn generate() -> Self {
src/domain/exam.rsmodified+1 -1
@@ -28,7 +28,7 @@ use crate::validate::{
28 pub struct ExamId(RecordId);28 pub struct ExamId(RecordId);
29 29
30 impl ExamId {30 impl ExamId {
31- /// Minted from the process-wide monotonic generator, not `Ulid::new()`:31+ /// Minted from the process-wide monotonic generator, not `Ulid::generate()`:
32 /// exams list `id DESC` (newest first, [`crate::db::exam::list_all`]),32 /// exams list `id DESC` (newest first, [`crate::db::exam::list_all`]),
33 /// and a random low half scrambles rows minted in the same millisecond.33 /// and a random low half scrambles rows minted in the same millisecond.
34 pub fn generate() -> Self {34 pub fn generate() -> Self {
src/domain/exam_question.rsmodified+4 -4
@@ -16,7 +16,7 @@ use crate::validate::{validate_question_kind, validate_question_points, validate
16 pub struct ExamQuestionId(RecordId);16 pub struct ExamQuestionId(RecordId);
17 17
18 impl ExamQuestionId {18 impl ExamQuestionId {
19- /// Minted from the process-wide monotonic generator, not `Ulid::new()`: the19+ /// Minted from the process-wide monotonic generator, not `Ulid::generate()`: the
20 /// id *is* the question's presentation order20 /// id *is* the question's presentation order
21 /// ([`crate::db::exam_question::list_for_exam`]21 /// ([`crate::db::exam_question::list_for_exam`]
22 /// sorts `id ASC`), and a random low half scrambles a burst of saves that22 /// sorts `id ASC`), and a random low half scrambles a burst of saves that
@@ -115,11 +115,11 @@ impl ChoiceText {
115 pub struct ChoiceId(String);115 pub struct ChoiceId(String);
116 116
117 impl ChoiceId {117 impl ChoiceId {
118- /// Plain `Ulid::new()` deliberately: options are ordered by their position118+ /// Plain `Ulid::generate()` deliberately: options are ordered by their position
119 /// in the stored `Vec`, never by id, so nothing here reads the id as a119 /// in the stored `Vec`, never by id, so nothing here reads the id as a
120 /// clock — it only has to be unique.120 /// clock — it only has to be unique.
121 fn generate() -> Self {121 fn generate() -> Self {
122- Self(Ulid::new().to_string())122+ Self(Ulid::generate().to_string())
123 }123 }
124 124
125 pub fn as_str(&self) -> &str {125 pub fn as_str(&self) -> &str {
@@ -408,7 +408,7 @@ mod tests {
408 /// A teacher saving several questions back to back gets them back in that408 /// A teacher saving several questions back to back gets them back in that
409 /// order: `list_for_exam` sorts `id ASC`, so the ids minted inside one409 /// order: `list_for_exam` sorts `id ASC`, so the ids minted inside one
410 /// millisecond have to sort in mint order. Revert `generate` to410 /// millisecond have to sort in mint order. Revert `generate` to
411- /// `Ulid::new()` and this fails — the low 80 bits are redrawn per id, so a411+ /// `Ulid::generate()` and this fails — the low 80 bits are redrawn per id, so a
412 /// same-tick burst comes out shuffled.412 /// same-tick burst comes out shuffled.
413 #[tokio::test]413 #[tokio::test]
414 async fn ids_sort_in_creation_order() {414 async fn ids_sort_in_creation_order() {
src/domain/homework.rsmodified+1 -1
@@ -27,7 +27,7 @@ use crate::validate::{validate_optional, validate_required};
27 pub struct HomeworkId(RecordId);27 pub struct HomeworkId(RecordId);
28 28
29 impl HomeworkId {29 impl HomeworkId {
30- /// Minted from the process-wide monotonic generator, not `Ulid::new()`:30+ /// Minted from the process-wide monotonic generator, not `Ulid::generate()`:
31 /// homework lists `id DESC` (newest first, [`Homework::list_all`]),31 /// homework lists `id DESC` (newest first, [`Homework::list_all`]),
32 /// and a random low half scrambles rows minted in the same millisecond.32 /// and a random low half scrambles rows minted in the same millisecond.
33 pub fn generate() -> Self {33 pub fn generate() -> Self {
src/domain/homework_file.rsmodified+2 -2
@@ -23,7 +23,7 @@ use crate::domain::timestamp::Timestamp;
23 pub struct HomeworkFileId(RecordId);23 pub struct HomeworkFileId(RecordId);
24 24
25 impl HomeworkFileId {25 impl HomeworkFileId {
26- /// Minted from the process-wide monotonic generator, not `Ulid::new()`:26+ /// Minted from the process-wide monotonic generator, not `Ulid::generate()`:
27 /// a submission's files list `id DESC` (newest first, [`HomeworkFile::list_for_submission`]),27 /// a submission's files list `id DESC` (newest first, [`HomeworkFile::list_for_submission`]),
28 /// and a random low half scrambles rows minted in the same millisecond.28 /// and a random low half scrambles rows minted in the same millisecond.
29 pub fn generate() -> Self {29 pub fn generate() -> Self {
@@ -75,7 +75,7 @@ impl HomeworkFile {
75 name,75 name,
76 content_type,76 content_type,
77 size,77 size,
78- file: Ulid::new().to_string(),78+ file: Ulid::generate().to_string(),
79 created_at: Timestamp::now(),79 created_at: Timestamp::now(),
80 }80 }
81 }81 }
src/domain/meal_ledger.rsmodified+1 -1
@@ -70,7 +70,7 @@ use crate::domain::user::UserId;
70 use crate::error::ValidationError;70 use crate::error::ValidationError;
71 use crate::validate::validate_optional;71 use crate::validate::validate_optional;
72 72
73-/// Mints ledger ids in write order — `Ulid::new()`'s random low bits sort73+/// Mints ledger ids in write order — `Ulid::generate()`'s random low bits sort
74 /// arbitrarily within one millisecond, which would scramble the `id` tie-break74 /// arbitrarily within one millisecond, which would scramble the `id` tie-break
75 /// of the newest-first statement below.75 /// of the newest-first statement below.
76 static IDS: LazyLock<std::sync::Mutex<Generator>> =76 static IDS: LazyLock<std::sync::Mutex<Generator>> =
src/domain/message.rsmodified+1 -1
@@ -100,7 +100,7 @@ impl Folder {
100 pub struct MessageId(RecordId);100 pub struct MessageId(RecordId);
101 101
102 impl MessageId {102 impl MessageId {
103- /// Minted from the process-wide monotonic generator, not `Ulid::new()`:103+ /// Minted from the process-wide monotonic generator, not `Ulid::generate()`:
104 /// the folder listings sort `id DESC` (newest first,104 /// the folder listings sort `id DESC` (newest first,
105 /// [`crate::db::message::list_folder`]),105 /// [`crate::db::message::list_folder`]),
106 /// and a random low half scrambles rows minted in the same millisecond.106 /// and a random low half scrambles rows minted in the same millisecond.
src/domain/monotonic_id.rsmodified+1 -1
@@ -1,7 +1,7 @@
1 //! Ids that sort in write order, for tables whose listings lean on `id` to1 //! Ids that sort in write order, for tables whose listings lean on `id` to
2 //! break ties (or to mean "newest first" outright).2 //! break ties (or to mean "newest first" outright).
3 //!3 //!
4-//! `Ulid::new()` fills the low 80 bits at random, so two ids minted in the4+//! `Ulid::generate()` fills the low 80 bits at random, so two ids minted in the
5 //! *same millisecond* sort arbitrarily against each other — millisecond-5 //! *same millisecond* sort arbitrarily against each other — millisecond-
6 //! accurate ordering only. That is not enough when a burst of writes lands6 //! accurate ordering only. That is not enough when a burst of writes lands
7 //! inside one tick (a recurring appointment publish expanding a series, a7 //! inside one tick (a recurring appointment publish expanding a series, a
src/domain/note.rsmodified+1 -1
@@ -10,7 +10,7 @@ use crate::validate::{validate_optional, validate_required};
10 pub struct NoteId(RecordId);10 pub struct NoteId(RecordId);
11 11
12 impl NoteId {12 impl NoteId {
13- /// Minted from the process-wide monotonic generator, not `Ulid::new()`:13+ /// Minted from the process-wide monotonic generator, not `Ulid::generate()`:
14 /// notes list `id DESC` (newest first, [`crate::db::note::list_for`]),14 /// notes list `id DESC` (newest first, [`crate::db::note::list_for`]),
15 /// and a random low half scrambles rows minted in the same millisecond.15 /// and a random low half scrambles rows minted in the same millisecond.
16 pub fn generate() -> Self {16 pub fn generate() -> Self {
src/domain/note_file.rsmodified+1 -1
@@ -16,7 +16,7 @@ use crate::error::ValidationError;
16 pub struct NoteFileId(RecordId);16 pub struct NoteFileId(RecordId);
17 17
18 impl NoteFileId {18 impl NoteFileId {
19- /// Minted from the process-wide monotonic generator, not `Ulid::new()`:19+ /// Minted from the process-wide monotonic generator, not `Ulid::generate()`:
20 /// a note's files list `id DESC` (newest first,20 /// a note's files list `id DESC` (newest first,
21 /// [`crate::db::note_file::list_for`]), and a random low half scrambles21 /// [`crate::db::note_file::list_for`]), and a random low half scrambles
22 /// rows minted in the same millisecond.22 /// rows minted in the same millisecond.
src/domain/payment_ledger.rsmodified+1 -1
@@ -59,7 +59,7 @@ use crate::error::ValidationError;
59 pub struct PaymentLedgerId(RecordId);59 pub struct PaymentLedgerId(RecordId);
60 60
61 impl PaymentLedgerId {61 impl PaymentLedgerId {
62- /// A fresh id in write order — `Ulid::new()`'s random low bits sort62+ /// A fresh id in write order — `Ulid::generate()`'s random low bits sort
63 /// arbitrarily within one millisecond, which would scramble the `id`63 /// arbitrarily within one millisecond, which would scramble the `id`
64 /// tie-break of the newest-first statement below.64 /// tie-break of the newest-first statement below.
65 pub fn generate() -> Self {65 pub fn generate() -> Self {
src/domain/pomodoro.rsmodified+1 -1
@@ -9,7 +9,7 @@ use crate::domain::user::UserId;
9 pub struct PomodoroSessionId(RecordId);9 pub struct PomodoroSessionId(RecordId);
10 10
11 impl PomodoroSessionId {11 impl PomodoroSessionId {
12- /// Minted from the process-wide monotonic generator, not `Ulid::new()`:12+ /// Minted from the process-wide monotonic generator, not `Ulid::generate()`:
13 /// the log sorts `started_at DESC, id DESC` and the id breaks the tie between13 /// the log sorts `started_at DESC, id DESC` and the id breaks the tie between
14 /// two sessions started at the same instant. The `open_` key below never ties14 /// two sessions started at the same instant. The `open_` key below never ties
15 /// with itself (one running session per user), so it needs no ordering.15 /// with itself (one running session per user), so it needs no ordering.
src/domain/pool_question.rsmodified+1 -1
@@ -28,7 +28,7 @@ use crate::validate::validate_required;
28 pub struct PoolQuestionId(RecordId);28 pub struct PoolQuestionId(RecordId);
29 29
30 impl PoolQuestionId {30 impl PoolQuestionId {
31- /// Minted from the process-wide monotonic generator, not `Ulid::new()`:31+ /// Minted from the process-wide monotonic generator, not `Ulid::generate()`:
32 /// the pool sorts `asked_at DESC, id DESC` and the id *is* the tie-break32 /// the pool sorts `asked_at DESC, id DESC` and the id *is* the tie-break
33 /// ([`crate::db::pool_question::list_all`]),33 /// ([`crate::db::pool_question::list_all`]),
34 /// and a random low half scrambles rows minted in the same millisecond.34 /// and a random low half scrambles rows minted in the same millisecond.
src/domain/question_image.rsmodified+1 -1
@@ -75,7 +75,7 @@ impl QuestionImage {
75 exam: exam.clone(),75 exam: exam.clone(),
76 question: question.clone(),76 question: question.clone(),
77 slot: slot.cloned(),77 slot: slot.cloned(),
78- file: Ulid::new().to_string(),78+ file: Ulid::generate().to_string(),
79 content_type,79 content_type,
80 size,80 size,
81 }81 }
src/domain/rag_output.rsmodified+1 -1
@@ -27,7 +27,7 @@ use crate::domain::timestamp::Timestamp;
27 pub struct RagOutputId(RecordId);27 pub struct RagOutputId(RecordId);
28 28
29 impl RagOutputId {29 impl RagOutputId {
30- /// Minted from the process-wide monotonic generator, not `Ulid::new()`:30+ /// Minted from the process-wide monotonic generator, not `Ulid::generate()`:
31 /// a note's outputs list `id DESC` (newest first,31 /// a note's outputs list `id DESC` (newest first,
32 /// [`list_for`](crate::db::rag_output::list_for)).32 /// [`list_for`](crate::db::rag_output::list_for)).
33 pub fn generate() -> Self {33 pub fn generate() -> Self {
src/domain/session.rsmodified+1 -1
@@ -11,7 +11,7 @@ pub struct SessionId(RecordId);
11 11
12 impl SessionId {12 impl SessionId {
13 pub fn generate() -> Self {13 pub fn generate() -> Self {
14- Self(RecordId::new(SESSION_TABLE, Ulid::new().to_string()))14+ Self(RecordId::new(SESSION_TABLE, Ulid::generate().to_string()))
15 }15 }
16 16
17 pub fn record(&self) -> RecordId {17 pub fn record(&self) -> RecordId {
src/domain/solution.rsmodified+1 -1
@@ -23,7 +23,7 @@ use crate::validate::validate_required;
23 pub struct SolutionId(RecordId);23 pub struct SolutionId(RecordId);
24 24
25 impl SolutionId {25 impl SolutionId {
26- /// Minted from the process-wide monotonic generator, not `Ulid::new()`:26+ /// Minted from the process-wide monotonic generator, not `Ulid::generate()`:
27 /// solutions sort `offered_at ASC, id ASC` and the id *is* the tie-break27 /// solutions sort `offered_at ASC, id ASC` and the id *is* the tie-break
28 /// ([`crate::db::solution::list_for`]),28 /// ([`crate::db::solution::list_for`]),
29 /// and a random low half scrambles rows minted in the same millisecond.29 /// and a random low half scrambles rows minted in the same millisecond.
src/domain/subject.rsmodified+2 -2
@@ -10,7 +10,7 @@ use crate::validate::{validate_optional, validate_required};
10 pub struct SubjectId(RecordId);10 pub struct SubjectId(RecordId);
11 11
12 impl SubjectId {12 impl SubjectId {
13- /// Minted from the process-wide monotonic generator, not `Ulid::new()`: the13+ /// Minted from the process-wide monotonic generator, not `Ulid::generate()`: the
14 /// id *is* the curriculum's order ([`crate::db::subject::list_for_course`]14 /// id *is* the curriculum's order ([`crate::db::subject::list_for_course`]
15 /// sorts `id ASC`), and a random low half scrambles a burst of saves that15 /// sorts `id ASC`), and a random low half scrambles a burst of saves that
16 /// lands inside one millisecond.16 /// lands inside one millisecond.
@@ -99,7 +99,7 @@ mod tests {
99 /// A teacher entering a curriculum gets it back in the order they typed it:99 /// A teacher entering a curriculum gets it back in the order they typed it:
100 /// `list_for_course` sorts `id ASC`, so the ids minted inside one100 /// `list_for_course` sorts `id ASC`, so the ids minted inside one
101 /// millisecond have to sort in mint order. Revert `generate` to101 /// millisecond have to sort in mint order. Revert `generate` to
102- /// `Ulid::new()` and this fails — the low 80 bits are redrawn per id, so a102+ /// `Ulid::generate()` and this fails — the low 80 bits are redrawn per id, so a
103 /// same-tick burst comes out shuffled.103 /// same-tick burst comes out shuffled.
104 #[tokio::test]104 #[tokio::test]
105 async fn ids_sort_in_creation_order() {105 async fn ids_sort_in_creation_order() {
src/domain/term.rsmodified+1 -1
@@ -18,7 +18,7 @@ use crate::validate::validate_required;
18 pub struct TermId(RecordId);18 pub struct TermId(RecordId);
19 19
20 impl TermId {20 impl TermId {
21- /// Minted from the process-wide monotonic generator, not `Ulid::new()`:21+ /// Minted from the process-wide monotonic generator, not `Ulid::generate()`:
22 /// terms sort `starts_at DESC, id DESC` and the id breaks the tie between22 /// terms sort `starts_at DESC, id DESC` and the id breaks the tie between
23 /// two terms starting at the same instant,23 /// two terms starting at the same instant,
24 /// and a random low half sorts arbitrarily inside one millisecond.24 /// and a random low half sorts arbitrarily inside one millisecond.
src/domain/user.rsmodified+6 -10
@@ -5,7 +5,7 @@
5 5
6 use std::sync::OnceLock;6 use std::sync::OnceLock;
7 7
8-use argon2::password_hash::SaltString;8+use argon2::password_hash::phc::PasswordHash as PhcHash;
9 use argon2::{Argon2, PasswordHasher, PasswordVerifier};9 use argon2::{Argon2, PasswordHasher, PasswordVerifier};
10 use surrealdb::types::{RecordId, RecordIdKey, SurrealValue};10 use surrealdb::types::{RecordId, RecordIdKey, SurrealValue};
11 11
@@ -23,7 +23,7 @@ use crate::validate::{validate_password, validate_username};
23 pub struct UserId(RecordId);23 pub struct UserId(RecordId);
24 24
25 impl UserId {25 impl UserId {
26- /// Minted from the process-wide monotonic generator, not `Ulid::new()`:26+ /// Minted from the process-wide monotonic generator, not `Ulid::generate()`:
27 /// users list `id DESC` (newest first, [`crate::db::user::list_all`]) and page by27 /// users list `id DESC` (newest first, [`crate::db::user::list_all`]) and page by
28 /// offset over that order, and a random low half scrambles rows minted in28 /// offset over that order, and a random low half scrambles rows minted in
29 /// the same millisecond. Not a secret: the session token is separate29 /// the same millisecond. Not a secret: the session token is separate
@@ -93,13 +93,9 @@ impl Password {
93 /// Private on purpose: argon2 must never run on an async worker. Callers93 /// Private on purpose: argon2 must never run on an async worker. Callers
94 /// outside this module go through [`Password::hash_async`].94 /// outside this module go through [`Password::hash_async`].
95 fn hash(&self) -> Result<PasswordHash, AppError> {95 fn hash(&self) -> Result<PasswordHash, AppError> {
96- let mut salt_bytes = [0u8; 16];96+ // password-hash 0.6 generates the salt internally (its own CSPRNG);
97- getrandom::fill(&mut salt_bytes).map_err(|e| AppError::Internal(format!("rng: {e}")))?;97+ // the explicit SaltString step is gone.
98- let salt = SaltString::encode_b64(&salt_bytes)98+ let hash = Argon2::default().hash_password(self.0.as_bytes())?.to_string();
99- .map_err(|e| AppError::Internal(format!("salt: {e}")))?;
100- let hash = Argon2::default()
101- .hash_password(self.0.as_bytes(), &salt)?
102- .to_string();
103 Ok(PasswordHash(hash))99 Ok(PasswordHash(hash))
104 }100 }
105 101
@@ -142,7 +138,7 @@ impl PasswordHash {
142 138
143 /// Private on purpose — see [`Password::hash`]. Use [`PasswordHash::verify_async`].139 /// Private on purpose — see [`Password::hash`]. Use [`PasswordHash::verify_async`].
144 fn verify(&self, password: &Password) -> bool {140 fn verify(&self, password: &Password) -> bool {
145- match argon2::password_hash::PasswordHash::new(&self.0) {141+ match PhcHash::new(&self.0) {
146 Ok(parsed) => Argon2::default()142 Ok(parsed) => Argon2::default()
147 .verify_password(password.0.as_bytes(), &parsed)143 .verify_password(password.0.as_bytes(), &parsed)
148 .is_ok(),144 .is_ok(),
src/domain/work_entry.rsmodified+1 -1
@@ -20,7 +20,7 @@ pub(crate) fn out_before_in_error() -> AppError {
20 pub struct WorkEntryId(RecordId);20 pub struct WorkEntryId(RecordId);
21 21
22 impl WorkEntryId {22 impl WorkEntryId {
23- /// Minted from the process-wide monotonic generator, not `Ulid::new()`:23+ /// Minted from the process-wide monotonic generator, not `Ulid::generate()`:
24 /// the log sorts `check_in DESC, id DESC` and the id breaks the tie between24 /// the log sorts `check_in DESC, id DESC` and the id breaks the tie between
25 /// two stints checked in at the same instant. The `open_` key below never25 /// two stints checked in at the same instant. The `open_` key below never
26 /// ties with itself (one open stint per user), so it needs no ordering.26 /// ties with itself (one open stint per user), so it needs no ordering.
src/web/questions.rsmodified+2 -2
@@ -482,7 +482,7 @@ async fn upload_image(
482 let upload = read_image_upload(&st, &mut multipart).await?;482 let upload = read_image_upload(&st, &mut multipart).await?;
483 let size = upload.size();483 let size = upload.size();
484 484
485- let file = ulid::Ulid::new().to_string();485+ let file = ulid::Ulid::generate().to_string();
486 store_blob(&st, &file, &upload.data, || async {486 store_blob(&st, &file, &upload.data, || async {
487 match pool_question::set_image(&st.db, question.get_id(), &file, &upload.content_type, size)487 match pool_question::set_image(&st.db, question.get_id(), &file, &upload.content_type, size)
488 .await?488 .await?
@@ -808,7 +808,7 @@ async fn upload_solution_image(
808 let upload = read_image_upload(&st, &mut multipart).await?;808 let upload = read_image_upload(&st, &mut multipart).await?;
809 let size = upload.size();809 let size = upload.size();
810 810
811- let file = ulid::Ulid::new().to_string();811+ let file = ulid::Ulid::generate().to_string();
812 store_blob(&st, &file, &upload.data, || async {812 store_blob(&st, &file, &upload.data, || async {
813 match solution::set_image(&st.db, solution.get_id(), &file, &upload.content_type, size)813 match solution::set_image(&st.db, solution.get_id(), &file, &upload.content_type, size)
814 .await?814 .await?
src/web/users.rsmodified+1 -1
@@ -1151,7 +1151,7 @@ async fn upload_my_avatar(
1151 let upload = read_image_upload(&st, &mut multipart).await?;1151 let upload = read_image_upload(&st, &mut multipart).await?;
1152 let size = upload.size();1152 let size = upload.size();
1153 1153
1154- let file = ulid::Ulid::new().to_string();1154+ let file = ulid::Ulid::generate().to_string();
1155 store_blob(&st, &file, &upload.data, || async {1155 store_blob(&st, &file, &upload.data, || async {
1156 match crate::service::user::set_avatar(1156 match crate::service::user::set_avatar(
1157 &st.db,1157 &st.db,