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:
+20
-20
@@ -12,14 +12,14 @@ import (
|
||||
|
||||
// Fact — one observation. Ts is valid-time (true-as-of), as in store.
|
||||
type Fact struct {
|
||||
ID int64 `json:"id"`
|
||||
Ts time.Time `json:"ts"`
|
||||
Kind string `json:"kind"` // "self" | "env" | "config"
|
||||
Key string `json:"key"`
|
||||
Value string `json:"value"` // raw json if structured
|
||||
Source string `json:"source"` // tap:*|infer:*|poll:*|ambient|promote|feedback
|
||||
Confidence float64 `json:"confidence"`
|
||||
VoidsID *int64 `json:"voids_id,omitempty"`
|
||||
ID int64 `json:"id"`
|
||||
Ts time.Time `json:"ts"`
|
||||
Kind string `json:"kind"` // "self" | "env" | "config"
|
||||
Key string `json:"key"`
|
||||
Value string `json:"value"` // raw json if structured
|
||||
Source string `json:"source"` // tap:*|infer:*|poll:*|ambient|promote|feedback
|
||||
Confidence float64 `json:"confidence"`
|
||||
VoidsID *int64 `json:"voids_id,omitempty"`
|
||||
}
|
||||
|
||||
// Bucket — presence hysteresis state: "present" | "away".
|
||||
@@ -66,9 +66,9 @@ type Reminder struct {
|
||||
// routing and tone. presence = reachability, NOT wakefulness (spec). Loop
|
||||
// reads probes + computes score itself; modules get the resolved snapshot.
|
||||
type Presence struct {
|
||||
Bucket Bucket `json:"bucket"`
|
||||
Score float64 `json:"score"`
|
||||
Updated time.Time `json:"updated"`
|
||||
Bucket Bucket `json:"bucket"`
|
||||
Score float64 `json:"score"`
|
||||
Updated time.Time `json:"updated"`
|
||||
}
|
||||
|
||||
// WriteFactReq — the only state mutation a capture/tool module performs.
|
||||
@@ -315,19 +315,19 @@ func CallerFrom(ctx context.Context) (Caller, bool) {
|
||||
// Sentinel errors. Mirror store's 1:1 so module code reads the same whether
|
||||
// in-process or over the wire. The store adapter translates store.* → these.
|
||||
var (
|
||||
ErrNoFact = errors.New("ipc: no fact for key")
|
||||
ErrConfidence = errors.New("ipc: confidence must be in (0.0, 1.0]")
|
||||
ErrVoidsMissing = errors.New("ipc: voids_id does not reference an existing fact")
|
||||
ErrNudgeNotFound = errors.New("ipc: nudge not found")
|
||||
ErrNudgeOutcome = errors.New("ipc: nudge already resolved")
|
||||
ErrNoFact = errors.New("ipc: no fact for key")
|
||||
ErrConfidence = errors.New("ipc: confidence must be in (0.0, 1.0]")
|
||||
ErrVoidsMissing = errors.New("ipc: voids_id does not reference an existing fact")
|
||||
ErrNudgeNotFound = errors.New("ipc: nudge not found")
|
||||
ErrNudgeOutcome = errors.New("ipc: nudge already resolved")
|
||||
ErrReminderNotFound = errors.New("ipc: reminder not found")
|
||||
ErrReminderState = errors.New("ipc: reminder not in a mutable state")
|
||||
ErrUnknownMethod = errors.New("ipc: unknown method")
|
||||
ErrBadParams = errors.New("ipc: bad params")
|
||||
ErrReminderState = errors.New("ipc: reminder not in a mutable state")
|
||||
ErrUnknownMethod = errors.New("ipc: unknown method")
|
||||
ErrBadParams = errors.New("ipc: bad params")
|
||||
// ErrForbidden — the caller's authority doesn't cover this call. The
|
||||
// auth layer's only wire-exported verdict: surface caps the layer, or a
|
||||
// write was out-of-scope, or step-up was required but not asserted. The
|
||||
// text ErrForbidden carries is derived during dispatch (from auth.ErrForbidden
|
||||
// via fmt.Errorf %w wrapping); the wire carries codeForbidden.
|
||||
ErrForbidden = errors.New("ipc: forbidden")
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user