Skip to content

fix: raise ValueError in _all_tasks_done when given empty list#223

Merged
fazxes merged 1 commit intomainfrom
feat/0220-guard-all-tasks-done-empty-list
Apr 9, 2026
Merged

fix: raise ValueError in _all_tasks_done when given empty list#223
fazxes merged 1 commit intomainfrom
feat/0220-guard-all-tasks-done-empty-list

Conversation

@fazxes
Copy link
Copy Markdown
Member

@fazxes fazxes commented Apr 9, 2026

Summary

  • _all_tasks_done([]) previously returned (True, []) -- vacuous truth that would silently permit releasing a version with zero tasks if the upstream if not task_files: guard were ever removed
  • Now raises ValueError("_all_tasks_done requires at least one task file") on empty input
  • Test test_empty_file_list_returns_true renamed to test_empty_file_list_raises_value_error and updated to assert the error

Test plan

  • make check passes (997 tests, ruff, mypy, dry-runs, ASCII, shell syntax all green)
  • _all_tasks_done([]) raises ValueError with a descriptive message
  • All existing _all_tasks_done call sites remain correct -- _version_ready still guards with if not task_files: before calling, so no callers ever pass an empty list

Prevents vacuous truth: calling _all_tasks_done([]) previously returned
(True, []) which would silently permit releasing a version with zero tasks
if the caller-side guard were ever removed. Now raises ValueError explicitly,
and the test contract is updated to expect the error instead of True.
@fazxes fazxes merged commit 493d843 into main Apr 9, 2026
7 checks passed
@fazxes fazxes deleted the feat/0220-guard-all-tasks-done-empty-list branch April 9, 2026 01:33
fazxes added a commit that referenced this pull request Apr 9, 2026
Add the missing strategy report for session #123 that tasks #241,
#242, and #243 reference. Mark task #223 (worktree cleanup) as done
since it is superseded by the more detailed #241 spec.
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