Problem
The vm-sync command fails when trying to sync changes to a VM created from the golden image:
./scripts/vers-client.sh vm-sync <vmId>
Output:
Creating git bundle from 5931196c..HEAD
Failed to create bundle. Is 5931196c an ancestor of HEAD?
Root Cause
The VERS_GOLDEN_COMMIT_ID is a Vers commit ID (VM snapshot), not a git commit hash. The vm-sync command assumes it can create a git bundle from the golden commit to HEAD, but this fails because:
- The Vers commit ID doesn't exist in the git history
- Git cannot create a bundle from a non-existent commit
Current Workaround
Must manually upload the binary:
./scripts/vers-client.sh vm-upload <vmId> dist/vers-agent-linux /tmp/vers-agent-new
./scripts/vers-client.sh vm-exec <vmId> "systemctl stop vers-agent; cp /tmp/vers-agent-new /usr/local/bin/vers-agent; chmod +x /usr/local/bin/vers-agent; systemctl start vers-agent"
Suggested Fix
Option A: Store the git commit hash alongside the Vers commit ID in golden image metadata
Option B: Modify vm-sync to detect when the base commit is invalid and offer alternative sync methods (full upload, rsync, etc.)
Option C: Add a --force-full flag to vm-sync that uploads the entire codebase instead of a bundle
🤖 Generated with Claude Code
Problem
The
vm-synccommand fails when trying to sync changes to a VM created from the golden image:Output:
Root Cause
The
VERS_GOLDEN_COMMIT_IDis a Vers commit ID (VM snapshot), not a git commit hash. Thevm-synccommand assumes it can create a git bundle from the golden commit to HEAD, but this fails because:Current Workaround
Must manually upload the binary:
Suggested Fix
Option A: Store the git commit hash alongside the Vers commit ID in golden image metadata
Option B: Modify
vm-syncto detect when the base commit is invalid and offer alternative sync methods (full upload, rsync, etc.)Option C: Add a
--force-fullflag tovm-syncthat uploads the entire codebase instead of a bundle🤖 Generated with Claude Code