Skip to content

docs(openspec): the Qdrant retry spec names tenacity and a third wait #6762

Done

Description

@dan-petty

Problem

Checked at main on 2026-11-22.

  • The requirement qdrant-retry-wait-uses-clock-seam in openspec/specs/rag-lookup-pause/spec.md says: "The Qdrant retry SHALL wait between attempts through the sleep parameter of tenacity". _execute_with_retry in src/devops_cli/ai/rag/qdrant.py uses no tenacity. It is a for loop that calls the sleep parameter, which the clock seam supplies, through _record_retry.
  • Its scenario "retry backoff sequence is recorded in order" gives waits of 0.5, 1.0 and 1.5 s. DEFAULT_MAX_RETRIES is 3 attempts, so a request that fails each time waits 2 times: 0.5 and 1.0 s (test_a_request_that_keeps_failing_backs_off_longer_each_time_before_it_succeeds in tests/ai/rag/test_qdrant_request_telemetry.py records [0.5, 1.0]).
  • The requirement is about the Qdrant client, not about the pause of RAG lookups. The capability qdrant-request-retry, which fix(ai): retry a Qdrant call after a 502, 503 or 504 #6757 adds, holds the retry rules of the Qdrant client.

Proposed remedy

  • Move the requirement to qdrant-request-retry (REMOVED in rag-lookup-pause, ADDED in qdrant-request-retry), with text that matches the loop and the clock seam, and a scenario with the real count of waits.

Acceptance criteria

  • No spec says that the Qdrant retry uses tenacity.
  • The scenario of the waits gives the waits that DEFAULT_MAX_RETRIES attempts make.

Person steps

None.

Dependencies

Alternatives check of 2026-11-22: not-applicable.
Class: docs, no search.
Tool: none found.

Proposed design

Problem statement

The rag-lookup-pause spec says the Qdrant retry waits through tenacity and gives three waits. The code uses a for loop and the clock seam, and three attempts make two waits. The requirement belongs in qdrant-request-retry.

Acceptance criteria

Requirement: Remove the Qdrant retry requirement from rag-lookup-pause

The change SHALL remove the qdrant-retry-wait-uses-clock-seam requirement from openspec/specs/rag-lookup-pause/spec.md.

Scenario: The rag-lookup-pause spec has no Qdrant retry requirement

  • WHEN uv run pytest tests/openspec/test_qdrant_retry_spec.py::test_rag_lookup_pause_has_no_qdrant_retry_requirement runs
  • THEN the test passes and the spec has no requirement named qdrant-retry-wait-uses-clock-seam

Requirement: Add the Qdrant retry requirement to qdrant-request-retry

The change SHALL add the qdrant-retry-wait-uses-clock-seam requirement to openspec/specs/qdrant-request-retry/spec.md with text that names the sleep parameter supplied by the clock seam and does not name tenacity.

Scenario: The qdrant-request-retry spec has the clock-seam requirement

  • WHEN uv run pytest tests/openspec/test_qdrant_retry_spec.py::test_qdrant_request_retry_has_clock_seam_requirement runs
  • THEN the test passes and the requirement text has sleep and clock seam and no tenacity

Requirement: The retry scenario gives two waits

The scenario SHALL give the two waits that three attempts of DEFAULT_MAX_RETRIES make, 0.5 s and 1.0 s, and SHALL NOT give 1.5 s.

Scenario: The retry scenario has the waits of three attempts

  • WHEN uv run pytest tests/openspec/test_qdrant_retry_spec.py::test_qdrant_retry_scenario_has_two_waits runs
  • THEN the test passes and the scenario text has 0.5 and 1.0 and no 1.5

Existing Tool Considered

The alternatives check in the issue body records not-applicable for class docs and names no tool. The change edits OpenSpec text and builds no code, so there is no build cost.

Key questions

  • Where does the Qdrant retry requirement belong?: Move it to qdrant-request-retry, the capability that fix(ai): retry a Qdrant call after a 502, 503 or 504 #6757 adds for the retry rules of the Qdrant client. (best practice) [sources: openspec/specs/rag-lookup-pause/spec.md, src/devops_cli/ai/rag/qdrant.py:551]
    • Rejected: Keep it in rag-lookup-pause. The requirement is about the Qdrant client retry, not the pause of RAG lookups.
    • Chosen: Move it to qdrant-request-retry. The new capability holds the retry rules of the Qdrant client.
  • Does the Qdrant retry use tenacity?: No. _execute_with_retry is a for loop over DEFAULT_MAX_RETRIES attempts, and _record_retry calls the sleep parameter, which defaults to clock_seam.sleep. [sources: src/devops_cli/ai/rag/qdrant.py:551, src/devops_cli/ai/rag/qdrant.py:197, src/devops_cli/ai/rag/qdrant.py:558]
  • How many waits do DEFAULT_MAX_RETRIES attempts make, and what are they?: Three attempts make two waits: 0.5 s and 1.0 s, because _record_retry sleeps 0.5 * attempt before attempt 2 and attempt 3. [sources: src/devops_cli/config/defaults.py:568, src/devops_cli/ai/rag/qdrant.py:197, tests/ai/rag/test_qdrant_request_telemetry.py]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#6757

Activity

  1. added
    type/docs
    source/agent
    status/new
    effort/low
    value/low
    scope/openspec
    on Nov 22, 2026
  2. dan-petty commented on Nov 22, 2026

    @dan-petty
    OwnerAuthor
    • Priority: P3-Low. A spec text correction with no live impact and no blocker.
    • Related: fix(ai): retry a Qdrant call after a 502, 503 or 504 #6757, which asks for a different change. Both concern the Qdrant retry spec, but #6757 adds the retry capability for 502/503/504 while this item fixes the existing spec text and moves it to that capability.
  3. added
    priority/p3-low
    on Nov 22, 2026
  4. added
    status/ready
    and removed
    status/new
    on Nov 23, 2026
  5. devops-cli-service commented on Nov 23, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See the section Proposed design of the body.

  6. added
    status/in-progress
    status/in-review
    and removed
    status/ready
    status/in-progress
    on Nov 25, 2026
  7. removed
    status/in-review
    on Nov 25, 2026
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/p3-lowscope/openspecsource/agenttype/docsvalue/low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions