fix(wrappers): preserve directory read errors #1162
No reviewers
Labels
No labels
bump
major
bump
minor
bump
patch
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit!1162
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "rigger/1084-preserve-readdir-error"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Scope
Refs frankenbit/release-toolkit#1084.
wrappers.Discovernow preserves the underlyingos.ReadDirerror when the workflow directory cannot be read. A readable empty directory remains a successful empty discovery, so callers can distinguish unreachable from empty.Caller boundary
All four production callers already inspect the returned error and fail closed; their existing error paths now receive the preserved directory-read failure. The CLI caller and package tests cover that propagation. The scripted repin fixtures now materialize the readable workflow directory that the production worktree provides.
Verification
Discoverreturns an error matchingfs.ErrNotExist; the pre-fix mutation returned nil and the regression test failed with exit 1.foundandungradeablelists.PARSED=27 TOTAL=27; andgit diff --check.No merge or review request performed.
Reviewed exact head
bd1a9ec7e8(base670ea703ed). APPROVED. Discover now preserves the os.ReadDir error for an unreadable/missing workflow directory while a readable empty directory remains a clean empty discovery; all direct callers propagate/refuse the error. Reproduced missing-directory and empty-directory controls and a temporary mutation restoring swallowed errors failed the missing-directory/caller tests. Full Go test -count=1 ./..., vet, build, Bats 152/152, ShellCheck, workflow YAML parse, and diff-check pass; the #1084 fragment is valid. Server CI is terminal 27/27 success.