Refactor task management structure and update documentation

- Changed the directory structure for task specifications to include a dedicated `todo/` folder within `_docs/02_tasks/` for tasks ready for implementation.
- Updated references in various skills and documentation to reflect the new task lifecycle, including changes in the `implementer` and `decompose` skills.
- Enhanced the README and flow documentation to clarify the new task organization and its implications for the implementation process.

These updates improve task management clarity and streamline the implementation workflow.
This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-03-28 01:17:45 +02:00
parent 8c665bd0a4
commit cbf370c765
35 changed files with 1348 additions and 58 deletions
@@ -0,0 +1,64 @@
# Annotation Queue Message Tests
**Task**: AZ-163_test_annotation_queue
**Name**: Annotation Queue Message Tests
**Description**: Implement 5 tests for annotation queue message parsing — Created, Validated bulk, Deleted bulk, malformed handling
**Complexity**: 2 points
**Dependencies**: AZ-152_test_infrastructure
**Component**: Blackbox Tests
**Jira**: AZ-163
**Epic**: AZ-151
## Problem
The annotation queue processes msgpack-encoded messages from RabbitMQ Streams. Tests must verify correct parsing of all message types and graceful handling of malformed input.
## Outcome
- 5 passing pytest tests in `tests/test_annotation_queue.py`
## Scope
### Included
- BT-AQM-01: Parse Created annotation message (all fields populated correctly)
- BT-AQM-02: Parse Validated bulk message (status == Validated, names list matches)
- BT-AQM-03: Parse Deleted bulk message (status == Deleted, names list matches)
- BT-AQM-04: Malformed message raises exception
- RT-AQM-01: Malformed msgpack bytes handled (exception caught, no crash)
### Excluded
- Live RabbitMQ Streams connection (requires external service)
- Queue offset persistence (requires live broker)
## Acceptance Criteria
**AC-1: Created message**
Given msgpack bytes matching AnnotationMessage schema (status=Created, role=Validator)
When decoded and constructed
Then all fields populated: name, detections, image bytes, status == "Created", role == "Validator"
**AC-2: Validated bulk**
Given msgpack bytes with status=Validated, list of names
When decoded and constructed
Then status == "Validated", names list matches input
**AC-3: Deleted bulk**
Given msgpack bytes with status=Deleted, list of names
When decoded and constructed
Then status == "Deleted", names list matches input
**AC-4: Malformed msgpack**
Given invalid msgpack bytes
When decode is attempted
Then exception raised
**AC-5: Resilient handling**
Given random bytes (not valid msgpack)
When passed to message handler
Then exception caught, handler doesn't crash
## Constraints
- Msgpack messages constructed in-memory at test time
- Must match the AnnotationMessage/AnnotationBulkMessage schemas from annotation-queue/
- Resilience test marked: `@pytest.mark.resilience`