feat(cli): sync existing apps into local checkouts #502
No reviewers
Labels
No labels
Compat/Breaking
Component/Enclave-Builder
Component/Infrastructure
Deploy/BYOC
Deploy/Full-managed
Deploy/Self-hosted
Interface/API
Interface/CLI
Interface/Git
Interface/Web
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
Reviewed/Confirmed
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Status/Abandoned
Status/Blocked
Status/Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
public/platform!502
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/apps-sync"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
caution apps sync <APP_ID>to restore an existing app's local link in the current Git checkout. The CLI creates.cautionif necessary and writes the supported ID-only.caution/deployment.json; live app details continue to come from the API.cautionremote, replacing stale/multiple fetch and push URLs with the API-provided URL.origin,caution.hcl, trusted hashes, secrets, and other local files. Do not create an app, fetch/push source, or deploy anything.Test plan
cargo +1.96.1 test --locked -p cli --test apps_sync— 4 passed. Real CLI subprocesses and Git/filesystem operations against an explicitly synthetic loopback API cover initial creation, repeated sync, stale links and remote URLs, preservation, bad/missing IDs, API failures/mismatched responses, non-worktrees, and native Git config-lock failure.RUSTUP_TOOLCHAIN=1.96.1 make test— 1,441 Rust and 89 Python tests passed; 52 Rust tests ignored by the regular suite.cargo +1.96.1 clippy --locked -p cli --all-targets -- -D warnings— passed on commit5cc219283cc8caa859abe1847be9af3aecba7376; the fullmake testsuite was also rerun successfully on that exact commit.rustfmt +1.96.1 --check --edition 2024 src/cli/src/apps/sync.rs src/cli/tests/apps_sync.rsand scoped Git whitespace checks — passed.Boundaries
Independent review passed with no blocking findings. This restores the local app link, not source code, deployment snapshots, or verification/secrets material. If intentionally switching apps, existing app-specific trust and quorum files remain; verify the selected app before using them. Every Git command checks its exit status. If the later metadata write fails after Git was updated, the error explicitly reports that partial state and advises retrying; this is not a cross-file transaction.
No deployed-stack/cloud E2E was run: this is a local CLI change using the existing read-only app endpoint, and no branch deployment was requested. Nothing was merged or deployed.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.