← Back to Pull requests

fix(preview): drop phantom refs from shipped filePathMaps #3594

Open
unknown opened this pull request with 208 lines diff across 2 files
View on GitHub
unknown unknown commented on Oct 02, 2026 06:35 UTC
Author

Follow-up to #3593. Dispatch 36972014885 failed in staging: real builds emit filePathMap values (apps/web/.next/node_modules/<pkg>-<hash>) that exist in neither the build nor deploy tree. Failing closed on them blocks every preview. This drops unresolvable values from the shipped maps so the CLI only re-adds staged files, keeps a guardrail that fails when everything is phantom, and records drops in the manifest. Local: affected suites pass.

<!-- CURSOR_SUMMARY -->
---

[!NOTE]

Low Risk

CI preview staging script and tests only; behavior is more permissive for real builds but retains a fail-closed check when all references are phantom.

> Overview

Preview prebuilt staging no longer fails when some filePathMap paths are missing (e.g. transient .next/node_modules/<pkg>-<hash> entries that never exist in the build tree).

> The staging script now rewrites each .vc-config.json so only resolvable, staged paths remain in filePathMap; phantom, absolute, protected, and other skipped values are removed so vercel deploy --prebuilt does not try to re-add files that would ENOENT. Drops are recorded in .preview-refs-manifest.json under skipped with reason missing.

> A guardrail still exits with an error only when every string reference is missing (empty maps after drops), which indicates a wrong project base rather than a few stale NFT traces.

> <sup>Reviewed by Cursor Bugbot for commit 275322162a6dd99166ec8e243d2fe8a9a891ade6. Bugbot is set up for automated code reviews on this repo. Configure here.</sup>

<!-- /CURSOR_SUMMARY -->

Diff: 208 lines (+156 / -52) across 2 files Reviewer: github-actions[bot] Review duration: 1m
All Vouch review confidence checks passed
Residual risk 0.31 = Change Risk (0.41) × (1 − Review Confidence (0.26)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.41 · 208 lines diff across 2 files
0.41
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 33% · Reviewer familiarity: 35%
25%
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.320
Ai Authored ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #3594"
general weight: 0.35
Assignees
Unassigned
Labels
risk: low confidence: 25.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: 41.4% (MEDIUM) · Higher = larger blast radius
41.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: 25.5% · Lower = rushed or shallow review
25.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: 30.9% · Safe to merge
30.9%