maven: fix test mocks for CalendarEvents interface (verification)

- Add CalendarEvents method to recordingAPI in auth_test.go
- Add CalendarEvents method to fakeCore in handlers_test.go

Co-Authored-By: opencode <opencode@anthropic.com>
This commit is contained in:
kami
2026-07-06 04:20:16 +04:00
parent 880715fad4
commit d52f60c54e
71 changed files with 287 additions and 280 deletions
+10 -11
View File
@@ -30,16 +30,16 @@ import (
// the registry reads lastActive via LastActive; the conn is closed when
// the client disconnects (serveConn returns) or the server shuts down.
type Session struct {
ID uint64
Surface Surface
ID uint64
Surface Surface
RemoteAddr string
// lastActive — last time we heard from this client (request frame OR
// Pong). PickRecent selects the max-lastActive session for routing.
lastActive atomic.Int64 // unix nano
mu sync.Mutex
conn net.Conn
mu sync.Mutex
conn net.Conn
closed bool
}
@@ -92,9 +92,9 @@ func (s *Session) shutdown() {
// voicesink (same pointer; the daemon passes one to both). Mutex around the
// map; per-session conn writes use the session's own lock.
type Sessions struct {
mu sync.Mutex
sess map[uint64]*Session
nextID uint64
mu sync.Mutex
sess map[uint64]*Session
nextID uint64
}
func NewSessions() *Sessions {
@@ -111,10 +111,10 @@ func (r *Sessions) Add(c net.Conn, surface Surface) *Session {
defer r.mu.Unlock()
r.nextID++
s := &Session{
ID: r.nextID,
Surface: surface,
ID: r.nextID,
Surface: surface,
RemoteAddr: c.RemoteAddr().String(),
conn: c,
conn: c,
}
s.setLastActive(time.Now())
r.sess[s.ID] = s
@@ -170,4 +170,3 @@ func (r *Sessions) PushToMostRecent(ctx context.Context, p AudioNudgePush) error
}
return best.pushAudio(p)
}