summaryrefslogtreecommitdiff
path: root/Omni/Task/RaceTest.hs
AgeCommit message (Collapse)Author
2025-11-30Add task complexity field and model selectionBen Sima
All tests pass. Let me summarize the changes made: - Added `taskComplexity :: Maybe Int` field to the `Task` data type (1-5 - Updated SQL schema to include `complexity INTEGER` column - Updated `FromRow` and `ToRow` instances to handle the new field - Updated `tasksColumns` migration spec for automatic schema migration - Updated `saveTask` to include complexity in SQL INSERT - Updated `createTask` signature to accept `Maybe Int` for complexity - Added `--complexity=<c>` option to the docopt help string - Added complexity parsing in `create` command (validates 1-5 range) - Added complexity parsing in `edit` command - Updated `modifyFn` in edit to handle complexity updates - Updated all unit tests to use new `createTask` signature with complexi - Added CLI tests for `--complexity` flag parsing - Added unit tests for complexity field storage and persistence - Updated `selectModel` to use `selectModelByComplexity` based on task c - Added `selectModelByComplexity :: Maybe Int -> Text` function with map - `Nothing` or 3-4 → `anthropic/claude-sonnet-4-20250514` (default) - 1-2 → `anthropic/claude-haiku` (trivial/low complexity) - 5 → `anthropic/claude-opus-4-20250514` (expert complexity) - Updated `createTask` calls to include `Nothing` for complexity Task-Id: t-141.5
2025-11-28Make task description a required field on createBen Sima
All tests pass. The changes are complete: **Summary of changes:** 1. **Omni/Task/Core.hs**: Changed `taskDescription` from `Maybe Text` to 2. **Omni/Task.hs**: Made `--description` required on CLI `create` (pani 3. **Omni/Task/RaceTest.hs**: Updated test to provide descriptions Task-Id: t-165
2025-11-26Move test database to _/tmp (cabdir)Ben Sima
- Document _/ directory structure in AGENTS.md - Change test database path from .tasks/ to _/tmp/ - Update all references in tests and docs
2025-11-26Fix test database isolation: TASK_TEST_MODE takes precedenceBen Sima
Tests were polluting production database because TASK_DB_PATH took precedence over TASK_TEST_MODE. Now test mode always uses .tasks/tasks-test.db regardless of TASK_DB_PATH setting.
2025-11-24fix(task): ensure thread safety and isolate testsBen Sima
Re-introduces MVar locking in Task Core to prevent race conditions during Read-Modify-Write cycles (e.g. ID generation). Updates tests to use isolated SQLite databases instead of the production DB or JSONL files. Removes legacy test artifacts. Amp-Thread-ID: https://ampcode.com/threads/T-ac41b9b6-d117-46de-9e4f-842887a22f1d Co-authored-by: Amp <amp@ampcode.com>
2025-11-22fix: cleanup test artifact in Omni/Task/RaceTest.hsBen Sima
Amp-Thread-ID: https://ampcode.com/threads/T-ca3b086b-5a85-422a-b13d-256784c04221 Co-authored-by: Amp <amp@ampcode.com>
2025-11-21feat: add description field to tasksOmni Worker
Amp-Thread-ID: https://ampcode.com/threads/T-79499d9e-f4f4-40de-893c-524c32a45483 Co-authored-by: Amp <amp@ampcode.com>
2025-11-21style: fix lintingOmni Worker
Amp-Thread-ID: https://ampcode.com/threads/T-79499d9e-f4f4-40de-893c-524c32a45483 Co-authored-by: Amp <amp@ampcode.com>
2025-11-21feat: implement t-1fKn9oBen Sima