feat: harden runtime readiness and session workflow
This commit is contained in:
@@ -327,6 +327,11 @@ class Config(BaseModel):
|
||||
return translated
|
||||
|
||||
|
||||
def workspace_id_from_path(path: Path) -> str:
|
||||
"""Return the stable workspace identity, resolving deployment aliases first."""
|
||||
return path.resolve().stem.lower().replace(".", "-").replace("_", "-")
|
||||
|
||||
|
||||
def load_config(path: Path) -> Config:
|
||||
if not path.exists():
|
||||
raise ConfigError(f"File di configurazione non trovato: {path}")
|
||||
@@ -378,7 +383,7 @@ def load_config(path: Path) -> Config:
|
||||
FutureWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
cfg._workspace_id = path.stem.lower().replace(".", "-").replace("_", "-")
|
||||
cfg._workspace_id = workspace_id_from_path(path)
|
||||
cfg._config_source = path.resolve().as_posix()
|
||||
return cfg
|
||||
|
||||
|
||||
Reference in New Issue
Block a user