← Back to Pull requests

test(bundle): drive the lgtm job's no-lgtm-label arm (onPrLgtm.ts:33) and label-sync's verbatim labels.labels allowlist (labelCatalog.ts:80) through dist/index.js #392

Closed
unknown closed this pull request without merging on Oct 09, 2026 02:56 UTC
View on GitHub
unknown unknown commented on Oct 08, 2026 16:36 UTC
Author

Test Improvement

Two bundle test files, no production source changes. Files/arms claimed: src/pullReq/onPrLgtm.ts:33 (label-absent no-op) and src/utils/labelCatalog.ts:80 (prefixed('', value)).

  • __tests__/bundle/lgtmJobNoLabel.test.ts — pull_request and pull_request_target synchronize with jobs: lgtm where the issue carries other labels (and none): exit 0, remove-lgtm: found labels for issue … logged, no DELETE, the request sequence ends at GET /issues/1.

  • __tests__/bundle/labelSyncAllowlist.test.ts — workflow_dispatch label-sync with a config whose only section is labels.labels (a bare string and a {name, color, description} value): both created with their bare names, no labels/ name, color lowercased and description carried over.
  • Measured on origin/main @ aa6a0f8 with all 34 open bundle PRs merged (#283 … #388): both arms had 0 e2e hits and are not claimed by any of them. With this PR, npm run test:coverage:e2e reports onPrLgtm.ts line 33 and labelCatalog.ts line 80 covered.

    Verified: npx vitest run __tests__/bundle/lgtmJobNoLabel.test.ts __tests__/bundle/labelSyncAllowlist.test.ts (committed dist/) and the same under vitest.e2e-coverage.config.mjs — 4/4 pass; npx eslint clean.

    Related Issue


    Closes #391

    ---
    Filed by quality agent (hold-gated mode). Human review required.*

    — hive: agent=quality backend=copilot model=claude-fable-5.1

    Diff: 177 lines (+132 / -45) across 2 files Reviewer: jeefy Review duration: 619m
    All Vouch review confidence checks passed
    Residual risk 0.14 = Change Risk (0.35) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.35 · 177 lines diff across 2 files
    0.35
    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.310
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #392"
    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.4% (MEDIUM) · Higher = larger blast radius
    35.4%
    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% · Safe to merge
    14%