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): one refusal walk for every leaf apply can write #1230
Implementation: AgentDescent (ours) — PR follows in this session; do not pick up.
#1215 / #1222 / #1224 each fixed the one leaf its report named — a destination blocked by a file, a tree child blocked by a file, a tree leaf blocked by a directory — but the preview (show --diff, apply --dry-run) and the tree writer still read different rules for the fourth leaf: a link planted in the destination. On live main 761eb4cb, with a tree artifact that writes alpha and dest/alpha a symlink to a file outside, show --diff and apply --dry-run return written: ["alpha"] while the real apply exits with an uncaught TreeError traceback (refusing to write 'alpha' under …: 'alpha' is a symlink) instead of the exit-2 JSON refusal every other blocked leaf returns. The same shape holds one level down: dest/sub a symlink to a directory and the artifact writing sub/leaf.md.
Add a single refusal inside _check_apply_paths (the funnel show, apply, --from and --install-to all call) that runs filetree.dest_problem(dest, path) for every produced path, so the preview and the writer agree by construction:
reference the produced path, not the tree root: cannot write <path>: '<rel>' is a symlink (or resolves outside <dest>), matching the sentence materialize would raise;
a text artifact's written is [dest] itself and its link/directory refusals already run before the funnel — do not re-check it there.
Acceptance: on live main, dest/alpha -> outside file and dest/sub -> outside dir both refuse identically on show --diff, apply --dry-run, apply, apply --from and apply --install-to; no write, no traceback, link and its target untouched; the #1215/#1222/#1224 rows and a legal sibling still pass; one test row per leaf in one file; one changelog fragment; docs/api.md unchanged.
Claim: branch agent/1230-refusal-walk, tip df940ab61e5c9276a47b8860faa91093ddec23d8, base 761eb4cb — draft PR follows in this turn.
Red first, at 761eb4cb with only the new test file added: 2 failed, 4 passed — test_a_symlinked_leaf_is_named_on_every_surface, test_a_symlinked_intermediate_directory_is_named_on_every_surface. On main the preview advertises written: ["alpha"] / ["sub/leaf.md"] while the real apply raises an uncaught TreeError out of main. The four passers are the #1215/#1222/#1224 shapes as locks plus a legal sibling control.
Filed by AgentDescent Dev-1 without a Lead dispatch: found as the fourth leaf of the #1215/#1222/#1224 walk while sweeping that family, and opened this issue plus draft PR #1231 in the same session.
Activity
HugoXK commentedon Nov 23, 2026
Claim: branch
agent/1230-refusal-walk, tipdf940ab61e5c9276a47b8860faa91093ddec23d8, base761eb4cb— draft PR follows in this turn.Red first, at
761eb4cbwith only the new test file added:2 failed, 4 passed—test_a_symlinked_leaf_is_named_on_every_surface,test_a_symlinked_intermediate_directory_is_named_on_every_surface. On main the preview advertiseswritten: ["alpha"]/["sub/leaf.md"]while the realapplyraises an uncaughtTreeErrorout ofmain. The four passers are the#1215/#1222/#1224shapes as locks plus a legal sibling control.fix(cli): refuse a link in the destination from the same walk (#1230)
HugoXK commentedon Nov 23, 2026
Filed by AgentDescent Dev-1 without a Lead dispatch: found as the fourth leaf of the
#1215/#1222/#1224walk while sweeping that family, and opened this issue plus draft PR#1231in the same session.Run dir
runs/20261123-1000-sweep,2026-11-23.test(cli): the leaf refusal names the relative leaf, as issue #1230 s…
test(apply): pin prune=True refusing to delete a symlink it did not e…