Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. Comment |
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.
During two-way development, an automatic file import could overwrite a newer CMS edit even when a separate stale
primo pushwas rejected. The watcher imported the full site withoutexpected_revision; a file writeback/reimport could therefore delete and recreate the edited page entries from older local content.Automatic two-way site imports now send the last verified CMS revision. Receipts from successful imports and transaction-bound exports advance that revision; unresolved local conflicts do not. A CMS edit after the receipt makes the server reject the import atomically. A missing export receipt pauses an already verified two-way session before changing files. Files-author and CMS-author behavior remain unchanged.
Refs primocms/primo#1239 and primocms/primo#1241. Two-way sync remains experimental; this is a targeted safeguard for automatic site imports, not a claim that every startup/library conflict is resolved.
Validation: both new regressions fail against upstream and pass with this change; four existing sync-conflict tests also pass. A disposable workflow using the actual built CLI reproduced the lost CMS edit before the fix. Repeated runs with the guard preserve the CMS edit, all five content values, and section IDs through client editing and republication. That workflow still flags the independent
primo-mcppublication-hydration issue.Security follow-up: removes extract-zip and replaces every server-export extraction call with full metadata validation before file creation. Rejects symlinks, special files, traversal, duplicate/case aliases, Windows reserved names/streams and existing links/files. A symlink-then-file exploit overwrites a disposable sentinel with the old dependency; the replacement refuses the archive without writing. Regular nested/binary exports preserve normal umask-based asset readability. Twenty-six ZIP cases also run against the installed CLI package across all five native CMS runners. Upgrades Chokidar to 4 (literal directory watch paths; removes vulnerable braces), esbuild to a patched floor, and vulnerable compatible transitive locks. Full npm audit is clean.
Final rc.2 installed-package testing passes all 187 CLI tests without skips on Node 22.13.0 and 24.0.0. The final handoff also checks an actual active-workspace edit passing through the upgraded watcher with section IDs retained. All work remains draft; no merge, tag, package/release publication or deployment.