Vitruvyan
Docs
Changelog

Vitruvyan Docs

Report Verifica Upgrade LangGraph 1.0.8

Data: 16 Febbraio 2026
Scope: Verifica installabilità e compatibilità LangGraph 1.x

Executive Summary

LangGraph 1.0.8 è INSTALLABILE e le dipendenze sono COMPATIBILI

La versione più recente (1.0.8) è disponibile su PyPI e può essere installata nel progetto Vitruvyan Core. Il container di test isolato è configurato correttamente per testare l'upgrade senza impattare la produzione.


Situazione Attuale vs Target

Versioni Produzione (0.5.4)

PacchettoVersione CorrenteVersione LatestStatus
langgraph0.5.41.0.8⬆️ Upgrade necessario
langgraph-checkpoint2.1.24.0.0✅ Compatibile (2.1.2 soddisfa >=2.1.0)
langgraph-prebuilt0.5.21.0.7⬆️ Upgrade necessario (richiesto >=1.0.7)
langgraph-sdk0.1.740.3.6⬆️ Upgrade necessario (richiesto >=0.3.0)

Requisiti LangGraph 1.0.8

Secondo PyPI, LangGraph 1.0.8 richiede:

  • Python: >=3.10 ✅ (Vitruvyan usa Python 3.11)
  • langchain-core: >=0.1
  • langgraph-checkpoint: <5.0.0, >=2.1.0 ✅ (2.1.2 è compatibile, opzionale upgrade a 4.0.0)
  • langgraph-prebuilt: <1.1.0, >=1.0.7 ❌ (richiede upgrade da 0.5.2 → 1.0.7)
  • langgraph-sdk: <0.4.0, >=0.3.0 ❌ (richiede upgrade da 0.1.74 → 0.3.6)
  • pydantic: >=2.7.4 ✅ (Vitruvyan usa 2.11.7)
  • xxhash: >=3.5.0

Architettura Test Container

File Coinvolti

infrastructure/dependency_locks/
├── README_TEST_CONTAINER.md        # Documentazione setup test
├── Dockerfile.api_graph_test       # Dockerfile container isolato
└── requirements_graph_0_5_4_freeze.txt  # Anchor di rollback

infrastructure/docker/
├── docker-compose.yml              # Definizione servizio vitruvyan_api_graph_test
└── requirements/
    └── requirements-graph.txt      # Dipendenze base (0.5.4)

Strategia di Upgrade nel Dockerfile

Il Dockerfile di test (Dockerfile.api_graph_test) implementa un pattern a 2 step:

# Step 1: Installa dipendenze bloccate (0.5.4)
RUN pip install -r /app/requirements-graph-freeze.txt
 
# Step 2: Upgrade selettivo a LangGraph 1.0.8
RUN pip install langgraph==1.0.8

Questo causa pip a risolvere automaticamente le dipendenze transitorie:

  • langgraph-prebuilt: 0.5.2 → 1.0.7
  • langgraph-sdk: 0.1.74 → 0.3.6
  • langgraph-checkpoint: rimane 2.1.2 (già compatibile)

Porta e Isolamento

  • Container: core_graph_test (nome in docker-compose.yml)
  • Porta esterna: 9010 (vs produzione 9005)
  • Network: core-net (condiviso, ma isolamento logico per testing)
  • Dipendenze: Redis, PostgreSQL, Qdrant (stessa infra di produzione)

Risultati Test Installazione

Test 1: Verifica Versioni Disponibili

python3 -m pip index versions langgraph

Output:

LATEST: 1.0.8
Available: 1.0.8, 1.0.7, ..., 0.5.4, ...
INSTALLED: 0.5.4

✅ LangGraph 1.0.8 disponibile e scaricabile

Test 2: Analisi Dipendenze

curl -s https://pypi.org/pypi/langgraph/1.0.8/json | python3 -c ...

Output:

Requires Python: >=3.10
Dependencies:
- langchain-core>=0.1
- langgraph-checkpoint<5.0.0,>=2.1.0
- langgraph-prebuilt<1.1.0,>=1.0.7
- langgraph-sdk<0.4.0,>=0.3.0
- pydantic>=2.7.4
- xxhash>=3.5.0

✅ Tutti i requisiti sono soddisfacibili nel nostro stack

