-
Notifications
You must be signed in to change notification settings - Fork 233
Description
Problem
When using shadow environments for iterative development, I ran into a workflow gap that caused confusion and wasted time.
What happened
- Created a shadow environment with local sources for
amplifier-app-cliandamplifier-module-hooks-streaming-ui - Tested changes - they worked
- Made additional commits locally to fix issues found during testing
- Assumed the shadow would have the new commits
- Tested again - changes weren't there
- Spent time debugging why the "fix" wasn't working, when the real issue was the shadow had a point-in-time snapshot
Root cause
The shadow instructions (amplifier-bundle-shadow/context/shadow-instructions.md) mention that snapshots are point-in-time, but don't provide clear workflow guidance for the common iterative development pattern:
write code → create shadow → test → find issue → fix locally → test again → ???
The missing step is: use add-source to sync new commits into the running shadow.
Proposed change
Add a section to context/shadow-instructions.md in the shadow bundle:
## Iterating on Local Changes
Shadow environments snapshot your local repos **at creation time**. When you make new commits locally after creating a shadow, those changes are NOT automatically available.
**To sync new local commits into a running shadow:**
1. Use `add-source` to push the new commit:
```bash
shadow add-source <shadow-id> /path/to/local/repo:org/repo-name-
Clear any module/package caches inside the shadow that may have the old version
-
Re-test
Alternative: Destroy and recreate the shadow to get a fresh snapshot with all current commits.
Common mistake: Assuming new local commits are automatically available in existing shadows. They are not - shadows are isolated snapshots.
This would help AI agents (and humans) understand the correct workflow for iterative development with shadow environments.
---
*Note: Filed here because `microsoft/amplifier-bundle-shadow` has issues disabled.*