Merge pull request 'Allow research source recovery to complete' (#390) from codex/household-travel-query-fix into main

Reviewed-on: #390
This commit is contained in:
m
2026-08-25 21:08:39 +00:00
2 changed files with 4 additions and 13 deletions
+3 -1
View File
@@ -9,7 +9,6 @@ import (
func TestSpecializedInformationReplyIsNotOverwrittenByResearch(t *testing.T) {
for _, kind := range []interaction.InformationRequestKind{
interaction.InformationRequestMemoryInventory,
interaction.InformationRequestTimeDifference,
interaction.InformationRequestCapabilityInventory,
interaction.InformationRequestCognitiveModelInventory,
interaction.InformationRequestCognitiveChannelStatus,
@@ -19,6 +18,9 @@ func TestSpecializedInformationReplyIsNotOverwrittenByResearch(t *testing.T) {
t.Fatalf("specialized information request %q must bypass general research", kind)
}
}
if !shouldRunGeneralResearch(interaction.InformationRequestTimeDifference) {
t.Fatal("time difference must use the current-data research route")
}
if !shouldRunGeneralResearch("") {
t.Fatal("ordinary research requests must still use general research")
}
+1 -12
View File
@@ -770,9 +770,6 @@ func main() {
case interaction.InformationRequestMemoryInventory:
planningReply = humanMemoryInventory(conversationHistory, assistantName)
needsCognition = false
case interaction.InformationRequestTimeDifference:
planningReply = humanTimeDifferenceReply(effectiveTaskMessage)
needsCognition = false
case interaction.InformationRequestResearchFailureExplanation:
planningReply = "Я не выдаю предположение как факт, если не получил согласованных проверяемых данных. Могу повторить поиск, уточнить запрос или проверить другой источник."
needsCognition = false
@@ -1638,7 +1635,7 @@ func main() {
}
func shouldRunGeneralResearch(kind interaction.InformationRequestKind) bool {
return kind == ""
return kind == "" || kind == interaction.InformationRequestTimeDifference
}
func creatorSessionHandler(bootstrapToken, creatorUsername, creatorPassword string, sessionKey []byte, now func() time.Time) http.HandlerFunc {
@@ -1974,14 +1971,6 @@ func latestAssistantName(history []interaction.HumanUtterance) string {
return latestName
}
func humanTimeDifferenceReply(message string) string {
lower := strings.ToLower(message)
if strings.Contains(lower, "моск") && strings.Contains(lower, "шанх") {
return "Шанхай опережает Москву на 5 часов. Если в Москве 12:00, в Шанхае 17:00."
}
return "Уточните два города — я сравню их часовые пояса."
}
func researchSourceLabel(finding epistemics.ResearchFinding) string {
title := strings.TrimSpace(finding.Source.Title)
locator := strings.TrimSpace(finding.Source.Locator)