-
Notifications
You must be signed in to change notification settings - Fork 0
Fix checkpoint_remote silently falling back to origin on owner mismatch #149
Copy link
Copy link
Open
Labels
Description
Description
When a user configures checkpoint_remote in .partio/settings.json (e.g. {"provider": "github", "repo": "alice/checkpoints"}) and the origin remote belongs to a different owner (e.g. org/work-repo), Partio silently ignores the configured checkpoint remote and pushes to origin instead. The fallback messages are written only to debug/warn logs — the user has no visible indication their config is being ignored.
This was reported in entireio/cli#800 and fixed in entireio/cli#805.
What to fix
In the pre-push hook logic that resolves push settings:
- When
checkpoint_remoteis explicitly configured, respect it regardless of owner mismatch between push remote and checkpoint remote. Owner mismatch should not trigger a silent fallback. - For all fallback paths (remote URL lookup failure, URL parse failure, URL derivation failure), print a user-visible warning to stderr so users know their checkpoint_remote config is being ignored and why.
- Add a test case covering the scenario where
checkpoint_remoteowner differs from origin owner — verify the checkpoint push goes to the configured remote.
Acceptance Criteria
- When checkpoint_remote is configured with a different owner than origin, pushes go to checkpoint_remote, not origin
- When checkpoint_remote push fails, a user-visible warning is printed to stderr (not silently swallowed to a log file)
- Existing behavior for matching-owner checkpoint_remote configs is unchanged
make testpassesmake lintpasses
Source
Inspired by entireio/cli#805 (fixes entireio/cli#800)
Reactions are currently unavailable