hub v0.181.0 (not deployed): root files are 'behind' only when the files differ (R-1392, decision 304); Go 1.27.4 (R-1391)
gates / gates (push) Successful in 1m55s

This commit is contained in:
admin committed 2026-11-14 10:11:31 +01:00
1 parent 561a4d98e9
commit 83316fc986
15 files changed
+442 -11

No files matched your search

+13
View File
@@ -17,6 +17,7 @@ import (
"gitea.dooplex.hu/admin/felhom-hub/internal/accesslog"
"gitea.dooplex.hu/admin/felhom-hub/internal/api"
"gitea.dooplex.hu/admin/felhom-hub/internal/assets"
"gitea.dooplex.hu/admin/felhom-hub/internal/bundlefiles"
"gitea.dooplex.hu/admin/felhom-hub/internal/claim"
"gitea.dooplex.hu/admin/felhom-hub/internal/dbsnap"
"gitea.dooplex.hu/admin/felhom-hub/internal/gitea"
@@ -497,6 +498,18 @@ func main() {
logger.Printf("[ERROR] OS_APPROVE_NIGHTS=%q invalid — keeping 1", v)
}
}
// R-1392 (`09` §3 decision 304): a box whose config bundle holds the vouched FILES under an older label is not
// "behind". Needs the package registry; without it the old verdict stays (compare the bundle's sha256 only).
if giteaClient != nil {
bundleSame := &bundlefiles.Resolver{Logger: logger, Fetch: func(ctx context.Context, version string) ([]byte, error) {
return giteaClient.FetchFile(ctx, "felhom-agent", version, "felhom-config-bundle.json", 4<<20)
}}
osSvc.SameBundleFiles = bundleSame.Same
webServer.SetSameBundleFiles(bundleSame.Same)
logger.Printf("[INFO] Root files: bundles are compared by their files (R-1392)")
} else {
logger.Printf("[WARN] Root files: no package registry — bundles are compared by sha256 only (R-1392 not active)")
}
osSvc.DockerNights = 2
if v := os.Getenv("OS_DOCKER_APPROVE_NIGHTS"); v != "" {
if n, nerr := strconv.Atoi(v); nerr == nil && n >= 0 {