Skip to content

v1.0.0 beta.5 - #459

Open
leogdion wants to merge 24 commits into
mainfrom
v1.0.0-beta.5
Open

v1.0.0 beta.5#459
leogdion wants to merge 24 commits into
mainfrom
v1.0.0-beta.5

Conversation

@leogdion

@leogdion leogdion commented Sep 1, 2026

Copy link
Copy Markdown
Member

No description provided.

leogdion and others added 10 commits August 31, 2026 09:37
Decode ownerRecordName, zoneType, and deleted on zone responses so change feeds surface tombstones and shared-zone owners round-trip correctly.

Co-authored-by: Cursor <cursoragent@cursor.com>
Exercise ownerRecordName, zoneType, and deleted tombstones live via listZones, lookupZones, and fetchDatabaseChanges on the private database pipeline.

Co-authored-by: Cursor <cursoragent@cursor.com>
After re-syncing from upstream mistkit branches, reapply the monorepo
overlay so Examples/* build against the parent MistKit checkout.

Co-authored-by: Cursor <cursoragent@cursor.com>
subrepo:
  subdir:   "Examples/BushelCloud"
  merged:   "cf22ab7"
upstream:
  origin:   "git@github.com:brightdigit/BushelCloud.git"
  branch:   "mistkit"
  commit:   "cf22ab7"
git-subrepo:
  version:  "0.4.9"
  origin:   "https://github.com/Homebrew/brew"
  commit:   "4710c526b3"
subrepo:
  subdir:   "Examples/CelestraCloud"
  merged:   "11609b9"
upstream:
  origin:   "git@github.com:brightdigit/CelestraCloud.git"
  branch:   "mistkit"
  commit:   "11609b9"
git-subrepo:
  version:  "0.4.9"
  origin:   "https://github.com/Homebrew/brew"
  commit:   "4710c526b3"
Replace String? with DEFAULT_ZONE/REGULAR_CUSTOM_ZONE cases so unrecognized wire values surface as ConversionError during zone lifting.

Co-authored-by: Cursor <cursoragent@cursor.com>
Model zone payload fields: ownerRecordName, zoneType, deleted (#444)
…nfig keys (#455)

Extracts the CloudKit credential configuration glue shared by MistKit's server-side applications into its own package, and converges BushelCloud, CelestraCloud and MistDemo on typed configuration keys.

## MistKitConfiguration

Lives at `Packages/MistKitConfiguration` as a subrepo of brightdigit/MistKitConfiguration, published as `1.0.0-beta.1`. Three layers, separated so that *reading* configuration cannot fail: raw `CloudKitConfiguration` → `validated()` → `ValidatedCloudKitConfiguration`, whose throwing initializer runs the key-ID and PEM validators. There is no way to hold the validated type with credentials that skipped format validation, which is what lets the examples delete their hand-rolled checks.

## Examples

All three rewired onto the package; local validators, `ConfigValueReading` and duplicated CloudKit config types removed (~180 lines that were character-for-character identical between BushelCloud and CelestraCloud). App-specific error mapping stays with each app, since each already owns its own wording and key names.

## Dependencies

ConfigKeyKit is pinned to `1.0.0-beta.3`, which carries ConfigKeyKit#8 (boolean resolution via a bool primitive) — the fix the branch pin was tracking.

## Note

`Packages/MistKitConfiguration` is scaffolding for the beta.5 line. It must be removed in the `v1.0.0-beta.5` → `main` release PR: shipping it would be circular, since its `.gitrepo` tracks a branch pinning that same unreleased release. Downstream consumers use the published tag instead.

codecov/patch and codecov/project fail as expected — this PR deletes validator suites whose tests moved to the MistKitConfiguration repo.
Thread zone selection through web CRUD/assets, library uploadAssets, and a live sharee round-trip phase so shared-database writes carry ownerRecordName correctly.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 329 files, which is 229 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

Usage-priced reviews support at most 300 files.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: e8ae6863-e58e-4771-b986-d3f0d51384f1

📥 Commits

Reviewing files that changed from the base of the PR and between 687b532 and 0eb79dd.

⛔ Files ignored due to path filters (3)
  • Examples/BushelCloud/Package.resolved is excluded by !**/Package.resolved
  • Examples/CelestraCloud/Package.resolved is excluded by !**/Package.resolved
  • Examples/MistDemo/Package.resolved is excluded by !**/Package.resolved
