feat: unify installation model catalog

This commit is contained in:
Codex
2026-09-02 18:45:33 +02:00
parent ae053961a3
commit 7b7927bfe5
169 changed files with 3696 additions and 4572 deletions
+9 -1
View File
@@ -15,6 +15,7 @@ import (
"github.com/aritmolab/thothii/tools/tht/internal/authconfig"
"github.com/aritmolab/thothii/tools/tht/internal/compose"
"github.com/aritmolab/thothii/tools/tht/internal/config"
"github.com/aritmolab/thothii/tools/tht/internal/modelprojection"
"github.com/aritmolab/thothii/tools/tht/internal/output"
"github.com/aritmolab/thothii/tools/tht/internal/pi"
"github.com/aritmolab/thothii/tools/tht/internal/service"
@@ -101,7 +102,7 @@ func RunWithProbe(ctx context.Context, installation config.Installation, runner
return Report{}, errors.New("doctor requires an HTTP probe")
}
secretValues, secretErr := secretValues(installation)
report := Report{Checks: make([]Check, 0, 12)}
report := Report{Checks: make([]Check, 0, 13)}
add := func(name, status, detail string) {
report.Checks = append(report.Checks, Check{Name: name, Status: status, Detail: output.SanitizeDetail(detail, secretValues)})
}
@@ -111,6 +112,13 @@ func RunWithProbe(ctx context.Context, installation config.Installation, runner
} else {
add("descriptor", StatusPassed, "installation descriptor is loaded")
}
if drift, err := modelprojection.Check(installation); err != nil {
add("model-projection", StatusFailed, "model runtime projections could not be recomputed")
} else if len(drift) > 0 {
add("model-projection", StatusFailed, "generated model runtime projections differ: "+strings.Join(drift, ", "))
} else {
add("model-projection", StatusPassed, "generated model runtime projections match modelCatalog")
}
if err := filePermissions(installation); err != nil || secretErr != nil {
if secretErr != nil {
add("files", StatusFailed, "declared secret files could not be read")