Vitruvyan Docs
Update Manager โ Capacitร Attuali & Roadmap
Last updated: Feb 19, 2026 18:00 UTC
Codebase: ~4,100 righe (esclusi test)
Status: Phase 0-4 complete (80% feature-complete)
Contract:UPDATE_SYSTEM_CONTRACT_V1.md
๐ฆ Cosa Fa il Sistema Attualmente
โ Phase 0 - Foundations (COMPLETE)
Contract & Schema
- โ
UPDATE_SYSTEM_CONTRACT_V1.mdโ Binding contract tra Core e Verticals - โ
vertical_manifest.yamlesteso con sezionecompatibility: - โ
release_metadata.jsonschema (GitHub Releases) - โ
Struttura directory
core/platform/update_manager/
Deliverable:
- Contract pubblicato in KB (con 5 diagrammi Mermaid flow)
- Template manifest aggiornato
โ Phase 1 - Compatibility Engine (COMPLETE)
Command: vit update
Cosa fa:
- Legge versione Core corrente (da
vitruvyan_core.__version__ogit describe) - Fetcha latest release da GitHub (via GitHub Releases API)
- Legge vertical_manifest.yaml (dal repo corrente, walking up to Git root)
- Valida compatibilitร :
- โ
Target version dentro range
min_core_versionโmax_core_version - โ
Wildcard matching (
1.x.x= qualsiasi1.*.*) - โ Contracts major version match
- โ Breaking changes check (opt-in via allowlist)
- โ
Target version dentro range
- Output human-readable:
Implementazione:
engine/registry.py(284L): GitHub API client, release fetching, checksum verificationengine/compatibility.py(356L): SemVer matching, wildcard logic, breaking changes checkengine/models.py(150L):Release,CompatibilityResultdataclassescli/commands/update.py(215L): CLI command implementationcli/formatters.py(120L): Tabelle, colori, output formattato
Casi d'uso supportati:
Limitazioni attuali:
- โ Non supporta proxy/firewall configurabili
- โ GitHub rate limiting non gestito (fallback locale)
- โ Cache releases (ogni call = nuovo fetch API)
โ Phase 2 - Apply + Rollback (COMPLETE)
Commands: vit upgrade, vit plan, vit rollback
vit upgrade โ Applica Upgrade
Flusso:
- Pre-flight check: Compatibilitร (riusa
CompatibilityChecker) - Create snapshot: Git tag
pre-upgrade-YYYYMMDD-HHMMSS - Checkout target version:
git checkout v1.2.0 - Install dependencies:
pip install -e .(editable mode) - Run smoke tests:
smoke_tests/run.sh(timeout configurabile) - Confirm or rollback:
- โ Tests pass (exit 0) โ upgrade confermato
- โ Tests fail (exit โ 0) โ rollback automatico
- Audit log: Write entry in
~/.vitruvyan/audit.json
Implementazione:
engine/executor.py(420L): Orchestrazione upgrade, snapshot, rollbackengine/planner.py(280L): Genera upgrade plan (diff, changelog, tests required)cli/commands/upgrade.py(220L): CLI wrappercli/commands/plan.py(183L): Mostra upgrade plan senza eseguirecli/commands/rollback.py(75L): Manual rollback
Audit log format:
Casi d'uso supportati:
Smoke tests contract:
- Location:
<vertical_root>/smoke_tests/run.sh - Exit codes:
0= pass,1= fail,2= error - Timeout: 300s default (configurabile via manifest)
- Output: STDOUT/STDERR logged, non parsato
Limitazioni attuali:
- โ Rollback limitato a 1 snapshot (no rollback stack)
- โ No database migration support (solo Git + pip)
- โ Snapshot non include virtualenv (solo Git state)
- โ Smoke tests output non strutturato (no JUnit XML)
โ Phase 3 - CI/CD Integration (COMPLETE)
GitHub Actions Workflow: .github/workflows/update_manager_ci.yml
Trigger: Git tag push (v*.*.*)
Jobs:
- validate-manifests: Valida tutti i vertical manifests (ContractValidator)
- check-compatibility: Verifica compatibilitร verticals con release
- run-compatibility-tests: Esegue pytest suite (8 test compatibility)
- summary: Genera report JSON + artifacts
Release Blocking:
- โ Manifest invalido โ BLOCK (exit 1)
- โ Vertical incompatibile โ BLOCK (exit 1)
- โ Compatibility test fail โ BLOCK (exit 1)
Implementazione:
ci/contract_validator.py(325L): Valida manifests vs contract schemaci/pytest_integration.py(150L): Markers, fixtures, parametrizationci/release_blocker.py(250L): CLI tool, blocking logic, exit codes.github/workflows/update_manager_ci.yml(172L): GitHub Actions workflow
Test suite (tests/test_compatibility.py, 175L):
- โ
Wildcard matching (
1.x.x,1.2.x) - โ
Pre-release handling (
1.2.0-beta.1) - โ Contracts major mismatch
- โ Breaking changes allowlist
- โ Edge cases (invalid semver, empty manifest)
Artifacts prodotti:
compliance_report.json(manifest validation)compatibility-report.json(version check results)test-results.xml(pytest JUnit)
Limitazioni attuali:
- โ No multi-vertical test matrix (testa 1 vertical alla volta)
- โ No performance benchmarks (solo functional tests)
- โ No smoke tests in CI (solo compatibility logic)
โ Phase 4 - Notification System (COMPLETE)
Features:
- โ Startup check (controlla updates all'avvio servizi)
- โ Periodic polling (daemon background, intervallo configurabile)
- โ Multi-channel distribution (desktop, log, webhook, email*)
Command: vit status
Output:
Implementazione:
notifications/config.py(193L): Multi-tier config (env > manifest > defaults)notifications/startup_check.py(163L): Check on boot, throttlingnotifications/periodic_poller.py(128L): Background daemonnotifications/notifiers/:desktop.py(134L): Linux (notify-send), macOS (osascript), Windows (win10toast)log.py(71L):~/.vitruvyan/update_notifications.logwebhook.py(126L): Slack (rich attachments) + generic HTTP POSTbase.py(42L):BaseNotifierinterface
cli/commands/status.py(259L):vit statuscommand
Configurazione (manifest):
Env vars override:
VIT_NOTIFY_ENABLED=0/1VIT_NOTIFY_CHANNELS=desktop,log,webhookVIT_NOTIFY_INTERVAL=12VIT_NOTIFY_WEBHOOK_URL=...
Periodic Poller (daemon):
Test suite (tests/test_notifications.py, 347L):
- โ 15 tests (config loading, notifiers, startup logic, poller)
- โ Mocked subprocess (desktop notifier)
- โ Mocked httpx (webhook notifier)
- โ File I/O (log notifier)
- โ Time mocking (interval throttling)
Limitazioni attuali:
- โ ๏ธ Email notifier stub (interfaccia presente, SMTP non implementato)
- โ Webhook retry logic (single HTTP POST, no backoff)
- โ Desktop notification persistenza (no notification center integration)
- โ Rate limiting notifications (puรฒ spammare se update check fallisce)
๐๏ธ Come Funziona il Sistema
Architettura Complessiva
Flussi Principali (5 Diagrammi Mermaid in KB)
- Update Check Flow โ
vit update - Upgrade Flow โ
vit upgrade(con rollback automatico) - Notification Flow โ Startup check + periodic poller
- CI/CD Integration โ GitHub Actions release blocking
- Periodic Poller โ Background daemon lifecycle
Vedi: UPDATE_SYSTEM_CONTRACT_V1.md sezione "Update System Flow Diagrams"
Dependency Graph
State Management
Stateful components:
- Audit log:
~/.vitruvyan/audit.json(upgrade history) - Last check time:
~/.vitruvyan/last_update_check(timestamp float) - Notification log:
~/.vitruvyan/update_notifications.log(append-only) - Git snapshots: Tags
pre-upgrade-*(rollback points)
Stateless (ogni invocation รจ autonoma):
- Release fetching (GitHub API, no local cache)
- Compatibility validation (in-memory)
- Smoke tests execution (subprocess, no persistent state)
๐ Cosa Puรฒ Essere Ulteriormente Implementato
๐ฅ Phase 5 - Hardening & Governance (PROPOSTA)
1. Enhanced Audit Trail
Attuale: Audit log minimale (timestamp, versions, snapshot, success flag)
Proposta:
- โ Operation metadata (user, hostname, duration, PID)
- โ Compatibility check result (issues, warnings)
- โ Smoke tests details (exit code, log path, duration)
- โ Rollback reason (manual vs automatic)
- โ Checksum verification result
- โ Environment snapshot (Python version, OS, dependencies)
Benefici:
- Debugging post-mortem upgrade failures
- Compliance auditing (chi ha fatto cosa quando)
- Performance monitoring (durata upgrade nel tempo)
Effort: ๐ข Low (1-2 ore, extend existing _write_audit_log())
2. Support Window Policy
Attuale: Nessuna policy di EOL (End of Life) versioni
Proposta:
- โ
engine/support_policy.py: Define N-X support window - โ Warning nel CLI se target version รจ EOL
- โ
vit supportedcommand: Lista versioni supportate + EOL dates - โ Auto-skip EOL versions in
vit update(con flag override)
Policy esempio:
Benefici:
- Prevent verticals da rimanere su versioni non supportate
- Comunicazione chiara lifecycle Core releases
Effort: ๐ก Medium (2-3 ore, date logic + integration)
3. Rollback Resilience Tests
Attuale: Rollback testato manualmente, no automated resilience tests
Proposta: Test suite dedicata (tests/test_rollback_resilience.py)
Test cases:
- โ Rollback con snapshot corrotto (git tag missing)
- โ Rollback con disk space esaurito
- โ Rollback doppio (rollback di un rollback)
- โ Rollback con dirty git tree (uncommitted changes)
- โ Rollback con smoke tests timeout
Benefici:
- Confidence che rollback funziona in scenari edge case
- Regression prevention (rollback รจ safety critical)
Effort: ๐ข Low (1-2 ore, pytest parametrize)
4. Operational Runbook
Attuale: Documentazione sparsa, no incident response guide
Proposta: docs/knowledge_base/operations/UPDATE_MANAGER_RUNBOOK.md
Sezioni:
- Pre-Upgrade Checklist (backup, disk space, test environment)
- Post-Upgrade Verification (smoke tests, health checks, logs)
- Incident Response Decision Tree:
- Smoke tests failed โ auto-rollback
- Service degradation post-upgrade โ manual rollback
- Partial upgrade (some verticals fail) โ isolation strategy
- Common Failures & Solutions:
- Network timeout โ retry logic, offline mode
- Checksum mismatch โ re-download, report corruption
- Smoke tests timeout โ extend timeout, debug test
- Communication Templates (incident announcement, postmortem)
Benefici:
- Operational readiness per production
- Faster incident response (no improvvisazione)
Effort: ๐ก Medium (2-3 ore, documentation)
5. Version History Dashboard
Attuale: Audit log esiste, ma no command per visualizzarlo
Proposta: vit history command
Output (human-readable):
Benefici:
- Visibility su upgrade history (troubleshooting)
- Integration con monitoring esterni (Grafana, Datadog)
Effort: ๐ข Low (1 ora, CLI command + formatter)
๐ฎ Future Enhancements (Post-Phase 5)
6. Database Migration Support
Current limitation: Solo Git + pip, no database schema changes
Proposta:
- โ Alembic/SQL migration integration
- โ Pre-upgrade DB snapshot (pg_dump)
- โ Rollback include DB restore
- โ Migration dry-run mode
Use case: Vertical use PostgreSQL, schema changes in upgrade
Effort: ๐ด High (5-8 ore, DB-specific logic)
7. Partial Upgrade Support
Current limitation: All-or-nothing (tutto il Core, non single components)
Proposta:
- โ Component-level versioning (Sacred Orders indipendenti?)
- โ Dependency resolution (upgrade Order X โ require Order Y v1.2+)
- โ Partial rollback
Use case: Hotfix su single Sacred Order senza full Core upgrade
Effort: ๐ด High (architectural, richiede Core refactoring)
8. Offline Mode
Current limitation: Richiede GitHub API (no air-gapped environments)
Proposta:
- โ Local release repository (file:// schema)
- โ
vit importcommand (import release tarball) - โ Checksum verification offline
Use case: Deployment in ambiente senza internet
Effort: ๐ก Medium (3-4 ore, abstraction Registry)
9. Multi-Core Multi-Vertical Matrix Testing
Current limitation: CI testa 1 vertical corrente, no cross-vertical
Proposta:
- โ GitHub Actions matrix build (N verticals ร M Core versions)
- โ Compatibility matrix report (table)
- โ Auto-discovery verticals nel monorepo
Use case: Detect regression che rompe vertical X ma non Y
Effort: ๐ก Medium (2-3 ore, GitHub Actions)
10. Incremental Upgrades (Multi-Hop)
Current limitation: Upgrade 1.0 โ 1.5 richiede single hop (no 1.0โ1.2โ1.5)
Proposta:
- โ Path planning (calcola upgrade intermedii)
- โ Multi-step execution (checkpoint ogni hop)
- โ Rollback granulare (rollback al checkpoint precedente)
Use case: Major version jump con breaking changes intermedie
Effort: ๐ด High (6-10 ore, state machine complexity)
๐ Summary Matrix
| Feature | Status | Lines | Tests | Priority | Effort |
|---|---|---|---|---|---|
| Phase 0 (Contract) | โ Complete | ~500 | โ | Critical | Done |
Phase 1 (vit update) | โ Complete | ~1,200 | 8 | Critical | Done |
Phase 2 (vit upgrade/rollback) | โ Complete | ~1,500 | Manual | Critical | Done |
| Phase 3 (CI gates) | โ Complete | ~700 | 8 | High | Done |
| Phase 4 (Notifications) | โ Complete | ~900 | 15 | Medium | Done |
| Phase 5a (Enhanced audit) | โธ๏ธ Proposed | ~200 | 5 | Medium | Low |
| Phase 5b (Support policy) | โธ๏ธ Proposed | ~250 | 8 | Medium | Medium |
| Phase 5c (Rollback tests) | โธ๏ธ Proposed | ~150 | 10 | High | Low |
| Phase 5d (Runbook) | โธ๏ธ Proposed | ~0 | โ | High | Medium |
Phase 5e (vit history) | โธ๏ธ Proposed | ~100 | 3 | Low | Low |
| Future (DB migrations) | ๐ก Idea | ~800 | 15 | Medium | High |
| Future (Offline mode) | ๐ก Idea | ~300 | 8 | Low | Medium |
| Future (Multi-vertical CI) | ๐ก Idea | ~200 | โ | Medium | Medium |
Total implemented: ~4,100 lines (main) + ~540 lines (tests) = ~4,640 lines
๐ฏ Raccomandazioni Next Steps
Opzione A: Complete Phase 5 (Production Readiness)
Focus: Hardening, governance, operational excellence
Deliverables:
- Enhanced audit trail (metadata completo)
- Support policy + EOL warnings
- Rollback resilience tests (10 test cases)
- Operational runbook (incident response)
vit historycommand
Timeline: 1-2 giorni
ROI: ๐ข High (production-grade system)
Opzione B: Quick Wins (Minimal Viable Phase 5)
Focus: Feature critiche con effort minimo
Deliverables:
- Enhanced audit trail (solo duration + hostname)
- Rollback resilience tests (5 test cases critici)
vit historycommand (basic table)
Timeline: 3-4 ore
ROI: ๐ก Medium (good enough per MVP)
Opzione C: Future Features (Innovation)
Focus: Estendere capabilities oltre MVP
Deliverables:
- Database migration support (Alembic)
- Offline mode (local repository)
- Multi-vertical CI matrix
Timeline: 1 settimana
ROI: โ ๏ธ Variable (dipende da use case)
๐ Risorse
- Contract: UPDATE_SYSTEM_CONTRACT_V1.md
- Package Manager Contract: PACKAGE_MANAGER_SYSTEM_CONTRACT_V1.md
- Update Manager System: Update_Manager_System.md
- Flow Diagrams: UPDATE_SYSTEM_CONTRACT_V1.md ยง "Update System Flow Diagrams"
- Codebase:
vitruvyan_core/core/platform/update_manager/ - Tests:
vitruvyan_core/core/platform/update_manager/tests/
END OF SUMMARY