fix(R-1298): held-app reports only for installed apps (a restore hold always)

Red-proved. Commit only.
This commit is contained in:
2026-10-26 20:26:44 +01:00
parent dfd0f8ec53
commit b156e4526a
4 changed files with 75 additions and 3 deletions
+6
View File
@@ -1068,6 +1068,12 @@ func main() {
// when one is gone, every hold again once a day and after each start. One observer of the hold store, so every
// writer is covered. Pinned by internal/holdreport.
holdReporter := holdreport.New(sett, notifier.PushEvent, logger)
// R-1298: „installed" = the app's app.yaml file exists (a product removal deletes it; an unreadable one still counts,
// the R-1220 rule). An install's hold of an app without one is not reported.
holdReporter.SetInstalled(func(stack string) bool {
_, err := os.Stat(filepath.Join(cfg.Paths.StacksDir, stack, "app.yaml"))
return err == nil
})
sched.Every("hold-report", time.Minute, func(ctx context.Context) error {
holdReporter.Tick(time.Now())
return nil