Skip to content

Amends #2: data a step or hook receives is read-only #27

Closed

Description

@marlon-sousa

Agreed design as of 2026-10-02. Amends #2 (proposal 0002, Foundations). Decided by the maintainer during the evaluation of #10; there was no separate original proposal.

Summary

Everything a step or a hook receives is read-only for it. Changing a received value never changes the data bag, a step's contributions, or what any other step or hook receives. The only way to change the data bag remains a contributor.

Motivation

Steps and hooks never see the data bag; they ask for data and the workflow resolves it. That separation is only real if what they receive cannot be used to change the bag behind the workflow's back. In a language with shared mutable objects, a step that modifies a list it received could otherwise change what a later step sees, invisibly and without any event.

Agreed design

  1. Received data is read-only. Every value a step or a hook receives (a step's inputs, data from the workflow, data from the step, a failure's reason or details, an error, the journey ID) is read-only for it.
  2. Isolation. Changing a received value, where the language allows it at all, MUST NOT change the data bag, the contributions of any step or hook, or what any other step or hook receives.
  3. Contributions are captured when made. A value passed to a contributor is captured at that moment: changing the object afterwards MUST NOT change what was contributed.
  4. Writing goes only through a contributor, as proposals 0002 and 0008 already say, so every change to the data bag is visible in the events.
  5. How it is guaranteed is each language's choice, recorded in its tech spec: for example through ownership and borrowing, or by giving each receiver its own copy or an immutable view.

Changes when accepted

Tier

Activity

  1. added
    proposal
    on Oct 2, 2026
  2. marlon-sousa commented on Oct 2, 2026

    @marlon-sousa
    ContributorAuthor

    Claude summary

    Posted by Claude (Claude Code) from a maintainer's account, as described in PROCESS.md.

    Decided by the maintainer during the evaluation of #10, outside the thread, on 2026-10-02. The issue body holds the agreed design. Nothing is open. This proposal is ready for a maintainer to set status: ready.

  3. added
    status: evaluating
    tier: 1
    amends: 2
    status: ready
    and removed
    status: evaluating
    on Oct 2, 2026
  4. github-actions commented on Oct 2, 2026

    @github-actions

    Accepted on 2026-10-02 in #30.

  5. locked as resolved and limited conversation to collaborators on Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    amends: 2proposalstatus: readytier: 1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions