Your question is Predict Code Output. Take a moment with it on the right.
Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).
GitLab's CI system tracks the status of each pipeline stage as it runs. A QA engineer wrote this quick Ruby script to simulate three stages sharing a default status template, then asked what it actually prints before trusting the pattern in a test fixture.
default_status = { name: "pending", retries: 0 }
stages = []
3.times do |i|
status = default_status
status[:name] = "stage_#{i}"
stages << status
end
stages.each { |s| puts s[:name] }
puts default_status[:name]
State exactly what this prints, in order, and explain why, before describing the fix.