From d0a195e9f55eb84f5985e924ba38e8fa0903dcbb Mon Sep 17 00:00:00 2001 From: Steve Biedermann Date: Tue, 3 Nov 2026 18:53:45 +0100 Subject: [PATCH] feat!: use self-messaging in the counter start operation BREAKING CHANGE: the bundled counter accepts start instead of send and queues an add message to itself using ctx.this, rather than forwarding to a target actor. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CHANGELOG.md | 2 ++ runa-std/actors/counter.rn | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a1355b..55a1897 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ All notable changes to this project will be documented in this file. ### Changed +- Change the bundled counter's `send` operation to `start`, which queues an + increment to itself using `ctx.this`. - **Breaking:** Protocol v5 adds actor log thresholds to snapshots, guarded editing operations, and opt-in log-history/follow operations and notifications. - Move image sources and actors into a dedicated Runa Activity Bar sidebar, diff --git a/runa-std/actors/counter.rn b/runa-std/actors/counter.rn index 808780f..99922d8 100644 --- a/runa-std/actors/counter.rn +++ b/runa-std/actors/counter.rn @@ -1,6 +1,6 @@ pub fn handle(ctx, state, sender, message) { - if message.op == "send" { - ctx.send(message.target, #{op: "add", value: message.value}); + if message.op == "start" { + ctx.send(ctx.this, #{op: "add", value: 1}); state + 1 } else if message.op == "add" { state + message.value