Repository navigation
fix: avoid duplicate component PATCHes and skip unchanged components in deploy (SIR-2552) - #89
Merged
KeinerM merged 1 commit intoDec 3, 2026
Conversation
…in deploy (SIR-2552)
There was a problem hiding this comment.
Risk: low. This automation approved the PR. The change is a bounded CLI deploy optimization (one PATCH per component, skip when remote HTML and editable fields match) with tests covering skip and upload reporting, and no Tier 1 issues.
Risk Assessment (Framework v2.0)
Framework (v2.0)
| Dimension | Tier | Score | Rationale |
|---|---|---|---|
| Security | 1 | Low | No findings |
| Sensitive domains | 1 | Low | None. CLI component upload path only; no auth, payments, PII storage, infra, CI/CD, or secrets changes |
| Data integrity | 1 | Low | No data-access or org-scoping changes |
| Deployment | 1 | Low | None |
| Scope | 2 | Medium | Modifications in existing files (~242/18) plus tests; core logic change is small |
| Architecture | 2 | Low | Stays in CLI component/deploy modules; updateComponentConfig remains for start/watch |
| Feature flags | 2 | Low | CLI tooling behavior; production feature-flag wrap is unnecessary |
| Dependencies | 2 | Low | No changes; reuses existing lodash |
Mitigating Factors
- Unit tests cover
hasComponentChanged, skip-on-match, PATCH-when-changed, and deploy skip reporting - Skip compares the same
latestHtmlandeditablefields the PATCH writes raisely startstill uses the previous config/file update path
Findings
| # | Finding | Status | Resolution |
|---|---|---|---|
Outstanding findings: 0
Overall risk: LOW
Decision: APPROVED
Rationale: All Tier 1 dimensions are Low, outstanding findings is 0, and the deploy skip path is covered by tests. Approving under decision rule 4.
Sent by Cursor Approval Agent: Nemo - Pull Request Router and Approver
dankeela
approved these changes
Dec 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Reduces unnecessary component saves and eliminates concurrent duplicate
PATCHrequests duringraisely deploy, addressing the CLI-side contributor to SIR-2552.Changes
src/deploy.js:updateComponentConfig(data)call duringdeploy. Previouslydeployenqueued bothupdateComponentConfig(data)andupdateComponentFile(data)concurrently for every component even thoughupdateComponentFilealready sends bothlatestHtmlandlatestSchema(includingeditable: config.fields), causing concurrentPATCH /v3/components/{uuid}?private=1requests to race onlatestVersionand double compiles and Cloudflare cache purges.updateComponentFile(data, { skipUnchanged: true })call per component and reports uploaded vs. skipped unchanged components.src/actions/components.js:hasComponentChanged(remoteComponent, { file, config })comparinglatestHtmlandlatestSchema.data.editable(vialodash.isEqual).updateComponentFileto support{ skipUnchanged: true }, returning{ skipped: true }without sending aPATCHwhen remote matches local.updateComponentConfigexported forsrc/start.jscompatibility.tests/components.test.js&tests/deploy.test.js:hasComponentChanged,updateComponentFilewith{ skipUnchanged: true }, anddeploycomponent skipping/reporting.Verification
npm test(vitest run --config vitest.config.js): 14/14 test files, 133/133 tests passing.raisely deploywith no changes skips all components (0PATCHrequests)..jsor.json(fields) sends a singlePATCHfor that component and skips the rest.raisely startcontinues to save.jsand.jsonchanges without regression.Note
Low Risk
Deploy path optimization with preserved start/watch behavior; behavior change is fewer API writes when content is unchanged.
Overview
Deploy now uploads each local component with a single
updateComponentFile(..., { skipUnchanged: true })instead of racing concurrentupdateComponentConfigandupdateComponentFilePATCHes. The CLI compares remotelatestHtmland editable schema fields to local files and skips PATCHes when nothing changed, with progress text for uploaded vs skipped counts.hasComponentChanged(lodash deep-equal onconfig.fields) gates that skip behavior;updateComponentConfigremains forraisely startwatch flows. Tests cover change detection, skip-on-match, and deploy reporting.Reviewed by Cursor Bugbot for commit b4f4536. Bugbot is set up for automated code reviews on this repo. Configure here.