[TASK-992a051e] fix: allow nullable assigned/reviewer agents in tasks table - #12
Closed
jsyqrt wants to merge 2 commits into
Closed
[TASK-992a051e] fix: allow nullable assigned/reviewer agents in tasks table#12jsyqrt wants to merge 2 commits into
jsyqrt wants to merge 2 commits into
Conversation
… table Two changes to fix SQLite test data isolation: 1. Schema: Remove NOT NULL from assigned_agent_id and reviewer_agent_id columns. This reflects the reality that tasks can exist without being assigned yet (e.g., pending tasks awaiting approval). 2. Repo: Apply ?? null fallback for assignedAgentId/reviewerAgentId in SqliteTaskRepo.create(). This prevents undefined being passed to the INSERT statement when those fields are omitted. 3. Tests: Add missing agent setup in TaskRepo and TaskLogRepo tests. The assigned_agent_id FK requires the agent to exist first.
…in TaskRepo/TaskLogRepo tests TaskRepo: remote HEAD already had agent-1+agent-2; fixed reviewer to use agent-1 TaskLogRepo: ensure agent creation includes roleId/roleName fields; remove invalid status field All 12 SQLite storage tests pass (12/12)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix SQLite test data isolation
Problem
SQLite tests failed with FOREIGN KEY constraint failed. Root cause:
tasks.assigned_agent_idcolumn hasNOT NULL + FKconstraint, but tasks were created without providing this field.Changes
1. Schema (sqlite-storage.ts)
NOT NULLfromassigned_agent_idandreviewer_agent_idcolumns2. Repo (sqlite-storage.ts)
data.assignedAgentId ?? nullinstead of baredata.assignedAgentIddata.reviewerAgentId ?? nullinstead of baredata.reviewerAgentId3. Tests (sqlite-storage.test.ts)
Test results
Related