← Back to Pull requests

test(storage): add Jira requirement links to test docstrings - Pt. 1 #6969

Open
unknown opened this pull request with 363 lines diff across 4 files
View on GitHub
unknown unknown commented on Nov 19, 2026 16:30 UTC
Author

##### What this PR does / why we need it:
Adds Jira requirement traceability to test function docstrings and moves
the Polarion test-case IDs there from their decorators:

  • Jira: https://redhat.atlassian.net/browse/<ID> # <skip-jira-utils-check> line(s) added to each test docstring (after any existing Jira: lines, otherwise at the top). Skipped for tests whose own docstring already links an STP — the STP is that test's required traceability link, and the Jira line is the fallback for tests without one (unless the run used --no-skip-stp).

  • Polarion test-case IDs move from @pytest.mark.polarion("CNV-XXXX") decorators into the docstring as Polarion: CNV-XXXX lines; the decorators are removed.

  • Tests without a docstring get one: leading # comments above the test body become docstring text, and single-line docstrings are expanded to multi-line.

  • Polarion markers removed from parametrize decorators keep their parameters; only the marks=pytest.mark.polarion(...) entries are stripped.

  • Unused imports left behind by the marker removal (e.g. pytest) are cleaned up by the repo's pre-commit hooks (ruff).
  • Test-to-requirement traceability now lives in the code itself (code-first test management): each test links directly to the Jira requirement resolved from the test's Polarion linkage, or to its STP. Polarion IDs are kept in the docstring so the existing Polarion linkage stays visible during the migration.

    ##### Which issue(s) this PR fixes:
    NONE

    ##### Special notes for reviewer:

  • 5 test files changed

  • Jira links added: CNV-25151, CNV-484, CNV-50825, CNV-5128, CNV-8296, KNIP-1131

  • Existing docstring text is preserved (only reflowed when a docstring is created or expanded to multi-line).

  • Test behavior is unchanged — docstrings and decorators only.

  • Polarion IDs flagged for manual review (no Jira link found): CNV-2001, CNV-2004, CNV-2007, CNV-2008, CNV-2011, CNV-2015, CNV-2018, CNV-2198, CNV-2340, CNV-2812, CNV-2813, CNV-2815, CNV-3410, CNV-3474, CNV-3475, CNV-3476, CNV-3478, CNV-3479, CNV-3480, CNV-3481, CNV-3482, CNV-3483, CNV-3484, CNV-3485, CNV-3486, CNV-3637, CNV-377, CNV-674, CNV-675, CNV-784, CNV-875, CNV-876, CNV-8908, CNV-8909, CNV-8910, CNV-8911, CNV-8912, CNV-8913, CNV-8914, CNV-8915, CNV-8916, CNV-8917
  • ##### jira-ticket:
    NONE
    <!-- This PR is not tracked by a single Jira ticket — it adds requirement links to many Jiras; the requirement links live in the test docstrings. -->

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->
    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    Tests
    Updated test-case tracking references across storage and migration test coverage. Test behavior, parameters, fixtures, and assertions remain unchanged, so these updates do not change product functionality or affect the user experience.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 363 lines (+272 / -91) across 4 files Reviewer: acinko-rh Review duration: 16211m
    All Vouch review confidence checks passed
    Residual risk 0.23 = Change Risk (0.43) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 363 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.353
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #6969"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.7% (MEDIUM) · Higher = larger blast radius
    42.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 22.7% · Safe to merge
    22.7%