generated from coulomb/repo-seed
Compare commits
2 Commits
a0dba9a96b
...
699ef15ee2
| Author | SHA1 | Date | |
|---|---|---|---|
| 699ef15ee2 | |||
| 24301ccd60 |
@@ -1,11 +1,10 @@
|
||||
# Repo classification (Repo Classification Standard v1.0).
|
||||
# First-pass agent classification (CUST-WP-0050 T02) — pending human review.
|
||||
|
||||
repo_classification:
|
||||
standard: Repo Classification Standard
|
||||
version: '1.0'
|
||||
classified_at: '2026-06-22'
|
||||
classified_by: agent
|
||||
classified_by: human
|
||||
category: tooling
|
||||
domain: infotech
|
||||
secondary_domains: []
|
||||
|
||||
@@ -28,6 +28,7 @@ def create_progress_router(
|
||||
*,
|
||||
topic_id: uuid.UUID | None = None,
|
||||
workstream_id: uuid.UUID | None = None,
|
||||
workplan_id: uuid.UUID | None = None,
|
||||
task_id: uuid.UUID | None = None,
|
||||
decision_id: uuid.UUID | None = None,
|
||||
event_type: str | None = None,
|
||||
@@ -37,9 +38,9 @@ def create_progress_router(
|
||||
offset: int = 0,
|
||||
) -> list[Any]:
|
||||
q = select(progress_model)
|
||||
scope_id = workplan_id if workplan_id is not None else workstream_id
|
||||
for field, value in (
|
||||
("topic_id", topic_id),
|
||||
("workstream_id", workstream_id),
|
||||
("task_id", task_id),
|
||||
("decision_id", decision_id),
|
||||
):
|
||||
@@ -51,6 +52,16 @@ def create_progress_router(
|
||||
detail=f"Progress events do not support filtering by {field}",
|
||||
)
|
||||
q = q.where(column == value)
|
||||
if scope_id is not None:
|
||||
column = getattr(progress_model, "workplan_id", None) or getattr(
|
||||
progress_model, "workstream_id", None
|
||||
)
|
||||
if column is None:
|
||||
raise HTTPException(
|
||||
status_code=400,
|
||||
detail="Progress events do not support filtering by workplan_id",
|
||||
)
|
||||
q = q.where(column == scope_id)
|
||||
if event_type:
|
||||
q = q.where(progress_model.event_type == event_type)
|
||||
if event_types is not None:
|
||||
@@ -66,6 +77,7 @@ def create_progress_router(
|
||||
async def list_progress(
|
||||
topic_id: uuid.UUID | None = None,
|
||||
workstream_id: uuid.UUID | None = None,
|
||||
workplan_id: uuid.UUID | None = None,
|
||||
task_id: uuid.UUID | None = None,
|
||||
decision_id: uuid.UUID | None = None,
|
||||
event_type: str | None = None,
|
||||
@@ -78,6 +90,7 @@ def create_progress_router(
|
||||
session,
|
||||
topic_id=topic_id,
|
||||
workstream_id=workstream_id,
|
||||
workplan_id=workplan_id,
|
||||
task_id=task_id,
|
||||
decision_id=decision_id,
|
||||
event_type=event_type,
|
||||
|
||||
Reference in New Issue
Block a user