Closed
Conversation
There was a problem hiding this comment.
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-queriesto0.31.0and 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-hostedrunners; 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-hostedwithout 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 keepubuntu-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 }} |
d04931a to
eca9e22
Compare
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.
No description provided.