Running iwe normalize over a whole library no longer rewrites every file: documents whose formatting does not change are left alone, so their modification times and the library's edit history survive. Every command, editor action and MCP tool that writes a document now also refuses a key that would land outside the workspace, instead of silently creating, overwriting or deleting a file above the workspace root, and a write that fails on disk is reported as an error rather than a panic or a false success.
iwe
Fixed
create,normalize --keyandrenamerefuse a key with a..segment or a leading/instead of writing, rewriting or moving a file outside the workspace. A document write that fails now prints an error instead of a panic.normalizeno longer rewrites documents it does not change. Run over a whole library it wrote every file unconditionally, giving all of them the same modification time and losing the library's edit history; it now writes only the documents whose formatting actually moved.normalize --keyalready behaved this way. The same guard now coversupdate,rename,attach,extract,inlineandsquash, which wrote unconditionally when a change turned out to be a no-op.
iwes
Fixed
- Rename rejects a new name that resolves outside the workspace. Previously the graph kept a key such as
../notewhile the file was created inside the workspace, and the links written for it dangled after a reload. - Go to definition returns no location for a link that resolves outside the workspace (previously it pointed the editor at a path above the workspace root).
iwec
Fixed
- Writing a document leaves the file alone when the content is unchanged, instead of rewriting it and moving its modification time.
iwe_createandiwe_renamereject a key with a..segment or a leading/before touching the graph. Such a key used to create, overwrite or delete a file outside the workspace.- A write that fails on disk is reported as an error by every mutating tool. Previously the tool reported success and left the graph and the files out of step.
Library crates (liwe, diwe)
diwe
Added
write_file_if_changedwrites a file only when its content differs from what is on disk, and returns whether it wrote.write_fileandapply_changesnow go through it, so no document is replaced with the bytes it already holds.key_escapes_workspacetells whether a document key would leave the workspace root through a..segment or an absolute path, andworkspace_document_pathjoins a key onto the workspace root only when it stays inside.
Fixed
write_fileandapply_changesrefuse a key that escapes the workspace root with anInvalidInputerror, instead of creating, overwriting or deleting a file outside it.