fix(deploy): target personal Cloudflare account for ShmuggingFace preview - #133
Open
shaypal5 wants to merge 1 commit into
Open
fix(deploy): target personal Cloudflare account for ShmuggingFace preview#133shaypal5 wants to merge 1 commit into
shaypal5 wants to merge 1 commit into
Conversation
…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
|
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: |
There was a problem hiding this comment.
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_ENVdefaults and accompanying help text/comments to target the intended Cloudflare account boundary. - Adjusted the deploy completion output to stop guessing the
.pages.devhostname and instead direct operators to Wrangler’s printed URLs. - Synced
package-lock.jsonto matchpackage.json’s pinnedwranglerversion 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_ENVis now set to apagent/...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``. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-envdefaulted to a hardcoded Adanim path (~/.config/adanim/cloudflare_api_token.env), so any routine--deployrun pushed to the wrong account.What changed
DEFAULT_CF_ENVnow 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.https://<project-name>.pages.devfrom the project name. On the personal account thepages.devsubdomain 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.package-lock.jsonstill carriedwrangler: "latest"/node: ">=20"whilepackage.jsonalready pinswrangler 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):
/kaggle/leadforge-lead-scoring-v1-intro/), andmanifest.jsonall 200.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