← Back to Pull requests

feat(account): improve dev account assignment (ROSAENG-75188) #1046

Closed
unknown closed this pull request without merging on Nov 02, 2026 20:26 UTC
View on GitHub
unknown unknown commented on Oct 30, 2026 13:29 UTC
Author

Summary


  • Restrict new dev account assignment to osd-staging-1 and OU ou-0wd6-x0ri0jpn

  • Reject osd-staging-2 assignments and staging-2 credentials

  • Default new account names to rosa-dev-<ldap>, with optional --account-name override

  • Apply HCM account tags: service-name=rosa-internal, cost-center=732, service-phase=dev, and app-code=OSD-002

  • Preserve owner and claimed tags
  • Test plan


  • go test ./cmd/account/mgmt

  • make generate-docs

  • git diff --check
  • Test Evidence

    Updated command help and account-name pattern:
    <img width="1079" height="437" alt="Screenshot 2026-11-02 at 9 47 29 AM" src="https://github.com/user-attachments/assets/d6aa3b6c-5387-46f1-811a-55c1ecc56ae0" />
    " />

    osd-staging-2 is rejected as deprecated:
    <img width="1079" height="111" alt="Screenshot 2026-11-02 at 9 52 44 AM" src="https://github.com/user-attachments/assets/d3a95f0f-fd53-4887-97dc-6519efb857f1" />

    New account created in osd-staging-1:
    <img width="1075" height="130" alt="Screenshot 2026-11-02 at 1 25 58 PM" src="https://github.com/user-attachments/assets/fa5a75af-a9da-4399-b6dd-6c94ae4373df" />

    New account name and independently generated email:
    <img width="1074" height="130" alt="Screenshot 2026-11-02 at 1 33 02 PM" src="https://github.com/user-attachments/assets/13524042-434e-4aa1-90a9-68173a5a76bd" />

    All six account tags applied:
    <img width="1074" height="399" alt="Screenshot 2026-11-02 at 1 33 40 PM" src="https://github.com/user-attachments/assets/16716ad0-dff8-4add-9055-47a7978fc282" />

    Account placed under OU ou-0wd6-x0ri0jpn:
    <img width="1074" height="123" alt="Screenshot 2026-11-02 at 1 34 27 PM" src="https://github.com/user-attachments/assets/55668266-7baf-486e-acf0-1110d8448f18" />

    ROSAENG-75188

    [ROSAENG-75188]: https://redhat.atlassian.net/browse/ROSAENG-75188?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

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

    Summary by CodeRabbit

    New Features
    You can name a newly created account; if you don’t provide a name, one is generated from your username.
    New accounts receive additional service and cost-allocation tags.
    Account creation retries when a generated email address is already in use.
    Behavior Changes
    Account assignment defaults to OSD Staging 1 and rejects other payer selections. Account names and IDs cannot be supplied together.
    Automatic assignment selects only unclaimed development accounts.
    Accounts unassigned from OSD Staging 1 are moved to its designated unassignment location.
    Documentation
    Updated assignment command documentation with account-naming guidance and the payer-account default.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 367 lines (+275 / -92) across 4 files Reviewer: joshbranham Review duration: 4736m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 367 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    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.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #1046"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% 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: 60.5% · Lower = rushed or shallow review
    60.5%
    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: 16.9% · Safe to merge
    16.9%