Skip to content

Add failing tests for IMPORTANT audit findings (wave 5)#12

Open
kelp wants to merge 1 commit intomainfrom
audit-wave5-important-tests
Open

Add failing tests for IMPORTANT audit findings (wave 5)#12
kelp wants to merge 1 commit intomainfrom
audit-wave5-important-tests

Conversation

@kelp
Copy link
Copy Markdown
Owner

@kelp kelp commented Mar 30, 2026

Summary

  • Add failing integration tests for 6 IMPORTANT audit findings across mkdir, rmdir, mktemp, mv, and touch
  • Tests encode correct GNU coreutils behavior; they fail against current code (TDD red phase)
  • No implementation code modified

Findings Tested

Utility Finding Expected (GNU) Actual (vibeutils)
mkdir -m symbolic modes Accepts u=rwx,go=rx Rejects with "invalid mode"
mkdir -p -m scope Mode applies to leaf only Mode applies to all intermediates
rmdir -v --ignore-fail-on-non-empty Still prints verbose Verbose suppressed
mktemp Implicit suffix myapp.XXXXXXtxt succeeds Rejected as "too few X's"
mv Hardlink same-file Exit 0, remove source Exit 1 with error message
touch -h implies -c Does not create file Creates regular file

Test plan

  • All new tests verified to FAIL against current implementation
  • No existing tests regressed
  • Phase 2: fix implementations to make tests pass

Generated with Claude Code

Tests encode correct GNU coreutils behavior for IMPORTANT
findings across mkdir, rmdir, mktemp, mv, and touch. They
fail against current code -- that is intentional (TDD red).

Findings tested:
- mkdir -m rejects symbolic mode strings (u=rwx,go=rx)
- mkdir -p -m applies mode to all dirs (GNU: leaf only)
- rmdir -v --ignore-fail-on-non-empty suppresses verbose
- mktemp rejects implicit suffix (myapp.XXXXXXtxt)
- mv same-file via hardlink aborts instead of exit 0
- touch -h creates file (should imply -c / no-create)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant