Files
ThothII/docs/architecture/thothii-session-lifecycle.lifecycle.json
T
CodexandClaude Opus 5.5 0adda6e8af docs: add complete Archify architecture diagram set
Thirteen source-backed interactive diagrams in docs/architecture with an
index page (thothii-diagrams.html): runtime and deployment architecture,
module tree, F1-F8 workflow, session and catalog-sync lifecycles,
new-question, gate round-trip, resume and OIDC sequences, session runtime
classes, metadata dataflow and Metadata Catalog ERD. Replaces the old
thothii-core sequence diagram.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 12:24:07 +02:00

229 lines
5.3 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"schema_version": 3,
"diagram_type": "lifecycle",
"meta": {
"title": "ThothII — ciclo di vita di una sessione",
"locale": "it",
"output": "docs/architecture/thothii-session-lifecycle.html",
"quality_profile": "showcase",
"repository": {
"url": "https://git.tylconsulting.it/mptyl/ThothII.git",
"link_mode": "local-only",
"revision": "31e6d3a162e9e5ac71fc2d8da4fe44b16c06aae3"
}
},
"mainPath": [
"open",
"finalized",
"archived"
],
"states": [
{
"id": "open",
"type": "start",
"label": "open",
"sublabel": "fasi F1–F8 in corso",
"tag": "riprendibile",
"step": "01",
"sources": [
{
"path": "harness/tht/session/models.py",
"line": 107,
"end_line": 107,
"label": "status"
},
{
"path": "harness/tht/session/store.py",
"line": 524,
"end_line": 533,
"label": "reopen_session"
}
]
},
{
"id": "finalized",
"type": "success",
"label": "finalized",
"sublabel": "SQL verificato sul DWH",
"tag": "sola lettura",
"step": "02",
"sources": [
{
"path": "harness/tht/session/store.py",
"line": 570,
"end_line": 592,
"label": "persist_verified_finalization"
},
{
"path": "harness/.pi/extensions/tht-gate.js",
"line": 1650,
"end_line": 1666,
"label": "finalize automatico"
}
]
},
{
"id": "archived",
"type": "neutral",
"label": "archiviata",
"sublabel": "flag archived",
"tag": "nascosta",
"step": "03",
"sources": [
{
"path": "harness/tht/session/store.py",
"line": 556,
"end_line": 562,
"label": "set_archived"
},
{
"path": "backend/src/routes/sessions.ts",
"line": 928,
"end_line": 937,
"label": "POST /archive"
}
]
},
{
"id": "closed",
"type": "waiting",
"label": "closed",
"sublabel": "processo Pi fermato",
"tag": "riprendibile",
"sources": [
{
"path": "harness/tht/session/store.py",
"line": 506,
"end_line": 512,
"label": "close_session"
},
{
"path": "backend/src/routes/sessions.ts",
"line": 832,
"end_line": 850,
"label": "POST /close"
}
]
},
{
"id": "failed",
"type": "failure",
"label": "failed",
"sublabel": "bootstrap o Pi falliti",
"tag": "riprendibile",
"sources": [
{
"path": "harness/tht/session/store.py",
"line": 515,
"end_line": 521,
"label": "fail_session"
},
{
"path": "backend/src/routes/sessions.ts",
"line": 355,
"end_line": 366,
"label": "bootstrap fallito"
}
]
},
{
"id": "deleted",
"type": "neutral",
"label": "cancellata",
"sublabel": "directory rimossa",
"sources": [
{
"path": "harness/tht/session/store.py",
"line": 564,
"end_line": 568,
"label": "delete_session"
},
{
"path": "backend/src/routes/sessions.ts",
"line": 948,
"end_line": 968,
"label": "DELETE /sessions/:id"
}
]
}
],
"transitions": [
{
"id": "open-finalized",
"from": "open",
"to": "finalized",
"label": "F8 chiusa",
"variant": "emphasis"
},
{
"id": "finalized-archived",
"from": "finalized",
"to": "archived",
"label": "archive"
},
{
"id": "open-closed",
"from": "open",
"to": "closed",
"label": "close"
},
{
"id": "closed-open",
"from": "closed",
"to": "open",
"label": "resume (reopen)"
},
{
"id": "open-failed",
"from": "open",
"to": "failed",
"label": "errore runtime",
"variant": "security"
},
{
"id": "failed-open",
"from": "failed",
"to": "open",
"label": "resume (reopen)"
},
{
"id": "closed-deleted",
"from": "closed",
"to": "deleted",
"label": "delete",
"variant": "dashed"
},
{
"id": "archived-finalized",
"from": "archived",
"to": "finalized",
"label": "unarchive"
}
],
"cards": [
{
"dot": "cyan",
"title": "Ripresa",
"items": [
"Si riprendono solo sessioni open, closed o failed: reopen le riporta a open",
"Il backend risponde 409 se la sessione è finalized o archiviata"
]
},
{
"dot": "amber",
"title": "Archiviazione",
"items": [
"archived è un flag separato dallo status: si può archiviare anche una sessione chiusa",
"Archiviare non cambia lo status; una sessione archiviata non si riprende finché non viene ripristinata",
"delete è possibile da qualunque stato e ferma il runtime; nel diagramma è mostrato solo da closed"
]
},
{
"dot": "emerald",
"title": "Fase e status",
"items": [
"Lo status descrive la sessione; la fase F1–F8 si ricalcola dal ledger delle decisioni"
]
}
]
}