PhraseChat and PhraseQuery hide model failures — a dead server scores as bad phrasing #108

Closed
claude wants to merge 0 commits from task/397-phrasechat-and-phrasequery-hide-model-fa into master
Contributor

Closes Vikunja #397.

Acceptance criteria and quality gate are in TASK.md on this branch.
Review the review, not the diff — leave comments and the agent will apply them via task start 397.

Closes Vikunja #397. Acceptance criteria and quality gate are in `TASK.md` on this branch. Review the review, not the diff — leave comments and the agent will apply them via `task start 397`.
claude added 2 commits 2026-08-03 22:41:26 +02:00
PhraseChat and PhraseQuery returned canned text with a nil error, so a dead
or OOM-killed server was indistinguishable from bad phrasing — "не знаю." is
also a legitimate answer.

Both now return the fallback text AND the error. The daemon keeps using the
text, so the turn still survives; a measuring caller counts a real failure.
An empty response is its own error: the model is up and said nothing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Call sites take the fallback text and log the error instead of treating a
canned string as success. phraseSource drops the text entirely — its callers
hold the passage and read it back better than "вот что я нашла: <passage>".

The talk scorer's before-and-after model probe (the #395 workaround) goes;
the run now fails only when every case errored, which is the honest
"nothing was measured" condition. TalkFixture gets its own schema version so
the two fixtures can be versioned apart.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
kami reviewed 2026-08-03 22:46:07 +02:00
@@ -63,2 +65,4 @@
log.Printf("voice: chat: %v", err)
}
if reply == "" {
return "поговорили."
Owner

let's replace with "не могу найти слов" or "даже не знаю, что сказать".

also: this looks like one more place where we can take from pre-written templates.

let's replace with "не могу найти слов" or "даже не знаю, что сказать". also: this looks like one more place where we can take from pre-written templates.
kami added 1 commit 2026-08-03 22:47:33 +02:00
It sat in world.go, which is about the workstation model; it is a phrasing
error and belongs in llmphraser.go. Also trims the PhraseQuery doc.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
kami added 1 commit 2026-08-03 22:50:55 +02:00
Review of #108: "поговорили." reads as a summary of a conversation that did
not happen. One exported constant now, so the Stub, the LLMPhraser fallback
and the daemon all say the same thing.

internal/voice/replier.go keeps its own copy — that is the separate replier
seam, not this one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Author
Contributor

Re the chat fallback (comment 844): took "даже не знаю, что сказать." It is an admission rather than a summary of a conversation that did not happen. One exported constant now, phraser.ChatFallback, so the Stub, the LLMPhraser fallback and cmd/mavend/actions.go all say it. internal/voice/replier.go keeps its own copy — that is the separate replier seam.

On templates: agreed in principle. nudges_ru_v1.json is keyed by rule with anti-repeat picking, and a chat fallback does not fit that shape without reworking the file. Say the word and I will file it as its own task.

Re the chat fallback (comment 844): took "даже не знаю, что сказать." It is an admission rather than a summary of a conversation that did not happen. One exported constant now, phraser.ChatFallback, so the Stub, the LLMPhraser fallback and cmd/mavend/actions.go all say it. internal/voice/replier.go keeps its own copy — that is the separate replier seam. On templates: agreed in principle. nudges_ru_v1.json is keyed by rule with anti-repeat picking, and a chat fallback does not fit that shape without reworking the file. Say the word and I will file it as its own task.
kami approved these changes 2026-08-04 12:49:59 +02:00
Author
Contributor

Landed transitively. This branch is already an ancestor of master, so there is nothing left to merge and Gitea did not close the pull request on its own.

Reviewed as part of a bottom-up pass over the open stack. The four open findings from that pass are worth a follow-up task, and none of them blocks anything here:

  • internal/router/stage0.go has two grammars named rest-of-day-query, and the second is dead.
  • internal/router/numwords.go holds ruNumerals, a second copy of the lexicon cardinals.
  • cmd/mavend/reminderbody.go and cmd/mavend/historyq.go still match Russian by hand.
  • internal/weather/openmeteo.go guesses declension by reversing endings, and bails under four runes.
Landed transitively. This branch is already an ancestor of `master`, so there is nothing left to merge and Gitea did not close the pull request on its own. Reviewed as part of a bottom-up pass over the open stack. The four open findings from that pass are worth a follow-up task, and none of them blocks anything here: - `internal/router/stage0.go` has two grammars named `rest-of-day-query`, and the second is dead. - `internal/router/numwords.go` holds `ruNumerals`, a second copy of the lexicon `cardinals`. - `cmd/mavend/reminderbody.go` and `cmd/mavend/historyq.go` still match Russian by hand. - `internal/weather/openmeteo.go` guesses declension by reversing endings, and bails under four runes.
claude closed this pull request 2026-08-04 18:34:47 +02:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kami/Maven#108