uttrflow / uttrflow/uttrflow-swift
Move EvaluationCorpus's 800 lines of contextual cases into their own file
- Dominant language
- Swift
- Stars
- 4
- Forks
- 17
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 286
Description
## What happens
`Sources/UttrflowEval/EvaluationCorpus.swift` is 1,631 lines, the second-largest file in `Sources/`. It is data: `static let all` near the top, then case lists. The `contextual` list alone runs from about line 607 to line 1418.
## Why it matters
Every clean-up issue that adds a corpus case (#572, #573 and most dictation good first issues) edits this one file, so two newcomers working at once collide in it, and reviewing an added case means scrolling a 1,600-line diff context.
## Acceptance criteria
- `contextual` moves to `Sources/UttrflowEval/EvaluationCorpus+Contextual.swift` as `extension EvaluationCorpus`, unchanged.
- `EvaluationCorpus.all` returns the same cases in the same order (a test comparing the case ids before and after is enough; `Tests/UttrflowEvalTests/` has the corpus tests).
- No other change in the same pull request.
- `make verify` passes.
- If #572 or #573 is claimed and in progress, coordinate on that issue first, or wait for it to merge.
## Where to start
- `Sources/UttrflowEval/EvaluationCorpus.swift`; `git grep -n 'static let contextual\|static var contextual' Sources/UttrflowEval`.
- Tests: `Tests/UttrflowEvalTests/ContextualCorpusTests.swift`, `CorpusEvidenceTests.swift`.
- Read [CONTRIBUTING.md](https://github.com/uttrflow/uttrflow-swift/blob/main/CONTRIBUTING.md) first, and say on this issue that you are taking it.
- Before pushing, run `make verify` (with `DEVELOPER_DIR` pointing at Xcode 26.6 or later). It is the same command CI runs.
**Size:** XS to S, about 1 hour.
Contributor guide
Research direction
Read CONTRIBUTING.md, then inspect Sources/UttrflowEval/EvaluationCorpus.swift and locate contextual with git grep. Compare the relevant case IDs using Tests/UttrflowEvalTests/ContextualCorpusTests.swift and CorpusEvidenceTests.swift; done means contextual is isolated unchanged, ordering is preserved, no other changes are included, and make verify passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 90/100