📒 Files selected for processing (329)
  • .agents/skills/release/SKILL.md
  • .agents/skills/release/agents/openai.yaml
  • .claude/agent-notes.md
  • .claude/docs/README.md
  • .claude/docs/SUMMARY.md
  • .claude/docs/cloudkit-schema-plan.md
  • .claude/docs/https_-swiftpackageindex.com-brightdigit-SyndiKit-0.6.1-documentation-syndikit.md
  • .claude/docs/mistdemo/configuration.md
  • .claude/docs/mistdemo/overview.md
  • .claude/docs/mistdemo/phases/phase-1-core-infrastructure.md
  • .claude/docs/mistdemo/swift-configuration-reference.md
  • .claude/docs/protocol-extraction-continuation.md
  • .claude/docs/research/asset-filechecksum.md
  • .claude/docs/research/windows-6.2-ci-failure-462.md
  • .claude/docs/swift-configuration.md
  • .claude/docs/swift-log.md
  • .claude/docs/swift-openapi-generator.md
  • .claude/docs/swift-openapi-runtime.md
  • .claude/memory/MEMORY.md
  • .claude/memory/feedback_examples_workflow_tracks_tools_version.md
  • .claude/memory/feedback_subrepo_directive_scope.md
  • .claude/memory/feedback_use_git_trees_not_git_worktree.md
  • .claude/memory/project_beta4_worktree_layout.md
  • .claude/memory/project_dogfood_pins_are_branch_pins_not_tags.md
  • .claude/memory/project_fieldvalue_bytes_is_base64_string.md
  • .claude/memory/project_mistkitconfiguration_subrepo_overlay.md
  • .claude/memory/project_mkc_integration_branch.md
  • .claude/memory/project_path_package_identity_collision.md
  • .claude/memory/project_release_process.md
  • .claude/memory/reference_cloudkit_zone_dictionary.md
  • .claude/memory/reference_configkey_cli_flag_dash_case.md
  • .claude/memory/reference_configkeykit_configvaluereading.md
  • .claude/memory/reference_draft_gated_ci_needs_ready_for_review.md
  • .claude/memory/reference_git_trees_add_bases_on_main.md
  • .claude/memory/reference_windows_62_mistkittests_emit_abort.md
  • .claude/skills/fix-lint/SKILL.md
  • .claude/skills/fix-lint/scripts/compile-lint-report.py
  • .claude/skills/release
  • .github/workflows/MistDemo-Integration.yml
  • .github/workflows/MistDemo.yml
  • .github/workflows/examples.yml
  • .github/workflows/release.yml
  • AGENTS.md
  • Examples/BushelCloud/.claude/data-sources-api-research.md
  • Examples/BushelCloud/.claude/firmware-wiki.md
  • Examples/BushelCloud/.claude/mobileasset-wiki.md
  • Examples/BushelCloud/.env.example
  • Examples/BushelCloud/.github/CLOUDKIT_SYNC_SETUP.md
  • Examples/BushelCloud/.github/SECRETS_SETUP.md
  • Examples/BushelCloud/.github/actions/cloudkit-sync/action.yml
  • Examples/BushelCloud/.github/workflows/bushel-cloud-build.yml
  • Examples/BushelCloud/.gitrepo
  • Examples/BushelCloud/CLAUDE.md
  • Examples/BushelCloud/Package.swift
  • Examples/BushelCloud/README.md
  • Examples/BushelCloud/Sources/BushelCloudCLI/Commands/ClearCommand.swift
  • Examples/BushelCloud/Sources/BushelCloudCLI/Commands/ExportCommand.swift
  • Examples/BushelCloud/Sources/BushelCloudCLI/Commands/ListCommand.swift
  • Examples/BushelCloud/Sources/BushelCloudCLI/Commands/StatusCommand.swift
  • Examples/BushelCloud/Sources/BushelCloudCLI/Commands/SyncCommand.swift
  • Examples/BushelCloud/Sources/BushelCloudKit/CloudKit/BushelCloudKitService.swift
  • Examples/BushelCloud/Sources/BushelCloudKit/CloudKit/KeyIDValidator.swift
  • Examples/BushelCloud/Sources/BushelCloudKit/CloudKit/PEMValidator.swift
  • Examples/BushelCloud/Sources/BushelCloudKit/CloudKit/SyncEngine.swift
  • Examples/BushelCloud/Sources/BushelCloudKit/Configuration/BushelConfiguration.swift
  • Examples/BushelCloud/Sources/BushelCloudKit/Configuration/CloudKitConfiguration.swift
  • Examples/BushelCloud/Sources/BushelCloudKit/Configuration/CloudKitConfigurationError+Mapping.swift
  • Examples/BushelCloud/Sources/BushelCloudKit/Configuration/ConfigurationKeys.swift
  • Examples/BushelCloud/Sources/BushelCloudKit/Configuration/ConfigurationLoader+Loading.swift
  • Examples/BushelCloud/Sources/BushelCloudKit/Configuration/ConfigurationLoader.swift
  • Examples/BushelCloud/Sources/BushelCloudKit/Configuration/VirtualBuddyConfiguration.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/CloudKit/KeyIDValidatorTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/CloudKit/PEMValidatorTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/Configuration/ConfigurationLoaderTests+Fixtures.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/Configuration/ConfigurationLoaderTests.swift
  • Examples/CelestraCloud/.agents/skills/rebase-integration-branches/SKILL.md
  • Examples/CelestraCloud/.agents/skills/rebase-integration-branches/agents/openai.yaml
  • Examples/CelestraCloud/.agents/skills/rebase-integration-branches/projects.md
  • Examples/CelestraCloud/.claude/cloudkit-public-database-architecture.md
  • Examples/CelestraCloud/.claude/skills/rebase-integration-branches
  • Examples/CelestraCloud/.github/workflows/CelestraCloud.yml
  • Examples/CelestraCloud/.github/workflows/dependency-policy.yml
  • Examples/CelestraCloud/.gitrepo
  • Examples/CelestraCloud/AGENTS.md
  • Examples/CelestraCloud/Package.swift
  • Examples/CelestraCloud/Sources/CelestraCloud/Commands/AddFeedCommand.swift
  • Examples/CelestraCloud/Sources/CelestraCloud/Commands/ClearCommand.swift
  • Examples/CelestraCloud/Sources/CelestraCloud/Commands/UpdateCommand+Reporting.swift
  • Examples/CelestraCloud/Sources/CelestraCloud/Commands/UpdateCommand.swift
  • Examples/CelestraCloud/Sources/CelestraCloudKit/Configuration/CelestraConfiguration.swift
  • Examples/CelestraCloud/Sources/CelestraCloudKit/Configuration/CloudKitConfiguration.swift
  • Examples/CelestraCloud/Sources/CelestraCloudKit/Configuration/CloudKitConfigurationError+Mapping.swift
  • Examples/CelestraCloud/Sources/CelestraCloudKit/Configuration/ConfigurationKeys.swift
  • Examples/CelestraCloud/Sources/CelestraCloudKit/Configuration/ConfigurationLoader.swift
  • Examples/CelestraCloud/Tests/CelestraCloudTests/Configuration/CloudKitConfigurationTests.swift
  • Examples/MistDemo/.swift-version
  • Examples/MistDemo/Package.swift
  • Examples/MistDemo/README.md
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/AcceptConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/AuthTokenConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/AuthTokensConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/BrowserFlagResolver.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/CloudKitConfigurationError+Mapping.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/CreateConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/CreateTokenConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/CreateZoneConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/CurrentUserConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/DeleteConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/DeleteZoneConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/DemoErrorsConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/DiscoverConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/FetchChangesConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/FetchDatabaseChangesConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/FetchZoneRecordChangesConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/Keys/MistDemoKeys+Asset.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/Keys/MistDemoKeys+Auth.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/Keys/MistDemoKeys+AuthModes.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/Keys/MistDemoKeys+Changes.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/Keys/MistDemoKeys+Integration.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/Keys/MistDemoKeys+Output.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/Keys/MistDemoKeys+Query.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/Keys/MistDemoKeys+Record.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/Keys/MistDemoKeys+Server.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/Keys/MistDemoKeys+Sharing.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/Keys/MistDemoKeys+Subscription.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/Keys/MistDemoKeys.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/ListSubscriptionsConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/ListZonesConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/LookupConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/LookupSubscriptionConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/LookupZonesConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/MistDemoConfig+Parsing.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/MistDemoConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/MistDemoConfiguration.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/ModifyConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/ModifySubscriptionsConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/ModifyZonesConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/ProbeDuplicateSubscriptionConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/QueryConfig+Parsing.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/QueryConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/RegisterTokenConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/RereferenceAssetConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/ResolveConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/TestPrivateConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/TestPublicConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/UpdateConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/UploadAssetConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/ValidateConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/WebConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Constants/MistDemoConstants+Defaults.swift
  • Examples/MistDemo/Sources/MistDemoKit/Constants/MistDemoConstants.swift
  • Examples/MistDemo/Sources/MistDemoKit/Extensions/FieldValue+FieldType.swift
  • Examples/MistDemo/Sources/MistDemoKit/Integration/Phases/DownloadAssetPhase.swift
  • Examples/MistDemo/Sources/MistDemoKit/Integration/Phases/ShareCreateAndAcceptPhase.swift
  • Examples/MistDemo/Sources/MistDemoKit/Integration/Phases/SharedZoneRoundtripPhase.swift
  • Examples/MistDemo/Sources/MistDemoKit/Integration/Phases/ZonePayloadMetadataPhase.swift
  • Examples/MistDemo/Sources/MistDemoKit/Integration/Tests/PrivateDatabaseTest.swift
  • Examples/MistDemo/Sources/MistDemoKit/Integration/Tests/PublicDatabaseTest.swift
  • Examples/MistDemo/Sources/MistDemoKit/Resources/index.html
  • Examples/MistDemo/Sources/MistDemoKit/Resources/js/app.js
  • Examples/MistDemo/Sources/MistDemoKit/Server/CloudKitService+WebBackend.swift
  • Examples/MistDemo/Sources/MistDemoKit/Server/WebBackend.swift
  • Examples/MistDemo/Sources/MistDemoKit/Server/WebRequests+Assets.swift
  • Examples/MistDemo/Sources/MistDemoKit/Server/WebRequests.swift
  • Examples/MistDemo/Sources/MistDemoKit/Server/WebServer+Assets.swift
  • Examples/MistDemo/Sources/MistDemoKit/Server/WebServer+CRUD.swift
  • Examples/MistDemo/Sources/MistDemoKit/Utilities/FieldValueFormatter.swift
  • Examples/MistDemo/Tests/MistDemoTests/Configuration/AuthTokenConfigTests.swift
  • Examples/MistDemo/Tests/MistDemoTests/Configuration/AuthTokensConfigTests.swift
  • Examples/MistDemo/Tests/MistDemoTests/Configuration/Keys/MistDemoKeysTests.swift
  • Examples/MistDemo/Tests/MistDemoTests/Configuration/MistDemoConfigurationBoolTests.swift
  • Examples/MistDemo/Tests/MistDemoTests/Configuration/TestPrivateConfigTests.swift
  • Examples/MistDemo/Tests/MistDemoTests/Extensions/FieldValue+FieldType/FieldValue+FieldTypeTests+BytesType.swift
  • Examples/MistDemo/Tests/MistDemoTests/MistDemoConfig+Testing.swift
  • Examples/MistDemo/Tests/MistDemoTests/MistDemoConfiguration+Testing.swift
  • Examples/MistDemo/Tests/MistDemoTests/Server/MockBackend+Calls.swift
  • Examples/MistDemo/Tests/MistDemoTests/Server/MockBackend+RecordOperations.swift
  • Examples/MistDemo/Tests/MistDemoTests/Server/MockBackend+ServiceOperations.swift
  • Examples/MistDemo/Tests/MistDemoTests/Server/WebServerTests+Index.swift
  • Examples/MistDemo/Tests/MistDemoTests/Server/WebServerTests+QueryZone.swift
  • Examples/MistDemo/Tests/MistDemoTests/Server/WebServerTests+WriteZone.swift
  • Examples/MistDemo/project.yml
  • Makefile
  • Package.swift
  • Packages/MistKitConfiguration/.claude/hooks/session-start.sh
  • Packages/MistKitConfiguration/.claude/settings.json
  • Packages/MistKitConfiguration/.github/actions/setup-mistkitconfiguration/action.yml
  • Packages/MistKitConfiguration/.github/actions/setup-tools/action.yml
  • Packages/MistKitConfiguration/.github/workflows/MistKitConfiguration.yml
  • Packages/MistKitConfiguration/.github/workflows/claude-code-review.yml
  • Packages/MistKitConfiguration/.github/workflows/claude.yml
  • Packages/MistKitConfiguration/.github/workflows/cleanup-caches.yml
  • Packages/MistKitConfiguration/.github/workflows/dependency-policy.yml
  • Packages/MistKitConfiguration/.gitignore
  • Packages/MistKitConfiguration/.gitrepo
  • Packages/MistKitConfiguration/.periphery.yml
  • Packages/MistKitConfiguration/.spi.yml
  • Packages/MistKitConfiguration/.swift-format
  • Packages/MistKitConfiguration/.swift-version
  • Packages/MistKitConfiguration/.swiftlint.yml
  • Packages/MistKitConfiguration/CLAUDE.md
  • Packages/MistKitConfiguration/LICENSE
  • Packages/MistKitConfiguration/Makefile
  • Packages/MistKitConfiguration/Package.swift
  • Packages/MistKitConfiguration/README.md
  • Packages/MistKitConfiguration/Scripts/cloud-setup.sh
  • Packages/MistKitConfiguration/Scripts/header.sh
  • Packages/MistKitConfiguration/Scripts/lint.sh
  • Packages/MistKitConfiguration/Sources/MistKitConfiguration/CloudKitConfiguration.swift
  • Packages/MistKitConfiguration/Sources/MistKitConfiguration/CloudKitConfigurationError.swift
  • Packages/MistKitConfiguration/Sources/MistKitConfiguration/CloudKitConfigurationField.swift
  • Packages/MistKitConfiguration/Sources/MistKitConfiguration/CloudKitConfigurationKeys.swift
  • Packages/MistKitConfiguration/Sources/MistKitConfiguration/ConfigReader+ConfigValueReading.swift
  • Packages/MistKitConfiguration/Sources/MistKitConfiguration/ConfigValueReading+CloudKit.swift
  • Packages/MistKitConfiguration/Sources/MistKitConfiguration/ConfigurationError.swift
  • Packages/MistKitConfiguration/Sources/MistKitConfiguration/ConfigurationSources.swift
  • Packages/MistKitConfiguration/Sources/MistKitConfiguration/KeyIDValidationFailure.swift
  • Packages/MistKitConfiguration/Sources/MistKitConfiguration/KeyIDValidator.swift
  • Packages/MistKitConfiguration/Sources/MistKitConfiguration/PEMValidationFailure.swift
  • Packages/MistKitConfiguration/Sources/MistKitConfiguration/PEMValidator.swift
  • Packages/MistKitConfiguration/Sources/MistKitConfiguration/ValidatedCloudKitConfiguration.swift
  • Packages/MistKitConfiguration/Tests/MistKitConfigurationTests/CloudKitConfigurationKeysTests.swift
  • Packages/MistKitConfiguration/Tests/MistKitConfigurationTests/CloudKitConfigurationReadingTests.swift
  • Packages/MistKitConfiguration/Tests/MistKitConfigurationTests/CloudKitConfigurationTests.swift
  • Packages/MistKitConfiguration/Tests/MistKitConfigurationTests/ConfigurationSourcesTests.swift
  • Packages/MistKitConfiguration/Tests/MistKitConfigurationTests/KeyIDValidatorTests.swift
  • Packages/MistKitConfiguration/Tests/MistKitConfigurationTests/PEMValidatorTests.swift
  • Packages/MistKitConfiguration/Tests/MistKitConfigurationTests/TestFixtures.swift
  • Packages/MistKitConfiguration/codecov.yml
  • Packages/MistKitConfiguration/mise.toml
  • README.md
  • ReleaseNotes.md
  • Scripts/lint.sh
  • Scripts/release.sh
  • Scripts/update-subrepo.sh
  • Sources/MistKit/Authentication/AdaptiveTokenManager+Transitions.swift
  • Sources/MistKit/Authentication/AuthenticationMiddleware.swift
  • Sources/MistKit/Authentication/HTTPField.Name+CloudKit.swift
  • Sources/MistKit/Authentication/RotatedWebAuthTokenFailureReporter.swift
  • Sources/MistKit/Authentication/TokenManager+Rotation.swift
  • Sources/MistKit/Authentication/TokenManager.swift
  • Sources/MistKit/Authentication/WebAuthTokenManager.swift
  • Sources/MistKit/CloudKitService/CloudKitError+ErrorDescription.swift
  • Sources/MistKit/CloudKitService/CloudKitError+ServerErrorCode.swift
  • Sources/MistKit/CloudKitService/CloudKitError.swift
  • Sources/MistKit/CloudKitService/CloudKitService+AssetOperations.swift
  • Sources/MistKit/CloudKitService/CloudKitService+RecordWriteConvenience.swift
  • Sources/MistKit/CloudKitService/CloudKitService.swift
  • Sources/MistKit/Documentation.docc/ConfiguringMistKit.md
  • Sources/MistKit/Models/ConversionError.swift
  • Sources/MistKit/Models/FieldValues/Asset+Download.swift
  • Sources/MistKit/Models/FieldValues/Asset.swift
  • Sources/MistKit/Models/FieldValues/FieldValue+Codable.swift
  • Sources/MistKit/Models/FieldValues/FieldValue+Components+List.swift
  • Sources/MistKit/Models/FieldValues/FieldValue+Components+Scalar.swift
  • Sources/MistKit/Models/FieldValues/FieldValue+Components.swift
  • Sources/MistKit/Models/FieldValues/FieldValue+Convenience.swift
  • Sources/MistKit/Models/FieldValues/FieldValue.swift
  • Sources/MistKit/Models/FieldValues/Reference.swift
  • Sources/MistKit/Models/Sharing/CreatedShare.swift
  • Sources/MistKit/Models/Sharing/ShareRecordInfo.swift
  • Sources/MistKit/Models/Sharing/ShareTargetReference.swift
  • Sources/MistKit/Models/Subscriptions/SubscriptionInfo+Schema.swift
  • Sources/MistKit/Models/Zones/ZoneChangeResult.swift
  • Sources/MistKit/Models/Zones/ZoneID.swift
  • Sources/MistKit/Models/Zones/ZoneInfo.swift
  • Sources/MistKit/Models/Zones/ZoneType.swift
  • Sources/MistKit/OpenAPI/Components/Components.Schemas.FieldValueRequest.swift
  • Sources/MistKit/OpenAPI/Components/Components.Schemas.ListValuePayload.swift
  • Sources/MistKitOpenAPI/Types.swift
  • Tests/MistKitTests/Authentication/Middleware/AuthenticationMiddlewareTests+TokenRotation.swift
  • Tests/MistKitTests/Authentication/WebAuth/WebAuthTokenManagerTests+Basic.swift
  • Tests/MistKitTests/Authentication/WebAuth/WebAuthTokenManagerTests+Performance.swift
  • Tests/MistKitTests/Authentication/WebAuth/WebAuthTokenManagerTests+WebAuthEdgeCases.swift
  • Tests/MistKitTests/CloudKitService/CreateZone/CloudKitServiceTests.CreateZone+ErrorHandling.swift
  • Tests/MistKitTests/CloudKitService/DeleteZone/CloudKitServiceTests.DeleteZone+ErrorHandling.swift
  • Tests/MistKitTests/CloudKitService/FetchDatabaseChanges/CloudKitServiceTests.FetchDatabaseChanges+Helpers.swift
  • Tests/MistKitTests/CloudKitService/FetchDatabaseChanges/CloudKitServiceTests.FetchDatabaseChanges+Pagination.swift
  • Tests/MistKitTests/CloudKitService/FetchDatabaseChanges/CloudKitServiceTests.FetchDatabaseChanges+SuccessCases.swift
  • Tests/MistKitTests/CloudKitService/FetchRecordZoneChanges/CloudKitServiceTests.FetchRecordZoneChanges+Helpers.swift
  • Tests/MistKitTests/CloudKitService/FetchRecordZoneChanges/CloudKitServiceTests.FetchRecordZoneChanges+PaginationLimits.swift
  • Tests/MistKitTests/CloudKitService/FetchZoneChanges/CloudKitServiceTests.FetchZoneChanges+DeprecatedAPI.swift
  • Tests/MistKitTests/CloudKitService/FetchZoneChanges/CloudKitServiceTests.FetchZoneChanges+ErrorHandling.swift
  • Tests/MistKitTests/CloudKitService/FetchZoneChanges/CloudKitServiceTests.FetchZoneChanges+Helpers.swift
  • Tests/MistKitTests/CloudKitService/FetchZoneChanges/CloudKitServiceTests.FetchZoneChanges+SuccessCases.swift
  • Tests/MistKitTests/CloudKitService/FetchZoneChanges/CloudKitServiceTests.FetchZoneChanges+Validation.swift
  • Tests/MistKitTests/CloudKitService/FetchZoneChanges/CloudKitServiceTests.FetchZoneChanges+WireFormat.swift
  • Tests/MistKitTests/CloudKitService/FetchZoneChanges/CloudKitServiceTests.FetchZoneChanges.SuccessCases+Pagination.swift
  • Tests/MistKitTests/CloudKitService/LookupZones/CloudKitServiceTests.LookupZones+Helpers.swift
  • Tests/MistKitTests/CloudKitService/ModifyZones/CloudKitServiceTests.ModifyZones+ErrorHandling.swift
  • Tests/MistKitTests/CloudKitService/ModifyZones/CloudKitServiceTests.ModifyZones+Helpers.swift
  • Tests/MistKitTests/CloudKitService/Query/CloudKitServiceTests.Query+ZoneID.swift
  • Tests/MistKitTests/CloudKitService/RecordWrite/CloudKitServiceTests.RecordWriteConvenience+ZoneID.swift
  • Tests/MistKitTests/CloudKitService/ServerErrorCodes/CloudKitServiceTests.ServerErrorCodes+ForwardCompatibility.swift
  • Tests/MistKitTests/CloudKitService/ServerErrorCodes/CloudKitServiceTests.ServerErrorCodes+Roundtrip.swift
  • Tests/MistKitTests/CloudKitService/Sharing/CloudKitServiceTests.Sharing+Helpers.swift
  • Tests/MistKitTests/CloudKitService/Subscriptions/CloudKitServiceTests.Subscriptions+FailureCases.swift
  • Tests/MistKitTests/CloudKitService/Subscriptions/CloudKitServiceTests.Subscriptions+Helpers.swift
  • Tests/MistKitTests/CloudKitService/Subscriptions/CloudKitServiceTests.Subscriptions+LikelyDuplicateCases.swift
  • Tests/MistKitTests/CloudKitService/Tokens/CloudKitServiceTests.Tokens+FailureCases.swift
  • Tests/MistKitTests/CloudKitService/Upload/CloudKitServiceTests.Upload+ErrorHandling.swift
  • Tests/MistKitTests/CloudKitService/Upload/CloudKitServiceTests.Upload+SuccessCases.swift
  • Tests/MistKitTests/CloudKitService/Zones/CloudKitServiceTests.ZoneOwnerWireKey+WireFormat.swift
  • Tests/MistKitTests/CloudKitService/Zones/CloudKitServiceTests.ZoneOwnerWireKey.swift
  • Tests/MistKitTests/Helpers/Platform.swift
  • Tests/MistKitTests/Mocks/TokenManagers/MockTokenManagerWithRotation.swift
  • Tests/MistKitTests/Mocks/TokenManagers/MockTokenManagerWithRotationFailure.swift
  • Tests/MistKitTests/Models/FieldValues/AssetDownloadTests.swift
  • Tests/MistKitTests/Models/FieldValues/FieldValueConversionTests+BasicTypes.swift
  • Tests/MistKitTests/Models/FieldValues/FieldValueConversionTests+ComplexTypes.swift
  • Tests/MistKitTests/Models/FieldValues/FieldValueConversionTests+EdgeCases.swift
  • Tests/MistKitTests/Models/FieldValues/FieldValueConversionTests+Lists.swift
  • Tests/MistKitTests/Models/FieldValues/FieldValueConversionTests+ResponseTypes.swift
  • Tests/MistKitTests/Models/FieldValues/FieldValueTests.swift
  • Tests/MistKitTests/Models/Notifications/CourierTests.swift
  • Tests/MistKitTests/Models/Subscriptions/NotificationInfoTests.swift
  • Tests/MistKitTests/Models/Subscriptions/SubscriptionConversionTests.swift
  • Tests/MistKitTests/Models/Zones/ZoneMetadataTests+Responses.swift
  • Tests/MistKitTests/Models/Zones/ZoneMetadataTests+ZoneInfoConversion.swift
  • Tests/MistKitTests/Models/Zones/ZoneMetadataTests+ZoneInfoConversionEdgeCases.swift
  • Tests/MistKitTests/OpenAPI/CloudKitResponseTypeTests.swift
  • Tests/MistKitTests/RecordManagement/AltTestRecord.swift
  • Tests/MistKitTests/RecordManagement/FieldValueConvenienceTests.swift
  • Tests/MistKitTests/RecordManagement/MockCollectionRecordManagingService.swift
  • Tests/MistKitTests/RecordManagement/RecordManagingTests+RecordCollection.swift
  • Tests/MistKitTests/RecordManagement/RecordTypeSetTests.swift
  • codecov.yml
  • docs/internals/field-type-polymorphism.md
  • openapi.yaml

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.05970% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.54%. Comparing base (0375d09) to head (0eb79dd).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...es/MistKit/Models/FieldValues/Asset+Download.swift 80.00% 4 Missing ⚠️
...hentication/AdaptiveTokenManager+Transitions.swift 80.00% 3 Missing ⚠️
...els/FieldValues/FieldValue+Components+Scalar.swift 62.50% 3 Missing ⚠️
...mponents/Components.Schemas.ListValuePayload.swift 0.00% 3 Missing ⚠️
...oudKitService/CloudKitError+ErrorDescription.swift 50.00% 1 Missing ⚠️
...odels/FieldValues/FieldValue+Components+List.swift 83.33% 1 Missing ⚠️
...Kit/Models/FieldValues/FieldValue+Components.swift 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #459      +/-   ##
==========================================
+ Coverage   81.74%   86.54%   +4.80%     
==========================================
  Files         196      199       +3     
  Lines        4755     4861     +106     
