← Back to Pull requests

test: migrate accounting specs to Vitest #441

Closed
unknown closed this pull request without merging on Aug 24, 2026 04:21 UTC
View on GitHub
unknown unknown commented on Aug 23, 2026 13:55 UTC
Author

What and why

Migrate all 15 accounting specs from Karma to Vitest. This also updates the Karma baseline and ESLint suppression paths without changing assertions or production code.

Closes #405

Verification

  • Migrated batch: 56 tests

  • Full Vitest suite: 94 files and 602 tests passed

  • Karma suite: 770 tests passed

  • Test totals: Karma 826 → 770, Vitest 546 → 602, 1,372 unchanged

  • npm run lint

  • npm run format:check

  • npm run check:test-runner

  • npm run build
  • Screenshots

    Not applicable.

    Checklist

  • I did not hand-edit generated files under src/app/api/.

  • Adapter boundary changes are not applicable.

  • User-facing strings are not affected.

  • Existing tests were migrated without changing their coverage.

  • UI workflow and e2e changes are not applicable.

  • Commits are signed.
  • Diff: 104 lines (+78 / -26) across 1 files Reviewer: zhangxinyao88 Review duration: 865m
    All Vouch review confidence checks passed
    Residual risk 0.23 = Change Risk (0.54) × (1 − Review Confidence (0.58)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.54 · 104 lines diff across 1 files
    0.54
    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%
    57%
    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.289
    Diff Size diff_size
    0.278
    Sensitive Paths sensitive_paths
    0.054
    Real PR Conversation Timeline
    1 comments
    "Review active on #441"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 58.0% 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: 54% (MEDIUM) · Higher = larger blast radius
    54%
    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: 58.0% · Lower = rushed or shallow review
    58.0%
    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: 22.7% · Safe to merge
    22.7%