← Back to Pull requests

agents: modify rules according to code rabbit learning #6445

Open
unknown opened this pull request with 258 lines diff across 3 files
View on GitHub
unknown unknown commented on Oct 05, 2026 11:49 UTC
Author

##### What this PR does / why we need it:

  • Update AGENTS.md with CodeRabbit learnings: add known linter suppression exceptions, remove the stale Resource clients rule, clarify named-argument convention, add OS detection and SSL/network security patterns, expand Scripts Directory with known intentional behaviors, and tighten PR discipline wording
  • Add domain-specific AGENTS.md files for multiarch golden-image tests, product_upgrade tests, and nmstate network tests to capture context that prevents AI tools from incorrectly "fixing" intentional behavior
  • Expand the CodeRabbit test-instructions workflow with smoke-test specifics, fix the isTeamMember output key, and add guardrails against REQUEST_CHANGES flow and empty top-level PR review body
  • Update docs/AI_CONTRIBUTION_POLICY.md to list all three AI trailer variants (Assisted-by, Co-authored-by, Generated-by) so contributors pick the one that best reflects the AI's involvement
  • ##### Which issue(s) this PR fixes:

    ##### Special notes for reviewer:

  • Those rules are taken from code-rabbit learning stack. in case there is a rejection to some of them, they should also be removed from the https://app.coderabbit.ai/learnings dashboard.

  • nmstate_ds and nmstate_namespace should rely on nmstate_dependent_placeholder. this is out of scope for this PR.
  • Created by using https://github.com/learnings2guidelines/Learnings2AGENTS

    ##### jira-ticket:
    NONE

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

    Summary by CodeRabbit

    Documentation
    Clarified project and test guidance for configuration checks, coverage exceptions, smoke tests, network testing, upgrades, and golden-image validation.
    Updated AI contribution guidance with examples for disclosing different levels of AI involvement.
    Added instructions for handling test-plan workflow failures, checking team membership, and using the non-blocking review flow.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 258 lines (+193 / -65) across 3 files Reviewer: RoniKishner Review duration: 20095m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.39) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 258 lines diff across 3 files
    0.39
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.332
    Real PR Conversation Timeline
    1 comments
    "Review active on #6445"
    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: 39.2% (MEDIUM) · Higher = larger blast radius
    39.2%
    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: 20.9% · Safe to merge
    20.9%