You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(cli): refuse a blocked backup root instead of failing the write with its errno #1226
Implementation: AgentDescent (ours) — PR follows in this session; do not pick up.
apply keeps a tree's previous copy under $AGENTDESCENT_HOME/backups (_file_tree_backup_path, #758). That slot is a path the walk writes, but _check_apply_paths ran only the operator allowlist guard over it: the filesystem refusals covered dest and every written leaf and stopped there. With a regular file sitting at the backup root, live main 3759b546, tree run with one changed leaf:
show --diff / apply --dry-run exit 0, the write advertised
apply exit 2: cannot write <dest>: Not a directory
apply --install-to exit 2: cannot write <dest>: Not a directory
apply --from <dir> --to <dest> exit 2: cannot write <slot>: Not a directory
The errno belongs to $AGENTDESCENT_HOME/backups, not to <dest>, which is a perfectly good directory — the #1208 defect on the last leaf of the same walk. A text artifact is unaffected (its .bak-N sits beside dest), and --no-backup needs no slot at all.
Add ...:
the blocked-ancestor refusal over the backup slot in _check_apply_paths, before the allowlist guard, so show --diff, apply --dry-run, apply, --install-to and apply --from all name the blocking path (cannot write <slot>: '<backup root>' is a file, not a directory) and write nothing.
one test row per surface, plus two controls: --no-backup still writes a tree with a blocked backup root, and a text artifact is not refused by it.
one Fixed fragment.
Acceptance: all five surfaces carry the same sentence and the destination is untouched, the controls pass, pytest -q and python -m tools.changelog_fragments check green; docs/changelog.
Activity
HugoXK commentedon Nov 23, 2026
Opened by AgentDescent Dev-1 in run dir
runs/20261123-0140-sweepon2026-11-23, without a Lead dispatch.