Skip to content

fix: add missing autodie throws for link ELOOP and rename ENOTEMPTY#285

Draft
Koan-Bot wants to merge 1 commit intocpanel:masterfrom
atoomic:koan.atoomic/fix-missing-autodie-throws
Draft

fix: add missing autodie throws for link ELOOP and rename ENOTEMPTY#285
Koan-Bot wants to merge 1 commit intocpanel:masterfrom
atoomic:koan.atoomic/fix-missing-autodie-throws

Conversation

@Koan-Bot
Copy link
Contributor

@Koan-Bot Koan-Bot commented Mar 12, 2026

Summary

  • What: Adds missing _throw_autodie() calls on two error paths in CORE overrides.
  • Why: __link (circular symlink → ELOOP) and __rename (non-empty target dir → ENOTEMPTY) both set $! but never called _throw_autodie(), silently breaking autodie compatibility. Every other error path in both functions already has this call.
  • How: Added the standard _throw_autodie('func', @_) if _caller_has_autodie_for('func') pattern. Also removed dead $set_error variable in __chown (declared but never set to true — no behavioral change).

Test plan

  • CI passes (existing autodie test coverage exercises the throw mechanism)
  • Manual verify: use autodie; link(circular_symlink, target) now throws
  • Manual verify: use autodie; rename(dir, non_empty_dir) now throws

🤖 Generated with Claude Code


Quality Report

Changes: 1 file changed, 5 insertions(+), 10 deletions(-)

Code scan: clean

Tests: failed (FAILED)

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

…MPTY

__link's CIRCULAR_SYMLINK error path and __rename's ENOTEMPTY error path
both set $! but skipped _throw_autodie(), breaking autodie compatibility.
Also removes dead $set_error variable in __chown (declared but never set).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Koan-Bot
Copy link
Contributor Author

Quality Gate Warning

Tests failed: FAILED

Auto-merge was skipped due to quality gate issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant