docs: introduce Phase C (pwsh removal), rename ESXi to Phase D

- Add plans/idea-3-powershell-removal.md: Phase C goal is to eliminate
  the pwsh dependency from the Linux host by porting the remaining PS
  scripts (bench run, validate host, smoke run) to Python sub-commands.
- Update idea-3-esxi-support.md header: Fase C → Fase D.
- Update ideas-overview.md: new four-phase table (A/B/C/D) with
  prerequisiti and criteri for Phase C.
- Rename all "Hook futuri Fase C" (ESXi) → "Hook futuri Fase D" in
  implementation-plan-A-B.md; add Phase C/D entries to summary and
  references section.
- Update PhaseB-user-checklist.md end note and CLAUDE.md to point
  Phase C → pwsh removal, Phase D → ESXi.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-05-21 20:46:01 +02:00
parent 43a69b82db
commit 6db20d66bf
6 changed files with 155 additions and 38 deletions
+102
View File
@@ -0,0 +1,102 @@
# Fase C — Eliminazione dipendenza PowerShell dall'host Linux
> **Stato**: **pianificata**, da avviare dopo che Fase B è stabile in
> produzione (≥1 settimana di burn-in, Passo 8 completato).
> Vedi [overview](ideas-overview.md).
---
## 1. Obiettivo
Rendere l'host Linux completamente indipendente da PowerShell Core (`pwsh`).
Dopo la Fase B l'orchestrazione ordinaria (job, timer, monitoring, backup)
è già Python puro. Rimangono script PS usati per test manuali, burn-in e
validazione host che richiedono `pwsh` installato.
**C done**: nessuno script in `scripts/*.ps1` viene più eseguito
direttamente sull'host Linux; `pwsh` può essere disinstallato senza
impatti operativi. I `.ps1` rimangono nel repo come riferimento storico
e per il runner Windows (fallback dual-boot).
---
## 2. Script da portare
| Script PS | Uso attuale (Linux host) | Target Python |
|-----------|--------------------------|---------------|
| `Test-CapacityBurnIn.ps1` | burn-in B7: 4 job × 10 round | `python -m ci_orchestrator bench run` |
| `Start-BurnInTest.ps1` | burn-in Windows single-shot | `python -m ci_orchestrator bench run --guest-os windows` |
| `Start-BurnInTest-Linux.ps1` | burn-in Linux single-shot | `python -m ci_orchestrator bench run --guest-os linux` |
| `Validate-HostState.ps1` | verifica stato host pre-cutover | `python -m ci_orchestrator validate host` |
| `Measure-CIBenchmark.ps1` | raccolta metriche timing | integrato in `bench run --collect-metrics` |
| `Test-Smoke.ps1` | smoke end-to-end manuale | `python -m ci_orchestrator smoke run` |
| `Test-CapacityBurnIn.ps1` | già referenziato in B7 checklist | vedi sopra |
Script **non da portare** (girano solo su Windows o sono già shim):
- `Register-CIScheduledTasks.ps1` — Windows Scheduler, non serve su Linux
- `Invoke-RetentionPolicy.ps1` / `Backup-CITemplate.ps1` — già portati in B5
- Tutti gli script shim in `scripts/` — 3 righe che chiamano Python, restano
- Script guest (`Install-CIToolchain-*.ps1`, `Prepare-*.ps1`, ecc.) — girano
dentro le VM Windows, non sull'host
---
## 3. Architettura prevista
Nuovi sub-comandi CLI sotto due nuovi gruppi:
```
python -m ci_orchestrator bench run --guest-os windows|linux
--template <path>
--concurrency N
--rounds N
--collect-metrics
python -m ci_orchestrator validate host # verifica stato host
python -m ci_orchestrator smoke run # end-to-end smoke test
```
Il gruppo `bench` sostituisce i tre script `*BurnIn*.ps1` con logica
unificata: avvia N clone in parallelo, misura tempo per job, confronta
con baseline, emette un report JSON in `CI_ARTIFACTS/bench/`.
Il gruppo `validate` porta `Validate-HostState.ps1`: verifica vmrun,
template snapshot, credenziali, permessi directory, act-runner attivo.
---
## 4. Aggiornamenti collaterali
- `plans/PhaseB-user-checklist.md` §B7: sostituire il comando `pwsh
Test-CapacityBurnIn.ps1` con `python -m ci_orchestrator bench run`.
- `deploy/systemd/README.md`: nessun riferimento a `pwsh`.
- `CLAUDE.md`: rimuovere nota "PowerShell 5.1 Constraints" se non più
rilevante per l'host (rimane valida per gli script guest Windows).
- `docs/RUNBOOK.md`: aggiornare procedure di burn-in e smoke test.
---
## 5. Prerequisiti
- Fase B completata e stabile (≥1 settimana, Passo 8 ✅).
- Nessuna dipendenza da `pwsh` nei timer systemd (già soddisfatta da B5).
---
## 6. Criteri di "C done"
- `python -m ci_orchestrator bench run --concurrency 4 --rounds 10` esegue
burn-in completo (Win + Linux) con output equivalente a `Test-CapacityBurnIn.ps1`.
- `python -m ci_orchestrator validate host` esce con 0 su host configurato
correttamente.
- `pwsh --version` può essere assente sull'host Linux senza che nessun
test, timer o script CI fallisca.
- Suite pytest ≥90% coverage, verde.
---
## 7. Rollback
I `.ps1` originali rimangono nel repo e funzionano su host Windows o su
Linux con `pwsh` installato. Il rollback è semplicemente reinstallare
`pwsh` e usare gli script esistenti.