← Back to Pull requests

Create the Core Engine and plugin package structure and define the Plugin contract and registration metadata. #377

Open
unknown opened this pull request with 291 lines diff across 3 files
View on GitHub
unknown unknown commented on Sep 25, 2026 01:57 UTC
Author

<!--
- Thanks for submitting code to Oppiabot! Please fill out the following as part of
- your pull request so we can review your code more easily.
-->

Explanation

This PR establishes the initial Core Engine and Plugin Framework structure for the unified TypeScript-based Oppiabot architecture.

tracked by issue : https://github.com/oppia/oppiabot/issues/378#issue-5584987382

https://docs.google.com/document/d/1xk6LARVtFoi6xO-EoXSBAXP-vhBYQFvM94KRw1jDb9A/edit?tab=t.0

Changes


  • Add the TypeScript project configuration and build/type-check setup.

  • Add Jest-based unit testing infrastructure for the new TypeScript code.

  • Add the OppiabotPlugin contract and plugin registration metadata.

  • Add the explicit PluginRegistry for plugin registration and lookup.

  • Add the CoreEngine and PluginRegistry, with trigger-based plugin resolution and per-plugin failure isolation.

  • Add the initial Trigger, ExecutionContext, and configuration schema types required by the framework structure.

  • Add the src/plugins/ and src/entrypoints/ package structure for subsequent implementation work.

  • Keep all existing legacy Oppiabot implementation unchanged.
  • Later PRs extend this: configuration-aware plugin resolution (#384) and result handling (#385). Runtime entrypoints and GitHub integration come in subsequent PRs.

    Dependency Changes


  • package-lock.json — updated to record the development tooling added by this PR. It is already tracked in the repository and is committed so that dependency versions remain reproducible across local and CI installs.
  • Stacking

    Parent: none — this is the root of the stack (base: master).
    Children: #379 — Execution Context.

    New commits (review these)

    725e152, ec98a65, 389f560, abda95b, 4bff2e8, 24f1595, 7586436, 7706b3b, 79e7d03, 6705d47, 5a16868, 08a1697, 0ee10e8, a6bbc84, ec58f02.

    Inherited changes (don't re-review)

  • None.
  • Checklist


  • I have successfully deployed my own instance of Oppiabot.

  • - You can find instructions for doing this here.
  • I have manually tested all the changes made in this PR following the manual tests matrix.
  • Diff: 291 lines (+218 / -73) across 3 files Reviewer: Yashbhu Review duration: 100315m
    All Vouch review confidence checks passed
    Residual risk 0.28 = Change Risk (0.47) × (1 − Review Confidence (0.41)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.47 · 291 lines diff across 3 files
    0.47
    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%
    40%
    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.340
    Real PR Conversation Timeline
    1 comments
    "Review active on #377"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 40.9% 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: 46.9% (MEDIUM) · Higher = larger blast radius
    46.9%
    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: 40.9% · Lower = rushed or shallow review
    40.9%
    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: 27.7% · Safe to merge
    27.7%
    Repository