Skip to content

fix(roadmap): count only answered searches in alternatives - #4101

Merged
dan-petty merged 4 commits into
mainfrom
fix/4044-alternatives-counts-answered-searches
Nov 8, 2026
Merged

dan-petty merged 4 commits into
mainfrom
fix/4044-alternatives-counts-answered-searches

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

A search outage gave a false "no tool" verdict in the alternatives check (#4044). AlternativesTools.search_web recorded a Search for every query, also when no provider answered, so a verdict none after only failed searches passed _refusal and stood for the recheck period.

cited_web_search now returns SearchAnswer(text, answered). A failed or refused query is not answered. AlternativesTools records a Search only for an answered query and counts every call separately for the search limit. The retry message and the failure reason say "answered search". The refine tool still uses the text only.

Closes #4044

Change: openspec/changes/archive/2026-11-08-4044-alternatives-counts-answered-searches/
Elapsed: 5.03s

@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Nov 8, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Test record for #4044.

Fail-to-pass. devops ci fail-to-pass --base origin/main on the new and changed test files (tests/roadmap/test_roadmap_alternatives.py, tests/roadmap/test_roadmap_alternatives_search.py): 7 tests failed on the base and pass on the branch. 166 other tests in those files passed on both. The log is .data/agent/state/4044-fail-to-pass.log in the author worktree. The base fails because cited_web_search returns a plain string and AlternativesTools records every query.

Full CI. devops ci ran once on the final code before the rebase onto the release 0.86.0 commit: exit 0, all 25 rows passed (test row 18 min 48 s). The rebase touched no file of this change. After it, devops openspec check and the 7 new search tests passed again.

Rollout rule. The change adds, removes, renames or tightens no setting. k8s/devops/configmap.example.yaml and the live ConfigMap are not touched, so the test that loads the example ConfigMap into Settings is not needed. Nothing was applied to the cluster.

Choices for a person to review.

  • A refused query (SearchQueryRefused) also counts as not answered, because it ran no search. The issue names only SearchFailed.
  • Every search_web call still counts against the search limit (search_calls), so a failing provider cannot give the model unlimited calls.

@dan-petty
dan-petty marked this pull request as ready for review November 8, 2026 01:13
@dan-petty
dan-petty merged commit b34fe0e into main Nov 8, 2026
25 checks passed
@dan-petty
dan-petty deleted the fix/4044-alternatives-counts-answered-searches branch November 8, 2026 01:43
dan-petty pushed a commit that referenced this pull request Nov 8, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.87.0](v0.86.0...v0.87.0)
(2026-11-08)


### Features

* **k8s:** add k8s crawl4ai-check command
([#4108](#4108))
([32e247f](32e247f))


### Bug Fixes

* **repos:** keep unmanaged and ignored-data worktrees in add reclaim
([#4106](#4106))
([8978d56](8978d56))
* **roadmap:** check a split plan of the stage with every gate
([#4109](#4109))
([768dbd3](768dbd3))
* **roadmap:** count only answered searches in alternatives
([#4101](#4101))
([b34fe0e](b34fe0e))
* **roadmap:** keep a round alive on item-changed; fail on bad schedule
([#4102](#4102))
([9231dc3](9231dc3))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(roadmap): alternatives counts only answered searches

1 participant