From e593f578843dd349bcb1498b1de6e79819cf5b0e Mon Sep 17 00:00:00 2001 From: Oleksandr Bezdieniezhnykh Date: Mon, 23 Mar 2026 14:09:15 +0200 Subject: [PATCH] Update annotation class to make 'time' attribute public and enhance video time formatting in the main processing function. Adjust documentation to reflect changes in test batch progression. --- _docs/_autopilot_state.md | 6 +++--- annotation.pxd | 2 +- main.py | 6 +++++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/_docs/_autopilot_state.md b/_docs/_autopilot_state.md index d2b5e37..031168e 100644 --- a/_docs/_autopilot_state.md +++ b/_docs/_autopilot_state.md @@ -4,7 +4,7 @@ step: 2e name: Implement Tests status: in_progress -sub_step: Batch 1 — AZ-138 test_infrastructure +sub_step: Batch 2a — AZ-139, AZ-140, AZ-141, AZ-142 retry_count: 0 ## Step ↔ SubStep Reference @@ -47,9 +47,9 @@ retry_count: 0 ## Last Session date: 2026-03-23 -ended_at: Step 2d Decompose Tests — completed +ended_at: Step 2e Implement Tests — Batch 1 complete, Batch 2a starting reason: session boundary -notes: Decompose complete, implementation ready. 11 tasks, 35 complexity points, 3 batches. Next step: Implement Tests (Step 2e) via /implement skill. +notes: Batch 1 (AZ-138 test_infrastructure) committed and pushed. AZ-138 transitioned to In Testing. AZ-139, AZ-140, AZ-141, AZ-142 transitioned to In Progress on Jira. Next: launch 4 implementer agents for Batch 2a (AZ-139, AZ-140, AZ-141, AZ-142), then Batch 2b (AZ-144, AZ-146, AZ-147), then Batch 3 (AZ-143, AZ-145, AZ-148). Jira cloudId: 1598226f-845f-4705-bcd1-5ed0c82d6119. Transition IDs: In Progress=21, In Testing=32, Done=31. ## Blockers - none diff --git a/annotation.pxd b/annotation.pxd index 8bfc0bc..c841d10 100644 --- a/annotation.pxd +++ b/annotation.pxd @@ -8,7 +8,7 @@ cdef class Detection: cdef class Annotation: cdef public str name cdef public str original_media_name - cdef long time + cdef public long time cdef public list[Detection] detections cdef public bytes image diff --git a/main.py b/main.py index 5852c2f..1e8d3f5 100644 --- a/main.py +++ b/main.py @@ -177,10 +177,14 @@ def _post_annotation_to_service(token_mgr: TokenManager, media_id: str, try: token = token_mgr.get_valid_token() image_b64 = base64.b64encode(annotation.image).decode() if annotation.image else None + total_seconds = annotation.time // 1000 if annotation.time else 0 + hours = total_seconds // 3600 + minutes = (total_seconds % 3600) // 60 + seconds = total_seconds % 60 payload = { "mediaId": media_id, "source": 0, - "videoTime": f"00:00:{annotation.time // 1000:02d}" if annotation.time else "00:00:00", + "videoTime": f"{hours:02d}:{minutes:02d}:{seconds:02d}", "detections": [d.model_dump() for d in dtos], } if image_b64: