feat: cf push --remote (HTTPS push via GitHub App) + idempotent cf init#15
Merged
feat: cf push --remote (HTTPS push via GitHub App) + idempotent cf init#15
Conversation
Adds an HTTPS-only alternative to the SFTP push path for users behind
corporate firewalls that block port 22, and reworks cf init to be safe
to re-run on linked projects.
cf push --remote:
- Verifies local HEAD is reachable from a remote ref on origin and that
the push-critical files (wrapper GDS, verilog/rtl/user_defines.v when
not openframe, .cf/project.json when tracked) are clean at HEAD.
- Calls POST /projects/{id}/remote-push so the platform fetches those
files via the ChipFoundry GitHub App and stages them into the SFTP
landing zone. Downstream pipeline is unchanged.
- Keeps existing --submit semantics.
cf init:
- Idempotent refresh: if already linked, fetches the platform project,
pre-fills prompts, auto-detects github_repo_url from git remote, and
PUTs only diffs. platform_project_id is preserved.
- Blank input keeps the current/detected value; typing 'clear' removes
a field explicitly.
Also extracts shared GDS wrapper constants and detect_github_repo_url /
get_head_commit_sha helpers into utils.py, and adds a verify_push_repo
helper (and RemotePushGitError) alongside the existing remote-precheck
verifier.
README updated for the new flows including a corporate-firewall tip.
…nflict When .cf/project.json and the workspace (e.g. git remote) disagree, the prompt now shows both and Enter accepts the detected value (ground truth). Type `k`/`keep` to keep the stored value instead. Previously Enter would silently keep the stale stored value, which let wrong github_repo_url values persist through repeated `cf init` runs. Made-with: Cursor
Large openframe GDS uploads via the platform take several minutes. The default 15 s httpx timeout caused the CLI to abort while the backend and lambda were still legitimately processing the request. Override to 600 s and warn the user that the call may take several minutes. Made-with: Cursor
After a successful remote push, the CLI does a platform project sync via
PUT /projects/{id}. This uses the default 15 s timeout which was too
tight behind slow links or when the backend is warming up. Bump to 60 s
for this specific call only; other PUTs keep the default.
Made-with: Cursor
…raceback _push_critical_paths calls _detect_wrapper_gds which raises the precheck exception class RemotePrecheckGitError. _push_remote only caught RemotePushGitError, so the precheck exception escaped as an unhandled traceback. Rewrap it under RemotePushGitError with a push-oriented hint (including a note about git lfs pull for LFS repos) and add a defensive catch-all at the call site as a backstop. Made-with: Cursor
The platform project payload already exposes remote_precheck_github_app_install_url; surface it directly so the user can click through to install the ChipFoundry GitHub App on the right account instead of hunting through the portal. Made-with: Cursor
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.
Summary
cf push --remoteas an HTTPS-only alternative to SFTP push for users behind corporate firewalls blocking port 22. Verifies local HEAD is on a remote ref, then asks the platform to fetch the commit via the ChipFoundry GitHub App.cf initidempotent: re-running on a linked project auto-detects the GitHub remote, pre-fills from.cf/project.jsonand platform state, preservesplatform_project_id, and offers explicitclear/keepcontrols when stored vs. detected values conflict.Version: 2.3.14 → 2.3.19
Test plan
kkeeps current,clearremoves)Made with Cursor