Phase 02 plans 02-01, 02-02, 02-03: - fix(02-01): dead condition in AllegroShipmentService ZPL page size Both ternary branches returned 'A6'; ZPL now correctly returns 'ZPL' - fix(02-02): add last_status_checked_at cursor to AllegroStatusSyncService New migration adds orders.last_status_checked_at DATETIME NULL with composite index (source, source_updated_at). findOrdersNeedingStatusSync() filters by cursor; markOrderStatusChecked() records timestamp on success. - fix(02-03): replace AllegroOrderSyncStateRepository in ShopproOrdersSyncService New ShopproOrderSyncStateRepository (same table, correct class name). Application.php wires correct repository to correct service. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4.0 KiB
4.0 KiB
phase, plan, subsystem, tags, requires, provides, affects, tech-stack, key-files, key-decisions, patterns-established, duration, started, completed
| phase | plan | subsystem | tags | requires | provides | affects | tech-stack | key-files | key-decisions | patterns-established | duration | started | completed | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 02-bug-fixes | 03 | settings, dependency-injection |
|
|
|
shoppro-sync, application-wiring |
|
|
|
|
~20min | 2026-03-13T00:00:00Z | 2026-03-13T00:00:00Z |
Phase 02 Plan 03: ShopproOrderSyncStateRepository
Wydzielono ShopproOrderSyncStateRepository — ShopproOrdersSyncService nie zależy już od klasy Allegro.
Performance
| Metric | Value |
|---|---|
| Duration | ~20min |
| Started | 2026-03-13 |
| Completed | 2026-03-13 |
| Tasks | 3/3 completed |
| Files modified | 3 (1 new, 2 modified) |
Acceptance Criteria Results
| Criterion | Status | Notes |
|---|---|---|
| AC-1: ShopproOrdersSyncService nie zależy od AllegroOrderSyncStateRepository | Pass | 0 wystąpień w pliku |
| AC-2: ShopproOrdersSyncService używa ShopproOrderSyncStateRepository | Pass | Konstruktor linia 16 |
| AC-3: ShopproOrderSyncStateRepository ma identyczny kontrakt publiczny | Pass | getState, markRunStarted, markRunSuccess, markRunFailed |
| AC-4: Application.php wstrzykuje ShopproOrderSyncStateRepository | Pass | Linia 302 |
| AC-5: Brak regresji — ta sama tabela, ta sama logika | Pass | Kod identyczny, tylko nazwa klasy |
Accomplishments
- Nowy
ShopproOrderSyncStateRepository— identyczny kontrakt publiczny zAllegroOrderSyncStateRepository - Poprawna zależność w
ShopproOrdersSyncService(zmiana jednego typehinta w konstruktorze) Application.phpwstrzykuje właściwe repozytorium do właściwego serwisuAllegroOrderSyncStateRepositoryzachowany nienaruszony — nadal używany przezAllegroOrdersSyncService
Files Created/Modified
| File | Change | Purpose |
|---|---|---|
src/Modules/Settings/ShopproOrderSyncStateRepository.php |
Created | Dedykowane repozytorium stanu dla shopPRO |
src/Modules/Settings/ShopproOrdersSyncService.php |
Modified | Zamiana typehinta w konstruktorze |
src/Core/Application.php |
Modified | Nowy import + zamiana wstrzyknięcia |
Decisions Made
| Decision | Rationale | Impact |
|---|---|---|
| Pełna kopia kodu zamiast abstrakcji | Ekstrakcja interfejsu/klasy bazowej poza zakresem planu (granica BOUNDARIES) | Tech debt: przyszła zmiana logiki = dwa miejsca do edycji |
| Ta sama tabela DB | integration_id-scoping zapewnia izolację bez nowego schematu |
Zero risk migracji, brak destrukcji danych |
Deviations from Plan
None — plan wykonany dokładnie jak napisano.
Issues Encountered
None.
Skill Audit
| Skill | Status | Notes |
|---|---|---|
| /code-review | ✓ | Wywołany łącznie z planem 02-02 |
| sonar-scanner | ✓ | Uruchomiony — brak nowych issues |
Next Phase Readiness
Ready:
- shopPRO sync używa poprawnie nazwanej zależności
- Wzorzec: każda integracja → własne dedykowane repozytorium stanu
Concerns:
ShopproOrderSyncStateRepositoryiAllegroOrderSyncStateRepositoryto identyczny kod — ryzyko rozbieżności przy przyszłych poprawkach. Do zaadresowania w osobnym planie (ekstrakcja wspólnej klasy bazowej).
Blockers: None
Phase: 02-bug-fixes, Plan: 03 Completed: 2026-03-13