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
+3 -3
View File
@@ -33,8 +33,8 @@ import (
type Client struct {
path string
mu sync.Mutex
c net.Conn
mu sync.Mutex
c net.Conn
dial func() (net.Conn, error)
}
@@ -188,4 +188,4 @@ func marshalParams(v any) (json.RawMessage, error) {
return nil, fmt.Errorf("worker: marshal params: %w", err)
}
return b, nil
}
}
+1 -1
View File
@@ -64,4 +64,4 @@ func readFrame(r io.Reader, v any) error {
return fmt.Errorf("worker: unmarshal frame: %w", err)
}
return nil
}
}
+1 -1
View File
@@ -22,4 +22,4 @@ type Transcriber interface {
// so a server asked for the wrong verb refuses cleanly).
type Synthesizer interface {
Synthesize(ctx context.Context, req SynthesizeReq) (SynthesizeResp, error)
}
}
+4 -4
View File
@@ -42,13 +42,13 @@ type TranscribeResp struct {
// SynthesizeReq — the synthesize verb args.
type SynthesizeReq struct {
Text string `json:"text"`
Lang string `json:"lang"` // "ru" | "en" | ""
Voice string `json:"voice"` // named voice or "" ⇒ worker default
Text string `json:"text"`
Lang string `json:"lang"` // "ru" | "en" | ""
Voice string `json:"voice"` // named voice or "" ⇒ worker default
Speed float64 `json:"speed"` // 1.0 = normal; clamped server-side
}
// SynthesizeResp — the synthesize verb result.
type SynthesizeResp struct {
Audio audio.Audio `json:"audio"` // rendered PCM
}
}
+1 -1
View File
@@ -225,4 +225,4 @@ func parentDir(p string) string {
}
}
return "."
}
}
+2 -2
View File
@@ -62,7 +62,7 @@ type Request struct {
// Response — one frame back from the worker. Exactly one of Result/Error is set.
type Response struct {
Result json.RawMessage `json:"r,omitempty"`
Error *RpcError `json:"e,omitempty"`
Error *RpcError `json:"e,omitempty"`
}
// RpcError — a typed wire error. Mirrors internal/ipc's shape for tooling
@@ -120,4 +120,4 @@ func rpcErr(err error) *RpcError {
return &RpcError{Code: c, Message: err.Error()}
}
return &RpcError{Code: c}
}
}
+1 -1
View File
@@ -286,4 +286,4 @@ func TestPathAfterListen(t *testing.T) {
func contains(haystack, needle string) bool {
return len(haystack) >= len(needle) && (bytes.Contains([]byte(haystack), []byte(needle)))
}
}