Skip to content

fix(roadmap): fix the cause of a refused alternatives check #6394

Closed

Description

@devops-cli-service

Split from #6346.

Problem: a refused alternatives check can cite a URL that the run did not return or fetch. The cause is not known. Four of five url refusals in the 2026-11-18 window are re-checks with an earlier result, but #6324 had no earlier result. Why deferred: issue #6346 first adds the true search count and a WARNING log line with the refused URL. The cause fix needs the data from that line. Acceptance criteria: when the log line shows a cause, the alternatives job SHALL remove that cause. A test SHALL reproduce the measured cause and assert that the reply is no longer refused for reason url. The change SHALL cite the log line and the item numbers that show the cause.

Proposed design

Problem statement

The alternatives check can refuse a reply for reason url when the reply cites a URL that the run did not return or fetch. The cause is not known. Four of five url refusals in the 2026-11-18 window are re-checks with an earlier result, and #6324 had no earlier result. The item waits on #6346, which adds the true search count and a WARNING log line with the refused URL.

Acceptance criteria

Requirement: Cause removed from the alternatives job

The alternatives job SHALL remove the measured cause, so that a reply that cites a URL the run returned or fetched is no longer refused for reason url.

Scenario: Supported reply is accepted

  • WHEN the check reads a reply and the run data that held the measured cause
  • THEN it keeps the reply and writes no refusal with reason code url

Requirement: Test replays the measured cause

A test MUST reproduce the measured cause and assert that the reply is no longer refused for reason url.

Scenario: Fixture holds the measured cause

  • WHEN the offline test scripts the search answer with WebFake and the reply with Script, sets the earlier result of the item, and runs plan_alternatives on the in-memory store
  • THEN the plan holds a check and no failure with reason code url

Requirement: Refusal stays for an unsupported URL

The alternatives check MUST keep the refusal for reason url when neither the run nor the earlier result of the item holds the cited URL.

Scenario: URL from no source

  • WHEN validate_reply checks a reply that cites a URL that neither the run nor the earlier result of the item holds
  • THEN it returns a CheckFailure with reason code url

Requirement: Change cites the evidence

The change MUST cite the log line and the item numbers that show the cause.

Scenario: Design names the log line and the items

  • WHEN uv run devops ci --check --only openspec validates the change folder
  • THEN the command passes on a design that holds the log line text and each item number that the cause shows

Existing Tool Considered

No alternatives check has run. A web search for an open, maintained tool or library that validates a cited URL against the URLs that a run returned or fetched found no candidate: the results were URL normalizers for SEO or social links, and each lacks the run's record, because it canonicalizes one URL and cannot say whether a search returned it. The defect is in the alternatives job of this project, and the fix changes that job. The written cost is one patch to _refusal_reason in src/devops_cli/roadmap/alternatives.py and one offline test: about 20k tokens of agent time to build and keep them, and half a day of elapsed time.

Key questions

  • What does the item wait on before the cause is known?: The delivery of fix(roadmap): show the cause of a refused alternatives check #6346. That item adds the true search count and a WARNING log line with the refused URL, and the cause fix needs the data from that line. (best practice) [sources: src/devops_cli/roadmap/alternatives.py:846, src/devops_cli/roadmap/alternatives.py:1178]
  • Is the item blocked, or does it have a dependency?: It has a dependency on fix(roadmap): show the cause of a refused alternatives check #6346. The work waits on another item, not on an outside event. [sources: .github/project-template.json:16, docs/roadmap/stage.md:138]
  • How does the test reproduce the cause with no live search?: An offline test scripts the search answer with WebFake and the model reply with Script, sets the earlier result of the item in the in-memory store, and runs plan_alternatives. It asserts that the plan holds a check and no failure with reason code url. (best practice) [sources: tests/roadmap/test_roadmap_alternatives_reply_fixable.py:72, tests/roadmap/test_roadmap_alternatives_reply_fixable.py:204, tests/roadmap/test_roadmap_alternatives_reply_fixable.py:216, tests/support/fakes/http.py:46, src/devops_cli/roadmap/alternatives.py:355, src/devops_cli/roadmap/alternatives.py:1401]
    • Chosen: Offline run with the fake search and the scripted model. It replays the search answer and the reply through WebFake and Script and runs plan_alternatives with no network; the existing reply-fixable test already runs a url refusal this way (tests/roadmap/test_roadmap_alternatives_reply_fixable.py:72, :216).
    • Rejected: Unit test of validate_reply with a hand-built AlternativesTools. It is offline, but it starts after search_web adds a returned URL to allowed_urls, so it cannot reproduce a cause in that bookkeeping (src/devops_cli/roadmap/alternatives.py:355). It is a useful second test, not the reproduction.
    • Rejected: Live check against a search provider. It needs network and outside state, and it gives no stable result.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#6346

Activity

  1. added
    type/bug
    source/agent
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 19, 2026
  2. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    ContributorAuthor
  3. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    ContributorAuthor

    Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.

  4. dan-petty commented on Nov 21, 2026

    @dan-petty
    Owner

    Data from #6346 (0.187.0, the Service log of the last 12 h, read on 2026-11-21):

    The causes to check: a page the model knows from its training, a link inside a fetched page that the run did not fetch, or a URL that a redirect or the normalization changes.

  5. added
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 21, 2026
  6. added
    status/in-review
    and removed
    status/in-progress
    on Nov 21, 2026
  7. removed
    status/in-review
    owner/agent
    on Nov 21, 2026
  8. devops-cli-service commented on Nov 21, 2026

    @devops-cli-service
    ContributorAuthor

    Live since 2026-11-21 13:09 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/mediumpriority/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