Skip to content

fix(workflow-code): json-text mapping escaping, client bundle, source find follow-ups - #10446

Merged
waleedlatif1 merged 2 commits into
stagingfrom
fix/release-audit-sim-a4-10442
Nov 26, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
fix/release-audit-sim-a4-10442

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

Release audit follow-ups for #10442 (v0.9.66).

  • Executor: escape references in JSON-text input mappings. inputMapping stored as JSON text spliced references raw, so a value with a quote, newline, backslash or object broke the JSON. The child workflow then got {} with no error. The resolver now treats input-mapping / workflow-input-mapper like a JSON code field, so the text and object encodings behave the same at runtime, which deploy-change detection already assumes.
  • Materialize: an object written over a whole-reference mapping is stored native. storesAsText treated any prior string as text, including a whole <start.input> reference, so the new object was stored as JSON text. For the mapping types, prior text now counts only when it encoded a container.
  • Keep the compiler out of client bundles. canonical/subblock-value.ts (reached from deploy change detection and the diff view) imported the @sim/workflow-code root barrel, which pulls in the Babel compile stack. JSON_TEXT_CONTAINER_TYPES and parseJsonContainer move to a dependency-free @sim/workflow-code/json-text subpath, used by the app and the executor.
  • sim workflows source find:
    • A source that does not compile now says so, rather than only "no block is named X".
    • JSON output carries compiles, so readers: [] is not mistaken for "nothing reads this".
    • An empty name is refused.
    • Duplicate reader rows from one line are dropped.
    • A wrapped fan-out statement is reported whole.
  • Renamed the printer's WiringStatement to PrintedWiring, so it no longer shares a name with the compile type.

Type of Change

  • Bug fix

Testing

  • Red → green, with each test run against the pre-fix code:
    • resolver.test.ts: a JSON-text input mapping with awkward reference values parses intact.
    • api-built-source.test.ts: an object written over a whole-reference mapping is stored native.
    • workflow-source-find.test.ts: covers the compile-failure message, the empty name, and duplicate readers.
  • Wrapped-statement find test.
  • Suites:
    • workflow-code: 810 pass.
    • sim-cli protocol: 641 pass.
    • apps/sim executor/variables, canonical, comparison, workflow handler and api-built-source: 1239 pass.
  • tsc passes for workflow-code and sim-cli.
  • Audits pass: check:boundaries, client-boundary, file-names, comment-hygiene, cli-docs (regenerated), workflow-code-golden, workflow-code-docs, test-patterns, sim-cli-bundle.
  • unused-exports shows only the pre-existing apps/docs .content env warning.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

…ep compiler out of client bundles, source find edge cases
@waleedlatif1
waleedlatif1 requested a review from a team as a code owner November 26, 2026 21:44
@vercel

vercel Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 26, 2026 9:53pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge, with no actionable issues found.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with no actionable issues found.

Summary

Fixes JSON-text workflow mappings, separates shared JSON helpers from the compiler, and improves sim workflows source find.

  • Child-workflow mappings escape reference values inside JSON text.
  • Objects replacing whole-reference mappings stay native.
  • Deploy comparison can load JSON helpers without the compiler stack.
  • Source find reports compile status and complete wiring statements.
  • The printer gives its wiring result type a distinct name.

Reviews (3) · Last reviewed commit: "fix(sim-cli): join wrapped wiring statem..." · Reviewed by Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 18 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 18 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 79081df into staging Nov 26, 2026
87 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/release-audit-sim-a4-10442 branch November 26, 2026 22:04

This branch was previously deployed

1 inactive deployment
Preview — ab85247d Deployed Nov 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant