{"record":{"id":"c30a23ccb9f19e03","repo":"zed-industries/zed","slug":"watch-registered","errorCode":null,"errorMessage":"watch registered","messagePattern":"watch registered","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/fs/src/fs_watcher.rs","lineNumber":1539,"sourceCode":"        notify::Event {\n            paths: vec![PathBuf::from(path)],\n            ..notify::Event::new(EventKind::Modify(notify::event::ModifyKind::Any))\n        }\n    }\n\n    fn recording_watcher() -> (OsWatcher, Arc<Mutex<Vec<String>>>) {\n        let backend = Arc::new(Mutex::new(FakeWatchBackend::default()));\n        let watcher = test_os_watcher(OsWatcherKind::Native, Some(backend));\n        let fired = Arc::new(Mutex::new(Vec::new()));\n        for dir in [\"/repo/a\", \"/repo/a/nested\", \"/repo/b\"] {\n            let fired = fired.clone();\n            let label = dir.to_owned();\n            watcher\n                .add(Arc::<Path>::from(Path::new(dir)), false, move |_| {\n                    fired.lock().push(label.clone());\n                })\n                .expect(\"add watch\")\n                .expect(\"watch registered\");\n        }\n        (watcher, fired)\n    }\n\n    #[test]\n    fn event_dispatches_only_to_registrations_covering_its_path() {\n        let (watcher, fired) = recording_watcher();\n\n        watcher.dispatch(Ok(modify_event(\"/repo/a/file.txt\")));\n\n        // Only the directory containing the file resolves; siblings stay untouched.\n        assert_eq!(*fired.lock(), vec![\"/repo/a\".to_owned()]);\n    }\n\n    #[test]\n    fn event_dispatches_to_every_ancestor_registration() {\n        let (watcher, fired) = recording_watcher();\n","sourceCodeStart":1521,"sourceCodeEnd":1557,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/fs/src/fs_watcher.rs#L1521-L1557","documentation":"This is not an error but a diagnostic trace log emitted by the filesystem watcher test suite when a watch registration is confirmed. It fires inside the recording test watcher (recording_watcher) after a directory such as /repo/a or /repo/b has been successfully added via the FakeWatchBackend, letting tests assert which paths were actually registered and in what order.","triggerScenarios":"Thrown at crates/fs/src/fs_watcher.rs:1539 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["No fix required; this log confirms successful watch registration in tests","If seen unexpectedly in production, verify the path exists and permissions allow adding a native watch","Check that the watcher backend was constructed before this log appears"],"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-14T05:17:10.506Z"}