Conversation
Run campaign and component validators before any deploy uploads, add the --no-validate escape hatch, and stop the deploy with contextual errors when validation fails. Co-authored-by: Cursor <cursoragent@cursor.com>
Add explicit integration-style tests for bad SCSS, bad component, network failure, --no-validate bypass, and gate behavior under --force and cli mode. Co-authored-by: Cursor <cursoragent@cursor.com>
Move the CLI test runner and all test files to Vitest while preserving existing test coverage and behavior. Add a shared Vitest config to support cwd-dependent tests and keep filenames standardized as *.test.js. Co-authored-by: Cursor <cursoragent@cursor.com>
Normalize malformed validator results into explicit deploy validation failures and stop the styles upload spinner on error before returning. Add coverage for malformed validator output to prevent regressions. Co-authored-by: Cursor <cursoragent@cursor.com>
…IR-1522) Limit pre-flight validation fan-out with bounded concurrency and treat a missing components directory as an empty component set. Add deploy test coverage for the missing-components path. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4b95fa8. Configure here.
| }; | ||
| }) | ||
| ), | ||
| ]; |
There was a problem hiding this comment.
Race condition in validation error handling
Medium Severity
The validation runs in parallel with a concurrency limit of 4, but the loader is started before all tasks begin. If validation fails very quickly (e.g., first batch fails), the loader shows "Validation passed" or "Deploy validation failed" before all validations complete, potentially missing errors from later batches.
Reviewed by Cursor Bugbot for commit 4b95fa8. Configure here.
| if (result && typeof result === 'object' && typeof result.ok === 'boolean') { | ||
| return { | ||
| ok: result.ok, | ||
| error: |
There was a problem hiding this comment.
Missing error normalization for empty strings
Low Severity
The normalizeValidationResult function checks if result.error is a non-empty string with result.error.trim(), but doesn't handle the case where result.error is an empty string after trimming. This results in the fallback error being used even when an empty string error was explicitly provided.
Reviewed by Cursor Bugbot for commit 4b95fa8. Configure here.
| } | ||
|
|
||
| if (options.validate !== false) { | ||
| const validationPassed = await runPreflightValidation({ config }, deps); |
There was a problem hiding this comment.
Token retrieval happens before validation option check
Low Severity
Authentication token is retrieved even when using --no-validate flag and validation might not require it. This causes unnecessary API calls and potential authentication prompts when skipping validation.
Reviewed by Cursor Bugbot for commit 4b95fa8. Configure here.


What changed
--no-validateonraisely deployto bypass validation when needed.--no-validatebypass--forcecli: truenode:testtovitest.Note
Medium Risk
Changes the
deployflow to run new pre-flight validation (SCSS transpiler + component parsing) and to fail fast before uploads, which can block deployments if validation behavior differs from production. Also adds a new test runner (vitest) and updates lockfile, increasing dependency/tooling change surface.Overview
Adds a pre-flight validation gate to
raisely deploythat validates campaign SCSS (via the transpiler service) and local component source before any uploads, and aborts the deploy with contextual campaign/component error messages when validation fails.Introduces a
--no-validateflag to bypass this gate, refactorsdeployto support dependency injection for testing, and migrates the test suite fromnode:testtovitestwith a newdeploytest suite covering validation success/failure and bypass scenarios.Reviewed by Cursor Bugbot for commit 4b95fa8. Bugbot is set up for automated code reviews on this repo. Configure here.