Skip to content

Commit f70df96

Browse files
committed
docs(changes): add tasks.md for improve-deterministic-tests
1 parent df12368 commit f70df96

File tree

1 file changed

+25
-0
lines changed
  • openspec/changes/improve-deterministic-tests

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+

0 commit comments

Comments
 (0)