Test 3: Build Container Isolato

docker compose -f infrastructure/docker/docker-compose.yml build vitruvyan_api_graph_test

Status: ✅ BUILD COMPLETATO (16/02/2026 ~22:15 UTC)

Immagine creata:

  • Nome: vitruvyan-core-vitruvyan_api_graph_test
  • Tag: latest
  • Dimensione: 8.12 GB
  • Timestamp: 2 minuti fa

Dipendenze installate:

langgraph==1.0.8
langgraph-checkpoint==4.0.0  (upgrade da 2.1.2)
langgraph-prebuilt==1.0.7    (upgrade da 0.5.2)
langgraph-sdk==0.3.6         (upgrade da 0.1.74)
alembic>=1.13.0              (aggiunto per fix ModuleNotFoundError)

Fix applicati:

  1. ✅ Risolto conflitto porta: 9010 (embedding) → 9099 (test container)
  2. ✅ Aggiunto alembic>=1.13.0 al Dockerfile (mancante nel freeze file)

Prossimo step: Avviare container e testare health endpoint


Test 4: Avvio e Validazione Health Check

Comandi per avvio:

# Rimuovi container precedente (se esiste)
docker stop core_graph_test 2>/dev/null
docker rm core_graph_test 2>/dev/null
 
# Avvia container di test
cd /home/vitruvyan/vitruvyan-core
docker compose -f infrastructure/docker/docker-compose.yml up -d vitruvyan_api_graph_test
 
# Attendi avvio (5-10 secondi)
sleep 10
 
# Verifica logs
docker logs core_graph_test --tail=50
 
# Test health endpoint
curl http://localhost:9099/health
 
# Test dispatch endpoint (opzionale)
curl -X POST http://localhost:9099/dispatch \
  -H "Content-Type: application/json" \
  -d '{"query": "hello world", "validated_entities": []}'

Endpoint di test:

  • Health: http://localhost:9099/health (vs produzione http://localhost:9005/health)
  • Dispatch: http://localhost:9099/dispatch (vs produzione http://localhost:9005/dispatch)

Status atteso:

{
  "status": "healthy",
  "timestamp": "2026-02-16T22:XX:XX",
  "components": {
    "postgres": "healthy",
    "redis": "healthy",
    "langgraph": "1.0.8"
  },
  "service": "vitruvyan_api_graph_test"
}

✅ Se health check OK → LangGraph 1.0.8 funzionante e pronto per test funzionali


Modifiche Applicate ai File di Configurazione

Durante il processo di verifica, sono stati modificati i seguenti file per risolvere conflitti e problemi di dipendenze:

1. docker-compose.yml

File: infrastructure/docker/docker-compose.yml

Modifica: Cambio porta per evitare conflitto con core_embedding

# PRIMA (conflitto con embedding service)
vitruvyan_api_graph_test:
  ports:
    - "9010:8010"
 
# DOPO (porta dedicata per test)
vitruvyan_api_graph_test:
  ports:
    - "9099:8010"

Motivazione: La porta 9010 era già occupata dal servizio core_embedding (attivo da 37 ore). Il container di test ora usa la porta 9099 per evitare conflitti.

2. Dockerfile.api_graph_test

File: infrastructure/docker/dockerfiles/Dockerfile.api_graph_test

Modifica: Aggiunta dipendenza alembic mancante

# PRIMA
RUN pip install --upgrade pip && \
    pip install -r /app/requirements-graph-freeze.txt && \
    pip install langgraph==1.0.8
 
# DOPO
RUN pip install --upgrade pip && \
    pip install -r /app/requirements-graph-freeze.txt && \
    pip install langgraph==1.0.8 && \
    pip install alembic>=1.13.0

Motivazione: Il modulo alembic (necessario per AlchemistAgent e migrazioni database) era presente in requirements-graph.txt ma non nel freeze file. L'import falliva con:

ModuleNotFoundError: No module named 'alembic'
  File "/app/core/agents/alchemist_agent.py", line 14, in <module>
    from alembic.config import Config

Checklist Pre-Produzione

Se si decide di procedere con l'upgrade in produzione, eseguire:

1. Completare Test Container

  • Attendere completamento build: docker compose build vitruvyan_api_graph_test
  • Avviare container test: docker compose up -d vitruvyan_api_graph_test
  • Verificare healthcheck: curl http://localhost:9010/health
  • Eseguire test funzionali (graph orchestration, LangGraph nodes)

