← Back to Pull requests

WIP: Run Ginkgo OrderedGroup containers as one unit #87

Open
unknown opened this pull request with 312 lines diff across 3 files
View on GitHub
unknown unknown commented on Dec 01, 2026 14:57 UTC
Author

This is a PoC for now, DO NOT REVIEW.

---

openshift-tests runs every spec in its own run-test child, so BeforeAll and
AfterAll in an Ordered container run around each It. Add support for the
g.OrderedGroup() decorator from the openshift Ginkgo fork, so the members of
an opted-in container can run together in one Ginkgo run, in definition order,
with BeforeAll/AfterAll running once.

This is the part of the design that origin's run-test -n a -n b child needs.
run-suite is unchanged and still runs one spec per process.

  • types: add ExtensionTestSpec.OrderedGroup (ID, Name), shown in list -o

  • jsonl
    , and the RunGroup hook. The ID is opaque and only unique within one
    listing of one binary.
  • ginkgo adapter: use TestSpec.OrderedContainer() and set OrderedGroup only for

  • opted-in containers (ID is the fork's node ID as a decimal string, Name is the
    container text). Fail listing when the OrderedGroup label is on anything but
    the outermost Ordered container. RunGroup resolves member names when called,
    runs them with Suite.RunSpecGroup, and matches each SpecReport to its member
    by leaf location and full text, keeping the report's start and end times.
    The SpecReport to result switch is extracted into specReportToResult.
  • ExtensionTestSpecs.Run: when several specs share one non-empty

  • OrderedGroup.ID and have RunGroup, call it once in-process. A member without
    a result is reported as failed. All other invocations (single member, mixed
    or multiple groups, no RunGroup) take the existing path. Per-result handling
    is shared by both paths (handleResult, finalizeResult).
  • Bump the ginkgo replace to the fork revision that provides OrderedContainer()

  • and g.OrderedGroup(), and re-vendor. This is still a personal fork
    pseudo-version; repoint it at openshift/onsi-ginkgo once the fork change is
    merged.

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

    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    New Features
    Extension test suites can now run members of an explicitly marked outermost ordered container together in one process, preserving their declared order.
    Results are associated with the corresponding members, and members that return no result are reported as failures.
    Per-member lifecycle hooks continue to run for each test in the group.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 312 lines (+234 / -78) across 3 files Reviewer: tchap Review duration: 2023m
    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 · 312 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
    Diff Size diff_size
    0.344
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #87"
    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: 40.3% (MEDIUM) · Higher = larger blast radius
    40.3%
    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.5% · Safe to merge
    21.5%