Skip to content

Fetch remote previews through base PR refs - #363

Merged
Blargian merged 1 commit into
mainfrom
codex/base-pr-ref-previews
Oct 8, 2026
Merged

Blargian merged 1 commit into
mainfrom
codex/base-pr-ref-previews

Conversation

@Blargian

@Blargian Blargian commented Oct 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Fetch fork PR content through the registered base repository's refs/pull/<number>/head ref.
  • Verify the fetched commit equals the triggering event SHA before copying remote content.
  • Request Vercel Connect access only for the registered base repository; retain the fork only for attribution and edit links.

Validation

  • Parsed the preview scope and scope writer with a PR ref.
  • Verified a live refs/pull/101/head fetch from ClickHouse/dbt-clickhouse resolves to its advertised SHA.
  • Checked workflow YAML, embedded Bash syntax, and diff whitespace.

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

🕵

Preview Deployment Components Updated (UTC)
Docs preview 🟢 Ready English: 🟢 Ready; no remotes; translations: Production fallback 2026-10-08 13:00 UTC

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 59b2682. Configure here.

Comment thread bin/fetch-remotes.ts
commit = (extracted.split("-").pop() ?? "unknown").toLowerCase();
if (expectedCommit && commit !== expectedCommit) {
throw new Error(`fetch-remotes: archive for ${r.name} resolved to ${commit}, expected ${expectedCommit}`);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Archive SHA check always fails

Low Severity

The new archive fallback treats the tarball root directory suffix as the fetched commit and compares it to expectedCommit, a 40-character SHA. GitHub's tarball API names that directory with a short SHA, so the check rejects a valid archive whenever a SHA-only preview falls back after sparse clone fails.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 59b2682. Configure here.

@Blargian
Blargian merged commit ca4f32d into main Oct 8, 2026
2 checks passed
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.

1 participant