File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
openspec/changes/improve-deterministic-tests Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ # Implementation Tasks
2+
3+ ## 1. Test Isolation
4+ - [x] 1.1 Create temp fixture roots per suite (openspec/changes, openspec/specs)
5+ - [x] 1.2 Use process.chdir to temp root within tests
6+ - [x] 1.3 Restore original cwd and clean temp dirs after each
7+
8+ ## 2. Deterministic Discovery
9+ - [x] 2.1 Implement getActiveChangeIds(root?) to only include dirs with proposal.md
10+ - [x] 2.2 Implement getSpecIds(root?) to only include dirs with spec.md
11+ - [x] 2.3 Return sorted results to avoid fs.readdir ordering variance
12+
13+ ## 3. Command Integration
14+ - [x] 3.1 Ensure change/show/validate rely on cwd and discovery helpers
15+ - [x] 3.2 Keep runtime behavior unchanged for end users
16+
17+ ## 4. Validation
18+ - [x] 4.1 Convert affected command tests (show, spec, validate, change) to isolated fixtures
19+ - [x] 4.2 Verify tests pass consistently across environments
20+ - [x] 4.3 Confirm no reads from real repo state during tests
21+
22+ ## 5. Optional (Not Needed Now)
23+ - [x] 5.1 Add optional root param to discovery helpers (default process.cwd())
24+ - [ ] 5.2 Consider threading root through command constructors if ever required
25+
You can’t perform that action at this time.
0 commit comments