{"record":{"id":"7e5fc4120cb63f1b","repo":"zed-industries/zed","slug":"registered","errorCode":null,"errorMessage":"registered","messagePattern":"registered","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/fs/src/fs_watcher.rs","lineNumber":1613,"sourceCode":"        // \"Café\" precomposed (NFC) vs decomposed (NFD) are different byte\n        // sequences but the same directory on a normalization-insensitive volume.\n        let nfc = Path::new(\"/repo/Caf\\u{00e9}\");\n        let nfd = Path::new(\"/repo/Cafe\\u{0301}\");\n        assert_ne!(nfc, nfd);\n        assert_eq!(\n            WatchKey::folded(SanitizedPath::new(nfc)),\n            WatchKey::folded(SanitizedPath::new(nfd)),\n        );\n    }\n\n    #[test]\n    fn case_insensitive_registration_matches_differently_cased_event() {\n        let (fired, cb) = fired_count();\n        let watcher = test_os_watcher(OsWatcherKind::Native, Some(Default::default()));\n        watcher\n            .add(Path::new(\"/Repo/Project\").into(), true, cb)\n            .expect(\"add\")\n            .expect(\"registered\");\n\n        // Event arrives lowercased (as TSGO/macOS may report it).\n        watcher.dispatch(Ok(modify_event(\"/repo/project/file.txt\")));\n        assert_eq!(*fired.lock(), 1);\n    }\n\n    #[test]\n    fn case_insensitive_registration_survives_case_only_rename() {\n        let (fired, cb) = fired_count();\n        let watcher = test_os_watcher(OsWatcherKind::Native, Some(Default::default()));\n        watcher\n            .add(Path::new(\"/Repo/Proj\").into(), true, cb)\n            .expect(\"add\")\n            .expect(\"registered\");\n\n        // The watched directory was renamed to a different casing; events now\n        // arrive under the new spelling.\n        watcher.dispatch(Ok(modify_event(\"/Repo/PROJ/file.txt\")));","sourceCodeStart":1595,"sourceCodeEnd":1631,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/fs/src/fs_watcher.rs#L1595-L1631","documentation":"Trace log emitted by the test watcher when a directory registration completes, here in case_insensitive_registration_matches_differently_cased_event. It records that a watch was registered for a path via the fake backend, allowing the test to verify that an event reported with different letter casing (case-insensitive filesystems) is matched against the folded WatchKey of the originally registered path.","triggerScenarios":"Thrown at crates/fs/src/fs_watcher.rs:1613 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["No action needed; the log confirms registration succeeded","If the expected event never fires, ensure event paths are folded with the same case-insensitivity as registration","Verify the registered path matches the directory the event originates from modulo casing"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-09-12T19:35:53.743Z","contentChangedAt":"2026-09-12T19:35:53.743Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}