Skip to content

v0.3.2 - Fix Volatile Schema Unwrapping on Boot

Choose a tag to compare

@alanzhao0128 alanzhao0128 released this 29 Sep 11:19
· 5 commits to main since this release

What's Changed in v0.3.2

Fix Schemastery Volatile Reference Handling in resolveConfig

  • Root cause: Schemastery wraps fields marked with .volatile() in Volatile<T> reference objects ({ get(): T }). When dsh loads a profile entry without an explicit config, Cordis resolves absent volatile fields into reference objects instead of plain undefined. As a result, config.root ?? DEFAULT_MEMORY_ROOT yielded the reference object rather than falling back to default, causing expandHomePath to throw TypeError: path.startsWith is not a function.
  • Fix: Added unwrapConfig recursive helper to extract primitive values from any volatile reference before running resolveConfig.
  • Verification: Tested clean boot under both plain empty and Schemastery-parsed volatile configs (125/125 tests pass).