Repository navigation
Remove the pre-rename compatibility layer: no released version ever used the old name #52
Description
Summary
The code still carries a fallback to the product's pre-rename cache and
workspace directories. It can go: no published release ever used the old
name.
2026-08-28 first commit
2026-08-31 d51be90 renames the product to MatteLoop
2026-09-02 v0.1.0, the first tag and the first release
The rename landed three days before anything shipped. Every artifact any user
has ever installed writes and reads the current names. The compatibility layer
serves exactly one machine — the maintainer's development box, which predates
the rename — and it costs a branch in every cache path resolution plus a
dedicated test file to keep proving it works.
Precondition: migrate the one machine that has this data first
Removing the fallback makes pre-rename data invisible, not corrupt. On the
maintainer's machine that currently means model weights and a compiled provider
cache under the old cache directory, and at least one output directory holding
promoted cuts under the old workspace name.
Moving those to the current names is enough, and needs no code: the resolver
already prefers the new location whenever it exists. Do that before this change
lands, or the weights get re-downloaded and the promoted cuts stop being found.
What to remove
src/matteloop/paths.py:12—LEGACY_CACHE_NAMEsrc/matteloop/paths.py:14—LEGACY_WORKSPACE_NAMEsrc/matteloop/paths.py:17-29— the fallback insidecache_subdirectory(),
which then collapses to a singleuser_cache_dir(...).joinpath(*parts)src/matteloop/jobs/workspace/_platform.py:120-127—
_workspace_root_for_output(), the same pattern per output directorytests/test_legacy_data_locations.py— the whole file- The prose in
README.md,docs/engineering-guardrails.md,
docs/v1-scope.mdanddocs/building.mddescribing the fallback
What must NOT be removed in this change
Two schema tokens still spell the old name, and they are not paths:
src/matteloop/core/fingerprints.py:27—"rembggui-fingerprint"src/matteloop/jobs/workspace/_common.py:65—"rembggui-cut-manifest"
These are format identifiers written into stored files. Manifests carrying the
second token exist on disk today. Renaming them does not tidy a name — it
invalidates every promoted cut and every stored fingerprint, and
docs/engineering-guardrails.md:78 already says they stay. They are opaque
identifiers; the fact that the string reads like the old name costs nothing.
If they should be renamed anyway, that is a data-format migration and belongs in
its own issue with its own decision about what happens to existing cuts.
Related finding
coreml-cache is a third pre-rename directory. It is not reachable from any
code path — the string does not appear anywhere in src/, and never has in the
repository's history — yet compiled provider artifacts accumulate under it, in
one case several gigabytes, with nothing in the interface able to show or delete
them. That is a separate defect and not fixed by this issue, but whoever removes
the fallback will meet it.
Acceptance criteria
- No path resolution consults a pre-rename directory.
grep -rn "rembggui" src/returns only the two schema tokens named above.- The docs no longer describe a fallback that does not exist.
uv run ruff check . && uv run mypy src && QT_QPA_PLATFORM=offscreen uv run pytest -qstill green, and the guardrail check passes.
Ordering
#51 rewrites README.md, including the paragraph describing this fallback. Land
this after #51 to avoid a conflict, or rebase.
Activity
smb commentedon Sep 5, 2026
The cache half of the precondition is done. On the one machine that had
pre-rename data:
version namespace beneath it untouched — all seven weights verified intact
afterwards;
having already won the resolution;
3.3 GiB that no code path could reach;
All three subdirectories now resolve under the current product name, and
matteloop --smoke-testpasses against the moved cache.Still outstanding before this issue can land: an output directory on that
machine holds promoted cuts under the pre-rename workspace name. Removing
_workspace_root_for_output()would make those cuts undiscoverable. Renamingthat directory to the current workspace name is enough, and needs no code — the
resolver already prefers the current name when it exists.
Note that the manifests inside those cuts carry the
rembggui-cut-manifestschema token. Renaming the directory does not touch them, and it must not:
that token stays, for the reasons in the issue body.