Hmbown/CodeWhale · error
not a regular non-reparse file
Error message
not a regular non-reparse file
What it means
Windows guard in runtime_store_file_identity: the file's metadata has the FILE_ATTRIBUTE_REPARSE_POINT flag or is not a regular file. A reparse point could redirect the identity check to a different target, so the (volume-serial, file-index) identity used to detect store-file swaps is refused up front.
Source
Thrown at crates/tui/src/runtime_threads.rs:8975
let metadata = file.metadata()?;
anyhow::ensure!(
metadata.is_file() && metadata.nlink() == 1,
"not one regular file"
);
Ok((metadata.dev(), metadata.ino()))
}
#[cfg(windows)]
fn runtime_store_file_identity(file: &File) -> Result<(u64, u64)> {
use std::os::windows::fs::MetadataExt as _;
use std::os::windows::io::AsRawHandle as _;
use windows_sys::Win32::Storage::FileSystem::{
BY_HANDLE_FILE_INFORMATION, FILE_ATTRIBUTE_REPARSE_POINT, GetFileInformationByHandle,
};
let metadata = file.metadata()?;
let safe = metadata.is_file() && metadata.file_attributes() & FILE_ATTRIBUTE_REPARSE_POINT == 0;
anyhow::ensure!(safe, "not a regular non-reparse file");
let mut info = BY_HANDLE_FILE_INFORMATION::default();
// SAFETY: the handle and writable output remain valid for the call.
if unsafe { GetFileInformationByHandle(file.as_raw_handle(), &mut info) } == 0 {
return Err(std::io::Error::last_os_error()).context("Inspect Runtime store file identity");
}
anyhow::ensure!(info.nNumberOfLinks == 1, "has multiple filesystem links");
Ok((
u64::from(info.dwVolumeSerialNumber),
(u64::from(info.nFileIndexHigh) << 32) | u64::from(info.nFileIndexLow),
))
}
#[cfg(all(not(unix), not(windows)))]
fn runtime_store_file_identity(file: &File) -> Result<(u64, u64)> {
anyhow::ensure!(file.metadata()?.is_file(), "must be a regular file");
Ok((0, 0))
}
View on GitHub (pinned to 0c42157ee5)
Solutions
- Check the file with fsutil reparsepoint query and remove any junction/symlink/other reparse tag on the store path
- Replace the store path with a plain regular file (copy, delete link, rename back)
- Exclude the runtime store directory from tools that create reparse points
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/tui/src/runtime_threads.rs:8975 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20).
Data as JSON: /api/errors/f5f5538378de83c8.
Report an issue: GitHub.