Skip to content

fix: stabilize live sync e2e workflows#57

Merged
rgonek merged 22 commits intomainfrom
feat/live-e2e-sync-plan
Mar 11, 2026
Merged

fix: stabilize live sync e2e workflows#57
rgonek merged 22 commits intomainfrom
feat/live-e2e-sync-plan

Conversation

@rgonek
Copy link
Owner

@rgonek rgonek commented Mar 9, 2026

Summary

  • preserve local edits during automatic --on-conflict=pull-merge recovery
  • fix file-target validation in push worktrees so pulled asset paths remain valid
  • restore attachment round-trip handling for file-id-only media nodes and tighten live E2E expectations around tenant-specific date/media behavior

Testing

  • go test ./internal/sync -run focused pull/push regression tests
  • go test ./cmd -run focused pull-merge and validate regression tests
  • go test ./cmd -tags e2e -run 'TestWorkflow_(PushAutoPullMerge|PlainISODateTextStability|AttachmentPublicationRoundTripAndDeletion|EndToEndCleanupParity)$' -count=1 -v

rgonek added 22 commits March 9, 2026 12:11
Preserve local edits during automatic pull-merge, fix file-target validation in push worktrees, and restore attachment/date round-trips in live sync flows.

Verified with focused internal/sync tests, focused cmd tests, and the four live E2E workflows for pull-merge, plain ISO date stability, attachment publication round-trip, and cleanup parity.
- Added `pushDeletePage` function to handle the deletion and archiving of pages in Confluence.
- Implemented `pushUpsertPage` function to manage the creation and updating of pages, including attachment handling and conflict resolution.
- Introduced rollback mechanisms for safe operations during push mutations.
- Enhanced diagnostics for better error tracking and reporting during push operations.
- Integrated asset management for attachments, ensuring proper upload and deletion based on references in markdown documents.
- Moved `preparePushRepoWithBaseline` and `preparePushRepoWithLinkedChildBaseline` functions to `push_test_helpers_test.go`.
- Removed redundant code from `push_test.go` to improve readability and maintainability.
- Introduced a fake push remote struct and its methods to facilitate testing without affecting the actual remote.
- Implement tests for folder fallback behavior when folder listing fails.
- Add tests to ensure diagnostics are deduplicated for folder hierarchy resolution.
- Create tests for incremental pull operations, including handling deletions and watermark updates.
- Introduce tests for state management during pulls, ensuring drafts and trashed pages are handled correctly.
- Validate preservation of absolute cross-space links without unresolved warnings.
- Refactor folder hierarchy management to improve compatibility and error handling.
- Introduce diagnostics for folder API failures, falling back to page-based hierarchy when necessary.
- Update tests to cover new folder handling logic and ensure proper diagnostics are emitted.
- Add a live sync test log for comprehensive verification of push/pull functionality.
@rgonek rgonek merged commit 77f4387 into main Mar 11, 2026
2 checks 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.

1 participant