Skip to main content

max / goingson

Bump notify to 8.2 and notify-debouncer-mini to 0.7 notify 6.1 -> 8.2.0, notify-debouncer-mini 0.4.1 -> 0.7.0. The pair moves as a unit since the debouncer pins the notify version. No source changes were needed: new_debouncer keeps its (timeout, tx) signature and the DebounceEventResult shape the watcher matches on is unchanged. The bump also drops the duplicate mio 0.8 and windows-sys 0.48 trees that notify 6 was holding back, and moves inotify 0.9 -> 0.11. Linux inotify handling changed across this range, so db_watcher gains a test that drives the real debouncer against a temp directory watched non-recursively, writes the WAL sidecar, and asserts a matching debounced event arrives. That is the exact path the watcher uses in production. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-07-22 21:22 UTC
Commit: 7ab5633eb3796c4f923ff1a91df40d794bac15bf
Parent: 94d2390
3 files changed, +144 insertions, -141 deletions
M Cargo.lock +88 -139
@@ -10,12 +10,12 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
10 10
11 11 [[package]]
12 12 name = "aead"
13 - version = "0.5.2"
13 + version = "0.6.1"
14 14 source = "registry+https://github.com/rust-lang/crates.io-index"
15 - checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0"
15 + checksum = "1973cfbc1a2daf9cf550e74e1f088c28e7f7d8c1e1418fb6c9dc5184b7e84c99"
16 16 dependencies = [
17 - "crypto-common 0.1.7",
18 - "generic-array",
17 + "crypto-common 0.2.2",
18 + "inout 0.2.2",
19 19 ]
20 20
21 21 [[package]]
@@ -25,7 +25,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
25 25 checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
26 26 dependencies = [
27 27 "cfg-if",
28 - "cipher",
28 + "cipher 0.4.4",
29 29 "cpufeatures 0.2.17",
30 30 ]
31 31
@@ -682,7 +682,7 @@ version = "0.1.2"
682 682 source = "registry+https://github.com/rust-lang/crates.io-index"
683 683 checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6"
684 684 dependencies = [
685 - "cipher",
685 + "cipher 0.4.4",
686 686 ]
687 687
688 688 [[package]]
@@ -736,37 +736,26 @@ checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527"
736 736
737 737 [[package]]
738 738 name = "chacha20"
739 - version = "0.9.1"
740 - source = "registry+https://github.com/rust-lang/crates.io-index"
741 - checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818"
742 - dependencies = [
743 - "cfg-if",
744 - "cipher",
745 - "cpufeatures 0.2.17",
746 - ]
747 -
748 - [[package]]
749 - name = "chacha20"
750 739 version = "0.10.1"
751 740 source = "registry+https://github.com/rust-lang/crates.io-index"
752 741 checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81"
753 742 dependencies = [
754 743 "cfg-if",
744 + "cipher 0.5.2",
755 745 "cpufeatures 0.3.0",
756 746 "rand_core 0.10.1",
757 747 ]
758 748
759 749 [[package]]
760 750 name = "chacha20poly1305"
761 - version = "0.10.1"
751 + version = "0.11.0"
762 752 source = "registry+https://github.com/rust-lang/crates.io-index"
763 - checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35"
753 + checksum = "9b89e1c441e926b9c82a8d023f6e1b7ae0adcfaa7d621814e4d60789bac751cb"
764 754 dependencies = [
765 755 "aead",
766 - "chacha20 0.9.1",
767 - "cipher",
756 + "chacha20",
757 + "cipher 0.5.2",
768 758 "poly1305",
769 - "zeroize",
770 759 ]
771 760
772 761 [[package]]
@@ -810,8 +799,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
810 799 checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
811 800 dependencies = [
812 801 "crypto-common 0.1.7",
813 - "inout",
814 - "zeroize",
802 + "inout 0.1.4",
803 + ]
804 +
805 + [[package]]
806 + name = "cipher"
807 + version = "0.5.2"
808 + source = "registry+https://github.com/rust-lang/crates.io-index"
809 + checksum = "e8cf2a2c93cd704877c0858356ed03480ff301ee950b43f1cbe4573b088bfa6c"
810 + dependencies = [
811 + "block-buffer 0.12.1",
812 + "crypto-common 0.2.2",
813 + "inout 0.2.2",
815 814 ]
816 815
817 816 [[package]]
@@ -1032,7 +1031,7 @@ dependencies = [
1032 1031 "crossterm_winapi",
1033 1032 "derive_more 2.1.1",
1034 1033 "document-features",
1035 - "mio 1.2.0",
1034 + "mio",
1036 1035 "parking_lot",
1037 1036 "rustix",
1038 1037 "signal-hook",
@@ -1056,7 +1055,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1056 1055 checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
1057 1056 dependencies = [
1058 1057 "generic-array",
1059 - "rand_core 0.6.4",
1060 1058 "typenum",
1061 1059 ]
1062 1060
@@ -1066,7 +1064,9 @@ version = "0.2.2"
1066 1064 source = "registry+https://github.com/rust-lang/crates.io-index"
1067 1065 checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453"
1068 1066 dependencies = [
1067 + "getrandom 0.4.2",
1069 1068 "hybrid-array",
1069 + "rand_core 0.10.1",
1070 1070 ]
1071 1071
1072 1072 [[package]]
@@ -2902,20 +2902,20 @@ dependencies = [
2902 2902
2903 2903 [[package]]
2904 2904 name = "inotify"
2905 - version = "0.9.6"
2905 + version = "0.11.4"
2906 2906 source = "registry+https://github.com/rust-lang/crates.io-index"
2907 - checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff"
2907 + checksum = "153be1941a183ec9ccd095ddbe17a8b8d435ef6c76e9e02451b933c3999af2c8"
2908 2908 dependencies = [
2909 - "bitflags 1.3.2",
2909 + "bitflags 2.13.1",
2910 2910 "inotify-sys",
2911 2911 "libc",
2912 2912 ]
2913 2913
2914 2914 [[package]]
2915 2915 name = "inotify-sys"
2916 - version = "0.1.5"
2916 + version = "0.1.8"
2917 2917 source = "registry+https://github.com/rust-lang/crates.io-index"
2918 - checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb"
2918 + checksum = "c033f80b2c113cdf91ab7a33faa9cbc014726dcad99880c8609af2a370edf37d"
2919 2919 dependencies = [
2920 2920 "libc",
2921 2921 ]
@@ -2931,6 +2931,15 @@ dependencies = [
2931 2931 ]
2932 2932
2933 2933 [[package]]
2934 + name = "inout"
2935 + version = "0.2.2"
2936 + source = "registry+https://github.com/rust-lang/crates.io-index"
2937 + checksum = "4250ce6452e92010fdf7268ccc5d14faa80bb12fc741938534c58f16804e03c7"
2938 + dependencies = [
2939 + "hybrid-array",
2940 + ]
2941 +
2942 + [[package]]
2934 2943 name = "instability"
2935 2944 version = "0.3.12"
2936 2945 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3126,7 +3135,7 @@ dependencies = [
3126 3135 "tokio",
3127 3136 "tokio-stream",
3128 3137 "tower",
3129 - "tower-http",
3138 + "tower-http 0.7.0",
3130 3139 "tracing",
3131 3140 "uuid",
3132 3141 ]
@@ -3554,18 +3563,6 @@ dependencies = [
3554 3563
3555 3564 [[package]]
3556 3565 name = "mio"
3557 - version = "0.8.11"
3558 - source = "registry+https://github.com/rust-lang/crates.io-index"
3559 - checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c"
3560 - dependencies = [
3561 - "libc",
3562 - "log",
3563 - "wasi 0.11.1+wasi-snapshot-preview1",
3564 - "windows-sys 0.48.0",
3565 - ]
3566 -
3567 - [[package]]
3568 - name = "mio"
3569 3566 version = "1.2.0"
3570 3567 source = "registry+https://github.com/rust-lang/crates.io-index"
3571 3568 checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1"
@@ -3709,32 +3706,32 @@ dependencies = [
3709 3706
3710 3707 [[package]]
3711 3708 name = "notify"
3712 - version = "6.1.1"
3709 + version = "8.2.0"
3713 3710 source = "registry+https://github.com/rust-lang/crates.io-index"
3714 - checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d"
3711 + checksum = "4d3d07927151ff8575b7087f245456e549fea62edf0ec4e565a5ee50c8402bc3"
3715 3712 dependencies = [
3716 3713 "bitflags 2.13.1",
3717 - "crossbeam-channel",
3718 - "filetime",
3719 3714 "fsevent-sys",
3720 3715 "inotify",
3721 3716 "kqueue",
3722 3717 "libc",
3723 3718 "log",
3724 - "mio 0.8.11",
3719 + "mio",
3720 + "notify-types",
3725 3721 "walkdir",
3726 - "windows-sys 0.48.0",
3722 + "windows-sys 0.60.2",
3727 3723 ]
3728 3724
3729 3725 [[package]]
3730 3726 name = "notify-debouncer-mini"
3731 - version = "0.4.1"
3727 + version = "0.7.0"
3732 3728 source = "registry+https://github.com/rust-lang/crates.io-index"
3733 - checksum = "5d40b221972a1fc5ef4d858a2f671fb34c75983eb385463dff3780eeff6a9d43"
3729 + checksum = "17849edfaabd9a5fef1c606d99cfc615a8e99f7ac4366406d86c7942a3184cf2"
3734 3730 dependencies = [
3735 - "crossbeam-channel",
3736 3731 "log",
3737 3732 "notify",
3733 + "notify-types",
3734 + "tempfile",
3738 3735 ]
3739 3736
3740 3737 [[package]]
@@ -3752,6 +3749,15 @@ dependencies = [
3752 3749 ]
3753 3750
3754 3751 [[package]]
3752 + name = "notify-types"
3753 + version = "2.1.0"
3754 + source = "registry+https://github.com/rust-lang/crates.io-index"
3755 + checksum = "42b8cfee0e339a0337359f3c88165702ac6e600dc01c0cc9579a92d62b08477a"
3756 + dependencies = [
3757 + "bitflags 2.13.1",
3758 + ]
3759 +
3760 + [[package]]
3755 3761 name = "nu-ansi-term"
3756 3762 version = "0.50.3"
3757 3763 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4024,12 +4030,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
4024 4030 checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
4025 4031
4026 4032 [[package]]
4027 - name = "opaque-debug"
4028 - version = "0.3.1"
4029 - source = "registry+https://github.com/rust-lang/crates.io-index"
4030 - checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
4031 -
4032 - [[package]]
4033 4033 name = "open"
4034 4034 version = "5.3.3"
4035 4035 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4592,12 +4592,11 @@ dependencies = [
4592 4592
4593 4593 [[package]]
4594 4594 name = "poly1305"
4595 - version = "0.8.0"
4595 + version = "0.9.1"
4596 4596 source = "registry+https://github.com/rust-lang/crates.io-index"
4597 - checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf"
4597 + checksum = "6e2d0073b297041425c7c3df6eb4792d598a15323fe63346852b092eca02904c"
4598 4598 dependencies = [
4599 - "cpufeatures 0.2.17",
4600 - "opaque-debug",
4599 + "cpufeatures 0.3.0",
4601 4600 "universal-hash",
4602 4601 ]
4603 4602
@@ -4726,9 +4725,9 @@ dependencies = [
4726 4725
4727 4726 [[package]]
4728 4727 name = "pulldown-cmark"
4729 - version = "0.12.2"
4728 + version = "0.13.4"
4730 4729 source = "registry+https://github.com/rust-lang/crates.io-index"
4731 - checksum = "f86ba2052aebccc42cbbb3ed234b8b13ce76f75c3551a303cb2bcffcff12bb14"
4730 + checksum = "e9f068eba8e7071c5f9511831b44f32c740d5adf574e990f946ddb53db2f314e"
4732 4731 dependencies = [
4733 4732 "bitflags 2.13.1",
4734 4733 "getopts",
@@ -4835,7 +4834,7 @@ version = "0.10.2"
4835 4834 source = "registry+https://github.com/rust-lang/crates.io-index"
4836 4835 checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80"
4837 4836 dependencies = [
4838 - "chacha20 0.10.1",
4837 + "chacha20",
4839 4838 "getrandom 0.4.2",
4840 4839 "rand_core 0.10.1",
4841 4840 ]
@@ -5144,7 +5143,7 @@ dependencies = [
5144 5143 "tokio-rustls",
5145 5144 "tokio-util",
5146 5145 "tower",
5147 - "tower-http",
5146 + "tower-http 0.6.8",
5148 5147 "tower-service",
5149 5148 "url",
5150 5149 "wasm-bindgen",
@@ -5775,7 +5774,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
5775 5774 checksum = "b75a19a7a740b25bc7944bdee6172368f988763b744e3d4dfe753f6b4ece40cc"
5776 5775 dependencies = [
5777 5776 "libc",
5778 - "mio 1.2.0",
5777 + "mio",
5779 5778 "signal-hook",
5780 5779 ]
5781 5780
@@ -6990,7 +6989,7 @@ checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d"
6990 6989 dependencies = [
6991 6990 "bytes",
6992 6991 "libc",
6993 - "mio 1.2.0",
6992 + "mio",
6994 6993 "pin-project-lite",
6995 6994 "signal-hook-registry",
6996 6995 "socket2",
@@ -7206,6 +7205,22 @@ dependencies = [
7206 7205 "tower",
7207 7206 "tower-layer",
7208 7207 "tower-service",
7208 + ]
7209 +
7210 + [[package]]
7211 + name = "tower-http"
7212 + version = "0.7.0"
7213 + source = "registry+https://github.com/rust-lang/crates.io-index"
7214 + checksum = "b11f75e912b0c2be01b63d8cf8057b8c3f97cf34abb3d431a3a4c8675498e233"
7215 + dependencies = [
7216 + "bitflags 2.13.1",
7217 + "bytes",
7218 + "http",
7219 + "http-body",
7220 + "percent-encoding",
7221 + "pin-project-lite",
7222 + "tower-layer",
7223 + "tower-service",
7209 7224 "tracing",
7210 7225 ]
7211 7226
@@ -7445,12 +7460,12 @@ checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
7445 7460
7446 7461 [[package]]
7447 7462 name = "universal-hash"
7448 - version = "0.5.1"
7463 + version = "0.6.1"
7449 7464 source = "registry+https://github.com/rust-lang/crates.io-index"
7450 - checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea"
7465 + checksum = "f4987bdc12753382e0bec4a65c50738ffaabc998b9cdd1f952fb5f39b0048a96"
7451 7466 dependencies = [
7452 - "crypto-common 0.1.7",
7453 - "subtle",
7467 + "crypto-common 0.2.2",
7468 + "ctutils",
7454 7469 ]
7455 7470
7456 7471 [[package]]
@@ -8135,15 +8150,6 @@ dependencies = [
8135 8150
8136 8151 [[package]]
8137 8152 name = "windows-sys"
8138 - version = "0.48.0"
8139 - source = "registry+https://github.com/rust-lang/crates.io-index"
8140 - checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
8141 - dependencies = [
8142 - "windows-targets 0.48.5",
8143 - ]
8144 -
8145 - [[package]]
8146 - name = "windows-sys"
8147 8153 version = "0.52.0"
8148 8154 source = "registry+https://github.com/rust-lang/crates.io-index"
8149 8155 checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
@@ -8195,21 +8201,6 @@ dependencies = [
8195 8201
8196 8202 [[package]]
8197 8203 name = "windows-targets"
8198 - version = "0.48.5"
8199 - source = "registry+https://github.com/rust-lang/crates.io-index"
8200 - checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
8201 - dependencies = [
8202 - "windows_aarch64_gnullvm 0.48.5",
8203 - "windows_aarch64_msvc 0.48.5",
8204 - "windows_i686_gnu 0.48.5",
8205 - "windows_i686_msvc 0.48.5",
8206 - "windows_x86_64_gnu 0.48.5",
8207 - "windows_x86_64_gnullvm 0.48.5",
8208 - "windows_x86_64_msvc 0.48.5",
8209 - ]
8210 -
8211 - [[package]]
8212 - name = "windows-targets"
8213 8204 version = "0.52.6"
8214 8205 source = "registry+https://github.com/rust-lang/crates.io-index"
8215 8206 checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
@@ -8267,12 +8258,6 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
8267 8258
8268 8259 [[package]]
8269 8260 name = "windows_aarch64_gnullvm"
8270 - version = "0.48.5"
8271 - source = "registry+https://github.com/rust-lang/crates.io-index"
8272 - checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
8273 -
8274 - [[package]]
8275 - name = "windows_aarch64_gnullvm"
8276 8261 version = "0.52.6"
8277 8262 source = "registry+https://github.com/rust-lang/crates.io-index"
8278 8263 checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
@@ -8291,12 +8276,6 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
8291 8276
8292 8277 [[package]]
8293 8278 name = "windows_aarch64_msvc"
8294 - version = "0.48.5"
8295 - source = "registry+https://github.com/rust-lang/crates.io-index"
8296 - checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
8297 -
8298 - [[package]]
8299 - name = "windows_aarch64_msvc"
8300 8279 version = "0.52.6"
8301 8280 source = "registry+https://github.com/rust-lang/crates.io-index"
8302 8281 checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
@@ -8315,12 +8294,6 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
8315 8294
8316 8295 [[package]]
8317 8296 name = "windows_i686_gnu"
8318 - version = "0.48.5"
8319 - source = "registry+https://github.com/rust-lang/crates.io-index"
8320 - checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
8321 -
8322 - [[package]]
8323 - name = "windows_i686_gnu"
8324 8297 version = "0.52.6"
8325 8298 source = "registry+https://github.com/rust-lang/crates.io-index"
8326 8299 checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
@@ -8351,12 +8324,6 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
8351 8324
8352 8325 [[package]]
8353 8326 name = "windows_i686_msvc"
8354 - version = "0.48.5"
8355 - source = "registry+https://github.com/rust-lang/crates.io-index"
8356 - checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
8357 -
8358 - [[package]]
8359 - name = "windows_i686_msvc"
8360 8327 version = "0.52.6"
8361 8328 source = "registry+https://github.com/rust-lang/crates.io-index"
8362 8329 checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
@@ -8375,12 +8342,6 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
8375 8342
8376 8343 [[package]]
8377 8344 name = "windows_x86_64_gnu"
8378 - version = "0.48.5"
8379 - source = "registry+https://github.com/rust-lang/crates.io-index"
8380 - checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
8381 -
8382 - [[package]]
8383 - name = "windows_x86_64_gnu"
8384 8345 version = "0.52.6"
8385 8346 source = "registry+https://github.com/rust-lang/crates.io-index"
8386 8347 checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
@@ -8399,12 +8360,6 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
8399 8360
8400 8361 [[package]]
8401 8362 name = "windows_x86_64_gnullvm"
8402 - version = "0.48.5"
8403 - source = "registry+https://github.com/rust-lang/crates.io-index"
8404 - checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
8405 -
8406 - [[package]]
8407 - name = "windows_x86_64_gnullvm"
8408 8363 version = "0.52.6"
8409 8364 source = "registry+https://github.com/rust-lang/crates.io-index"
8410 8365 checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
@@ -8423,12 +8378,6 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
8423 8378
8424 8379 [[package]]
8425 8380 name = "windows_x86_64_msvc"
8426 - version = "0.48.5"
8427 - source = "registry+https://github.com/rust-lang/crates.io-index"
8428 - checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
8429 -
8430 - [[package]]
8431 - name = "windows_x86_64_msvc"
8432 8381 version = "0.52.6"
8433 8382 source = "registry+https://github.com/rust-lang/crates.io-index"
8434 8383 checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
M Cargo.toml +2 -2
@@ -72,8 +72,8 @@ tauri-plugin-updater = "2"
72 72 tauri-plugin-process = "2"
73 73
74 74 # Filesystem watching (db change notifications)
75 - notify = "6.0"
76 - notify-debouncer-mini = "0.4"
75 + notify = "8.2"
76 + notify-debouncer-mini = "0.7"
77 77 makeover = "1.0.0"
78 78 alloy_tui = "1.0.0"
79 79 toml = "1.1"
@@ -229,4 +229,58 @@ mod tests {
229 229 let test_path = PathBuf::from("/data/goingson.db.backup");
230 230 assert!(!is_db_file(&test_path, &db_path));
231 231 }
232 +
233 + /// Exercises the real debouncer against the real backend (inotify on Linux)
234 + /// so a notify major bump cannot silently stop delivering WAL writes. The
235 + /// watcher only ever watches a directory non-recursively, which is the case
236 + /// whose inotify handling changed across notify 6 -> 8.
237 + #[test]
238 + fn debouncer_delivers_wal_writes_for_a_watched_directory() {
239 + use notify_debouncer_mini::new_debouncer;
240 + use std::io::Write;
241 +
242 + let dir = tempfile::tempdir().expect("tempdir");
243 + let db_path = dir.path().join("goingson.db");
244 + std::fs::write(&db_path, b"").expect("seed db file");
245 +
246 + let (tx, rx) = std::sync::mpsc::channel();
247 + let mut debouncer =
248 + new_debouncer(Duration::from_millis(DEBOUNCE_MS), tx).expect("create debouncer");
249 + debouncer
250 + .watcher()
251 + .watch(dir.path(), RecursiveMode::NonRecursive)
252 + .expect("watch dir");
253 +
254 + // Write to the WAL sidecar, the file SQLite actually churns in WAL mode.
255 + let wal_path = dir.path().join("goingson.db-wal");
256 + let mut wal = std::fs::File::create(&wal_path).expect("create wal");
257 + wal.write_all(b"page").expect("write wal");
258 + wal.sync_all().expect("sync wal");
259 +
260 + // Debounce window plus slack for the backend to hand the event over.
261 + let deadline = Duration::from_millis(DEBOUNCE_MS * 8);
262 + let mut saw_db_change = false;
263 + let started = std::time::Instant::now();
264 + while started.elapsed() < deadline {
265 + match rx.recv_timeout(Duration::from_millis(200)) {
266 + Ok(Ok(events)) => {
267 + if events.iter().any(|e| is_db_file(&e.path, &db_path)) {
268 + saw_db_change = true;
269 + break;
270 + }
271 + }
272 + Ok(Err(e)) => panic!("watcher error: {e:?}"),
273 + Err(std::sync::mpsc::RecvTimeoutError::Timeout) => continue,
274 + Err(std::sync::mpsc::RecvTimeoutError::Disconnected) => {
275 + panic!("debouncer channel disconnected")
276 + }
277 + }
278 + }
279 +
280 + assert!(
281 + saw_db_change,
282 + "no debounced event matched the database files after writing {}",
283 + wal_path.display()
284 + );
285 + }
232 286 }