Skip to content

Commit cfe7f4e

Browse files
committed
test(platform-objects): the metadata-form catalog's translated count is 700 with the flow variable's Record Object row
Claude-Session: https://claude.ai/code/session_01JQwxbaiSvS6eyjEknCGKao Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6aefef6 commit cfe7f4e

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎.changeset/29442-flow-start-input-record.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
'@objectstack/spec': minor
33
'@objectstack/lint': minor
4+
'@objectstack/platform-objects': patch
45
---
56

67
feat(spec): a flow start input can declare that it is the id of a record of a named object (`objectName`)
@@ -10,7 +11,7 @@ Metadata-protocol: added
1011

1112
`FlowVariableSchema` declares one optional key, `objectName`: on an input (`isInput: true`), it says the input's value is the id of one record of the named object, e.g. `{ name: 'accountId', type: 'text', isInput: true, objectName: 'crm_account' }`. The rule it states: every door that starts the flow by name (the trigger route, an action of type flow over REST and MCP `run_action`, a declared endpoint of type flow) loads a declared input from that object in the caller's own scope before the run exists; an id the caller cannot read there is refused `404 RECORD_NOT_FOUND`, and a value that is not an id is refused `400 VALIDATION_FAILED` naming the input. An input without the declaration keeps the visible-read rule: it is judged as a record only where the flow's own definition reads it as a record id.
1213

13-
- **Spec.** `objectName` is an object name (snake_case) and is refused on a variable that is not an input, since no caller's value reaches one. `type` stays the data type: the variable holds the id. A `reference` or `object` key on a flow variable is still refused, and the refusal now names `objectName`. The flow form's variables repeater gains the column.
14+
- **Spec.** `objectName` is an object name (snake_case) and is refused on a variable that is not an input, since no caller's value reaches one. `type` stays the data type: the variable holds the id. A `reference` or `object` key on a flow variable is still refused, and the refusal now names `objectName`. The flow form's variables repeater gains the column, labelled in the metadata-form bundles (en, zh-CN, ja-JP, es-ES).
1415
- **Lint.** `flow-input-unknown-object`: a declared object the stack does not define is a warning (it may come from another installed package), and an error at the runtime publish gate when the write's package closure does not reach it, the verdict `flow-trigger-unknown-object` gives a trigger object. A `sys_` name is not judged.
1516

1617
This is the contract half: the start doors read the declaration in a later change, and until then no door loads a declared input. Nothing to do for existing flows.

‎packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1253,7 +1253,10 @@ describe('#19403 round 10 — the verdicts, on the live bundles', () => {
12531253
// 699 since #28879: the action form's `cancelText` row (the dismiss
12541254
// label of the action's confirm and param dialogs) — one row label,
12551255
// authored in all three locales.
1256-
expect(translated.length, `${locale} positive control`).toBe(699);
1256+
// 700 since #29442: the flow form's variables repeater offers
1257+
// `objectName` (a start input declared a record id) — one row label,
1258+
// authored in all three locales.
1259+
expect(translated.length, `${locale} positive control`).toBe(700);
12571260
}
12581261
// ⭐ DARK — the blindness, executable. On a synthetic two-locale catalog the
12591262
// all-three predicate returns 0 while the per-locale one returns 1, so the

0 commit comments

Comments
 (0)