fix: degrade gracefully when git init or upstream remote fails#14
Open
flipvh wants to merge 1 commit into
Open
fix: degrade gracefully when git init or upstream remote fails#14flipvh wants to merge 1 commit into
flipvh wants to merge 1 commit into
Conversation
Replace the undocumented CREATE_CELLA_SKIP_GIT/CREATE_CELLA_SKIP_REMOTE env vars with graceful degradation: the git init + upstream remote block now warns (with manual recovery commands) and continues on failure instead of tearing down an otherwise complete scaffold. - add progress.warn() to close a step with a yellow warning - remove the silent error-swallowing param from addRemote; remote failures were previously invisible, now they surface as a warning - release smoke test runs the real git steps (isomorphic-git: offline, no user git config needed) and asserts .git and the upstream remote Co-Authored-By: Claude Fable 5 <[email protected]>
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.
What
Removes the undocumented
CREATE_CELLA_SKIP_GIT/CREATE_CELLA_SKIP_REMOTEenv vars (flagged with aTODO review: this has a smell) and replaces them with graceful degradation: if git init, the initial commit, or adding the upstream remote fails, the CLI warns and continues instead of failing an otherwise complete scaffold.Why
The env vars existed solely so the release smoke test could skip git steps when running the packed binary as a subprocess. That was a hidden test-only backdoor in production code. Since the git layer is isomorphic-git (pure JS, offline, explicit commit author — no dependency on the runner's git binary or config), the test can simply run the real steps.
Changes
git init/git remote add cella-upstream …). If init fails, the remote step is skipped too.warn()on the progress tracker: closes the current step with a yellow ⚠ and the reason.silenterror-swallowing param; remote failures were previously invisible (which would silently break the sync CLI's upstream later), now they surface as a warning..gitexists and its config contains thecellajs/cellaupstream.Trade-off
A git failure now yields a created project plus a warning rather than a hard failure. The sync CLI depends on the
Cella-Basetrailer in the root commit, so the warning points users at the manual steps — considered acceptable versus failing the whole scaffold over a git hiccup.Testing
vitest run— 33 tests passpnpm run test:release— smoke test passes; output showsinitializing gitandadding upstream remoterunning for real in the packed binary🤖 Generated with Claude Code