--- phase: 50-allegro-shipment-waybill-push plan: 01 status: completed completed: 2026-03-28 --- # Phase 50 Plan 01 Summary ## Result - Dodano automatyczny push numeru przesylki do Allegro (`POST /order/checkout-forms/{id}/shipments`) po uzyskaniu `tracking_number`. - Push wykonuje sie tylko dla zamowien Allegro (`orders.source='allegro'`) z niepustym `source_order_id`. - Blad pushu jest niekrytyczny - lokalna paczka pozostaje utworzona. - Dodano retry pushu po `ALLEGRO_HTTP_401` z odswiezeniem tokenu. ## Acceptance Criteria - AC-1: Pass - AC-2: Pass - AC-3: Pass - AC-4: Pass ## Verification - `C:\xampp\php\php.exe -l src/Modules/Shipments/AllegroShipmentService.php` PASS - `C:\xampp\php\php.exe -l tests/Unit/AllegroShipmentServiceTest.php` PASS - `C:\xampp\php\php.exe vendor/bin/phpunit --filter AllegroShipmentServiceTest --testdox` PASS (4 tests, 54 assertions) - `sonar-scanner` PASS (analysis successful): https://sonar.project-pro.pl/dashboard?id=orderPRO ## Files - `src/Modules/Shipments/AllegroShipmentService.php` - `tests/Unit/AllegroShipmentServiceTest.php` - `DOCS/ARCHITECTURE.md` - `DOCS/TECH_CHANGELOG.md` ## Notes - Brak zmian schematu DB. - Brak checkpointow manualnych (plan autonomiczny).