Bugfix
release-tag / release-image (push) Successful in 1m29s

This commit is contained in:
2026-07-27 19:18:36 +02:00
parent 9b3227348d
commit f21da92dc6
15 changed files with 316 additions and 49 deletions
+10
View File
@@ -4,6 +4,7 @@ import (
"bufio"
"encoding/json"
"errors"
"fmt"
"os"
"path/filepath"
"sort"
@@ -25,6 +26,15 @@ func Open(dir string, maxRuns int) (*Store, error) {
return nil, err
}
s := &Store{path: filepath.Join(dir, "runs.jsonl"), processed: map[string]struct{}{}, maxRuns: maxRuns}
// Fail fast during startup if the persistent data path is not writable.
// A read-only/root-owned Docker volume must not be discovered only after the first ticket.
f, err := os.OpenFile(s.path, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0o640)
if err != nil {
return nil, fmt.Errorf("state directory %q is not writable: %w", dir, err)
}
if err := f.Close(); err != nil {
return nil, fmt.Errorf("close state write probe: %w", err)
}
if err := s.load(); err != nil {
return nil, err
}