Skip to content

feat: cf push --remote (HTTPS push via GitHub App) + idempotent cf init#15

Merged
jeffdi merged 6 commits intomainfrom
feature/cf-push-remote
Apr 19, 2026
Merged

feat: cf push --remote (HTTPS push via GitHub App) + idempotent cf init#15
jeffdi merged 6 commits intomainfrom
feature/cf-push-remote

Conversation

@jeffdi
Copy link
Copy Markdown
Contributor

@jeffdi jeffdi commented Apr 19, 2026

Summary

  • Adds cf push --remote as 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.
  • Makes cf init idempotent: re-running on a linked project auto-detects the GitHub remote, pre-fills from .cf/project.json and platform state, preserves platform_project_id, and offers explicit clear/keep controls when stored vs. detected values conflict.
  • Improves error output: friendly messages when the GDS wrapper can't be detected, a full install URL when the GitHub App isn't installed, and a longer timeout (10 min) for large file transfers.

Version: 2.3.14 → 2.3.19

Test plan

  • cf push --remote end-to-end against dev with a large (1–2 GB LFS) GDS
  • cf init refresh on a linked project preserves platform_project_id
  • cf init prompt conflict resolution (Enter accepts detected, k keeps current, clear removes)
  • cf push --remote surfaces install URL when App not installed
  • GDS-not-found error renders cleanly instead of Python traceback

Made with Cursor

jeffdi and others added 6 commits April 17, 2026 11:39
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
@jeffdi jeffdi merged commit 59de8d0 into main Apr 19, 2026
0 of 12 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.

2 participants