mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-01-30 06:12:06 +00:00
fix: add explicit in_progress=False to all feature creation paths
Complete the defense-in-depth approach from PR #53 by adding explicit in_progress=False to all remaining feature creation locations. This ensures consistency with the MCP server pattern and prevents potential NULL values in the in_progress field. Changes: - server/routers/features.py: Add in_progress=False to create_feature() and create_features_bulk() endpoints - server/services/expand_chat_session.py: Add in_progress=False to _create_features_bulk() in the expand chat session - api/migration.py: Add in_progress field handling in JSON migration, reading from source data with False as default This follows up on PR #53 which added nullable=False constraints and fixed existing NULL values, but only updated the MCP server creation paths. Now all 6 feature creation locations explicitly set both passes=False and in_progress=False. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -82,6 +82,7 @@ def migrate_json_to_sqlite(
|
|||||||
description=feature_dict.get("description", ""),
|
description=feature_dict.get("description", ""),
|
||||||
steps=feature_dict.get("steps", []),
|
steps=feature_dict.get("steps", []),
|
||||||
passes=feature_dict.get("passes", False),
|
passes=feature_dict.get("passes", False),
|
||||||
|
in_progress=feature_dict.get("in_progress", False),
|
||||||
)
|
)
|
||||||
session.add(feature)
|
session.add(feature)
|
||||||
imported_count += 1
|
imported_count += 1
|
||||||
|
|||||||
@@ -175,6 +175,7 @@ async def create_feature(project_name: str, feature: FeatureCreate):
|
|||||||
description=feature.description,
|
description=feature.description,
|
||||||
steps=feature.steps,
|
steps=feature.steps,
|
||||||
passes=False,
|
passes=False,
|
||||||
|
in_progress=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
session.add(db_feature)
|
session.add(db_feature)
|
||||||
@@ -411,6 +412,7 @@ async def create_features_bulk(project_name: str, bulk: FeatureBulkCreate):
|
|||||||
description=feature_data.description,
|
description=feature_data.description,
|
||||||
steps=feature_data.steps,
|
steps=feature_data.steps,
|
||||||
passes=False,
|
passes=False,
|
||||||
|
in_progress=False,
|
||||||
)
|
)
|
||||||
session.add(db_feature)
|
session.add(db_feature)
|
||||||
session.flush() # Flush to get the ID immediately
|
session.flush() # Flush to get the ID immediately
|
||||||
|
|||||||
@@ -403,6 +403,7 @@ class ExpandChatSession:
|
|||||||
description=f.get("description", ""),
|
description=f.get("description", ""),
|
||||||
steps=f.get("steps", []),
|
steps=f.get("steps", []),
|
||||||
passes=False,
|
passes=False,
|
||||||
|
in_progress=False,
|
||||||
)
|
)
|
||||||
session.add(db_feature)
|
session.add(db_feature)
|
||||||
created_rows.append(db_feature)
|
created_rows.append(db_feature)
|
||||||
|
|||||||
Reference in New Issue
Block a user