Skip to content

fix(platform): gate automation tester on input validation#1792

Merged
yannickmonney merged 1 commit into
mainfrom
fix/automation-tester-input-validation
Jun 1, 2026
Merged

fix(platform): gate automation tester on input validation#1792
yannickmonney merged 1 commit into
mainfrom
fix/automation-tester-input-validation

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

What

In the automation test panel (Automation → tester, e.g. Conversation Sync), Execute and Dry run were only disabled while a run was already in flight. With no required configuration entered — or with malformed JSON — you could still click them; the run just failed downstream with a toast.

Reported in #1483.

Change

Gate both buttons on validity:

  • The test input must parse as JSON.
  • Every required field from the start node's inputSchema must be configured. A required field is treated as unconfigured when it's absent, null, a blank/whitespace string, or an empty array/object. 0 and false are accepted (indistinguishable from deliberate values).

When blocked, an inline role="alert" message explains why — either "Enter valid JSON to run this automation." or "Configure required field(s) before running: …". Since the pre-filled template seeds required strings as "" and required arrays as [], a freshly-opened tester is correctly gated until the user fills them.

The check is a new pure helper getMissingRequiredFields(schema, value) so it's unit-testable in isolation.

Testing

  • New input-schema-template.test.ts (7 cases): no-required, non-object input, absent/null/blank/empty-array detection, 0/false accepted, whitespace-only strings, empty required object, and template-is-gated.
  • i18n parity test green (keys added to en/de/fr).
  • tsc --noEmit and oxlint --type-aware clean.

Closes #1483

The Execute and Dry-run buttons in the automation test panel were only
disabled while a run was in flight — you could click them with invalid
JSON or with required start-node inputs left blank, and the run would
only fail downstream.

Gate both buttons on validation: the input must parse as JSON and every
required field declared in the start node's inputSchema must be
configured. A required field counts as unconfigured when it's absent,
null, a blank string, or an empty collection; 0 and false are accepted.
When blocked, an inline message explains why (invalid JSON, or the list
of required fields still to fill). Because the pre-filled template seeds
required strings as empty, a freshly-opened tester is correctly gated
until the user fills them in.

Extract getMissingRequiredFields as a pure, exported helper with unit
coverage.

Closes #1483
@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@yannickmonney, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 55 minutes and 29 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 015b3ec6-022b-4514-9a7b-8483d5e860e6

📥 Commits

Reviewing files that changed from the base of the PR and between d5d52e1 and 0d4dd17.

📒 Files selected for processing (6)
  • services/platform/app/features/automations/components/automation-tester.tsx
  • services/platform/app/features/automations/utils/input-schema-template.test.ts
  • services/platform/app/features/automations/utils/input-schema-template.ts
  • services/platform/messages/de.json
  • services/platform/messages/en.json
  • services/platform/messages/fr.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/automation-tester-input-validation

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@yannickmonney yannickmonney merged commit 9fa27d2 into main Jun 1, 2026
46 of 47 checks passed
@yannickmonney yannickmonney deleted the fix/automation-tester-input-validation branch June 1, 2026 10:10
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.

Bug: Continue/Execute Without Validation (Missing Input Validation)

1 participant