==========================================
+ Hits         3887     4207     +320     
+ Misses        868      654     -214     
Flag Coverage Δ
mistdemo-spm-macos 11.08% <5.97%> (-0.15%) ⬇️
mistdemo-swift-6.2-jammy ?
mistdemo-swift-6.2-noble ?
mistdemo-swift-6.3-jammy ?
mistdemo-swift-6.3-noble ?
mistdemo-swift-6.4-jammy 11.09% <5.97%> (-0.15%) ⬇️
mistdemo-swift-6.4-noble 11.09% <5.97%> (-0.15%) ⬇️
spm 85.20% <88.05%> (+4.85%) ⬆️
swift-6.1-jammy 85.12% <88.05%> (+4.81%) ⬆️
swift-6.1-noble 85.32% <88.05%> (+4.80%) ⬆️
swift-6.2-jammy 85.26% <88.05%> (+4.64%) ⬆️
swift-6.2-noble 85.26% <88.05%> (+4.82%) ⬆️
swift-6.3-jammy 85.14% <88.05%> (+4.60%) ⬆️
swift-6.3-noble 85.26% <88.05%> (+4.87%) ⬆️
swift-6.4-jammy 85.12% <88.05%> (+4.68%) ⬆️
swift-6.4-noble 85.34% <88.05%> (+4.80%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@claude

claude Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review: v1.0.0 beta.5 release PR

This is a large aggregate PR (236 files, +8691/-2546), but the actual Sources/MistKit/Sources/MistKitOpenAPI surface touched is small (zone wire-key rename, new ZoneType, a deleted tombstone flag, and zoneID: threading into asset/write ops). The bulk of the diff is a new shared Packages/MistKitConfiguration subrepo consolidating config/validation code out of the three Examples, plus docs/CI/tooling. Reviewed with three focused passes (core library, Examples+CI, new config package). Summary below, most important first.

🔴 Release-process: ReleaseNotes.md has no ## 1.0.0-beta.5 section

ReleaseNotes.md at the tip of this branch still tops out at ## 1.0.0-beta.4 — this PR adds no beta.5 entry. Per this repo's own CLAUDE.md/AGENTS.md Release Process guardrail #1: "Never tag without notes... Both 1.0.0-beta.3 and 1.0.0-beta.4 were tagged with no ReleaseNotes.md section of their own." Shipping a third release without notes repeats the exact mistake that guardrail was written to prevent. Worth running ./Scripts/release.sh verify-tag <tag> --at HEAD before tagging.

🔴 Regression: CelestraCloud.yml MISTKIT_BRANCH pin flipped to tag form pre-merge

Examples/CelestraCloud/.github/workflows/CelestraCloud.yml:24 changes:

-  MISTKIT_BRANCH: v1.0.0-beta.4
+  MISTKIT_BRANCH: 1.0.0-beta.4

This is backwards per this PR's own new documentation (AGENTS.md's Release Process section, mirroring CLAUDE.md): "before the merge the pin must be the branch, after publishing it must be the tag." setup-mistkit resolves MISTKIT_BRANCH via git ls-remote, which matches tags too — since 1.0.0-beta.4 is already a published tag, CelestraCloud's CI will now silently build against the old, already-released beta.4 code instead of testing this release branch at all. This is the precise failure mode the doc warns about. Recommend reverting to v1.0.0-beta.4 (or bumping to v1.0.0-beta.5) — BushelCloud's equivalent pins (bushel-cloud-build.yml, cloudkit-sync/action.yml) correctly kept the v-prefixed branch form, so CelestraCloud.yml is now the outlier, not the other way around.

