Skip to content

Preserve config name when updating existing snapshot#44

Merged
fullstackjam merged 1 commit intomainfrom
claude/capture-dev-environment-la1cF
Apr 22, 2026
Merged

Preserve config name when updating existing snapshot#44
fullstackjam merged 1 commit intomainfrom
claude/capture-dev-environment-la1cF

Conversation

@fullstackjam
Copy link
Copy Markdown
Collaborator

What does this PR do?

When publishing a snapshot to update an existing config, fetch the remote config to preserve its name before sending the PUT request.

Why?

The PUT endpoint requires a name field. When updating an existing config (rather than creating a new one), we need to preserve the existing config's name. This change fetches the remote config to get the current name, falling back to the target slug if the fetch fails or returns an empty name.

Testing

  • go vet ./... passes
  • Tested locally with ./openboot --dry-run when updating an existing config

Notes for reviewer

The change gracefully handles fetch failures by falling back to using the target slug as the config name, ensuring the update can proceed even if the remote config fetch fails.

https://claude.ai/code/session_01J6FVyNhP1uSiqHbMUYHo1i

…ired"

When publishing updates to an existing config, the CLI skipped the
name/description prompt and sent an empty name in the PUT body. The API
requires name for both POST and PUT, so it rejected the request with
status 400. Now we fetch the existing config's name from the API before
the PUT and fall back to the slug if the fetch fails.

https://claude.ai/code/session_01J6FVyNhP1uSiqHbMUYHo1i
@github-actions
Copy link
Copy Markdown

👋 Thanks for opening this pull request!

Before merging:

  • Code follows existing patterns in the codebase
  • go build ./... and go vet ./... pass
  • Commit message is clear and descriptive

@fullstackjam will review this soon. Thanks for contributing! 🚀

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/cli/snapshot_publish.go 0.00% 8 Missing ⚠️

📢 Thoughts on this report? Let us know!

@fullstackjam fullstackjam merged commit c32c159 into main Apr 22, 2026
10 checks passed
@fullstackjam fullstackjam deleted the claude/capture-dev-environment-la1cF branch April 22, 2026 13:03
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