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:
+11
-11
@@ -7,16 +7,16 @@
|
||||
// a classifier owns the route; the SLM stays in its phrasing lane. same
|
||||
// boundary as "rules decide, llm phrases," extended to the reactive path.
|
||||
// - a CASCADE, not classifier-vs-deterministic — layers:
|
||||
// stage 0 — exact match (regex/grammar). wake-word + known command
|
||||
// grammar. "maven, restart nginx" hits the allowlist directly,
|
||||
// skips the classifier. lowest latency — the vosk command path.
|
||||
// stage 1 — intent classifier. embed utterance, nearest-centroid over
|
||||
// labeled intents. one forward pass, ~30ms cpu, similarity score.
|
||||
// stage 2 — slot extraction, per intent. classification gives *what kind*,
|
||||
// not *the args*. reminders need a datetime, acts need fn+params.
|
||||
// stage 3 — confidence gate. below threshold → clarify, don't guess.
|
||||
// same pattern as since(key)==null → don't fire: a misrouted
|
||||
// fact is a confident wrong write — worse than a gap.
|
||||
// stage 0 — exact match (regex/grammar). wake-word + known command
|
||||
// grammar. "maven, restart nginx" hits the allowlist directly,
|
||||
// skips the classifier. lowest latency — the vosk command path.
|
||||
// stage 1 — intent classifier. embed utterance, nearest-centroid over
|
||||
// labeled intents. one forward pass, ~30ms cpu, similarity score.
|
||||
// stage 2 — slot extraction, per intent. classification gives *what kind*,
|
||||
// not *the args*. reminders need a datetime, acts need fn+params.
|
||||
// stage 3 — confidence gate. below threshold → clarify, don't guess.
|
||||
// same pattern as since(key)==null → don't fire: a misrouted
|
||||
// fact is a confident wrong write — worse than a gap.
|
||||
// - save-where is the routing axis: act | reminder | fact | note | query.
|
||||
// - misroute correction = new centroid example — append-only, grows the
|
||||
// classifier as used. same shape as nudges.outcome tuning cooldowns.
|
||||
@@ -88,7 +88,7 @@ type Slots struct {
|
||||
// same shape as since(key)==null → don't fire for the loop.
|
||||
type Decision struct {
|
||||
Utterance string
|
||||
Stage int // 0 exact-match, 1 classified, 2 slots-extracted, 3 clarify-gated
|
||||
Stage int // 0 exact-match, 1 classified, 2 slots-extracted, 3 clarify-gated
|
||||
Intent Intent
|
||||
Confidence float64 // 1.0 for stage-0; classifier cosine similarity for 1+
|
||||
Slots Slots
|
||||
|
||||
@@ -228,10 +228,10 @@ func (t *unigramTokenizer) tokenize(text string) []int64 {
|
||||
}
|
||||
|
||||
type cand struct {
|
||||
start int
|
||||
end int
|
||||
id int64
|
||||
score float64
|
||||
start int
|
||||
end int
|
||||
id int64
|
||||
score float64
|
||||
}
|
||||
|
||||
func (t *unigramTokenizer) encodeWord(word string) []int64 {
|
||||
|
||||
Reference in New Issue
Block a user