🟡 CI failure: "Build static mistdemo"

Root cause: this PR adds .package(path: "../../Packages/MistKitConfiguration") to Examples/MistDemo/Package.swift, and MistKitConfiguration declares swift-tools-version: 6.4. MistDemo.yml/examples.yml were correctly bumped to a 6.4 nightly toolchain, but .github/workflows/MistDemo-Integration.yml (container swift:6.3.2-noble, line ~51/64) was missed — Swift 6.3.2 can't parse a 6.4 manifest, so the static-Linux build job fails immediately. Needs the same toolchain bump as the other two workflows.

🟢 Core library changes — no blocking issues

  • ZoneID gains zoneType: ZoneType? in a synthesized Equatable/Hashable struct — a response-decoded ZoneID will no longer == a hand-constructed one for the same zone. Internal code doesn't rely on ZoneID equality (keys off zoneName strings), but any external consumer diffing ZoneID values across request/response boundaries would be affected. Might be worth a release-notes callout.
  • ZoneInfo.deleted defaults absent→false, which is a different absent-vs-explicit-false philosophy than the neighboring atomic: Bool? (deliberately left un-defaulted per CLAUDE.md). Probably fine (Apple likely never sends deleted: false), but undocumented as a deliberate choice the way atomic is.
  • Minor test gap: the new request-side zoneType serialization has no wire-format pin test (response-side decode is tested), unlike the thorough dedicated tests for the ownerNameownerRecordName rename.
  • Sources/MistKitOpenAPI/Types.swift changes match openapi.yaml 1:1 with no evidence of manual hand-editing. Import ACLs and Sendable compliance look correct throughout.

