sync local env files with cloud on pull/push#6
Open
anserwaseem wants to merge 11 commits into
Open
Conversation
- Remove unused assetFileNames param from readProjectEnvFiles - Consolidate config DTO builders via shared helpers - Extract missing-env-file push warnings into envSync
- Partition cloud config into asset vs non-asset env variables - Add prepareEnvPushState and computeEnvPullChanges helpers - Slim push and sync command env wiring
Also drop stale asset env keys from appConfig so pull doesn’t resurrect deleted asset vars
Missing or empty .env.config/.env.secrets now warn and prompt
[y/N] before clearing cloud values; empty secrets push {}
- resolve base vs .env.*.<alias> by default alias + file presence - non-default pull creates scoped files; never stomps base - missing env file skips push side; empty file wipes with confirm - pull asset keys to resolved config path - wire push/pull/release + docs/tests
- Commander ate --app when parent+child both declared it - read --app from release parent opts in create/list/use - align Firestore version id with GCS snapshot path - alias-aware success/list hints for non-default apps
sharjeelyunus
approved these changes
Jun 18, 2026
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.
Env sync manual testing (issue #2)
Test app:
ZEBtYm15gELt1xBwOsF3(dev) · project:/tmp/ensemble-pull-testPull / push (verified)
.env.config(user vars + asset keys) and.env.secretscontent+envVariables/secrets+updatedAt).env.config→ delete non-asset vars in cloud${env.*}/${secrets.*}in YAML after pullRules: Asset keys (
assets,*_png) managed by asset sync, not user env CRUD. Missing file ≠ empty file.Releases (verified)
Local snapshots only —
release usedoes not push to cloud.snapshot.config.env.config(assets,*_png,E1, …)snapshot.secretssnapshot.assetsfileNameonly — nopublicUrl/copyTextrelease use.env.config; does not touch.env.secretsFlow:
release create→ mutate local →release use --hash <id>→ optionalensemble push.Automated:
tests/core/envSync.test.ts,tests/commands/release.test.ts.Commands