Skip to content

Commit d2273ab

Browse files
committed
docs(changeset): the third bullet states the reader-facing change, and a second ADR-0087 semantic entry carries it
- The third BREAKING bullet's FROM and TO name the readers only: a text hole and $record. - New semantic ledger entry flow-dotted-write-read-by-run-expressions-only states the rule; the changeset's registered marker names both entries. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017xRBcW9L8Noz9BxEwjwiov
1 parent d858719 commit d2273ab

2 files changed

Lines changed: 26 additions & 3 deletions

File tree

‎.changeset/automation-variable-keys-reserved-segments.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fix(service-automation)!: automation variable keys cannot use reserved object se
99
Clause-②: no (narrowing)
1010
Metadata-protocol: narrowed
1111

12-
<!-- adr-0087: registered flow-variable-key-reserved-segment-refused -->
12+
<!-- adr-0087: registered flow-variable-key-reserved-segment-refused, flow-dotted-write-read-by-run-expressions-only -->
1313

1414
- **BREAKING: a flow variable key may not use `__proto__`, `constructor` or `prototype` as its name or as any dot-separated part of it.** Registration (and `os migrate meta --stored`, which previews it) judges every key a flow names, in every graph it holds: each node's `id` (it heads every key the node's output is stored under), each declared variable's `name`, each `assignment` node's targets in every shape, each node's `outputVariable`, `iteratorVariable`, `indexVariable`, `errorVariable` and `idVariable`, and each `screen` field's `name`. A name is judged with surrounding whitespace trimmed.
1515
- FROM: a flow naming such a key registered.
@@ -20,6 +20,6 @@ Metadata-protocol: narrowed
2020
- TO: the resume answers `INVALID_SIGNAL` before anything reads the submitted values; nothing is applied, and the run stays paused for a valid submission.
2121
- The fix: send the screen's declared field names, and `output` keys without those segments.
2222
- **BREAKING: one run's writes never change a flow's defaults, another run's values, or the record the run was handed.** Each run binds its own copy of a declared variable's object or list default, and of the trigger record (`record` and `$record`). A dotted write whose head names a value the run holds (`cfg.mode` over a declared `cfg`, `record.x` over the trigger record) is read back by the run's expressions (conditions and CEL values); the value itself keeps what it was, and a text hole (`{{ cfg.mode }}`) and `$record` read the value. With no durable suspended-run store, a resumed run works on its own copy of its variables, as a stored run does.
23-
- FROM: such a write also changed the value it named: a text hole and `$record` read the write, the next run of the flow started from the changed default, and a node that changed the record in place changed the trigger's object.
24-
- TO: only the run's expressions read the write; text holes, `$record`, the flow's default, the next run and the trigger's object do not.
23+
- FROM: a text hole and `$record` read a dotted write.
24+
- TO: only the run's expressions read the write; a text hole and `$record` read the value.
2525
- The fix: to show or keep a value a run computed, assign it to a variable of its own (`assignments: { mode_now: { dialect: 'cel', source: 'cfg.mode' } }`) and read that variable in the text hole or the later step.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
2+
3+
import type { SemanticMigration } from '../../types.js';
4+
5+
export const entry: SemanticMigration = {
6+
id: 'flow-dotted-write-read-by-run-expressions-only',
7+
surface:
8+
'automation.Flow run by the automation engine: an assignment target (or any other key a node writes) whose head '
9+
+ 'names a value the run holds — a declared variable\'s object or list default (cfg.mode over a declared cfg) or '
10+
+ 'the trigger record (record.x) — read by a text hole ({{ cfg.mode }}) or through $record',
11+
replacement:
12+
'Assign the value the run computed to a variable of its own (assignments: { mode_now: { dialect: \'cel\', '
13+
+ 'source: \'cfg.mode\' } }) and read that variable in the text hole or the later step',
14+
reason:
15+
'Each run binds its own copy of a declared variable\'s object or list default and of the trigger record '
16+
+ '(record and $record). A dotted write whose head names such a value is read back by the run\'s expressions '
17+
+ '(conditions and CEL values); the value itself keeps what it was, so a text hole and $record read the value, '
18+
+ 'not the write. There is no mechanical rewrite: which reader needs the computed value is the author\'s '
19+
+ 'choice.',
20+
acceptanceCriteria:
21+
'Every text hole and $record read that should show a value a run computed reads a variable the run assigned '
22+
+ 'that value to, and a test run of each such flow shows the computed value there.',
23+
};

0 commit comments

Comments
 (0)