Skip to content

Sync with upstream#15

Closed
doozMen wants to merge 0 commit intomainfrom
sync-with-upstream
Closed

Sync with upstream#15
doozMen wants to merge 0 commit intomainfrom
sync-with-upstream

Conversation

@doozMen
Copy link
Owner

@doozMen doozMen commented Mar 16, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 16, 2026 18:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR syncs the repository with upstream updates, including a StructuredQueries dependency bump and corresponding CloudKit/SQLiteData integration changes, along with test and CI/workflow adjustments.

Changes:

  • Bump swift-structured-queries to 0.31.0 and update query-building call sites (eq, #bind, optional protocol qualification).
  • Update CloudKit sync + mocks (per-field “has set” tracking, trigger warning for SyncEngine.isSynchronizing, asset temp directory handling, metadata/upsert tweaks).
  • Refresh/expand test coverage and snapshots; switch GitHub Actions jobs to self-hosted runners; add Claude workflows.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Tests/SQLiteDataTests/Internal/TestScopes.swift Consolidates test traits/scopes; adds print flags for CloudKit custom dumps.
Tests/SQLiteDataTests/Internal/Schema.swift Updates test schemas (primary key type changes) to align with upstream expectations.
Tests/SQLiteDataTests/Internal/PrintTimestampsScope.swift Removes standalone timestamps trait file (moved into TestScopes.swift).
Tests/SQLiteDataTests/Internal/CloudKit+CustomDump.swift Adds TaskLocal toggle + mirror support to optionally include record change tags.
Tests/SQLiteDataTests/DateTests.swift Adds date round-trip coverage for DB persistence.
Tests/SQLiteDataTests/CloudKitTests/UserlandTests.swift Adjusts seeding to use explicit IDs.
Tests/SQLiteDataTests/CloudKitTests/TriggerTests.swift Updates trigger SQL snapshots (parentheses/format normalization).
Tests/SQLiteDataTests/CloudKitTests/SyncEngineTests.swift Adds known-issue test for SyncEngine.isSynchronizing misuse during trigger creation.
Tests/SQLiteDataTests/CloudKitTests/SharingTests.swift Updates error message snapshot; ensures CloudKit records include ID field in snapshots.
Tests/SQLiteDataTests/CloudKitTests/SchemaChangeTests.swift Expands schema migration tests (defaults/nullable columns; “outside record” cases; snapshot updates).
Tests/SQLiteDataTests/CloudKitTests/ReferenceViolationTests.swift Updates query DSL usage (#bind).
Tests/SQLiteDataTests/CloudKitTests/RecordTypeTests.swift Aligns schema/type expectations (e.g. INT) with updated schema generation.
Tests/SQLiteDataTests/CloudKitTests/PreviewTests.swift Tightens conditional compilation and modernizes @Test usage.
Tests/SQLiteDataTests/CloudKitTests/NextRecordZoneChangeBatchTests.swift Adds test covering edit timing between batching and sent-changes callback; uses new print traits.
Tests/SQLiteDataTests/CloudKitTests/MockCloudDatabaseTests.swift Adds asset temp directory behavior test.
Tests/SQLiteDataTests/CloudKitTests/MergeConflictTests.swift Updates snapshots and query bindings; adjusts timing logic around conflict reproduction.
Tests/SQLiteDataTests/CloudKitTests/ForeignKeyConstraintTests.swift Ensures CloudKit records include primary key fields explicitly in test setup/snapshots.
Tests/SQLiteDataTests/CloudKitTests/FetchRecordZoneChangesTests.swift Switches to setValue(_:forKey:at:) for consistent timestamp metadata.
Tests/SQLiteDataTests/CloudKitTests/CloudKitTests.swift Updates schema expectations + record mutation helpers to new timestamp-aware APIs.
Tests/SQLiteDataTests/CloudKitTests/AssetsTests.swift Updates snapshots for /tmp asset paths; uses #bind updates.
Tests/SQLiteDataTests/CloudKitTests/AppLifecycleTests.swift Adds test for app backgrounding when sync engine isn’t running.
Tests/SQLiteDataTests/AssertQueryTests.swift Updates query DSL usage (find, eq, #bind) and expected SQL output.
Sources/SQLiteData/Internal/ISO8601.swift Tweaks ISO8601 formatting to use nextUp to improve round-trip stability.
Sources/SQLiteData/FetchOne.swift Qualifies _OptionalProtocol with StructuredQueriesCore for compatibility.
Sources/SQLiteData/CloudKit/SyncEngine.swift CloudKit sync behavior updates (preview gating, trigger warning, upsert/metadata logic, query binding updates).
Sources/SQLiteData/CloudKit/Internal/Triggers.swift Uses #bind(nil) for nullable record fields in trigger updates.
Sources/SQLiteData/CloudKit/Internal/MockSyncEngine.swift Changes send-processing flow to return a callback so tests can interleave operations deterministically.
Sources/SQLiteData/CloudKit/Internal/MockCloudDatabase.swift Writes assets to DataManager temp directory when materializing CKAssets.
Sources/SQLiteData/CloudKit/Internal/DataManager.swift Sets in-memory temp directory to /tmp; defines previewValue.
Sources/SQLiteData/CloudKit/CloudKitSharing.swift Improves “no metadata” debug message; uses #bind in updates.
Sources/SQLiteData/CloudKit/CloudKit+StructuredQueries.swift Adds hasSet(key:) and ensures remove-value still records a modification timestamp.
Package@swift-6.0.swift Bumps swift-structured-queries dependency to 0.31.0.
Package.swift Bumps swift-structured-queries dependency to 0.31.0.
Package.resolved Updates pinned dependency revisions/versions.
Examples/SyncUps/SyncUpForm.swift Updates query DSL usage (eq).
Examples/SyncUpTests/SyncUpFormTests.swift Ensures sync engine is started in suite dependencies.
Examples/RemindersTests/Internal.swift Ensures sync engine is started in suite dependencies.
Examples/Reminders/Schema.swift Updates structured query update to use #bind.
Examples/Examples.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved Updates examples workspace dependency pin (structured-queries branch/revision).
Examples/CaseStudies/DynamicQuery.swift Adapts to updated async load API usage.
.github/workflows/release.yml Switches release jobs to self-hosted.
.github/workflows/claude.yml Adds Claude Code workflow for comment/review triggers.
.github/workflows/claude-code-review.yml Adds Claude Code Review workflow on PR open/sync.
.github/workflows/ci.yml Switches CI jobs to self-hosted runners.
Comments suppressed due to low confidence (1)

.github/workflows/release.yml:12

  • Similarly here, switching to runs-on: self-hosted without labels can run the workflow on an unexpected runner type. If the release workflow expects a Linux environment/tools, add appropriate self-hosted labels (or keep ubuntu-latest) to ensure consistent execution.
  project-channel:
    runs-on: self-hosted
    steps:
      - name: Dump Github context
        env:
          GITHUB_CONTEXT: ${{ toJSON(github) }}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines 16 to 22
matrix:
xcode: ['26.2']
config: ['debug', 'release']
runs-on: macos-26
runs-on: self-hosted
steps:
- uses: actions/checkout@v5
- name: Select Xcode ${{ matrix.xcode }}
@doozMen doozMen closed this Mar 16, 2026
@doozMen doozMen force-pushed the sync-with-upstream branch from d04931a to eca9e22 Compare March 16, 2026 18:17
@doozMen doozMen deleted the sync-with-upstream branch March 16, 2026 18:17
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