mavend: run the persona checks before she speaks (V-399)
The checks stay in the eval package and the daemon calls three of them: feminine, address, and a new leaked-reasoning test. No retry — it doubles the latency on the turn that is already going badly, and on the nudge path the moment has passed. A failure falls back to the deterministic floor and is logged with the whole rejected text and counted by check name. hisgender is deliberately not run: the simulator showed it rejecting "записала, что ты выпил воды", which is her own correct self-reference.
This commit is contained in:
@@ -67,6 +67,19 @@ func RunChecks(c Case, body, mood string) []Result {
|
||||
}
|
||||
}
|
||||
|
||||
// Feminine, HisGender and Address expose three checks one at a time, so the
|
||||
// daemon can run them on a phrased message before he hears it (Vikunja #399).
|
||||
// Only these three: they are unambiguous string tests with nothing to compare
|
||||
// against, while length is path-specific and ontopic needs the fixture's
|
||||
// expected fragments, which do not exist at runtime.
|
||||
func Feminine(body string) Result { return checkFeminine(body) }
|
||||
|
||||
// HisGender — see checkHisGender.
|
||||
func HisGender(body string) Result { return checkHisGender(body) }
|
||||
|
||||
// Address — see checkAddress.
|
||||
func Address(body string) Result { return checkAddress(body) }
|
||||
|
||||
func checkMood(mood string) Result {
|
||||
if Moods[mood] {
|
||||
return Result{CheckMood, true, ""}
|
||||
|
||||
Reference in New Issue
Block a user