Skip to content

test: marvel shift rolling-replace a team's sessions #38

@arcaven

Description

@arcaven

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

  1. Apply a healthy team:
workspace:
  name: shift-test
teams:
  - name: workers
    roles:
      - name: w
        replicas: 3
        runtime:
          command: sleep
          args: ["3600"]
  1. Wait until marvel get sessions shows 3× running sessions with gen=1.
  2. marvel shift shift-test/workers.
  3. marvel get sessions -w or tail marvel events.
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority.p2Medium — should address this sprintscope.in-scopeAccepted, will work ontriage.completeTriage done, ready for worktype.testTest-only changes or a request to verify shipped behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions