-
Notifications
You must be signed in to change notification settings - Fork 958
Closed
Description
Bug Description
When running openspec validate --all --strict --no-interactive in a repository with no active changes and no specs (empty openspec/changes/ and openspec/specs/ directories), the command hangs indefinitely with the spinner showing "Validating...".
Steps to Reproduce
- Create an openspec directory structure with no changes or specs:
mkdir -p openspec/changes/archive openspec/specs
- Run: openspec validate --all --strict --no-interactive
- Command hangs forever
Expected Behavior
Should complete immediately with a message like "No items to validate" and exit with code 0.
Root Cause
In src/commands/validate.ts runBulkValidation() method, when both changeIds and specIds are empty arrays, the queue length is 0, but the Promise resolution logic doesn't handle this edge case properly, causing the command to hang.
Suggested Fix
Add an early return when queue.length === 0 before entering the concurrent execution logic.
Metadata
Metadata
Assignees
Labels
No labels