Skip to content

Commit 234d7a2

Browse files
Use kit daemon runtime (#578)
## Summary - replace the custom daemon state-file and PID-lock implementation with go.kenn.io/kit daemon runtime records and start locks - expose the shared /api/ping liveness endpoint for daemon discovery - remove obsolete platform-specific boot/process-start stale PID checks and the internal pidlock package ## Validation - go test ./internal/server ./cmd/agentsview - go test ./... (fails in existing unrelated internal/parser TestParseWorkBuddySession: expected project `proj`, got `agentsview`) Co-authored-by: Marius van Niekerk <mariusvniekerk@users.noreply.github.com>
1 parent 3d4de23 commit 234d7a2

34 files changed

Lines changed: 1213 additions & 1865 deletions

cmd/agentsview/classifier.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func newClassifierRebuildCommand() *cobra.Command {
5555
return fmt.Errorf("loading config: %w", err)
5656
}
5757
applyClassifierConfig(cfg)
58-
tr, err := detectTransport(cfg.DataDir, 0)
58+
tr, err := detectTransport(cfg.DataDir, cfg.AuthToken, 0)
5959
if err != nil {
6060
return err
6161
}
@@ -82,9 +82,9 @@ func guardClassifierRebuild(tr transport) error {
8282
}
8383
if tr.Mode == transportDirect && tr.DirectReadOnly {
8484
return errors.New(
85-
"local daemon is active but not responding; " +
86-
"refusing to rebuild to avoid competing for " +
87-
"write ownership; stop the daemon first",
85+
"local daemon owns the SQLite archive but is not responding; " +
86+
"refusing to rebuild to avoid competing for write ownership; " +
87+
"stop the daemon first",
8888
)
8989
}
9090
return nil

cmd/agentsview/classifier_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ func TestClassifierRebuildRefusesOnDirectReadOnly(t *testing.T) {
140140
}
141141

142142
func TestClassifierRebuildAllowsDirectWritable(t *testing.T) {
143-
tr := transport{Mode: transportDirect, DirectReadOnly: false}
143+
tr := transport{Mode: transportDirect}
144144
assert.NoError(t, guardClassifierRebuild(tr))
145145
}
146146

0 commit comments

Comments
 (0)