MemPalace/mempalace · error · ValueError
sync apply requires explicit wing= or project_dirs= so it ca
Error message
sync apply requires explicit wing= or project_dirs= so it cannot auto-prune every wing in a multi-project palace; pass --wing or a project directory
What it means
Error "sync apply requires explicit wing= or project_dirs= so it cannot auto-prune every wing in a multi-project palace; pass --wing or a project directory" thrown in MemPalace/mempalace.
Source
Thrown at mempalace/sync.py:225
dry_run: bool = True,
batch_size: int = _BATCH,
wal_log: Optional[Callable] = None,
) -> SyncReport:
"""Prune drawers whose source files are gitignored, missing, or moved.
Returns a SyncReport with bucket counts. Dry-run by default; pass
dry_run=False to actually delete drawers and matching closets.
Holds ``mine_palace_lock`` for the whole call so the classify pass and
the apply branch see the same drawer snapshot. Raises
``MineAlreadyRunning`` if another mine is in progress on this palace.
On apply (``dry_run=False``), at least one of ``wing`` or
``project_dirs`` must be set so a caller cannot accidentally prune
every wing in a multi-project palace via auto-detected roots.
"""
if not dry_run and not wing and not project_dirs:
raise ValueError(
"sync apply requires explicit wing= or project_dirs= so it cannot "
"auto-prune every wing in a multi-project palace; pass --wing or "
"a project directory"
)
if project_dirs is not None and not project_dirs:
raise ValueError(
"project_dirs was provided but is empty; pass at least one project "
"root or pass project_dirs=None to auto-detect from drawer metadata"
)
counts = {
"scanned": 0,
"kept": 0,
"gitignored": 0,
"missing": 0,
"no_source": 0,
"out_of_scope": 0,
}View on GitHub (pinned to 06cb6987f0)
Solutions
- Pass --wing or a project directory to scope the sync apply
When it happens
Trigger: Thrown at mempalace/sync.py:225 when the library encounters an invalid state.
Common situations: Sync apply without scope could auto-prune every wing in a multi-project palace.
AI-assisted analysis of MemPalace/mempalace@06cb6987f0 (2026-08-15).
Data as JSON: /api/errors/a793cb1035f7f410.
Report an issue: GitHub.