🟢 New Packages/MistKitConfiguration — solid consolidation

  • No raw secret material ever appears in an error type (PEMValidationFailure/KeyIDValidationFailure are structural enums, no string payloads).
  • secretCommandLineFlags is now derived from each key's isSecret flag rather than a hand-maintained list — closes a real prior redaction-drift risk.
  • Duplicate PEMValidator/KeyIDValidator/CloudKitConfigurationError code fully removed from Examples/** (verified no leftovers); old per-example tests replaced by a single shared suite (603 lines across 7 files) — good coverage for a new package.
  • Wiring is clean: each example depends via .package(path: "../../Packages/MistKitConfiguration") with the documented never-merged-overlay discipline already used for the MistKit line; root Package.swift correctly has no reference (Examples-only tooling).
  • Pre-existing, not-introduced-by-this-PR weakness worth a follow-up issue: PEMValidator matches -----BEGIN... and ...PRIVATE KEY----- as two independent substring checks, so a block like BEGIN CERTIFICATE ... END PRIVATE KEY would incorrectly validate.

Nits

  • New .github/workflows/release.yml has no explicit permissions: block (defaults to repo setting) — cheap least-privilege win since it only needs to read the tag.

Nothing here looks blocking on the library-correctness side, but the ReleaseNotes.md gap and the CelestraCloud.yml pin regression should be fixed before merge/tag — the latter means CelestraCloud's CI currently isn't validating this release at all.

@claude

claude Bot commented Sep 3, 2026

Copy link
Copy Markdown

Review notes

This PR is the v1.0.0-beta.5main release merge (301 files changed, GitHub's diff view caps out at 300 files so I couldn't pull a full unified diff). I inspected the merged tree directly and cross-checked it against this repo's own documented release-process guardrails (CLAUDE.md → "Release Process"), plus spot-checked the newest security-relevant code (web-auth token rotation). The individual features here (zone payload modeling #451, MistDemo zone-aware writes #454, MistKitConfiguration extraction #455, token rotation #462/463, etc.) already went through their own PR review, so I focused on release-specific correctness rather than re-reviewing every line.

Blocking

  1. Packages/MistKitConfiguration overlay is still present and still pinned to a branch.
    CLAUDE.md is explicit about this exact PR:

    Packages/MistKitConfiguration is scaffolding for the beta.5 line. It must be removed in the v1.0.0-beta.5main release PR: shipping it would be circular, since its .gitrepo tracks a branch pinning that same unreleased release. Downstream consumers use the published tag instead.

    At HEAD, Packages/MistKitConfiguration/.gitrepo still points at branch = mistkit-beta.5 (not a tag), and all three examples still depend on it via local path rather than the published 1.0.0-beta.1 tag:

    • Examples/BushelCloud/Package.swift:33.package(path: "../../Packages/MistKitConfiguration")
    • Examples/CelestraCloud/Package.swift:28 — same
    • Examples/MistDemo/Package.swift:28 — same

    Merging as-is ships the circular scaffolding dependency into main, which is exactly what this guardrail exists to prevent. This should be stripped (and the examples repointed at the published tag) before merge, per ./Scripts/release.sh pins --expect-tag 1.0.0-beta.5.

  2. ReleaseNotes.md has no ## 1.0.0-beta.5 section. Only ## 1.0.0-beta.4 is present. The repo's own guardrail ("Never tag without notes") requires ./Scripts/release.sh verify-tag 1.0.0-beta.5 --at HEAD to pass before tagging — right now it won't. Worth confirming this is added before (or as part of) the tag push, per the Release Check CI workflow that re-asserts this.

Spot-checked and looks solid

  • Web-auth token rotation (Sources/MistKit/Authentication/AuthenticationMiddleware.swift, WebAuthTokenManager.swift, TokenManager+Rotation.swift, AdaptiveTokenManager+Transitions.swift): reads X-Apple-CloudKit-Web-Auth-Token off every response and re-validates the new token via WebAuthTokenAuthenticator before adopting it — a malformed rotated token can't silently corrupt manager state. Non-web-auth managers (API-token, server-to-server) get a no-op default via the TokenManager+Rotation.swift protocol extension rather than having to implement rotation themselves. Failure-to-adopt is logged and routed through an injectable RotatedWebAuthTokenFailureReporter.assertionHandler (defaults to assertionFailure, so it's a no-op in release builds and traps only in debug/tests) — a sensible fail-loud-in-dev/fail-safe-in-prod split. Test coverage for this path is extensive (rotation, edge cases, performance, validation format all have dedicated files).
  • ZoneType enum (closed DEFAULT_ZONE/REGULAR_CUSTOM_ZONE) fails loud on unrecognized wire values instead of silently defaulting, consistent with the codebase's existing fail-loud conversion philosophy.
  • The CLAUDE.mdAGENTS.md symlink and .claude/skills/release../../.agents/skills/release symlink migration (from the "Claude docs consolidation" commit) resolve correctly — the runbook path referenced from CLAUDE.md still works.

Not reviewed

Given the size, I did not do a line-by-line pass over the BushelCloud/CelestraCloud subrepo syncs, the MistDemo web/CLI surface, or the .claude/docs / memory-file churn — those are largely doc/example housekeeping already merged upstream in their own PRs. Happy to go deeper on any specific area if useful.

leogdion and others added 3 commits September 4, 2026 09:58
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
* Verify asset downloads against fileChecksum (#466).

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix watchOS asset download tests and dogfood CDN verify in MistDemo.

Replace MockURLProtocol with an internal fetch closure so download tests do
not hit the network on watchOS, and add DownloadAssetPhase to exercise
Asset.download() against live CDN bytes.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
MistDemo requires tools-version 6.4, so pin the musl build to
nightly-6.4.x-noble and the matching 6.4.x-branch Static Linux SDK.

Co-authored-by: Cursor <cursoragent@cursor.com>
@claude

claude Bot commented Sep 4, 2026

Copy link
Copy Markdown

Review of #459 (v1.0.0-beta.5 release PR)

This PR aggregates ~19 already-individually-reviewed commits (#444, #451, #454, #460-#469, #473, plus release tooling) into a 331-file / +11.5k / -5.3k diff. Reviewing every line of a release-aggregation PR isn't practical or that useful - the individual PRs already went through review. I focused this pass on the actual library surface: Sources/MistKit/, Sources/MistKitOpenAPI/, and openapi.yaml (36 files, ~630 added lines), plus the release-process/CI plumbing, since that's where a mistake would actually ship to consumers.

Code quality / correctness - looks solid

  • FieldValue.bytes: String to Data (Change FieldValue.bytes from String to Data #467): clean cut-over. Request encoding (Components.Schemas.FieldValueRequest.swift, ListValuePayload.swift) now explicitly base64-encodes at the wire boundary, response decoding (FieldValue+Components+Scalar.swift, +List.swift) goes through the new dataFromBase64 helper and fails loud (ConversionError.typeValueMismatch) on malformed base64 instead of silently coercing. Matches the fail-loud philosophy documented in CLAUDE.md, and the new dataValue/bytesValue split in FieldValue+Convenience.swift is a nice touch - the doc comment on dataValue explicitly explains why it doesn't attempt inference from .string (no false-positive signal for base64), which is exactly the kind of non-obvious rationale worth keeping in a comment.
  • WebAuthTokenManager to actor: correct fix to safely support the new mutable webAuthToken var needed for token rotation (issue Web auth token rotation (X-Apple-CloudKit-Web-Auth-Token) is never consumed #462). AdaptiveTokenManager was already an actor, so this brings the two in line.
  • Web-auth token rotation (AuthenticationMiddleware, TokenManager+Rotation.swift, RotatedWebAuthTokenFailureReporter.swift): reads X-Apple-CloudKit-Web-Auth-Token off every response and pushes it back into the token manager. The default no-op protocol extension for non-web-auth managers avoids doing anything expensive for S2S callers. The @TaskLocal failure reporter defaulting to assertionFailure is a nice touch for tests to intercept while staying a no-op in release builds.
  • ZoneType, zoneID.zoneType, ZoneInfo.deleted tombstone field: consistent with the existing "absent != false" convention already used for atomic - good attention to that detail carrying forward.
  • ZoneID.init(from:) now throws due to ZoneType.fromWire validation, and ShareRecordInfo's call site was correctly updated from .map(ZoneID.init(from:)) to an explicit if let ... try ZoneID(from:). Easy spot to miss during a refactor - good that it was caught.
  • ownerName to ownerRecordName wire rename: propagated consistently through Sources/MistKitOpenAPI/Types.swift, ZoneID.swift, and SubscriptionInfo+Schema.swift. I didn't spot any remaining reference to the old key.
  • Test coverage for all of the above looks proportionate - AuthenticationMiddlewareTests+TokenRotation, AssetChecksumTests, AssetDownloadTests, ZoneMetadataTests+ZoneInfoConversionEdgeCases, CloudKitServiceTests.ZoneOwnerWireKey+WireFormat, RecordWriteConvenience+ZoneID, etc. each map to a specific behavior change rather than being generic smoke tests.

Security

  • Asset.download(using:) never returns bytes without a successful checksum comparison (missing checksum -> missingAssetChecksum, mismatch -> assetChecksumMismatch) - good, this is exactly the kind of thing that's easy to get wrong (return-then-verify) and it's structured so verification happens before the data is handed back.
  • Token rotation correctly re-validates the new token via WebAuthTokenAuthenticator(...) before committing it to state, so a malformed rotated token doesn't get persisted into TokenStorage.
  • Nothing else jumped out - no obvious new injection/logging-of-secrets surface. Debug-level logging of tokens is a pre-existing, documented tradeoff (CLAUDE.md), not something this PR changes.

Minor items worth a look before tagging

  1. ReleaseNotes.md's "Unreleased" section looks thin relative to the commit list. It currently only calls out the FieldValue.bytes->Data change and asset checksum verification. Skimming the 19 commits in this PR, I don't see entries for the web-auth token rotation feature (Web auth token rotation (X-Apple-CloudKit-Web-Auth-Token) is never consumed #462), the new zoneType/deleted zone metadata (Zone payloads: deleted, zoneType unmodeled and ownerRecordName never decodes (confirmed live) #444), or the new zoneID: parameter on createRecord/updateRecord/deleteRecord/asset upload (MistDemo: zone-aware writes (CRUD + assets) #454) - all of which are public API additions. CLAUDE.md's release runbook calls "never tag without notes" a standing guardrail, so it's worth double-checking ReleaseNotes.md covers everything before running Scripts/release.sh verify-tag.
  2. AuthenticationMiddleware: the rotated-token adoption path constructs a throwaway WebAuthTokenAuthenticator purely to validate the token before committing it (in both AdaptiveTokenManager and WebAuthTokenManager). Not a bug, just a minor duplication - could be a shared static func validate(apiToken:webAuthToken:) throws if it shows up a third time, but not worth changing for two call sites.
  3. Didn't see anything asking to be simplified or flagged as a correctness bug in the Sources/ diff - the changes I could inspect are narrowly scoped to what their commit messages claim.

Scope note

I could not pull the full 331-file diff through gh pr diff/gh api (GitHub's diff endpoint rejects PRs over 300 files, and this sandbox restricts gh api/git fetch), so I reconstructed the Sources/Tests/openapi diff locally via git diff against origin/main and reviewed CI workflow changes the same way. I did not review the Examples/BushelCloud, Examples/CelestraCloud, .claude/, or .agents/ doc/memory churn in detail - those are largely subrepo syncs, doc reorganization, and agent-memory housekeeping rather than library code.

@leogdion
leogdion marked this pull request as ready for review September 4, 2026 17:34
leogdion and others added 3 commits September 4, 2026 13:49
The "Verify static linkage" step hardcoded
.build/x86_64-swift-linux-musl/release/mistdemo, which the nightly 6.4
toolchain does not populate — the build succeeded but the step failed
with "No such file or directory", blocking the integration job.

Ask SwiftPM for the directory with --show-bin-path instead, print
diagnostics (ls of the bin dir plus a find over .build) when the binary
is still missing, and stage the verified binary at a fixed path so
upload-artifact no longer duplicates the layout assumption.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The Unreleased section covered only two of the branch's changes. Add the
missing public API additions: web auth token rotation (#462, #463), the
zone payload metadata zoneType/deleted plus the ownerRecordName decoding
fix (#444), the zoneID: parameter on createRecord/updateRecord/
deleteRecord/uploadAssets (#454), the new asset-download CloudKitError
cases (#466), the MistKitConfiguration extraction (#455), the MistDemo
zone-aware work (#438, #453, #454), and the release runbook plus code
review follow-ups (#460, #461).

Also move the Reference.Action VALIDATE entry (#464) out of the
1.0.0-beta.4 section: that tag is already published and does not contain
the commit, so the change ships in this release, not the previous one.

Per the release runbook, new entries are a flat bullet list with no
category subsections.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Scripts/release.sh verify-tag asserts a '### v<tag>' roadmap section
exists in the tagged tree; there was none for beta.5, so the release
check would have failed.

Also check off #146 (custom CloudKit zone support for queries) under
beta.4. The issue closed 2026-08-28 and shipped in that release, but it
was still listed unchecked under Backlog / Post-beta.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Remove the checksum verification #473 added: fileChecksum cannot be
recomputed client-side, so the check rejected every genuine asset.

The value is not a SHA-256 of the plaintext. Verified against a live
container, it decodes to 21 bytes -- a 0x01 version prefix plus a
20-byte digest -- so it could never equal a 32-byte SHA-256, and
Asset.download() therefore threw on every real CloudKit asset. The
MistDemo Integration job caught this; the unit tests did not, because
they built fixtures with the same formula they asserted against.

It is minted server-side: MistKit reads it verbatim from the CDN upload
receipt, the receipt embeds a fragment of it, and Apple's archived
reference labels the field only [SIGNATURE] with no algorithm. It is
deterministic and content-addressed -- identical bytes yield identical
checksums, it doubles as the content address in downloadURL, and it is
what rereferenceAssets echoes back -- so it is an identity/caching
token, not an integrity check. ~1,500 candidate constructions over
three byte-exact samples produced zero matches; see
.claude/docs/research/asset-filechecksum.md.

Delete matches(data:), assetChecksumMismatch, missingAssetChecksum and
AssetChecksumTests rather than deprecating them: the API cannot do what
its name says, and beta is the time to remove it. download(using:) now
returns bytes unverified; MistDemo checks the declared size instead,
which is client-checkable and catches truncation.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Sep 4, 2026

Copy link
Copy Markdown

Review

This PR (#459, v1.0.0 beta.5) is the release-branch merge: 332 changed files, including two git subrepo push commits for Examples/BushelCloud / Examples/CelestraCloud (reviewed in their own repos) and large .claude/ doc/memory housekeeping. GitHub's diff API rejects a >300-file diff and this sandbox's network tooling (git fetch, gh api) was blocked, so I scoped this review to the genuinely new package logic: Sources/MistKit/, Sources/MistKitOpenAPI/, openapi.yaml, and the matching Tests/ (36 non-test files, ~550 net new lines). That's the part with real behavioral risk; the subrepo pushes and docs housekeeping aren't re-reviewed here.

Stale ReleaseNotes.md "Unreleased" entries (correctness of the release notes themselves)

Lines 4 and 10 of ReleaseNotes.md still say:

But the shipped code in this PR does the opposite: Asset+Download.swift's doc comment explicitly says the bytes are not verified against fileChecksum, and .missingAssetChecksum / .assetChecksumMismatch don't exist anywhere in Sources/ (grep for them is empty). Only .missingAssetDownloadURL actually landed. This matches the CLAUDE.md write-up of issue #473 superseding #466 once checksum verification turned out to be unimplementable (fileChecksum is a 21-byte opaque server signature, not a recomputable digest) — but the release notes were never updated to reflect that reversal. Given the project's own release guardrail ("never tag without notes"), these two bullets should be corrected/removed before beta.5 is tagged, or downstream consumers will expect checksum verification that was deliberately removed.

assertionFailure fallback is driven entirely by server data

AuthenticationMiddleware.intercept (Sources/MistKit/Authentication/AuthenticationMiddleware.swift) now reads the X-Apple-CloudKit-Web-Auth-Token header — documented as present on every CloudKit response — and on adoption failure calls RotatedWebAuthTokenFailureReporter.assertionHandler, whose default is assertionFailure(message) (RotatedWebAuthTokenFailureReporter.swift). WebAuthTokenAuthenticator.init throws for an empty token or one under 10 characters, and that string comes straight from the server, not from app input. If CloudKit ever sends an empty/short value for this header (bug, edge case, future header repurposing), every downstream app built in a Debug configuration will trap on essentially any network call. assertionFailure is conventionally reserved for programmer-invariant violations; here it's wired to unvalidated wire data. Test coverage (AuthenticationMiddlewareTests+TokenRotation.swift) is aware of this — the failure-path test explicitly overrides assertionHandler to avoid crashing the test run — which suggests the risk was known but perhaps not weighed against real CloudKit responses. Worth considering whether this should just log-and-continue rather than trap by default.

Minor / non-blocking

  • WebAuthTokenManager correctly became an actor (was final class ... Sendable) to support the new mutable webAuthToken from rotation; all call sites were updated to await. Concurrent in-flight requests whose responses interleave out of order could in principle adopt a stale rotated token over a newer one — likely fine in practice (CloudKit presumably still honors superseded-but-recent tokens for a grace window) but worth a mental note if token-rotation bugs ever surface.
  • FieldValue.bytes moving from String to Data (issue Change FieldValue.bytes from String to Data #467) is a clean, well-tested breaking change with good back-compat (bytesValue still returns base64 String, new dataValue returns Data), and the untagged-vs-tagged BYTES inference behavior is thoroughly covered (FieldValueConversionTests+ResponseTypes.swift, +Lists.swift).
  • The ownerName -> ownerRecordName wire-key rename (issue Zone payloads: deleted, zoneType unmodeled and ownerRecordName never decodes (confirmed live) #444) is a real bug fix — shared-zone owners were silently always nil before this — and is pinned by a dedicated wire-format test (CloudKitServiceTests.ZoneOwnerWireKey+WireFormat.swift) asserting the correct key is emitted and the old one is absent.
  • zoneID: threading through createRecord/updateRecord/deleteRecord/uploadAssets (issue MistDemo: zone-aware writes (CRUD + assets) #454) is consistent end-to-end and covered by dedicated forwarding tests.
  • Reference.Action.VALIDATE is threaded consistently across openapi.yaml, generated Types.swift, the request/list converters, and the response converter — no gaps found.
  • New public API surface has doc comments; new files carry the standard license header.

No security issues found in this scoped diff (no secrets logged — TokenManagerError.errorDescription for invalid-credential reasons doesn't embed the raw token value).

Scope note: I could not verify this PR's CI status (gh pr checks was blocked in this environment), so please confirm the build/test/lint pipeline is green independent of this review.

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