Breaking Changes¶
This document tracks every breaking change in dazzle_filekit. If you are
updating a downstream tool across filekit versions, read this file top-to-
bottom and apply each migration in order.
The rule for landing a breaking change is: never casually. A break requires
A justification line in the relevant version section below.
A migration path (new-alongside-old, deprecation warning, or compat shim).
A grep across
C:\code\(andC:\code\claude-projects\) to find every caller, plus a commit updating each one in the same release window.An update to
docs/api-stability.mdremoving the old symbol from the Locked tables (or adding the replacement).An update to
tests/test_import_stability.pyreflecting the new surface.
The session-logger incident on 2026-04-10 is the cautionary tale we keep
citing: a rename of normalize_cross_platform_path silently broke four
copies of log-command.py across claude-session-logger/. Do not repeat.
v0.5.0 – v0.5.3 (one behaviour change; otherwise additive)¶
Summary: No names removed and no signatures tightened. One function now does what its name always said, which changes its result for trees that hold junctions.
0.5.0 –
copy_tree_preserving_linkskeeps junctions. Through 0.4.3 it wasshutil.copytree(symlinks=True), which keeps symlinks but treats a Windows junction as an ordinary folder: it walked in and copied whatever the junction pointed at. With the new defaultlinks="keep", a junction is recreated at the destination as a junction with the same target, and nothing behind it is read. If one cannot be recreated the copy raisesshutil.Error, so a caller that removes the source after a successful copy never does so after a partial one.Justification: the old result contradicted the function’s name and docstring. A tree holding a junction to a large folder (or a drive root) was copied in full, and the copy was no longer a link to it.
Migration: pass
links="follow"to copy the contents as before;links="skip"leaves links out.Callers (searched
C:\code\on 2026-11-19): one live consumer, dazzlecmd-lib’s safedel (core/safedel/_platform.py,_recover.py), which uses the default and relies on links being kept. The other hits are archived copies of dazzlecmd, not installed code.
0.5.0 added
portable(portable path keys),batch_layout.plan_batch, andnormalize_cross_platform_path(expand=False)– additive.0.5.1 made
PortablePathErroralso derive from dazzle-lib’sFileOperationError(it is still aValueError, soexcept ValueErrorkeeps working), and fixed\\?\UNC\...normalising to a relative path.0.5.2 fixed
create_dest_path(path_style="absolute")for UNC sources; drive-letter destinations are byte-identical to 0.5.1.0.5.3 added
locking.exclusive_lock/LockTimeoutErrorandportable.current_flavor()– additive.
v0.4.0 – v0.4.2 (additive, no breaks)¶
Summary: No names removed, no signatures tightened, no behaviour removed. Downstream tools need no changes.
0.4.0 added the
longpathmodule (WindowsMAX_PATHshims via on-demand junctions). It went to a minor rather than a patch for risk class, not compatibility: it is the first module that creates and deletes filesystem objects, and a consumer taking a patch bump should not discover it can mint reparse points on their system drive. Nothing existing changed.0.4.1 was test- and guard-only:
@win_onlygating for POSIX CI legs, and a widened exception guard inshim_path. No API change.0.4.2 added
is_device_path/POSIX_DEVICE_PATHS/WINDOWS_INVALID_NAMES, and fixedis_valid_pathrejecting every forward-slash path on Windows. That fix is a behaviour correction, not a break —C:/code/projectwas previously reported invalid and now is not. A caller relying on the old (wrong) rejection would be relying on a bug.
Pinning note. docs/preservelib-integration.md previously advised
dazzle-filekit>=0.3.0,<0.4 on the reasoning that “a future 0.4.0 may break
again”. That prediction did not hold, and the cap now excludes every current
release for no compatibility reason. Anything written against 0.3.x runs
unchanged on 0.4.x.
v0.3.0 (clean break — migrations required)¶
Summary: 0.3.0 removed and renamed locked symbols without deprecation shims, and migrated every in-tree consumer in the same cycle. This was a deliberate exception to the rule at the top of this file: the rubric was coverage-completeness over backward-compatibility, and 0.3.0 had not shipped to PyPI when the changes landed, so no released contract broke mid-stream.
If you are updating a downstream tool from 0.2.x, these are the migrations:
Removed / renamed |
Replacement |
Notes |
|---|---|---|
|
|
link-following behaviour |
|
|
the default |
|
|
identical behaviour, clearer name |
|
|
folded into unctools ≥0.2.2 (stack V9); was never exported |
Behaviour change, not a removal: is_unc_path became platform-independent
— //server/share now returns True on every platform, where previously the
forward-slash spelling was recognized only on some. This is a superset of the
old behaviour, so no caller broke.
New required dependencies: dazzle-lib>=0.2.0 and unctools>=0.2.2. The
optional [unctools] extra was removed. Note that unctools is declared but
imported lazily — import dazzle_filekit still succeeds without it present.
Full per-symbol detail, including which external tool imported each one, is in
docs/api-stability.md.
v0.2.4 (additive consolidation, no breaks)¶
Summary: Pure enrichment release. No names removed, no signatures tightened, no behavior removed. Downstream tools need no changes.
Added¶
utils.compat.is_wsl()– returns True when running inside WSL (checksWSL_DISTRO_NAMEand/proc/version).operations.atomic_write_text(path, content, *, encoding='utf-8')– tmp-file +os.replaceatomic write.operations.atomic_write_json(path, data, *, indent=2, sort_keys=False)– thin wrapper overatomic_write_text.operations.copy_tree_preserving_links(src, dst, *, dirs_exist_ok=False)–shutil.copytree(symlinks=True)with reparse-point guard on Windows.dazzle_filekit.metadatamodule – rich metadata capture/apply:collect_file_metadata(path, *, include_acls=True, include_xattrs=True)apply_file_metadata(path, metadata, *, skip_quarantine=True)restore_windows_creation_time(path, ctime_float)is_win32_available()Internal
_collect_unix_xattrs,_apply_unix_xattrs
platform.windows.detect_alternate_streams(path)– NTFS ADS enumeration viaFindFirstStreamW(ctypes).platform.windows.has_significant_ads(path)– returns True if any ADS exists that isn’t:Zone.Identifier.New keyword-only parameters on existing functions (all default to the old behavior):
Phase 4 path functions – TBD during implementation.
Changed (behavior, not API)¶
collect_file_metadata(path)now returns a richer dict:On Windows: includes
security_descriptor_sddl,creation_time(high precision viapywin32.GetFileTime).On Linux/macOS: includes
xattrsdict.Old fields (
mode,mtime,atime,owner,group) unchanged.Callers that read the dict by key are unaffected – new keys are additive.
apply_file_metadata(path, metadata)now honors the new fields when present. Old manifests without the new keys still restore correctly.validation.is_junction(path)is fixed to useDeviceIoControl(FSCTL_GET_REPARSE_POINT)and correctly returns True only for mount-point reparse tags. Previously it silently returned False for everything (thewin32file.FILE_ATTRIBUTE_REPARSE_POINTconstant it referenced doesn’t exist, and the bareexceptclause swallowed the AttributeError). This is a bug fix, not an API break – no caller could have been relying on the broken behavior, because it was broken.Path normalizers (
normalize_path_no_resolve,normalize_cross_platform_path) each gain the capabilities the other had, unifying their feature sets. See Phase 4 target list below.
NOT changed (locked)¶
All top-level symbol names in
docs/api-stability.md.All positional parameters on existing functions.
All return types on existing functions (dicts may grow keys; callers reading specific keys are unaffected).
New dependency¶
pywin32 ; sys_platform == "win32"– required for SDDL ACL handling,SetFileTimectime restoration,DeviceIoControljunction detection, andFindFirstStreamWADS enumeration. pywin32 installs without admin for non-admin users.
Phase 4 path-normalization targets (fixpath edge-case catalog)¶
dazzlecmd/projects/core/fixpath/fixpath.py:fix_path() handles a superset
of what filekit’s path normalizers do today. Phase 4 will pull the
following into filekit’s normalize_path_no_resolve and
normalize_cross_platform_path:
Edge case |
Today in filekit? |
Target |
|---|---|---|
MSYS |
both functions |
keep |
WSL |
only |
add to |
MSYS-mangled WSL |
no |
add to both |
Extended-length |
only |
add to |
Extended UNC |
no |
add |
Forward-slash UNC |
no |
add |
Tilde |
only |
add to |
Env vars |
no |
add to both (documented) |
Relative path → absolute (no follow) |
only |
add to |
|
only |
add to |
Surrounding quotes/backticks |
no |
NOT added (stays in fixpath’s CLI layer) |
cmd.exe |
no |
NOT added (CLI-layer concern) |
URL-decoded |
no |
NOT added (CLI-layer concern) |
PowerShell |
no |
NOT added (CLI-layer concern) |
Trailing shell artifacts |
no |
NOT added (CLI-layer concern) |
The split rule: filekit handles cross-platform path formats; fixpath handles human input noise. Anything a program writes to disk or passes between systems belongs in filekit; anything a human pastes into a terminal stays in fixpath.
Future breaks (uncommitted)¶
None currently planned. Any future rename/removal must be proposed here with a migration plan before landing.