← Back to Pull requests

Add JUNIT_SUITE_NAME_PREFIX env var for testsuite name control #84

Open
unknown opened this pull request with 284 lines diff across 3 files
View on GitHub
unknown unknown commented on Oct 23, 2026 11:16 UTC
Author

Add support for an optional JUNIT_SUITE_NAME_PREFIX environment variable that prepends a prefix to suite.Name before passing it to NewJUnitResultWriter() and NewHTMLResultWriter(). Default is empty string — fully backward-compatible, zero impact on existing consumers.

Problem

CI step-registry refs are reused across different runtime environments (e.g., OPP and ACM+Virt pipelines). Each environment needs unique JUnit testsuite names so Sippy, Component Readiness, and ci-test-mapping can route results to the correct component. Currently there's no way to control the JUnit <testsuite name="..."> without post-processing the XML after every run, which adds maintenance overhead to each step-registry ref and complicates step reuse across pipelines.

Currently, run-suite in pkg/cmd/cmdrun/runsuite.go passes suite.Name directly to NewJUnitResultWriter(), so the JUnit testsuite name always equals the OTE suite selector (e.g. acm/policy/all). There's no mechanism to differentiate the JUnit identity from the suite selector.

Change

A small (~3 line) addition to runsuite.go:

suiteName := suite.Name
if prefix := os.Getenv("JUNIT_SUITE_NAME_PREFIX"); prefix != "" {
    suiteName = prefix + suiteName
}

The prefixed suiteName is consistently applied to both the JUnit writer and the HTML writer.

Use Case

Step-registry refs set JUNIT_SUITE_NAME_PREFIX as an env var (e.g. lp-interop--ACM--OPP--) so each pipeline produces unique, routable JUnit testsuite names without XML post-processing.

Related: INTEROP-9204, INTEROP-9441

---
AI-generated. Review for accuracy.

@amiskin94 requested from Slack

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

Summary by CodeRabbit

New Features
Test reports can display a suite name with the configured JUNIT_SUITE_NAME_PREFIX value prepended. The prefixed name is used for both JUnit and HTML results.
* If the variable is unset or empty, the suite name remains unchanged in reports. The prefix affects the displayed suite name only when a non-empty value is configured.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Diff: 284 lines (+213 / -71) across 3 files Reviewer: redhat-chai-bot Review duration: 3009m
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.40) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 284 lines diff across 3 files
0.40
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.338
Real PR Conversation Timeline
1 comments
"Review active on #84"
general weight: 0.35
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.7% (MEDIUM) · Higher = larger blast radius
39.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: 21.2% · Safe to merge
21.2%