chore(milestone): complete v0.1 Initial Release — archive, MILESTONES.md, ROADMAP reorganized

v0.1 Initial Release: 6 phases, 15 plans complete.
- Created .paul/MILESTONES.md with milestone entry
- Archived to .paul/milestones/v0.1-ROADMAP.md
- ROADMAP.md reorganized (milestone collapsed to Completed section)
- STATE.md cleared for next milestone

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 17:29:57 +01:00
parent aaa5d2fc25
commit e01b68f559
4 changed files with 146 additions and 68 deletions

55
.paul/MILESTONES.md Normal file
View File

@@ -0,0 +1,55 @@
# Milestones
Completed milestone log for this project.
| Milestone | Completed | Duration | Stats |
|-----------|-----------|----------|-------|
| v0.1 Initial Release | 2026-03-13 | 2 days | 6 phases, 15 plans |
---
## ✅ v0.1 Initial Release
**Completed:** 2026-03-13
**Duration:** 2 days (2026-03-12 → 2026-03-13)
### Stats
| Metric | Value |
|--------|-------|
| Phases | 6 |
| Plans | 15 |
| Files changed | ~45 |
### Key Accomplishments
- **AllegroTokenManager** wydzielony z 4 klas — usunięto ~85 linii duplikatu logiki OAuth
- **StringHelper** centralizuje 19 kopii helperów (nullableString, normalizeDateTime, normalizeColorHex) z 15+ klas
- **CronHandlerFactory** jako jedyne miejsce kompozycji crona — naprawiono rozbieżność Application.php / bin/cron.php + 2 bugi w zależnościach
- **ZPL label page size** naprawiony — martwy warunek `'ZPL' ? 'A6' : 'A6'``'ZPL' ? 'A6' : 'A4'`
- **AllegroStatusSyncService** — kursor `last_status_checked_at` eliminuje skanowanie wszystkich zamówień
- **ShopproOrderSyncStateRepository** — poprawna zależność (poprzednio używano Allegro repo)
- **CSRF standardization** — `_csrf_token``_token` w całym projekcie
- **5 kompensujących migracji** zaadnotowanych — DB_SCHEMA.md ma sekcję Compensating Migrations
- **Flash::set()/Flash::get()** — 10 bezpośrednich `$_SESSION` writes zastąpiono w kontrolerach
- **Typowane wyjątki** — hierarchia OrderProException (6 klas) eliminuje 95× RuntimeException
- **Stałe IntegrationSources + RedirectPaths** — 40+ powtarzających się literałów zebranych w 2 klasy
- **Złożoność kognitywna** — loadDeliveryServices() w 2 kontrolerach spłaszczone z 5 do 2 poziomów zagnieżdżenia
- **ShopproOrdersSyncService** podzielony 39→9 metod via ShopproOrderMapper + ShopproProductImageResolver
- **AllegroIntegrationController** podzielony 35→25 metod via 2 nowe kontrolery mapowań
- **SonarQube S1448** zredukowane 6x → 2x; S112 z 95x do 0; S1192 z 40x do 0
### Key Decisions
| Decision | Rationale |
|----------|-----------|
| AllegroTokenManager wydzielony z 4 klas | Eliminacja duplikacji logiki odświeżania tokenów |
| StringHelper jako final static class | Centralizacja 19 kopii helperów |
| CronHandlerFactory — jedyne miejsce kompozycji crona | Synchronizacja Application.php i bin/cron.php |
| CSRF pole: `_token` (nie `_csrf_token`) | Standard dla całego projektu |
| Flash::set()/Flash::get() zamiast $_SESSION | Jeden mechanizm flash w całej aplikacji |
| validateXxxInput(): ?string / validateXxxAccess(): ?Response | Wzorzec helperów walidacji — ≤3 return statements |
| God class split via move-method | Czysty podział bez zmiany logiki — ShopproOrdersSyncService 39→9 metod |
| AllegroIntegrationController pozostaje przy 25 metodach | Pełny podział wymaga AllegroImportScheduleService — deferred |
---

View File

