Skip to content

fix(workflows): lint unquoted string references in JSON fields and surface lint on deploy - #8803

Merged
waleedlatif1 merged 3 commits into
stagingfrom
fix/agent-deploy-validation
Oct 8, 2026
Merged

waleedlatif1 merged 3 commits into
stagingfrom
fix/agent-deploy-validation

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Lint now flags a block reference written unquoted in a JSON editor field (Table row data, API body, …) when the referenced output is declared string. Outside Function code references are substituted as raw text, so {"id": <start.order_id>} becomes invalid JSON and the block failed only at run time, while the edit result's lint, workflows lint, and deploy all reported clean. Numbers, booleans, objects and undeclared types are not flagged.
  • The finding reuses unresolvedReferences (kind: 'block-output', reason unquoted-json-string: …), so it appears in the lint field of every graph write and in workflows lint with no wire-shape change. Tokens come from the runtime's own reference scanner; only tokens outside JSON string literals (escapes handled) are considered.
  • POST /api/v2/workflows/{id}/deploy lints the exact version it just made live and, if anything is found, appends one entry to the existing warnings array. Deploy never refuses or fails on lint: findings stay advisory, and a lint failure is logged and ignored.
  • unresolvedReferences description updated (OpenAPI regenerated); the lint summary header for block-output findings reads "will not work as written".

Type of Change

  • Bug fix

Testing

  • New json-literal-refs.test.ts (unquoted string refs flagged; quoted, escaped-quote, JSON-typed, unknown-type, non-JSON-field and non-string values not flagged), a lint-report wiring test, and deploy use-case tests (warning added as the deploying user, clean graph adds nothing, lint failure never fails the deploy). Each failed before the fix; escape handling and the deploy try/catch were each reverted and watched go red.
  • bunx vitest run lib/workflows lib/mothership/agent-cli/engines app/api/v2/workflows (182 files, 2757 tests), bun run lint, bun run type-check, bun run check:audits, bun run docs-manifest:check.
  • Sim CLI command inventory is byte-identical to staging (no CLI contract change).

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)

@vercel

vercel Bot commented Oct 8, 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 Oct 8, 2026 4:01pm UTC

Request Review

@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 9 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

@greptile-apps

greptile-apps Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Adds lint detection for unquoted string references in JSON fields.

The PR appears safe to merge; the canonical filter fix introduces no actionable issue.

What we checked:

  • Inactive filters cause warnings: The basic builder stores an array. The lint check skips non-string values, so it does not scan those rules as JSON text.

Summary

The PR warns about unquoted string references in JSON fields and adds advisory lint findings to deploy responses.

  • The latest change reads JSON editors through canonicalParamId, restoring warnings for Table advanced filters.
  • Deploy warnings now describe the version being published, including pending activation.
  • All four earlier, unnumbered findings are addressed: unused fields are skipped, lint uses the acting subject, the subject test checks returned behavior, and advanced filters use their sent parameter.
  • No new actionable issues or repository-rule violations were found.

Reviews (3) · Last reviewed commit: "fix(workflows): check JSON editors sent ..." · Reviewed by Greptile

Comment thread apps/sim/lib/workflows/editing/lint.ts
Comment thread apps/sim/lib/workflows/application/deployments.ts Outdated
Comment thread apps/sim/lib/workflows/application/workflow-deployments.test.ts Outdated
@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 Oct 8, 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.

All reported issues were addressed across 9 files

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

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/workflows/application/deployments.ts
Comment thread apps/sim/lib/workflows/editing/lint.ts Outdated
@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 Oct 8, 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 9 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 33dfef2 into staging Oct 8, 2026
47 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/agent-deploy-validation branch October 8, 2026 16:48

This branch was previously deployed

1 inactive deployment
Preview — fd2ab618 Deployed Oct 8, 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