Skip to content
Atlas, your robot learning host

Interim portrait

Atlas · Foundations idempotency

Hello, little human. I am Atlas. One useful idea is plenty for a beginning. Read the explanation, then explore an example.

Choose your robot No recording yet · text complete
concept for everyone
  • web

Idempotency

Repeating the same operation has the same intended effect as applying it once; that does not guarantee identical responses or harmlessness.

Tune in, human.

Reviewed videos and Shorts

Captions requested · no autoplay

Finding reviewed videos…

    Keep the useful bits, human.

    Beginner field notes

    Choose explanation level
    • Idempotency means repeating the same operation has the same intended effect as doing it once. Define the effect you are comparing.
    • If only the value is modeled, setting a counter to 5 twice leaves 5; adding 1 twice adds 2. Repetition is about the operation’s rules, not its name.
    • An idempotent operation can still change information. It is not automatically harmless, authorized or reversible.
    See a worked example

    Compare repeated effects under three explicit contracts

    One reviewed sample, shared across levels. Nothing here runs on your computer.

    Example review recorded 2026-10-16 · version 1.

    Example input · do not paste
    Each trial resets the fictional board; no other changes occur.
    A: T7 starts Open. The intended effect is only the status change; no counter, event record, notification or other effect is modeled. Apply this “set status Done” operation twice.
    B: Completed counter starts 0. Apply unprotected “increase by 1” twice.
    C: Counter starts 0. Apply “increase by 1” with caller L/operation op42 twice. The service atomically records ID+effect, retains the ID throughout this trial, recognizes matching intent and rejects a changed amount under the same ID.
    Example output · do not paste
    A ends Done: the intended status is the same after one or two applications.
    B ends 2: repeating the increment changed the intended counter effect.
    C ends 1: the second matching attempt adds nothing. A later op42 request for “increase by 2” is rejected and leaves 1.
    Responses need not be byte-for-byte equal.

    C illustrates a stated deduplication contract; it does not prove exactly-once processing across arbitrary services or after the ID expires. A and B make clear why neither an operation name nor a successful response alone establishes idempotency. Nothing is executed against a real task list. Trial A does not establish idempotency for a different task-completion handler with additional intended effects, such as the event-sourced variant in another lesson.

    Sources for this sample

    Visual

    The contracted operation ID permits one intended counter increase; repeating an unprotected increase makes two changes.

    The reviewed description and complete diagram source are available here.

    Read the complete diagram source

    This is the source for the reviewed diagram, not a command to run.

    flowchart LR
      A["Same operation ID and intent"] --> D["Duplicate recognized"]
      D --> O["One intended counter increase"]
      B["Unprotected increase repeated"] --> T["Two counter increases"]
    Full explanation and primary sources

    Reviewed explanation

    An operation is idempotent when applying the same operation again has the same intended effect as applying it once. In Lantern Board, setting T7’s status to Done twice leaves it Done, just as one application does. Here the operation changes only that status; counters, event records and notifications are outside this trial. Increasing a counter by one twice changes it by two. The question is about the intended effect you defined, not whether every response message or audit entry is identical.

    HTTP uses this distinction to reason about repeating requests after a communication failure. RFC 9110 defines PUT and DELETE as idempotent, but they can change the target. Their response can differ across attempts, and incidental logging can happen each time. Idempotent therefore does not mean harmless, authorized or reversible. Do not infer a general retry guarantee for an arbitrary application operation merely from its name.

    An idempotency key is an identifier in a service contract, not magic supplied by the client. Our fictional counter operation accepts one caller/operation ID with one intended change. It records that ID and the counter change atomically, recognizes the same intent again, and rejects different parameters under that ID. These are deliberate example rules. The actual service must specify identity scope, retention, failures and concurrent handling before a caller can rely on them.

    The worked trials are independent: each starts from the stated initial values with no other writer. A repeated attempt represents the same intended operation, not a second user decision to add another completion. If the first reply is lost, repetition under a supported contract can preserve the intended effect while the client learns the outcome. Without that contract, reconcile uncertainty rather than assuming that any retry is safe.

    Source collection

    Notes AI source review · 2026-10-17

    AI source comparison recorded 2026-10-16. Human learner validation is pending.

    Quick quiz · one question

    Retry the same intent under the stated contract

    Sample scenario. Synthetic counter starts 0. The service atomically records each caller/operation ID and its amount with the effect, retains them throughout this trial, reuses matching intent and rejects a changed amount under that same caller/ID. Different callers have separate ID scopes. No crashes, expiration or concurrent races are modeled.

    Starting counter
    0
    Service contract
    Atomic ID plus effect, scoped by caller and operation; matching amount reused, changed amount rejected, IDs retained throughout this trial.
    Attempt 1
    Caller learner-a, operation op-42, amount 1
    Attempt 2
    Caller learner-a, operation op-42, amount 1
    Attempt 3
    Caller learner-a, operation op-42, amount 2
    Attempt 4
    Caller learner-b, operation op-42, amount 1

    What final counter and request handling follow this service contract?

    Answers stay on this device.

    Sources and exercise scope

    Original synthetic exercise. AI comparison against the reviewed lesson recorded on 2026-10-17; the references above state their scope. Human learner validation has not been run. A result here records this attempt; it does not establish mastery.

    Follow this learning pathLesson 7 of 8
    Save or adjust this lesson
    Reference notes · file removal and public access

    Robot reference desk

    Understand what can change

    These reviewed public notes are available to everyone. They do not establish that an operation ran or inspect your files, backups or permissions.

    File removal

    Before deleting files: deleting a file can remove it without putting it in Trash or a recycle bin, and recovery is not guaranteed. Check the intended targets and whether a usable backup or recovery option exists before continuing.

    Sources for this note

    Public access

    Before making a resource public: public read access can let anyone view the exposed content, and public write access can allow changes to data. Check the actual audience, exposed content and allowed operations before continuing. This guidance does not inspect or change your permissions.

    Sources for this note

    A link can carry these public reference topics in its fragment. Page scripts, extensions, browser history and copied links can read them. This page attempts to minimize that fragment when JavaScript runs; reloading afterward can lose the selection. No project details or conversation text belong in a lesson link. Privacy details.