fix: exclude exported cases from stale; add weekly-feedback-job handler to CEO
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 8s
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 8s
- /api/cases/stale: exclude 'exported' status — exported cases await Dafna's review intentionally, they are not stuck - legal-ceo.md: add routing for weekly-feedback-job reason + explicit handler (analyze feedback, update decision-lessons.md, close issue) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1137,7 +1137,7 @@ async def list_cases(
|
||||
|
||||
@app.get("/api/cases/stale")
|
||||
async def api_stale_cases(days: int = 3):
|
||||
"""Return cases that haven't been updated in N days and are not in 'final' or 'new' status."""
|
||||
"""Return cases that haven't been updated in N days and are not in a terminal/waiting status."""
|
||||
if days <= 0:
|
||||
return {"cases": [], "total": 0}
|
||||
pool = await db.get_pool()
|
||||
@@ -1147,7 +1147,7 @@ async def api_stale_cases(days: int = 3):
|
||||
SELECT case_number, title, status,
|
||||
EXTRACT(DAY FROM (now() - updated_at))::int AS days_stale
|
||||
FROM cases
|
||||
WHERE status NOT IN ('final', 'new')
|
||||
WHERE status NOT IN ('final', 'new', 'exported')
|
||||
AND updated_at < now() - make_interval(days => $1)
|
||||
ORDER BY updated_at ASC -- oldest stale first (longest overdue = highest priority)
|
||||
""",
|
||||
|
||||
Reference in New Issue
Block a user