fix(review round 1): daemon PAT-header auth, job pruning, session-split batches, streaming tars, seed cleanup, ping/pong, byte caps, branch switch, slug --, ctx cancel, Init:true, pagination, latest/before events; web newest-window history + load-older, offline busy gate, staleness guards, memo store, auth probe, scroll key, focus-visible, draft restore, poll dedup; 106+181 tests, coverage 96.2%/95.1%+

This commit is contained in:
Raphael Westphal
2026-08-18 18:49:52 +02:00
parent 64e45e1a82
commit 6aac763563
25 changed files with 2564 additions and 959 deletions
+5 -1
View File
@@ -67,7 +67,9 @@ func run(args []string) error {
hub := NewHub(store)
gitlab := NewGitLab(store, envOr(envGitLabBaseURL, defaultGitLabBase))
spawner, err := NewSpawner(store, hub, envOr(envGitLabBaseURL, defaultGitLabBase))
spawnerCtx, spawnerCtxCancel := context.WithCancel(context.Background())
defer spawnerCtxCancel()
spawner, err := NewSpawner(spawnerCtx, store, hub, envOr(envGitLabBaseURL, defaultGitLabBase))
if err != nil {
return fmt.Errorf("docker client: %w", err)
}
@@ -94,10 +96,12 @@ func run(args []string) error {
defer signal.Stop(stop)
select {
case err := <-serveErr:
spawnerCtxCancel()
return fmt.Errorf("listen: %w", err)
case <-stop:
}
log.Printf("shutting down")
spawnerCtxCancel()
ctx, cancel := context.WithTimeout(context.Background(), shutdownGrace)
defer cancel()
if err := httpServer.Shutdown(ctx); err != nil {