Skip to content

fix(tests): cleanup failures are reported, never swallowed silently - #70

Merged
bgard68 merged 1 commit into
mainfrom
fix/account-for-cleanup-failures
Aug 24, 2026
Merged

fix(tests): cleanup failures are reported, never swallowed silently#70
bgard68 merged 1 commit into
mainfrom
fix/account-for-cleanup-failures

Conversation

@bgard68

@bgard68 bgard68 commented Aug 24, 2026

Copy link
Copy Markdown
Owner

The previous fix narrowed the catch types and left the bodies empty — trading cs/catch-of-all-exceptions for cs/empty-catch-block. Same defect, different rule id.

House rule, now standing: no empty catch blocks anywhere, tests included. A caught exception is accounted for or it is not caught.

The cleanup catch now writes the leftover directory and the reason to test error output. The run still passes — a temp directory surviving is survivable; invisibly surviving is not. Repo swept for other empty catches: none.

Clears the last 2 open code-scanning alerts (#57, #58).

The previous fix narrowed the catch types and left the bodies empty — trading
cs/catch-of-all-exceptions for cs/empty-catch-block, which is the same defect
wearing a different rule id. An empty catch discards the one piece of evidence
anyone debugging a full temp disk would need.

House rule, now standing: no empty catch blocks anywhere, tests included. A
caught exception is accounted for or it is not caught. Cleanup failure here
writes the leftover path and the reason to the test error output; the run
still passes, because a temp directory surviving is survivable — invisibly
surviving is not.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@bgard68
bgard68 merged commit 72fde58 into main Aug 24, 2026
10 checks passed
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