Skip to content

fix(ai): widen pydantic-ai knowledge base manual version patterns #6998

Done

Description

@dan-petty

Problem Description

The knowledge base manuals for pydantic-ai and pydantic-ai-harness pin their applies_to frontmatter patterns to @2.71.* and @0.71.*:

  • src/devops_cli/ai/knowledge_base/devops_cli/libraries/pydantic_ai.md: pkg:pypi/[email protected].*
  • src/devops_cli/ai/knowledge_base/devops_cli/libraries/pydantic_ai_harness.md: pkg:pypi/[email protected].*
  • src/devops_cli/ai/knowledge_base/it_domains/tools/pydantic_ai.md: pkg:pypi/[email protected].*

When Renovate upgrades pydantic-ai to 2.73.0 and pydantic-ai-harness to 0.73.0 in PR #6989, tests/review/test_kb_manuals_metadata.py fails because installed versions do not match the restrictive minor-pinned pattern. Other libraries in the repository (such as pydantic@2.*, packaging@26.*, and rich@15.*) use major wildcards.

Reproduction Steps

  1. Update pydantic-ai to 2.73.0 and pydantic-ai-harness to 0.73.0 in pyproject.toml / uv.lock.
  2. Run uv run pytest tests/review/test_kb_manuals_metadata.py.
  3. Observe failure:
    AssertionError: devops_cli/libraries/pydantic_ai.md: applies_to patterns ['pkg:pypi/[email protected].*'] do not match installed version 2.73.0

Expected vs Actual Behavior

Expected: Knowledge base manuals for stable major versions use standard major wildcards pkg:pypi/pydantic-ai@2.* and pkg:pypi/pydantic-ai-harness@0.* so routine minor updates pass validation.
Actual: Manuals are pinned strictly to @2.71.* and @0.71.*, causing CI quality gates to fail on routine Renovate updates.

Environment Diagnostics

  • DevOps CLI Version: current main
  • Python Version: 3.14+
  • OS & Architecture: Linux x86_64
  • Execution Environment: DevContainer / CI

Logs, Traces, or Terminal Output

FAILED tests/review/test_kb_manuals_metadata.py::test_kb_manual_dependencies_match_installed
AssertionError: devops_cli/libraries/pydantic_ai.md: applies_to patterns ['pkg:pypi/[email protected].*'] do not match installed version 2.73.0

Pre-Submission Checklist

  • I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
  • I have checked existing issues and pull requests to ensure this is not a duplicate.

Proposed design

Problem statement

The knowledge base manuals for pydantic-ai and pydantic-ai-harness pin their applies_to frontmatter to the current minor versions. Routine Renovate minor upgrades then fail the metadata test. The change widens the patterns to the major wildcards that the project uses for other libraries.

Acceptance criteria

Requirement: Pydantic-ai library manual uses major wildcard

The applies_to frontmatter in src/devops_cli/ai/knowledge_base/devops_cli/libraries/pydantic_ai.md SHALL declare pkg:pypi/pydantic-ai@2.*.

Scenario: Minor upgrade matches the library manual

  • WHEN uv run pytest tests/review/test_kb_manuals_metadata.py::test_kb_manual_dependencies_match_installed runs with pydantic-ai 2.73.0 installed.
  • THEN The command passes and reports no mismatch for devops_cli/libraries/pydantic_ai.md.

Requirement: Pydantic-ai tools manual uses major wildcard

The applies_to frontmatter in src/devops_cli/ai/knowledge_base/it_domains/tools/pydantic_ai.md SHALL declare pkg:pypi/pydantic-ai@2.*.

Scenario: Minor upgrade matches the tools manual

  • WHEN uv run pytest tests/review/test_kb_manuals_metadata.py::test_kb_manual_dependencies_match_installed runs with pydantic-ai 2.73.0 installed.
  • THEN The command passes and reports no mismatch for it_domains/tools/pydantic_ai.md.

Requirement: Pydantic-ai-harness manual uses major wildcard

The applies_to frontmatter in src/devops_cli/ai/knowledge_base/devops_cli/libraries/pydantic_ai_harness.md SHALL declare pkg:pypi/pydantic-ai-harness@0.*.

Scenario: Minor upgrade matches the harness manual

  • WHEN uv run pytest tests/review/test_kb_manuals_metadata.py::test_kb_manual_dependencies_match_installed runs with pydantic-ai-harness 0.73.0 installed.
  • THEN The command passes and reports no mismatch for devops_cli/libraries/pydantic_ai_harness.md.

Existing Tool Considered

No alternatives check has run. No open, maintained tool or library covers this metadata correction; the change edits three existing Markdown manuals. It builds no code, so there is no build, keep or fix cost.

Key questions

  • Which applies_to pattern should the two pydantic-ai manuals use?: Use pkg:pypi/pydantic-ai@2.* in both pydantic-ai manuals. (best practice) [sources: src/devops_cli/ai/knowledge_base/devops_cli/libraries/pydantic_ai.md, src/devops_cli/ai/knowledge_base/it_domains/tools/pydantic_ai.md, tests/review/test_kb_manuals_metadata.py]
    • Rejected: pkg:pypi/[email protected].*. The installed version 2.73.0 does not match this minor-pinned pattern, so the metadata test fails.
    • Chosen: pkg:pypi/pydantic-ai@2.*. This major wildcard matches routine 2.x upgrades and follows the pattern that other library manuals use.
    • Rejected: pkg:pypi/[email protected].*. The next minor upgrade makes the pattern stale and fails the same metadata test.
  • Which applies_to pattern should the pydantic-ai-harness manual use?: Use pkg:pypi/pydantic-ai-harness@0.* in the harness manual. (best practice) [sources: src/devops_cli/ai/knowledge_base/devops_cli/libraries/pydantic_ai_harness.md, tests/review/test_kb_manuals_metadata.py]
    • Rejected: pkg:pypi/[email protected].*. The installed version 0.73.0 does not match this minor-pinned pattern, so the metadata test fails.
    • Chosen: pkg:pypi/pydantic-ai-harness@0.*. This major wildcard matches routine 0.x upgrades and the issue expects this pattern.
    • Rejected: pkg:pypi/[email protected].*. The next minor upgrade makes the pattern stale and fails the same metadata test.
  • Does the change need a code change in src/devops_cli/ai/kb.py or in the metadata test?: No. The loader already matches wildcard patterns, and the test reads the installed versions. The change edits only the three applies_to values. [sources: src/devops_cli/ai/kb.py:184, tests/review/test_kb_manuals_metadata.py]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/bug
    scope/ai
    source/agent
    on Nov 24, 2026
  2. dan-petty commented on Nov 24, 2026

    @dan-petty
    OwnerAuthor
  3. added
    status/new
    value/medium
    effort/low
    priority/p1-high
    owner/agent
    on Nov 24, 2026
  4. devops-cli-service commented on Nov 24, 2026

    @devops-cli-service
    Contributor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

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

    @devops-cli-service
    Contributor

    Live since 2026-11-24 15:27 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/p1-highscope/aisource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions