feat: code quality audit + autoresearch integration + infra hardening (#150)

This commit is contained in:
Alexander Whitestone
2026-03-08 12:50:44 -04:00
committed by GitHub
parent fd0ede0d51
commit ae3bb1cc21
186 changed files with 5129 additions and 3289 deletions

View File

@@ -9,14 +9,17 @@ def test_work_orders_page_returns_200(client):
def test_submit_work_order(client):
"""POST /work-orders/submit creates a work order."""
response = client.post("/work-orders/submit", data={
"title": "Fix the dashboard",
"description": "Details here",
"priority": "high",
"category": "bug",
"submitter": "dashboard",
"related_files": "src/app.py",
})
response = client.post(
"/work-orders/submit",
data={
"title": "Fix the dashboard",
"description": "Details here",
"priority": "high",
"category": "bug",
"submitter": "dashboard",
"related_files": "src/app.py",
},
)
assert response.status_code == 200
@@ -34,12 +37,15 @@ def test_active_partial_returns_200(client):
def test_submit_and_list_roundtrip(client):
"""Submitting a work order makes it appear in the pending section."""
client.post("/work-orders/submit", data={
"title": "Roundtrip WO",
"priority": "medium",
"category": "suggestion",
"submitter": "test",
})
client.post(
"/work-orders/submit",
data={
"title": "Roundtrip WO",
"priority": "medium",
"category": "suggestion",
"submitter": "test",
},
)
response = client.get("/work-orders/queue/pending")
assert "Roundtrip WO" in response.text
@@ -47,15 +53,19 @@ def test_submit_and_list_roundtrip(client):
def test_approve_work_order(client):
"""POST /work-orders/{id}/approve changes status."""
# Submit one first
client.post("/work-orders/submit", data={
"title": "To approve",
"priority": "medium",
"category": "suggestion",
"submitter": "test",
})
client.post(
"/work-orders/submit",
data={
"title": "To approve",
"priority": "medium",
"category": "suggestion",
"submitter": "test",
},
)
# Get ID from pending
pending = client.get("/work-orders/queue/pending")
import re
match = re.search(r'id="wo-([^"]+)"', pending.text)
if match:
wo_id = match.group(1)