Skip to content

fix(automation): honor the assignments wrapper shape on assignment nodes - #2250

Merged
os-zhuang merged 1 commit into
mainfrom
fix/flow-assignment-config-shape
Jun 23, 2026
Merged

fix(automation): honor the assignments wrapper shape on assignment nodes#2250
os-zhuang merged 1 commit into
mainfrom
fix/flow-assignment-config-shape

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Problem

The built-in assignment node executor set each top-levelconfig key as a flow variable:

for(const[k,v]ofObject.entries(config))variables.set(k,v);

But every surface that authors these nodes emits an assignmentswrapper instead:

  • Studio's visual Assignment editorconfig: { assignments: { <var>: <value> } }
  • bundled example flows (app-crm, showcase) → config: { assignments: [{ variable, value }] }

So a node designed in Studio (or any shipped example) silently set a single variable literally named assignments to the whole map/array and never set the intended variables — it passes build and no-ops at run time, leaving every downstream {var} reference unresolved. Classic "passes build / silent at runtime."

Found dogfooding the Studio Flow Builder as a business user.

Fix

builtin/logic-nodes.ts now normalizes all three shapes (assignments map, assignments array of {variable|name|key, value}, and the legacy flat { <var>: <value> }) and interpolates {var} templates in the values, matching the CRUD / screen nodes.

Tests

  • New logic-nodes.test.ts covers each shape (map / array / flat / interpolation) as a regression guard — fails on the wrapper shapes before the fix.
  • Full @objectstack/service-automation suite: 206 passing, no regressions.

🤖 Generated with Claude Code

The built-in assignment node executor treated every top-level config key as a
flow variable, but Studio's visual Assignment editor and the bundled example
flows all emit an `assignments` wrapper (map or array). A node designed in
Studio therefore set a single variable literally named `assignments` and never
set the intended variables — passing build, no-oping at run time.
Normalize the three authoring shapes (assignments map, assignments array of
{variable,value}, legacy flat keys) and interpolate {var} templates in values,
matching the CRUD/screen nodes. Add logic-nodes.test.ts as a regression guard.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercelBot commented Jun 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
specBuildingBuildingPreview, CommentJun 23, 2026 5:50pm

Request Review

@github-actionsgithub-actionsBot added documentation Improvements or additions to documentation tests tooling size/m labels Jun 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): packages/services.

5 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/guides/packages.mdx(via packages/services)
  • content/docs/guides/runtime-services/audit-service.mdx(via packages/services)
  • content/docs/guides/runtime-services/index.mdx(via packages/services)
  • content/docs/guides/runtime-services/settings-service.mdx(via packages/services)
  • content/docs/protocol/objectos/i18n-standard.mdx(via packages/services)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

@os-zhuang
os-zhuang merged commit b6a4972 into mainJun 23, 2026
14 of 15 checks passed
@os-zhuang
os-zhuang deleted the fix/flow-assignment-config-shape branch June 23, 2026 17:53
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/mteststooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@os-zhuang