Skip to content

Fix: A new single-commit storefront repository now builds on its first Vercel deployment (V-3843) - #329

Closed
damianlegawiec wants to merge 3 commits into
mainfrom
fix/v-3843-vercel-first-deploy
Closed

damianlegawiec wants to merge 3 commits into
mainfrom
fix/v-3843-vercel-first-deploy

Conversation

@damianlegawiec

Copy link
Copy Markdown
Member

A storefront repository created by the Setup storefront task has a single commit. Its first Vercel deployment stopped right after cloning, and redeploying failed the same way:

Running "git diff --quiet HEAD^ HEAD -- ."
fatal: bad revision 'HEAD^'

Cause

The ignored build step added in #294 compares the latest commit with its parent. A repository with one commit has no parent, so git diff exits with 128 instead of 0 (skip) or 1 (build), and Vercel stops the deployment without building.

Fix

vercel.json now checks that the parent commit exists before diffing:

git rev-parse --quiet --verify HEAD^ >/dev/null && git diff --quiet HEAD^ HEAD -- .

With no parent commit, the check exits 1 and Vercel builds. Otherwise the behaviour from #294 is unchanged: a commit that touches nothing in the storefront directory is skipped.

Verification

Ran the command in throwaway repositories (storefront in apps/sf, server in server/):

Case Exit Result
Single commit (old command) 128 deployment stopped
Single commit 1 builds
Second commit changes only server/ 0 skipped
Latest commit changes the storefront 1 builds
Standalone clone (repo root), any change 1 builds
Shallow clone, --depth 1 (no parent fetched) 1 builds
Shallow clone, --depth 2, storefront changed 1 builds

Vercel's shallow clone normally includes the parent; if it ever didn't, the deployment now builds rather than failing. No README or docs mention this setting, so none needed updating. pnpm run check passes.

Linear: V-3843


Generated by Claude Code

…(V-3838)

A Store Pickup order's order-placed page showed only the method and its cost, followed by the buyer's own address as the shipping address. Each pickup delivery now names the location to collect from, with its address and collection instructions, and the shipping address is hidden when every delivery is a pickup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WCEEKiKCrrVobc2aQfDXwA
…t Vercel deployment (V-3843)

The ignored build step ran `git diff --quiet HEAD^ HEAD -- .`. In a repository with one commit, such as the one the Setup storefront task creates, HEAD^ does not exist: git exits with 128 ("fatal: bad revision 'HEAD^'") and Vercel stopped the deployment without building, on every redeploy too.

The command now checks that HEAD^ exists first. With no parent commit (a new repository, or a clone too shallow to include it) it exits 1 and Vercel builds; otherwise it skips the build only when the latest commit changes nothing in the storefront directory, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WCEEKiU2S25f5FDPJkYrqg
@vercel

vercel Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
storefront Ready Ready Preview Nov 24, 2026 3:26pm UTC

Request Review

@strix-security

strix-security Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Strix Security Review

✅ No open security findings.

PR summary: Adds a parent-commit existence check to the `vercel.json` ignore command so a single-commit storefront repository deploys instead of failing, and extends the order-placed page to render the pickup location (name, address, instructions) and hide the shipping address when every fulfillment is collected in store.

Review summary

This PR fixes the ignored-build step for single-commit repositories and reworks the order confirmation page so pickup orders show the collection location instead of the buyer's shipping address. The vercel.json command change runs an inherited git check with no user input, so it creates no injection, secret-exposure or build-bypass surface. The new PickupLocation component renders stock-location fields as React text (escaped by the framework) with no markup, URL or dangerouslySetInnerHTML sink, and the pickup data it displays is the merchant's own collection address shown to the buyer who selected pickup. pickupLocation/pickup_only only read backend fulfillment data and gate which existing blocks render. The order lookup and cart-completion paths the page reaches were examined for cross-customer access and response widening; ownership is enforced by the Store API against the caller's own cart token/JWT, and those code paths are unchanged by this PR.

Ruled out (5)
  • Can an anonymous visitor read another customer's order through the order-placed page or the order lookup action?
    The lookup forwards only the caller's own cart token and JWT, so the Store API binds the returned order to that caller; the storefront adds no new caller, route or input, and no code path attaches another visitor's credentials.
  • Can an unencoded order id in the URL rewrite the Store API request path?
    The SDK builds the URL from a fixed origin, so a crafted segment can only retarget a path within the caller's own credentials, and non-order responses are discarded by the page's shape checks.
  • Can a client-built params object widen an order response?
    Every in-repo caller passes no params, and the data module is not reachable from the client bundle as an action.
  • Can the cookie-only surface resolution route a wholesale cart through the DTC client?
    The resolution is pre-existing and unchanged by this PR, and the request carries only the caller's own credentials, so no other user or privilege sits on the other side of the channel choice.
  • Can loading the confirmation page trigger a state-changing cart completion for a cart the visitor chose?
    The completion is gated on a 404 for a cart read made with the caller's own token, so a live foreign cart is not completable, and the code is unchanged context in this diff.

Review 1 on this PR · 97d8f09 · requested Nov 24 15:26 UTC when the PR was opened


Reviewed by Strix
Re-run review · Configure security review settings · Try a deeper review with @strix-security /deep

@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 30 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 81ff3c24-ece0-4bb9-8a18-7f5ad8042bf1
Commits

Reviewing files that changed from the base of the PR and between 3432767 and 97d8f09.

Files selected for processing: 11

  • e2e/order-placed.spec.ts
  • messages/de.json
  • messages/en.json
  • messages/es.json
  • messages/fr.json
  • messages/pl.json
  • src/app/[country]/[locale]/(checkout)/order-placed/[id]/page.tsx
  • src/components/order/PickupLocation.tsx
  • src/lib/utils/__tests__/purchase.test.ts
  • src/lib/utils/purchase.ts
  • vercel.json
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Copy link
Copy Markdown
Member Author

Closing in favour of #330. This branch was accidentally built on top of the unrelated V-3838 pickup-location commits. #330 carries only the one-line vercel.json fix for V-3843.


Generated by Claude Code

This branch was successfully deployed

1 active deployment
Preview — 97d8f096 Deployed Nov 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants