{"record":{"id":"e6d3a5ed7363adcd","repo":"BigPizzaV3/CodexPlusPlus","slug":"reparse-observation-file","errorCode":null,"errorMessage":"Reparse observation file","messagePattern":"Reparse observation file","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/native_browser.rs","lineNumber":965,"sourceCode":"        ensure!(meta.is_file(), \"Unexpected observation path\");\n        hash.update(format!(\n            \"{:?}:{:?}:{}\",\n            meta.created()?,\n            meta.modified()?,\n            meta.len()\n        ));\n        #[cfg(windows)]\n        {\n            use std::os::windows::io::AsRawHandle;\n            use windows::Win32::Foundation::HANDLE;\n            use windows::Win32::Storage::FileSystem::{\n                BY_HANDLE_FILE_INFORMATION, GetFileInformationByHandle,\n            };\n            let mut identity = BY_HANDLE_FILE_INFORMATION::default();\n            unsafe {\n                GetFileInformationByHandle(HANDLE(file.as_raw_handle()), &mut identity)?;\n            }\n            ensure!(\n                identity.dwFileAttributes & 0x400 == 0,\n                \"Reparse observation file\"\n            );\n            hash.update(identity.dwVolumeSerialNumber.to_le_bytes());\n            hash.update(identity.nFileIndexHigh.to_le_bytes());\n            hash.update(identity.nFileIndexLow.to_le_bytes());\n        }\n    }\n    Ok(format!(\"{:x}\", hash.finalize()))\n}\n\nasync fn monitor_once(\n    paths: BrowserPaths,\n    enabled: bool,\n    cache: Option<(BrowserStatus, Option<String>)>,\n    contract: RuntimeContract,\n) -> Result<(BrowserStatus, Option<String>)> {\n    tokio::task::spawn_blocking(move || {","sourceCodeStart":947,"sourceCodeEnd":983,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/b1ed92e5e4a2d74095d4b8db5af43cef7acba9c6/crates/codex-plus-core/src/native_browser.rs#L947-L983","documentation":"On Windows, the observation code queries BY_HANDLE_FILE_INFORMATION to build a stable file identity (volume serial + file index). If the file's attributes include FILE_ATTRIBUTE_REPARSE_POINT (0x400), the handle refers to a reparse point (symlink, junction, mount point), whose identity is not trustworthy, so the scan refuses with this error.","triggerScenarios":"monitor_once / idle observation hashing on Windows encounters a file opened via File::open whose GetFileInformationByHandle attributes contain the 0x400 reparse-point bit.","commonSituations":"User replaced a runtime file with a symlink or junction; OneDrive/Dropbox placeholder files with reparse attributes; a dev setup that junctions the runtime directory; NTFS dedup or layered-fileSystem drivers marking files as reparse points.","solutions":["Replace the reparse point with a real regular file (copy the target's content into place)","Exclude reparse-point paths from the observation set before hashing","Check for cloud-sync placeholders (OneDrive Files On-Demand) in the runtime dir and mark them always-available or exclude them","If junctioned runtime directories are intentional, resolve the target before hashing instead of failing"],"exampleFix":"// before\nensure!(identity.dwFileAttributes & 0x400 == 0, \"Reparse observation file\");\n// after\nif identity.dwFileAttributes & 0x400 != 0 {\n    eprintln!(\"skipping reparse point during observation\");\n    continue; // or resolve real path first\n}","handlingStrategy":"fallback","validationCode":"const attrs = await fs.promises.lstat(p);\nif (attrs.isSymbolicLink()) console.warn('reparse point in observation set:', p);","typeGuard":"const isReparsePoint = (attrs: { isSymbolicLink(): boolean }): boolean => attrs.isSymbolicLink();","tryCatchPattern":"match observe_and_hash() {\n    Err(e) if e.to_string().contains(\"Reparse observation file\") => {\n        eprintln!(\"reparse point encountered; falling back to path-hash\");\n        fallback_hash_without_identity()\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Don't replace runtime files with symlinks/junctions on Windows","Mark cloud placeholder files (OneDrive) as always available or exclude them","Resolve real paths before adding entries to the observation set"],"tags":["windows","filesystem","symlink","observation"],"backgroundTag":"incompatible-source-type","analyzedSha":"b1ed92e5e4a2d74095d4b8db5af43cef7acba9c6","analyzedAt":"2026-09-19T23:35:21.129Z","contentChangedAt":"2026-09-19T23:35:21.129Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}