kin: KIN-ARCH-008 Конфигурируемая test_command на уровне проекта
This commit is contained in:
parent
538af5b799
commit
6eea439c16
3 changed files with 24 additions and 19 deletions
22
core/db.py
22
core/db.py
|
|
@ -612,16 +612,18 @@ def _migrate(conn: sqlite3.Connection):
|
||||||
conn.commit()
|
conn.commit()
|
||||||
|
|
||||||
# Migrate pipelines: add parent_pipeline_id and department columns (KIN-098)
|
# Migrate pipelines: add parent_pipeline_id and department columns (KIN-098)
|
||||||
pipeline_cols = {r[1] for r in conn.execute("PRAGMA table_info(pipelines)").fetchall()}
|
# Guard: table may not exist in legacy schemas without pipelines (old test fixtures)
|
||||||
if "parent_pipeline_id" not in pipeline_cols:
|
if "pipelines" in existing_tables:
|
||||||
conn.execute("ALTER TABLE pipelines ADD COLUMN parent_pipeline_id INTEGER REFERENCES pipelines(id)")
|
pipeline_cols = {r[1] for r in conn.execute("PRAGMA table_info(pipelines)").fetchall()}
|
||||||
conn.commit()
|
if "parent_pipeline_id" not in pipeline_cols:
|
||||||
if "department" not in pipeline_cols:
|
conn.execute("ALTER TABLE pipelines ADD COLUMN parent_pipeline_id INTEGER REFERENCES pipelines(id)")
|
||||||
conn.execute("ALTER TABLE pipelines ADD COLUMN department TEXT")
|
conn.commit()
|
||||||
conn.commit()
|
if "department" not in pipeline_cols:
|
||||||
if "pid" not in pipeline_cols:
|
conn.execute("ALTER TABLE pipelines ADD COLUMN department TEXT")
|
||||||
conn.execute("ALTER TABLE pipelines ADD COLUMN pid INTEGER")
|
conn.commit()
|
||||||
conn.commit()
|
if "pid" not in pipeline_cols:
|
||||||
|
conn.execute("ALTER TABLE pipelines ADD COLUMN pid INTEGER")
|
||||||
|
conn.commit()
|
||||||
|
|
||||||
# Create department_handoffs table (KIN-098)
|
# Create department_handoffs table (KIN-098)
|
||||||
if "department_handoffs" not in existing_tables:
|
if "department_handoffs" not in existing_tables:
|
||||||
|
|
|
||||||
|
|
@ -394,22 +394,19 @@ class TestPmPromptStatusFieldConsistency:
|
||||||
"Issue 3 has been fixed — update or remove this test."
|
"Issue 3 has been fixed — update or remove this test."
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_pm_prompt_mentions_status_values_after_example(self):
|
def test_pm_prompt_does_not_mention_status_values_after_example(self):
|
||||||
"""Line after main example mentions 'Valid values for status: done, blocked'.
|
"""Orphaned 'Valid values for status' line was removed from pm.md.
|
||||||
|
|
||||||
Documents that this note appears AFTER the main example, causing ambiguity.
|
Issue 3 fixed: the ambiguous note that appeared after the main JSON example
|
||||||
|
and referenced a 'status' field absent from that example has been deleted.
|
||||||
"""
|
"""
|
||||||
with open("agents/prompts/pm.md") as f:
|
with open("agents/prompts/pm.md") as f:
|
||||||
content = f.read()
|
content = f.read()
|
||||||
|
|
||||||
assert 'Valid values for `status`' in content, (
|
assert 'Valid values for `status`' not in content, (
|
||||||
"Expected 'Valid values for `status`' in pm.md — did the prompt change?"
|
"Orphaned 'Valid values for `status`' line was re-introduced in pm.md"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Confirm it references done and blocked
|
|
||||||
assert '"done"' in content
|
|
||||||
assert '"blocked"' in content
|
|
||||||
|
|
||||||
def test_pm_blocked_protocol_example_uses_reason_not_blocked_reason(self):
|
def test_pm_blocked_protocol_example_uses_reason_not_blocked_reason(self):
|
||||||
"""The Blocked Protocol JSON example uses 'reason' (not 'blocked_reason').
|
"""The Blocked Protocol JSON example uses 'reason' (not 'blocked_reason').
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -696,6 +696,12 @@ async function addDecision() {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Upload warning banner -->
|
||||||
|
<div v-if="uploadWarning" class="mb-4 px-4 py-3 border border-yellow-700 bg-yellow-950/30 rounded flex items-start justify-between gap-2">
|
||||||
|
<p class="text-sm text-yellow-300">⚠ {{ uploadWarning }}</p>
|
||||||
|
<button @click="uploadWarning = ''" class="text-gray-600 hover:text-gray-400 bg-transparent border-none cursor-pointer text-xs shrink-0">✕</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Tabs -->
|
<!-- Tabs -->
|
||||||
<div class="flex gap-1 mb-4 border-b border-gray-800">
|
<div class="flex gap-1 mb-4 border-b border-gray-800">
|
||||||
<button v-for="tab in (['tasks', 'phases', 'decisions', 'modules', 'kanban', 'environments'] as const)" :key="tab"
|
<button v-for="tab in (['tasks', 'phases', 'decisions', 'modules', 'kanban', 'environments'] as const)" :key="tab"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue