feat: add quality_review task status and qualityReview initiative flag

Adds two new fields to the database and propagates them through the
repository layer:

- Task status enum gains 'quality_review' (between in_progress and
  completed), enabling a QA gate before tasks are marked complete.
- initiatives.quality_review (INTEGER DEFAULT 0) lets an initiative be
  flagged for quality-review workflow without a data migration (existing
  rows default to false).

Includes:
- Schema changes in schema.ts
- Migration 0037 (ALTER TABLE initiatives ADD quality_review)
- Snapshot chain repaired: deleted stale 0036 snapshot, fixed 0035
  prevId to create a linear chain (0032 → 0034 → 0035), then generated
  clean 0037 snapshot
- Repository adapter already uses SELECT * / spread-update pattern so
  no adapter code changes were needed
- Initiative and task repository tests extended with qualityReview /
  quality_review_status describe blocks (7 new tests)
- docs/database.md updated

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lukas May
2026-03-06 21:47:34 +01:00
parent c150f26d4a
commit 5137a60e70
8 changed files with 1103 additions and 193 deletions

View File

@@ -0,0 +1 @@
ALTER TABLE `initiatives` ADD `quality_review` integer DEFAULT false NOT NULL;

View File

@@ -2,7 +2,7 @@
"version": "6",
"dialect": "sqlite",
"id": "c84e499f-7df8-4091-b2a5-6b12847898bd",
"prevId": "5fbe1151-1dfb-4b0c-a7fa-2177369543fd",
"prevId": "443071fe-31d6-498a-9f4a-4a3ff24a46fc",
"tables": {
"accounts": {
"name": "accounts",
@@ -238,6 +238,13 @@
"notNull": false,
"autoincrement": false
},
"prompt": {
"name": "prompt",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"exit_code": {
"name": "exit_code",
"type": "integer",

View File

@@ -260,6 +260,13 @@
"when": 1772798869413,
"tag": "0036_icy_silvermane",
"breakpoints": true
},
{
"idx": 37,
"version": "6",
"when": 1772829916655,
"tag": "0037_worthless_princess_powerful",
"breakpoints": true
}
]
}
}