kin: auto-commit after pipeline
This commit is contained in:
parent
824341a972
commit
e3a286ef6f
5 changed files with 1598 additions and 6 deletions
|
|
@ -31,13 +31,27 @@ def validate_completion_mode(value: str) -> str:
|
|||
return "review"
|
||||
|
||||
|
||||
# Columns that are stored as JSON strings and must be decoded on read.
|
||||
# Text fields (title, description, name, etc.) are NOT in this set.
|
||||
_JSON_COLUMNS: frozenset[str] = frozenset({
|
||||
"tech_stack",
|
||||
"brief", "spec", "review", "test_result", "security_result", "labels",
|
||||
"tags",
|
||||
"dependencies",
|
||||
"steps",
|
||||
"artifacts", "decisions_made", "blockers",
|
||||
"extra_json",
|
||||
"pending_actions",
|
||||
})
|
||||
|
||||
|
||||
def _row_to_dict(row: sqlite3.Row | None) -> dict | None:
|
||||
"""Convert sqlite3.Row to dict with JSON fields decoded."""
|
||||
if row is None:
|
||||
return None
|
||||
d = dict(row)
|
||||
for key, val in d.items():
|
||||
if isinstance(val, str) and val.startswith(("[", "{")):
|
||||
if key in _JSON_COLUMNS and isinstance(val, str) and val.startswith(("[", "{")):
|
||||
try:
|
||||
d[key] = json.loads(val)
|
||||
except (json.JSONDecodeError, ValueError):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue