Windows: MutationTier.getTier() classifies every path as Tier D — all Tier-B memory writes fail ETIER_MISMATCH
Summary
On Windows, every call to MemorySystem.add() with type idea or knowledge fails with ETIER_MISMATCH. Root cause is two POSIX-only assumptions in LIFEOS/TOOLS/MutationTier.ts.
Root cause
-
Absolute-path guard (
getTier):if (!absolutePath.startsWith("/")) return "D";Windows absolute paths are
C:\..., so every path on the platform short-circuits to Tier D ("untouchable") and the defense-in-depth check inadd()rejects the write. -
Tier-B prefix table builds prefixes with a hardcoded forward slash:
pathResolve(CLAUDE_ROOT, "LIFEOS/MEMORY/KNOWLEDGE") + "/",pathResolveemits backslashes on Windows, so even past bug 1 theabs.startsWith(prefix)comparison fails on the mixed separator.
Fix (verified)
import { resolve as pathResolve, isAbsolute, sep } from "node:path";
// guard:
if (!isAbsolute(absolutePath)) return "D";
// prefixes:
pathResolve(CLAUDE_ROOT, "LIFEOS/MEMORY/KNOWLEDGE") + sep,
pathResolve(CLAUDE_ROOT, "LIFEOS/MEMORY/IDEAS") + sep,
After the patch, bun MutationTier.ts test passes 21/21 (all Tier-D untouchable defaults intact: settings.json, .env, hooks/*, CLAUDE.md, system prompt), and a 335-note bulk load through MemorySystem.add() completed with a full tier-b audit trail.
Impact
Silent on a fresh install: the autonomic reviewer's Tier-B dispatches all fail, so ideas/knowledge never persist on Windows. Proposals still work (queue writes skip the tier check), which masks the breakage.
Environment
Windows 11 (10.0.26200), Bun, LifeOS 7.28.3. Found during a Memora→Cortex bulk migration (first sustained Tier-B write volume on this platform). Related Windows-path class: #1729, #1730.
Good catch, @umair-a11y — on Windows, MutationTier was classifying every path as Tier D. Fixed in source (now uses isAbsolute() and sep, in MutationTier.ts), ships next release. Closing since the public repo is generated from that source.