@@ -6,62 +6,32 @@ orderPRO to narzędzie do wielokanałowego zarządzania sprzedażą. Projekt prz
## Current Milestone
**v0.1 Initial Release** (v0.1.0)
Status: ✅ Complete
Phases: 6/6 complete
Brak aktywnego milestone.
## Phases
Run `/paul:discuss-milestone` lub `/paul:milestone` aby zdefiniować v0.2.
| Phase | Name | Plans | Status | Completed |
|-------|------|-------|--------|-----------|
| 1 | Tech Debt | 2/2 | ✅ Complete | 2026-03-12 |
| 2 | Bug Fixes | 4/4 | ✅ Complete | 2026-03-13 |
| 3 | Tech Debt 2 | 1/1 | ✅ Complete | 2026-03-13 |
| 4 | Schema Docs | 1/1 | ✅ Complete | 2026-03-13 |
| 5 | Tech Debt 3 | 1/1 | ✅ Complete | 2026-03-13 |
| 6 | SonarQube Quality | 6/6 | ✅ Complete | 2026-03-13 |
## Next Milestone
## Phase Details
> Niezdefiniowany. Uruchom `/paul:discuss-milestone` aby omówić zakres lub `/paul:milestone` aby stworzyć bezpośrednio.
### Phase 1 — Tech Debt
Naprawa krytycznych problemów technicznych zidentyfikowanych w mapie kodu (`.paul/codebase/CONCERNS.md`).
## Completed Milestones
- **Plan 01-01** — Extract AllegroTokenManager (OAuth duplication HIGH × 4 classes) — *Complete*
- **Plan 01-02** — Extract StringHelper (duplicated helpers HIGH × 15 classes) — *Complete*
<details>
<summary>v0.1 Initial Release — 2026-03-13 (6 phases, 15 plans)</summary>
### Phase 2 — Bug Fixes
Naprawa zidentyfikowanych błędów z `.paul/codebase/CONCERNS.md`.
| Phase | Name | Plans | Completed |
|-------|------|-------|-----------|
| 1 | Tech Debt | 2/2 | 2026-03-12 |
| 2 | Bug Fixes | 4/4 | 2026-03-13 |
| 3 | Tech Debt 2 | 1/1 | 2026-03-13 |
| 4 | Schema Docs | 1/1 | 2026-03-13 |
| 5 | Tech Debt 3 | 1/1 | 2026-03-13 |
| 6 | SonarQube Quality | 6/6 | 2026-03-13 |
- **Plan 02-01** — Naprawa martwego warunku ZPL page size w AllegroShipmentService — *Complete*
- **Plan 02-02** — Kursor `last_status_checked_at` w AllegroStatusSyncService (no time-based cursor) — *Complete*
- **Plan 02-03** — `ShopproOrdersSyncService` używa `AllegroOrderSyncStateRepository` (błędna zależność) — *Complete*
- **Plan 02-04** — `Application.php` ręcznie buduje graf obiektów crona (duplikacja, rozbieżność z bin/cron.php) — *Complete*
Archive: `.paul/milestones/v0.1-ROADMAP.md`
### Phase 3 — Tech Debt 2
Ustandaryzowanie niespójności technicznych zidentyfikowanych w `.paul/codebase/CONCERNS.md`.
- **Plan 03-01** — CSRF Token Field Name Inconsistency — `_csrf_token``_token` w OrdersController, ShipmentController i ich widokach — *Complete*
### Phase 4 — Schema Docs
Adnotacja 5 migracji kompensujących `ensure_*` i aktualizacja dokumentacji schematu.
- **Plan 04-01** — Annotate ensure_* compensating migrations — *Complete*
### Phase 5 — Tech Debt 3
Migracja flash messages z bezpośrednich zapisów `$_SESSION` do abstrakcji `Flash::set()`/`Flash::get()`.
- **Plan 05-01** — Migrate $_SESSION flash writes to Flash class in OrdersController and ShipmentController — *Complete*
### Phase 6 — SonarQube Quality
Eliminacja 327 issues SonarQube (php:S112, S1142, S1192, S3776, S1448, S138) przez typowane wyjątki, ekstrakcję stałych, redukcję złożoności i podział god classes.
- **Plan 06-01** — php:S112 (95x) — Typowane klasy wyjątków zamiast RuntimeException — *Complete*
- **Plan 06-02** — php:S1142 (57x) — Redukcja liczby return w metodach — *Complete*
- **Plan 06-03** — php:S1192 (40x) — Ekstrakcja powtarzających się literałów do stałych — *Complete*
- **Plan 06-04** — php:S3776 (31x) — Redukcja złożoności kognitywnej metod — *Complete*
- **Plan 06-05** — php:S1448 (6x) — Podział god classes (ShopproOrdersSyncService, AllegroIntegrationController) — *Complete*
- **Plan 06-06** — php:S138 (4x) — Skrócenie zbyt długich metod — *Complete*
</details>
---
*Roadmap created: 2026-03-12*
*Last updated: 2026-03-13 after Phase 6 complete — milestone v0.1 Initial Release DONE*
*Last updated: 2026-03-13 — milestone v0.1 complete, awaiting v0.2 definition*

View File

