C.W.K.
Stream
Lesson 03 of 05 · published

Targets Progress Independently

~9 min · independent-targets, partial-outcomes, isolation

Level 0Lone Machine
0 XP0/37 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete
"Seven machines succeeded, one slept, one broke. That's three answers. Do not average them into one."

Nine machines, nine stories

A fleet-wide operation looks like one action, but it's really N independent ones running side by side. Each target has its own path through the state machine, its own events, its own ending. Treating the whole thing as a single success-or-failure throws away the one property that keeps fleet work sane: the machines don't share a fate.

The flattening lie

Say an upgrade finishes with seven hosts succeeded, one asleep and never started, and one failed. Flatten that to a single verdict and you get to pick your lie. Call it failed and you've cried wolf — seven machines are fine. Call it succeeded and you've hidden the wolf — one machine is actually broken. Either way, the number that matters is gone.

Three outcomes, kept apart

The honest shape keeps them separate: seven succeeded, one pending (a sleeping host is resumable work, not a casualty), one failed (a repair task with its own logs). Now the dashboard tells the truth at a glance, and each ending points at the right next action — nothing for the seven, wake-and-resume for the one, investigate for the other.

An isolated failure is not a campaign failure

Because targets are independent, one failed host becomes a repair task without cancelling the healthy peers mid-flight. The seven that were going to succeed still succeed. Only a genuinely systemic failure — the kind that suggests every remaining target will hit the same wall — pauses the unstarted work. One broken machine is a repair; a shared root cause is a stop.

Don't average independent fates. A single verdict over many machines is either a false alarm or a cover-up; the truth has as many cells as there are hosts.

Code

Per-target outcomes, never collapsed·python
results = {
    "office":  "succeeded",
    "server":  "succeeded",
    "laptop":  "succeeded",
    # ...four more succeeded...
    "sleeper": "pending",   # asleep, never started -> RESUMABLE, not failed
    "broke":   "failed",    # a repair task, with its own events + logs
}

# WRONG: campaign = "failed" if any(r != "succeeded") else "succeeded"
#        -> hides 7 wins, or cries wolf over 1 sleeper. One word cannot
#           carry nine truths.

# RIGHT: report the histogram; let each ending drive its own next step.
summary = { "succeeded": 7, "pending": 1, "failed": 1 }
# needs_attention only for 'failed'; 'pending' is a wake-and-resume task;
# the seven are simply done.

External links

Exercise

Imagine you run one command across five machines and it succeeds on three, is skipped on one (offline, expected), and errors on one. Write the result as five independent cells, then write the single-word summary someone might wrongly collapse it into. What decision does the collapsed version make impossible?
Hint
The collapsed 'failed' hides that three machines are done and one was skipped on purpose — so a reader can't tell whether to re-run everything (wasteful) or just fix the one. Independence is what lets the next action be surgical instead of a full retry.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.