← Back to Pull requests

Deploy employee PR previews without approval; keep fork builds gated #816

Closed
unknown closed this pull request without merging on Nov 18, 2026 19:02 UTC
View on GitHub
unknown unknown commented on Nov 18, 2026 18:56 UTC
Author

<img src="https://github.com/user-attachments/assets/1549b04c-267f-4fc4-b55a-3b0ced9913f2" alt="A badger usher waves the home burrow's animals straight into a lantern-lit preview tent while an owl at a side gate reads a visiting raccoon's note before lifting the latch" title="A badger usher waves the home burrow's animals straight into a lantern-lit preview tent while an owl at a side gate reads a visiting raccoon's note before lifting the latch" align="right" width="256">

Every PR preview currently waits for a developers approval, because the preview environment has required reviewers. That environment also gates fork builds in source-pr-preview.yaml (harper / harper-pro PRs from forks), so its reviewers can't simply be removed.

This moves those fork builds to a new preview-fork environment with the same reviewers. Once it merges, preview can drop its reviewers: PRs from this repo's branches, which only people with write access can open (the repo has no outside collaborators), deploy their preview automatically.

Rollout

  • Created the preview-fork environment: developers required reviewers, main only, no secrets or variables. It had to exist before merge, since GitHub auto-creates an unprotected environment the first time a workflow names one.

  • Merge this PR.

  • Remove the required reviewers from the preview environment (Settings → Environments → preview). Its OIDC trust policy pins the name preview, so the environment itself stays.
  • Not covered

    Fork PRs to this repo still get no preview. deploy-action skips forks itself, and harper preview setup refuses a workflow that would give a fork the preview identity, so approval-gated fork previews would need a deploy-action change first.

    Test plan

  • node --test scripts/source-pr-preview.test.mjs passes with the updated environment assertion.

  • npm run format:check is clean.
  • 🤖 Generated with Claude Code

    Diff: 245 lines (+183 / -62) across 3 files Reviewer: Ethan-Arrowood Review duration: 6m
    All Vouch review confidence checks passed
    Residual risk 0.25 = Change Risk (0.62) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.62 · 245 lines diff across 3 files
    0.62
    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.329
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.062
    Real PR Conversation Timeline
    1 comments
    "Review active on #816"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    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: 62% (MEDIUM) · Higher = larger blast radius
    62%
    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: 24.5% · Safe to merge
    24.5%