Problem
Tabby's autocomplete behavior now spans focus snapshots, request construction, normalization, session reconciliation, acceptance, model selection, and UI state. Without tests, regressions in partial acceptance, caret quality handling, prompt construction, or model management are easy to introduce.
Goal
Add a practical test suite that covers pure logic with unit tests and high-value product flows with acceptance tests.
Proposed Scope
- Add unit tests for pure logic:
SuggestionTextNormalizer
SuggestionSessionReconciler
SuggestionRequestFactory
- model catalog/display-name mapping
- custom instruction formatting
- settings snapshot behavior
- Add tests for acceptance behavior once configurable acceptance modes exist.
- Add tests for app-disabled/paused states once those features exist.
- Add lightweight acceptance tests for end-to-end coordinator behavior using fake services.
- Avoid tests that require real Accessibility permission or real model downloads by default.
Acceptance Criteria
- The project has a test target or documented test command.
- Core pure helpers have unit coverage.
- Session reconciliation tests cover partial Tab acceptance and AX lag tolerance.
- Request construction tests cover Fast vs Use My Instructions behavior.
- Tests can run locally without requiring a downloaded GGUF model.
- CI or a documented local command can run the test suite.
Open Questions
- Should tests use XCTest only, or should we add a small fake-service harness for coordinator acceptance tests?
- Which coordinator flows are stable enough to test now versus after more refactors?
- Should UI tests be added later, or is service-level acceptance coverage enough for now?
Problem
Tabby's autocomplete behavior now spans focus snapshots, request construction, normalization, session reconciliation, acceptance, model selection, and UI state. Without tests, regressions in partial acceptance, caret quality handling, prompt construction, or model management are easy to introduce.
Goal
Add a practical test suite that covers pure logic with unit tests and high-value product flows with acceptance tests.
Proposed Scope
SuggestionTextNormalizerSuggestionSessionReconcilerSuggestionRequestFactoryAcceptance Criteria
Open Questions