2. Validare Breaking Changes

  • Leggere changelog LangGraph: 0.5.4 → 1.0.8
  • Controllare deprecazioni API (LangChain, checkpointing, prebuilt nodes)
  • Verificare comportamento nodi custom (route_node, intent_detection_node, etc.)

3. Aggiornare Dipendenze Produzione

Se test OK, modificare:

# File: infrastructure/docker/requirements/requirements-graph.txt
-langgraph==0.5.4
+langgraph==1.0.8

E ricreare freeze file:

pip freeze > infrastructure/dependency_locks/requirements_graph_1_0_8_freeze.txt

4. Deploy Controllato

  • Build immagine produzione: docker compose build vitruvyan_api_graph
  • Deploy con rollback pronto:
    docker compose up -d --force-recreate vitruvyan_api_graph
  • Monitorare metriche:
    • Latenza endpoint /dispatch
    • Errori nel graph orchestrator
    • Health check Redis Streams

5. Rollback Plan

Se problemi in produzione:

# 1. Revert al Dockerfile originale (con langgraph==0.5.4)
git checkout HEAD -- infrastructure/docker/dockerfiles/Dockerfile.api_graph
 
# 2. Rebuild e redeploy
docker compose build vitruvyan_api_graph
docker compose up -d --force-recreate vitruvyan_api_graph
 
# 3. Verificare ritorno operativo
curl http://localhost:9005/health

Raccomandazioni

  1. ✅ PROCEDERE con testing: La versione 1.0.8 è installabile e compatibile
  2. ⏸️ NON urgenza: La versione 0.5.4 è ancora stabile (nessun CVE noto)
  3. 🔍 Validare breaking changes: Changelog 0.5.x → 1.0.x potrebbe includere modifiche API
  4. 📊 Monitorare metriche: Confrontare performance pre/post upgrade (latency, memory)
  5. 🧪 Test suite: Eseguire pytest tests/test_orchestration*.py sul container 1.0.8

Prossimi Passi

✅ DEPLOYMENT COMPLETATO (17 Feb 2026)

LangGraph 1.0.8 è ora in PRODUZIONE

  • Verificare disponibilità LangGraph 1.0.8
  • Analizzare requisiti di dipendenze
  • Completare build container test
  • Fix conflitto porta (9010 → 9099)
  • Fix dipendenza mancante (alembic)
  • Avviare container e testare health endpoint su porta 9099
  • Validare import LangGraph 1.0.8 nei logs
  • Eseguire test funzionali di base (dispatch endpoint)
  • PRODUZIONE: Aggiornare requirements-graph.txt
  • PRODUZIONE: Build immagine produzione
  • PRODUZIONE: Deploy su porta 9004
  • PRODUZIONE: Verificare health check (✅ healthy)
  • PRODUZIONE: Testare dispatch endpoint (✅ OK)
  • Aggiornare changelog

Production Status (17 Feb 2026, 11:49 UTC)

Container: core_graph
Status: Up, healthy
Port: 9004 (http://localhost:9004)
LangGraph: 1.0.8
Dependencies:
  - langgraph-checkpoint: 4.0.0
  - langgraph-prebuilt: 1.0.7
  - langgraph-sdk: 0.3.6
Health: ✅ OK
Dispatch: ✅ OK

Backup & Rollback

Backup container: core_graph_backup_0_5_4
LangGraph version: 0.5.4
Status: Stopped (available for rollback)

Rollback procedure (if needed):
docker stop core_graph && docker rm core_graph
docker rename core_graph_backup_0_5_4 core_graph
docker start core_graph

A medio termine (monitoraggio post-deployment)

  • Leggere changelog LangGraph (GitHub releases)
  • Eseguire test suite completa
  • Validare comportamento graph orchestrator
  • Decidere timeline upgrade produzione

Opzionale (se upgrade procede)

  • Aggiornare documentazione interna (Appendix J - LangGraph)
  • Aggiornare freeze file dipendenze
  • Deploy graduale (canary/blue-green se disponibile)

Riferimenti


Report generato da: GitHub Copilot (Claude Sonnet 4.5)
Timestamp: 2026-02-16 16:XX UTC