feat: make Core reports commercially production-ready
This commit is contained in:
@@ -174,6 +174,7 @@ def paths(root: str | Path) -> dict[str, Path]:
|
||||
state = state_root(root)
|
||||
return {
|
||||
"config": Path(root).resolve() / ".casan" / "config.json",
|
||||
"readiness": Path(root).resolve() / ".casan" / "readiness.json",
|
||||
"receipt": state / "state" / "latest-run.json",
|
||||
"metrics": state / "logs" / "cost" / "metrics.jsonl",
|
||||
"provider": state / "logs" / "level5" / "provider-usage.jsonl",
|
||||
@@ -185,6 +186,7 @@ def paths(root: str | Path) -> dict[str, Path]:
|
||||
|
||||
def project_profile(root: str | Path) -> dict[str, Any]:
|
||||
config = read_json(paths(root)["config"])
|
||||
readiness = read_json(paths(root)["readiness"])
|
||||
maturity = config.get("maturity") if isinstance(config.get("maturity"), dict) else {}
|
||||
return {
|
||||
"project_id": _text(config.get("project_id"), Path(root).resolve().name),
|
||||
@@ -199,6 +201,26 @@ def project_profile(root: str | Path) -> dict[str, Any]:
|
||||
"status": _text(maturity.get("status"), "not_assessed"),
|
||||
"evidence": _text(maturity.get("evidence")) or None,
|
||||
},
|
||||
"readiness": readiness if readiness else {
|
||||
"schema_version": 1,
|
||||
"overall_status": "not_assessed",
|
||||
"dimensions": {
|
||||
"core": {
|
||||
"status": "not_assessed",
|
||||
"summary": "Run `casan readiness --refresh` to assess this installation.",
|
||||
"acceptance": [],
|
||||
},
|
||||
"domain_pipeline": {
|
||||
"status": "not_assessed",
|
||||
"summary": "Domain Pipeline readiness has not been assessed.",
|
||||
},
|
||||
"provider_telemetry": {
|
||||
"status": "not_assessed",
|
||||
"summary": "Provider Telemetry readiness has not been assessed.",
|
||||
},
|
||||
},
|
||||
"next_actions": [],
|
||||
},
|
||||
"viewer": {
|
||||
"mode": "local_core",
|
||||
"scope": "single_project",
|
||||
|
||||
Reference in New Issue
Block a user