Skip to content

fix(roadmap): alternatives counts only answered searches #4044

Closed

Description

@dan-petty

Problem

A search outage gives a false "no tool" verdict in the alternatives check (alternatives.py).

AlternativesTools.search_web records a Search for every query, also when no provider answered. cited_web_search (refine_investigation.py) answers a failed search with the text "The search failed: no provider answered." It gives no signal to the caller.

_refusal accepts a verdict when tools.queries is not empty. So a search outage lets the model give the verdict none after searches that all failed. The check writes a false "no tool" result. It stands for DEFAULT_ROADMAP_ALTERNATIVES_RECHECK_DAYS (30 days).

Expected

Make cited_web_search return a small result with the text and a flag answered.

  • answered is true for a result list or for a real empty answer.
  • answered is false for SearchFailed.
  • The refine tool keeps using the text. Its text does not change.

search_web of the alternatives tools records a Search only when answered is true. _refusal then refuses a verdict when no search was answered. The check ends as a CheckFailure with a class, so the retry delay applies.

The order rule of #2951 does not change.

Acceptance criteria

  • uv run pytest tests/roadmap/test_roadmap_alternatives_search.py -k all_searches_failed - when every search fails, the result is a CheckFailure, not a none verdict. The body is not written.
  • uv run pytest tests/roadmap/test_roadmap_alternatives_search.py -k empty_answer - a search that answered with no result counts as a search.
  • uv run pytest tests/roadmap/test_roadmap_alternatives_search.py -k shared_text - cited_web_search returns a result with answered and the same text as before, for an answer, an empty answer and a failed search. The refine tool gets that text.

Every command above fails on the unchanged code. The pull request cites the fail-to-pass run (devops ci fail-to-pass --base <ref>).

Feasibility

I read alternatives.py (AlternativesTools.search_web, _refusal, validate_reply) and refine_investigation.py (cited_web_search, InvestigationTools.search_web) at origin/main. I did not run the code.

I ran the old criterion uv run pytest tests/roadmap -k 'refine and web_search' on main (commit 3a172a3). It gives 9 passed, so it is no fail-to-pass proof. The third criterion above replaces it.

The text "The search failed: no provider answered." is in the code at refine_investigation.py. The shared function is also used by refine, so the change keeps its text.

Existing tool considered

SearchFailed and web_search of ai/web_search.py. They are already the source of the failure signal. No library is needed.

Cost

Build: about 30k tokens and 1.5 h. Keep: about 2k tokens per quarter. Fix: about 8k tokens and 0.5 h.

Related

Part of #3027. #2951 (Ready gate on the alternatives verdict; do not duplicate). Order: before the issues #4049 and #4054. All change alternatives.py.

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/low
    on Nov 7, 2026
  2. dan-petty commented on Nov 7, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. A search outage produces a wrong verdict that persists for 30 days, but it requires all providers to fail simultaneously.
    • Value: Medium. Prevents a false no-tool verdict from blocking the roadmap for 30 days during a search outage.
    • Effort: Low. Changes are localized to two files with a small API addition and a conditional guard on Search recording.
    • Related: fix(roadmap): a failed alternatives check skips its item and does not fail the round #2949, which asks for a different change. Both concern the alternatives check failure path; #2949 handles the round-level retry after a CheckFailure, while this candidate makes the check correctly produce that CheckFailure when every search fails.
  3. added
    priority/p2-medium
    on Nov 7, 2026
  4. added
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 7, 2026
  5. removed
    status/in-review
    owner/agent
    on Nov 8, 2026
  6. devops-cli-service commented on Nov 8, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-08 03:31 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions