← Back to Pull requests

Support building packages through `ruyi admin build-package` #443

Closed
unknown closed this pull request without merging on Apr 20, 2026 19:50 UTC
View on GitHub
unknown unknown commented on Apr 20, 2026 19:36 UTC
Author

Summary by Sourcery

Add support for building packages from Starlark-based build recipes via a new ruyi admin build-package command and dedicated build-recipe host APIs.

New Features:

  • Introduce a build-recipe execution pipeline that discovers recipe projects, loads Starlark recipes, schedules builds, and executes declared subprocess invocations to produce artifacts.

  • Add the ruyi admin build-package CLI subcommand to run a specified recipe file with support for user variables, build selection, dry runs, and output directory overrides.

  • Expose a build-recipe-v1 capability and RUYI.build API (including scheduling builds and recipe build context helpers) for Starlark modules loaded in build-recipe mode.

  • Add new ruyi-build:// and ruyi-build-data:// load path schemes for accessing code and data relative to a recipe project root.
  • Enhancements:

  • Extend the plugin host context and loader with explicit load modes, per-mode capabilities, and support for tracking scheduled builds registered during recipe loading.

  • Guard subprocess execution and feature availability based on host context capabilities, tightening separation between command plugins and build recipes.
  • Documentation:

  • Document the build recipe design and workflow in a new build-recipes design document and link it from the main documentation index.
  • Tests:

  • Add unit, integration, and path-resolution tests covering recipe project discovery, build-recipe APIs, load-path handling, and the ruyi admin build-package command.
  • Diff: 190 lines (+142 / -48) across 2 files Reviewer: xen0n Review duration: 14m
    All Vouch review confidence checks passed
    Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 190 lines diff across 2 files
    0.36
    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.314
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #443"
    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: 35.9% (MEDIUM) · Higher = larger blast radius
    35.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: 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: 14.2% · Safe to merge
    14.2%
    Repository