What to test
marvel shift <team> performs a rolling replacement: drain old-generation sessions one at a time while launching new-generation replacements. Never exercised on desk.
Test plan
- Apply a healthy team:
workspace:
name: shift-test
teams:
- name: workers
roles:
- name: w
replicas: 3
runtime:
command: sleep
args: ["3600"]
- Wait until
marvel get sessions shows 3× running sessions with gen=1.
marvel shift shift-test/workers.
marvel get sessions -w or tail marvel events.
- Expect: one-at-a-time replacement — old gen 1 session deleted, new gen 2 session created, cycle through all 3.
Pass
- 3 drain + 3 launch events, interleaved per the reconcile cadence.
- Final state: 3×
gen=2 running, 0× gen=1.
- No observed window where
actual < desired for the role.
- One shift event per session transition (shifted/drained/launched — whichever kinds are emitted).
marvel describe team shift-test/workers shows Shift.Phase = ShiftNone at the end.
Fail
- All sessions dropped at once before replacements come up.
- Shift stalls with mixed generations (reconciler gets stuck).
- More than 3 replicas alive simultaneously.
- Generation never advances past 1.
Edge
- Apply a heterogeneous team (two roles). Shift one role only. Other role's sessions should be untouched and stay on
gen=1.
Related: internal/team reconcileShift.
What to test
marvel shift <team>performs a rolling replacement: drain old-generation sessions one at a time while launching new-generation replacements. Never exercised on desk.Test plan
marvel get sessionsshows 3× running sessions withgen=1.marvel shift shift-test/workers.marvel get sessions -wor tailmarvel events.Pass
gen=2running, 0×gen=1.actual < desiredfor the role.marvel describe team shift-test/workersshowsShift.Phase = ShiftNoneat the end.Fail
Edge
gen=1.Related: internal/team
reconcileShift.