Skip to content

Recover delayed Search Assist answers within one ask command - #164

Merged
variablenix merged 1 commit into
mainfrom
fix/ask-delayed-recovery
Sep 26, 2026
Merged

variablenix merged 1 commit into
mainfrom
fix/ask-delayed-recovery

Conversation

@variablenix

Copy link
Copy Markdown
Owner

Summary

Close a retry gap where an answer available after the initial Search Assist requests could only be retrieved by asking the same question again.

  • Space initial lightweight attempts by 300 ms instead of immediately repeating them.
  • If the provider chain misses, wait 500 ms and retry the original question once within the same command.
  • Reserve a three-second recovery window when at least 12 seconds remain; preserve shorter configured deadlines and never extend the overall timeout.
  • Keep successful replies on the fast path and retain existing provider fallbacks and success-only caching.

Verification

  • Regression fixtures for both Mario and Toad kart questions: two empty replies followed by a delayed answer recover within one command.
  • Tests cover bounded misses, cancellation, successful requests not retried, original-question preservation, and deadline reservation.
  • go test -race ./..., go vet ./..., staticcheck, and diff checks.
  • Live server checks returned Search Assist answers for both screenshot questions and the cost comparison; existing lookup smoke tests passed.

The live queries may already be cached upstream; deterministic delayed-response fixtures cover the first-miss recovery behavior. This fixes a concrete scheduling gap, not a guarantee of availability or a bypass of provider challenges.

@variablenix
variablenix merged commit 808b4bb into main Sep 26, 2026
3 checks passed
@variablenix
variablenix deleted the fix/ask-delayed-recovery branch September 26, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant