Skip to content

SIR-1523 - Validate watched saves before upload#69

Merged
KeinerM merged 2 commits intodevelopfrom
sir-1523-cli-v2-per-save-validation-in-raisely-start
May 8, 2026
Merged

SIR-1523 - Validate watched saves before upload#69
KeinerM merged 2 commits intodevelopfrom
sir-1523-cli-v2-per-save-validation-in-raisely-start

Conversation

@KeinerM
Copy link
Copy Markdown

@KeinerM KeinerM commented May 6, 2026

What changed

  • Added per-save validation to raisely start for campaign styles and components before upload.
  • On validation failure, the watcher now prints the validator error inline and skips upload for that save.
  • Refactored watcher setup into a testable registration function so watcher behavior can be verified directly.
  • Added tests covering invalid SCSS saves, invalid component saves, watcher persistence after failure, and successful recovery on the next valid save.

Note

Medium Risk
Medium risk because it changes raisely start watcher behavior and introduces token-dependent validation before uploads, which could affect developer workflows if validation or watcher wiring is incorrect.

Overview
Adds per-save validation to raisely start watchers: campaign stylesheet saves now call validateCampaignSass before uploadStyles, and component saves call validateComponent before updateComponentFile/updateComponentConfig, failing the ora loader inline and skipping the upload on validation errors.

Refactors watcher logic into exported, dependency-injectable helpers (handleCampaignChange, handleComponentChange, registerStartWatchers) and adds Vitest coverage to ensure invalid saves don’t upload, subsequent valid saves recover, and watcher callbacks keep running after failures.

Risk Assessment (Framework v2.0)

Dimension Tier Score Rationale
Security 1 Low No findings
Sensitive domains 1 Medium Touches token-backed validation flow used during uploads (auth-adjacent), though no auth/permissions logic is changed
Data integrity 1 Low No data access changes
Deployment 1 Low No infra/CI/deploy changes
Scope 2 Medium Moderate refactor of existing watcher logic plus new tests
Architecture 2 Low Localized to start command and related validation calls
Feature flags 2 Low Internal dev-tooling behavior change; feature flags not applicable
Dependencies 2 Low No dependency changes

Mitigating Factors

  • Adds focused unit tests for failure and recovery paths.

Findings

# Finding Status Resolution

Outstanding findings: 0
Overall risk: MEDIUM
Decision: APPROVED
Rationale: Single Tier 1 Medium (auth-adjacent token validation before uploads) with good unit coverage and no open findings.

Reviewed by Cursor Bugbot for commit a451eb9. Bugbot is set up for automated code reviews on this repo. Configure here.

@KeinerM KeinerM requested a review from xolott-ark May 6, 2026 17:15
@KeinerM KeinerM self-assigned this May 6, 2026
@KeinerM KeinerM force-pushed the sir-1523-cli-v2-per-save-validation-in-raisely-start branch from 6c4f31a to 6f305bb Compare May 7, 2026 14:54
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Fix All in Cursor

❌ 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 6f305bb. Configure here.

Comment thread src/start.js
Comment thread src/deploy.js Outdated
Comment thread src/deploy.js Outdated
@KeinerM KeinerM changed the base branch from develop to sir-1522-cli-v2-pre-flight-validation-gate-on-raisely-deploy-no-validate May 7, 2026 14:56
KeinerM and others added 2 commits May 8, 2026 10:10
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@KeinerM KeinerM force-pushed the sir-1523-cli-v2-per-save-validation-in-raisely-start branch from 6f305bb to a451eb9 Compare May 8, 2026 14:12
@KeinerM KeinerM changed the base branch from sir-1522-cli-v2-pre-flight-validation-gate-on-raisely-deploy-no-validate to develop May 8, 2026 14:12
@KeinerM KeinerM merged commit fdfebd9 into develop May 8, 2026
1 check passed
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.

2 participants