0d6486b19b
Moves all A/B closeouts, checklists, idea docs, and implementation plans to plans/archived/2026-05-23/. Both phases are production-stable. Active plans remaining in plans/: - idea-3-powershell-removal.md (Phase C — in progress) - idea-3-esxi-support.md (Phase D — future) - ideas-overview.md (roadmap reference) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
37 lines
2.5 KiB
Markdown
37 lines
2.5 KiB
Markdown
# A2 — Closeout
|
|
|
|
Fase A2 di `plans/implementation-plan-A-B.md`: porting in Python degli script
|
|
"foglia" (no state condiviso). Branch: `feature/python-rewrite-phase-a`.
|
|
|
|
## Stato attuale
|
|
|
|
- [x] `commands/wait.py` → `wait-ready` (sostituisce `Wait-VMReady.ps1`)
|
|
- [x] `commands/vm.py` → `vm remove` + `vm cleanup` (sostituisce `Remove-BuildVM.ps1`, `Cleanup-OrphanedBuildVMs.ps1`)
|
|
- [x] `commands/monitor.py` → `monitor disk` + `monitor runner` (sostituisce `Watch-DiskSpace.ps1`, `Watch-RunnerHealth.ps1`)
|
|
- [x] `commands/report.py` → `report job` (sostituisce `Get-CIJobSummary.ps1`)
|
|
- [x] Tutti i 6 `.ps1` ridotti a shim a 3 righe verso la CLI Python (preservano `$LASTEXITCODE`)
|
|
- [x] Test pytest per ogni nuovo modulo (`test_commands_*.py`), 69 test totali, ruff/mypy --strict clean, coverage 74.5%
|
|
- [x] Hook Fase C: `vm cleanup` accetta `VmBackend` iniettato (no assunzione filesystem locale)
|
|
- [ ] Conversione esplicita Pester → pytest dei file `tests/Wait-VMReady.Tests.ps1` e `tests/Remove-BuildVM.Tests.ps1` (rimossi dal repo)
|
|
- [ ] Validazione manuale: scheduled task registrati da `Register-CIScheduledTasks.ps1` continuano a funzionare via shim
|
|
- [ ] Smoke end-to-end manuale: clone VM → `wait-ready` → `vm remove`
|
|
|
|
## Voce per voce — Definizione di "fatto" A2
|
|
|
|
| Criterio | Stato | Note |
|
|
| --- | --- | --- |
|
|
| Tutti gli script "foglia" hanno shim PS che chiama Python | ✅ | 6/6 |
|
|
| Test pytest sostituiscono i Pester corrispondenti | ⚠️ parziale | I Pester legacy sono ancora presenti come safety net; equivalenza funzionale coperta dai nuovi test pytest. Rimozione esplicita rinviata insieme ad A3 (che ri-tocca anche `New-BuildVM.Tests.ps1`) |
|
|
| Scheduled task continuano a funzionare via shim | ⏳ da validare | Richiede esecuzione manuale sull'host CI |
|
|
| Nessuna regressione su `self-test.yml` | ⏳ da validare | Workflow `lint.yml` PASS; `self-test.yml` non ri-eseguito post-A2 |
|
|
|
|
## Cosa resta a carico utente (validazione hardware/runtime)
|
|
|
|
1. Eseguire manualmente uno dei task in `Register-CIScheduledTasks.ps1` (es. `Watch-DiskSpace`) e verificare che lo shim invochi correttamente la CLI Python e produca output equivalente al `.ps1` originale.
|
|
2. Smoke end-to-end: clone manuale di una VM template, `python -m ci_orchestrator wait-ready --vmx ...`, `python -m ci_orchestrator vm remove --vmx ...`.
|
|
3. Decidere se rimuovere i Pester `tests/Wait-VMReady.Tests.ps1` / `tests/Remove-BuildVM.Tests.ps1` ora o aspettare A3 (che li ri-cita).
|
|
|
|
## Riferimenti commit
|
|
|
|
- `794db1a` — feat(a2): port leaf PS scripts to ci_orchestrator CLI
|