@@ -5,31 +5,25 @@
See: .paul/PROJECT.md (updated 2026-03-12)
**Core value:** Sprzedawca może obsługiwać zamówienia ze wszystkich kanałów sprzedaży i nadawać przesyłki bez przełączania się między platformami.
**Current focus:** Milestone v0.1 Initial Release — COMPLETE. Gotowy do /paul:complete-milestone lub nowego milestone.
**Current focus:** Awaiting next milestone. v0.1 complete — uruchom /paul:discuss-milestone lub /paul:milestone.
## Current Position
Milestone: v0.1 Initial Release — ✅ COMPLETE
Phase: 6 of 6 (06-sonarqube-quality) — Complete
Plan: Wszystkie 6/6 planów zamknięte
Status: Milestone complete — ready for /paul:complete-milestone
Last activity: 2026-03-13 — Phase 06 UNIFY complete, milestone v0.1 done
Milestone: Awaiting next milestone
Phase: None active
Plan: None
Status: Milestone v0.1 Initial Release complete — ready for next
Last activity: 2026-03-13 — Milestone v0.1 completed
Progress:
- Milestone: [██████████] 100% 🎉
- Phase 1: [██████████] 100%
- Phase 2: [██████████] 100% (4/4 plans complete)
- Phase 3: [██████████] 100% (1/1 plans complete)
- Phase 4: [██████████] 100% (1/1 plans complete)
- Phase 5: [██████████] 100% (1/1 plans complete)
- Phase 6: [██████████] 100% (6/6 plans complete)
- v0.1 Initial Release: [██████████] 100%
## Loop Position
Current loop state:
```
PLAN ──▶ APPLY ──▶ UNIFY
[Phase 06 complete — milestone v0.1 done]
[Milestone complete — ready for next]
```
## Accumulated Context
@@ -97,13 +91,13 @@ Brak.
## Session Continuity
Last session: 2026-03-13
Stopped at: Milestone v0.1 Initial Release — wszystkie 6 faz i 15 planów zamknięte
Next action: /paul:complete-milestone
Resume file: .paul/ROADMAP.md
Stopped at: Milestone v0.1 Initial Release complete — /paul:complete-milestone executed
Next action: /paul:discuss-milestone
Resume file: .paul/MILESTONES.md
Resume context:
- Phase 06 UNIFY zamknięty (06-05 — god classes split)
- Milestone v0.1 complete: 6 faz, 15 planów, S1448 6x→2x
- Odchylenie: AllegroIntegrationController 25 metod (nie ≤15) — AllegroImportScheduleService jako deferred
- v0.1: 6 faz, 15 planów zamknięte
- Deferred: AllegroImportScheduleService (AllegroIntegrationController 25 metod), CI/CD SonarQube GitHub Actions
- git tag: v0.1.0 na main
---
*STATE.md — Updated after every significant action*

View File

@@ -0,0 +1,59 @@
# v0.1 Initial Release — Archive
**Archived:** 2026-03-13
**Status:** Complete
---
# Roadmap: orderPRO
## Overview
orderPRO to narzędzie do wielokanałowego zarządzania sprzedażą. Projekt przechodzi od podstawowych integracji z marketplace'ami i generowania etykiet, przez rozbudowę o nowe źródła zamówień i przewoźników, aż do pełnego zarządzania produktami i stanami magazynowymi.
## Milestone: v0.1 Initial Release
**v0.1 Initial Release** (v0.1.0)
Status: ✅ Complete
Completed: 2026-03-13
Phases: 6/6 complete
## Phases
| Phase | Name | Plans | Status | Completed |
|-------|------|-------|--------|-----------|
| 1 | Tech Debt | 2/2 | ✅ Complete | 2026-03-12 |
| 2 | Bug Fixes | 4/4 | ✅ Complete | 2026-03-13 |
| 3 | Tech Debt 2 | 1/1 | ✅ Complete | 2026-03-13 |
| 4 | Schema Docs | 1/1 | ✅ Complete | 2026-03-13 |
| 5 | Tech Debt 3 | 1/1 | ✅ Complete | 2026-03-13 |
| 6 | SonarQube Quality | 6/6 | ✅ Complete | 2026-03-13 |
## Phase Details
### Phase 1 — Tech Debt
- Plan 01-01 — Extract AllegroTokenManager — *Complete*
- Plan 01-02 — Extract StringHelper — *Complete*
### Phase 2 — Bug Fixes
- Plan 02-01 — ZPL page size fix — *Complete*
- Plan 02-02 — last_status_checked_at cursor — *Complete*
- Plan 02-03 — ShopproOrderSyncStateRepository — *Complete*
- Plan 02-04 — CronHandlerFactory — *Complete*
### Phase 3 — Tech Debt 2
- Plan 03-01 — CSRF _token standardization — *Complete*
### Phase 4 — Schema Docs
- Plan 04-01 — Annotate ensure_* migrations — *Complete*
### Phase 5 — Tech Debt 3
- Plan 05-01 — Flash::set()/Flash::get() migration — *Complete*
### Phase 6 — SonarQube Quality
- Plan 06-01 — php:S112 typed exceptions — *Complete*
- Plan 06-02 — php:S1142 return reduction — *Complete*
- Plan 06-03 — php:S1192 string constants — *Complete*
- Plan 06-04 — php:S3776 cognitive complexity — *Complete*
- Plan 06-05 — php:S1448 god class split — *Complete*
- Plan 06-06 — php:S138 long method extraction — *Complete*