Expand description
The filesystem identity recorded with every real index.lock a transaction creates.
What:
The filesystem identity recorded with every real index.lock a transaction creates,
spelled exactly as the incumbent’s @monochromatic-dev/module-fs-id spells it.
Why:
Recovery removes a real index.lock only when its device,
inode and filesystem
identity all match the journal;
the incumbent compares the recorded fsId with the one
it resolves now,
so both wrappers must resolve the same text for the same filesystem
(package/module/fs-id/src/platform-resolvers.ts,
parsers.ts).
In TS you’d write (pseudocode):
const { value } = await resolveFsId({ path: lockPath, emitDiagnostics: false });Enums§
- FsId
Source - What:
The mechanism that supplied an identity,
which names its prefix.
Why:
SOURCE_PREFIXESin the incumbent: stable sources and degraded fallbacks are told apart in the text itself.
Functions§
- create_
fs_ id - What:
The identity text
<prefix><payload>for a normalized payload. Why:createFsId. - filesystem_
identity - What:
The filesystem identity of the filesystem holding
path, or nothing when no mechanism answers. Why: The incumbent canonicalizes the path first and then asks the platform’s mechanism; on macOS and Windows the commands are the incumbent’s own. - normalize_
identity_ payload - What:
Normalize one command-supplied payload:
trim,
lowercase,
then accept only non-empty
safe ASCII up to 512 characters that is not a lone
-. Why:normalizeIdentityPayload; anything else is no identity. - parse_
df_ device - What:
The mounted device node in POSIX
df -Poutput: the first field of the last non-empty row that starts with/dev/and holds only safe characters. Why:parseDfDeviceon macOS. - parse_
diskutil_ volume_ uuid - What:
The
VolumeUUIDstring of adiskutil info -plistproperty list, normalized. Why:parseDiskutilVolumeUuidon macOS. - source_
prefix - What:
The prefix of one source.
Why:
The identity text is
<prefix><payload>. - windows_
drive_ root - What:
The uppercase drive root
X:\of a Windows path, or nothing for a path without one. Why:windowsDriveRoot: the drive letter feeds a fixed PowerShell query.