Skip to content

fix(deploy): target personal Cloudflare account for ShmuggingFace preview - #133

Open
shaypal5 wants to merge 1 commit into
mainfrom
fix/shmuggingface-deploy-private-cf-account
Open

fix(deploy): target personal Cloudflare account for ShmuggingFace preview#133
shaypal5 wants to merge 1 commit into
mainfrom
fix/shmuggingface-deploy-private-cf-account

Conversation

@shaypal5

@shaypal5 shaypal5 commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Why

The ShmuggingFace pre-publication preview site (leadforge-lead-scoring-v1-preview) was deployed on the Adanim Institute Cloudflare account — an account-boundary error. LeadForge is Shay's open-source project (github.com/leadforge-dev/leadforge), not an Adanim one, so it must live on the personal Cloudflare account (shaypal5@gmail.com).

The root cause was baked into the deploy script: --cf-env defaulted to a hardcoded Adanim path (~/.config/adanim/cloudflare_api_token.env), so any routine --deploy run pushed to the wrong account.

What changed

  • Account boundary fixDEFAULT_CF_ENV now points at the personal account env file (~/.config/pagent/personal/cloudflare/cloudflare_api_token.env). Docstring updated to match, with a note that this project deploys from the personal account, never Adanim.
  • Honest "Live at" hint — the script no longer synthesises https://<project-name>.pages.dev from the project name. On the personal account the pages.dev subdomain is Cloudflare-assigned and suffixed (leadforge-lead-scoring-v1-preview-een.pages.dev) because the unsuffixed name is globally held by the retired Adanim project. The script now points the operator at the immutable + stable URLs wrangler already prints.
  • Lockfile syncpackage-lock.json still carried wrangler: "latest" / node: ">=20" while package.json already pins wrangler 4.95.0 / node >=22. Synced the lock so deploys use the pinned wrangler rather than an unpinned global (addresses the external-review fragility note).

The project name is unchanged — only the account and the operator-facing URL hint move.

Deployment done as part of this fix

The site has already been redeployed to the private account (public, matching prior state and the sibling ShmuggingFace demo):

The old Adanim-account project will be deleted separately by Shay's Adanim agent once the private deployment is confirmed live.

A deploy runbook is being added to the shporg-wiki (docs/procedures/opensource/leadforge-demo-deploy.md).

🤖 Generated with Claude Code

…view

The ShmuggingFace pre-publication preview site was deployed from the
Adanim Cloudflare account via a hardcoded default env path
(~/.config/adanim/cloudflare_api_token.env). LeadForge is Shay's
open-source project, not an Adanim one, so the deploy must use the
personal account (shaypal5@gmail.com).

- Default --cf-env now points at
  ~/.config/pagent/personal/cloudflare/cloudflare_api_token.env.
- Stop synthesising the "Live at" hostname from the project name: on the
  personal account the pages.dev subdomain is Cloudflare-assigned and
  suffixed (leadforge-lead-scoring-v1-preview-een.pages.dev) because the
  unsuffixed name is globally held by the retired Adanim project. Point
  the operator at wrangler's own printed URLs instead.
- Sync package-lock.json to the already-pinned wrangler 4.95.0 / node>=22
  from package.json (the lock still carried wrangler "latest" / node>=20),
  so deploys use the pinned wrangler rather than an unpinned global.

The project name is unchanged; only the account boundary and the
operator-facing URL hint move.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GyE9JharCHhX8sCi9ShTLn
Copilot AI review requested due to automatic review settings August 2, 2026 09:21
@shaypal5 shaypal5 added type: bugfix Fixes a bug type: ci CI/CD pipeline changes labels Aug 2, 2026
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

pr-agent-context report:

No unresolved review comments, failing checks, or actionable patch coverage gaps were found on PR #133 in repository https://github.com/leadforge-dev/leadforge. Treat this PR as all clear unless new signals appear.

Run metadata:

Tool ref: v4
Tool version: 4.0.21
Trigger: pull request opened
Workflow run: 30741608622 attempt 1
Comment timestamp: 2026-08-02T09:21:50.339388+00:00
PR head commit: f8eb682a110d35055c79d3d278c13b5bdf87f034

Copilot AI 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.

Pull request overview

This PR updates the ShmuggingFace preview-site deploy tooling to avoid deploying the leadforge-lead-scoring-v1-preview Cloudflare Pages project under the wrong Cloudflare account, and syncs the Node lockfile to match the pinned Wrangler/Node engine versions.

Changes:

  • Updated --cf-env/DEFAULT_CF_ENV defaults and accompanying help text/comments to target the intended Cloudflare account boundary.
  • Adjusted the deploy completion output to stop guessing the .pages.dev hostname and instead direct operators to Wrangler’s printed URLs.
  • Synced package-lock.json to match package.json’s pinned wrangler version and Node engine requirement.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

File Description
scripts/build_shmuggingface_site.py Adjusts Cloudflare env default + deploy operator messaging to prevent account-boundary mistakes and avoid incorrect URL hints.
package-lock.json Updates locked Wrangler + Node engine metadata to match the pinned versions used for deploys.
Suppressed comments (1)

scripts/build_shmuggingface_site.py:77

  • DEFAULT_CF_ENV is now set to a pagent/... path and the surrounding comment includes a personal email. This couples the deploy script to a private tool-specific directory layout and adds PII to the codebase. Consider switching to a project-scoped config location and keeping the comment account-agnostic.
# LeadForge is Shay's open-source project — deploy from the personal
# Cloudflare account (shaypal5@gmail.com), never the Adanim account.
DEFAULT_CF_ENV = Path.home() / ".config/pagent/personal/cloudflare/cloudflare_api_token.env"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 37 to +41
--cf-env PATH
Cloudflare env file to source before wrangler.
Default: ``~/.config/adanim/cloudflare_api_token.env``.
Cloudflare env file to source before wrangler. Must target Shay's
*personal* Cloudflare account (``shaypal5@gmail.com``) — LeadForge is
an open-source project, not an Adanim one.
Default: ``~/.config/pagent/personal/cloudflare/cloudflare_api_token.env``.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bugfix Fixes a bug type: ci CI/CD pipeline changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants