Skip to content

V1.0.0 beta.3#408

Merged
leogdion merged 15 commits into
mainfrom
v1.0.0-beta.3
Jul 9, 2026
Merged

V1.0.0 beta.3#408
leogdion merged 15 commits into
mainfrom
v1.0.0-beta.3

Conversation

@leogdion

@leogdion leogdion commented Jun 4, 2026

Copy link
Copy Markdown
Member

No description provided.

leogdion and others added 3 commits June 1, 2026 14:57
Restores the full docs/ tree removed from main in the previous commit,
sourced from docs/talk-prep-archive so the authentication-middleware path
fix (aa9e36d) is folded in. Because this add lands after the deletion point,
merging v1.0.0-beta.3 into main will re-add docs/ without conflict.

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

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 166 files, which is 16 over the limit of 150.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 54b09a7f-cea5-4c51-86af-d547b4bc5f65

📥 Commits

Reviewing files that changed from the base of the PR and between d03a9a8 and 3935933.

📒 Files selected for processing (166)
  • .claude/docs/QUICK_REFERENCE.md
  • .codefactor.yml
  • .github/workflows/MistDemo.yml
  • .github/workflows/MistKit.yml
  • CLAUDE.md
  • Examples/BushelCloud/.github/actions/cloudkit-sync/action.yml
  • Examples/BushelCloud/.github/workflows/BushelCloud.yml
  • Examples/BushelCloud/.github/workflows/bushel-cloud-build.yml
  • Examples/BushelCloud/.github/workflows/codeql.yml
  • Examples/BushelCloud/.gitrepo
  • Examples/BushelCloud/Package.resolved
  • Examples/BushelCloud/Package.swift
  • Examples/BushelCloud/Scripts/lint.sh
  • Examples/BushelCloud/Tests/BushelCloudKitTests/CloudKit/MockCloudKitServiceTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/CloudKit/PEMValidatorTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/Configuration/ConfigurationLoaderTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/Configuration/FetchConfigurationTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/DataSources/MockAppleDBFetcherTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/DataSources/MockIPSWFetcherTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/DataSources/MockMESUFetcherTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/DataSources/MockSwiftVersionFetcherTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/DataSources/MockXcodeReleasesFetcherTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/DataSources/RestoreImageDeduplicationTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/DataSources/RestoreImageMergeTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/DataSources/SwiftVersionDeduplicationTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/DataSources/VirtualBuddyFetcherTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/DataSources/XcodeVersionDeduplicationTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/DataSources/XcodeVersionReferenceResolutionTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/ErrorHandling/AuthenticationErrorHandlingTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/ErrorHandling/CloudKitErrorHandlingTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/ErrorHandling/GracefulDegradationTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/ErrorHandling/NetworkErrorHandlingTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/Extensions/FieldValueURLTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/Mocks/MockAppleDBFetcher.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/Mocks/MockCloudKitService.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/Mocks/MockFetcherError.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/Mocks/MockIPSWFetcher.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/Mocks/MockMESUFetcher.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/Mocks/MockSwiftVersionFetcher.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/Mocks/MockURLProtocol.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/Mocks/MockXcodeReleasesFetcher.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/Models/DataSourceMetadataTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/Models/RestoreImageRecordTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/Models/SwiftVersionRecordTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/Models/XcodeVersionRecordTests.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/Utilities/FieldValue+Assertions.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/Utilities/MockRecordInfo.swift
  • Examples/BushelCloud/Tests/BushelCloudKitTests/Utilities/TestFixtures.swift
  • Examples/CelestraCloud/.github/workflows/CelestraCloud.yml
  • Examples/CelestraCloud/.github/workflows/codeql.yml
  • Examples/CelestraCloud/.github/workflows/update-feeds.yml
  • Examples/CelestraCloud/.gitrepo
  • Examples/CelestraCloud/Package.resolved
  • Examples/CelestraCloud/Package.swift
  • Examples/CelestraCloud/Sources/CelestraCloudKit/CelestraConfig.swift
  • Examples/CelestraCloud/Sources/CelestraCloudKit/Configuration/ConfigSource.swift
  • Examples/CelestraCloud/Sources/CelestraCloudKit/Configuration/ConfigurationKeys.swift
  • Examples/CelestraCloud/Sources/CelestraCloudKit/Configuration/ConfigurationLoader.swift
  • Examples/CelestraCloud/Sources/CelestraCloudKit/Configuration/EnhancedConfigurationError.swift
  • Examples/CelestraCloud/Sources/CelestraCloudKit/Errors/ConfigurationError.swift
  • Examples/MistDemo/Package.resolved
  • Examples/MistDemo/Package.swift
  • Examples/MistDemo/README.md
  • Examples/MistDemo/Sources/MistDemoApp/Views/NoteEditView.swift
  • Examples/MistDemo/Sources/MistDemoApp/Views/RecordDetailView.swift
  • Examples/MistDemo/Sources/MistDemoKit/Commands/FetchChangesCommand.swift
  • Examples/MistDemo/Sources/MistDemoKit/Commands/ModifyCommand.swift
  • Examples/MistDemo/Sources/MistDemoKit/Commands/QueryCommand.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/FetchChangesConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/MistDemoConfiguration.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/ModifyConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Configuration/QueryConfig.swift
  • Examples/MistDemo/Sources/MistDemoKit/Constants/MistDemoConstants.swift
  • Examples/MistDemo/Sources/MistDemoKit/Integration/Phases/ChangesRequestOptionsPhase.swift
  • Examples/MistDemo/Sources/MistDemoKit/Integration/Phases/CreateRecordsPhase.swift
  • Examples/MistDemo/Sources/MistDemoKit/Integration/Phases/LookupRecordsPhase.swift
  • Examples/MistDemo/Sources/MistDemoKit/Integration/Phases/ModifyRequestOptionsPhase.swift
  • Examples/MistDemo/Sources/MistDemoKit/Integration/Phases/QueryRequestOptionsPhase.swift
  • Examples/MistDemo/Sources/MistDemoKit/Integration/Tests/PrivateDatabaseTest.swift
  • Examples/MistDemo/Sources/MistDemoKit/Integration/Tests/PublicDatabaseTest.swift
  • Examples/MistDemo/Tests/MistDemoTests/Configuration/FetchChangesConfigTests.swift
  • Examples/MistDemo/Tests/MistDemoTests/Configuration/ModifyConfigTests.swift
  • Examples/MistDemo/Tests/MistDemoTests/Configuration/QueryConfig/QueryConfigTests+RequestOptions.swift
  • Examples/MistDemo/Tests/MistDemoTests/Extensions/FieldValue+FieldType/FieldValue+FieldTypeTests+TimestampDateType.swift
  • Packages/ConfigKeyKit/.github/actions/setup-configkeykit/action.yml
  • Packages/ConfigKeyKit/.github/actions/setup-tools/action.yml
  • Packages/ConfigKeyKit/.github/workflows/ConfigKeyKit.yml
  • Packages/ConfigKeyKit/.github/workflows/check-unsafe-flags.yml
  • Packages/ConfigKeyKit/.github/workflows/claude-code-review.yml
  • Packages/ConfigKeyKit/.github/workflows/claude.yml
  • Packages/ConfigKeyKit/.github/workflows/cleanup-caches.yml
  • Packages/ConfigKeyKit/.github/workflows/codeql.yml
  • Packages/ConfigKeyKit/.github/workflows/swift-source-compat.yml
  • Packages/ConfigKeyKit/.gitignore
  • Packages/ConfigKeyKit/.gitrepo
  • Packages/ConfigKeyKit/.periphery.yml
  • Packages/ConfigKeyKit/.spi.yml
  • Packages/ConfigKeyKit/.swift-format
  • Packages/ConfigKeyKit/.swift-version
  • Packages/ConfigKeyKit/.swiftlint.yml
  • Packages/ConfigKeyKit/LICENSE
  • Packages/ConfigKeyKit/Makefile
  • Packages/ConfigKeyKit/Package.swift
  • Packages/ConfigKeyKit/README.md
  • Packages/ConfigKeyKit/Scripts/header.sh
  • Packages/ConfigKeyKit/Scripts/lint.sh
  • Packages/ConfigKeyKit/Sources/ConfigKeyKit/Command.swift
  • Packages/ConfigKeyKit/Sources/ConfigKeyKit/CommandConfiguration.swift
  • Packages/ConfigKeyKit/Sources/ConfigKeyKit/CommandLineParser.swift
  • Packages/ConfigKeyKit/Sources/ConfigKeyKit/CommandRegistry.swift
  • Packages/ConfigKeyKit/Sources/ConfigKeyKit/CommandRegistryError.swift
  • Packages/ConfigKeyKit/Sources/ConfigKeyKit/ConfigKey+Bool.swift
  • Packages/ConfigKeyKit/Sources/ConfigKeyKit/ConfigKey+Debug.swift
  • Packages/ConfigKeyKit/Sources/ConfigKeyKit/ConfigKey.swift
  • Packages/ConfigKeyKit/Sources/ConfigKeyKit/ConfigKeySource.swift
  • Packages/ConfigKeyKit/Sources/ConfigKeyKit/ConfigurationKey.swift
  • Packages/ConfigKeyKit/Sources/ConfigKeyKit/ConfigurationParseable.swift
  • Packages/ConfigKeyKit/Sources/ConfigKeyKit/NamingStyle.swift
  • Packages/ConfigKeyKit/Sources/ConfigKeyKit/OptionalConfigKey+Debug.swift
  • Packages/ConfigKeyKit/Sources/ConfigKeyKit/OptionalConfigKey.swift
  • Packages/ConfigKeyKit/Sources/ConfigKeyKit/StandardNamingStyle.swift
  • Packages/ConfigKeyKit/Tests/ConfigKeyKitTests/CommandLineParserTests.swift
  • Packages/ConfigKeyKit/Tests/ConfigKeyKitTests/CommandRegistry/CommandRegistry+AvailableCommands.swift
  • Packages/ConfigKeyKit/Tests/ConfigKeyKitTests/CommandRegistry/CommandRegistry+CommandCreation.swift
  • Packages/ConfigKeyKit/Tests/ConfigKeyKitTests/CommandRegistry/CommandRegistry+CommandTypeRetrieval.swift
  • Packages/ConfigKeyKit/Tests/ConfigKeyKitTests/CommandRegistry/CommandRegistry+ConcurrentAccess.swift
  • Packages/ConfigKeyKit/Tests/ConfigKeyKitTests/CommandRegistry/CommandRegistry+Metadata.swift
  • Packages/ConfigKeyKit/Tests/ConfigKeyKitTests/CommandRegistry/CommandRegistry+Overwrite.swift
  • Packages/ConfigKeyKit/Tests/ConfigKeyKitTests/CommandRegistry/CommandRegistry+Registration.swift
  • Packages/ConfigKeyKit/Tests/ConfigKeyKitTests/CommandRegistry/CommandRegistry+TestCommandTypes.swift
  • Packages/ConfigKeyKit/Tests/ConfigKeyKitTests/CommandRegistry/CommandRegistry.swift
  • Packages/ConfigKeyKit/Tests/ConfigKeyKitTests/ConfigKeySourceTests.swift
  • Packages/ConfigKeyKit/Tests/ConfigKeyKitTests/ConfigKeyTests.swift
  • Packages/ConfigKeyKit/Tests/ConfigKeyKitTests/NamingStyleTests.swift
  • Packages/ConfigKeyKit/Tests/ConfigKeyKitTests/OptionalConfigKeyTests.swift
  • Packages/ConfigKeyKit/Tests/ConfigKeyKitTests/TestEnvironment.swift
  • Packages/ConfigKeyKit/codecov.yml
  • Packages/ConfigKeyKit/mise.toml
  • Sources/MistKit/CloudKitService/CloudKitService+Operations+Deprecated.swift
  • Sources/MistKit/CloudKitService/CloudKitService+Operations.swift
  • Sources/MistKit/CloudKitService/CloudKitService+RecordWriteConvenience.swift
  • Sources/MistKit/CloudKitService/CloudKitService+SyncOperations.swift
  • Sources/MistKit/CloudKitService/CloudKitService+WriteOperations.swift
  • Sources/MistKit/Documentation.docc/HandlingErrors.md
  • Sources/MistKit/Models/FieldValues/FieldValue+Codable.swift
  • Sources/MistKit/Models/FieldValues/FieldValue+Components.swift
  • Sources/MistKitOpenAPI/Types.swift
  • Tests/MistKitTests/CloudKitService/Query/CloudKitServiceTests.Query+ExistingRecordNames.swift
  • Tests/MistKitTests/CloudKitService/RecordWrite/CloudKitServiceTests.RecordWriteConvenience.swift
  • Tests/MistKitTests/CloudKitService/RequestOptions/CloudKitServiceTests.RequestOptions.swift
  • Tests/MistKitTests/Models/FieldValues/FieldValueConversionTests+ResponseTypes.swift
  • Tests/MistKitTests/Models/FieldValues/FieldValueTests.swift
  • docs/README.md
  • docs/cloudkit-guide/.social/README.md
  • docs/cloudkit-guide/README.md
  • docs/cloudkit-guide/articles/README.md
  • docs/cloudkit-guide/articles/authenticating-cloudkit-backend-services.md
  • docs/cloudkit-guide/articles/deploying-mistkit-server-side.md
  • docs/cloudkit-guide/articles/rebuilding-mistkit-claude-code-part-1.md
  • docs/cloudkit-guide/articles/rebuilding-mistkit-claude-code-part-2.md
  • docs/internals/authentication-middleware.md
  • docs/internals/error-code-parsing.md
  • docs/internals/field-type-polymorphism.md
  • docs/talk-feedback.md
  • docs/why-mistkit.md
  • openapi.yaml

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

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch v1.0.0-beta.3

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.

@claude

claude Bot commented Jun 4, 2026

Copy link
Copy Markdown

Code Review: V1.0.0 beta.3

Overview

This PR advances CelestraCloud and BushelCloud examples to the beta.3 API, with the centerpiece change being a refactoring of CelestraCloud's configuration system to use ConfigKeyKit. It also includes CI workflow updates, copyright year corrections, license header additions, and new documentation articles.


CI / Workflow Changes

Removing scheme: inputs from swift-build — The removal of the hardcoded scheme: parameters in .github/workflows/MistKit.yml and MistDemo.yml is clean and likely reflects the action having learned to auto-detect the scheme.

Branch tag format change — The MISTKIT_BRANCH env var changes from v1.0.0-beta.2 to 1.0.0-beta.2 (dropping the v prefix). Make sure the setup-mistkit action resolves both forms — if it expects a v-prefixed tag this will silently fall back to a branch named 1.0.0-beta.2 instead of the release tag.

CONFIGKEYKIT_BRANCH: main — Pinning to main rather than a release tag is fine for now but worth revisiting before a stable release to ensure reproducibility.


CelestraCloud: ConfigKeyKit Refactor

What changed

  • ConfigurationKeys now stores typed ConfigKey<T> / OptionalConfigKey<T> values (from ConfigKeyKit) instead of paired raw strings.
  • ConfigurationLoader gains overloaded read(_:) helpers that iterate ConfigKeySource.allCases (CLI to ENV) and apply defaults automatically, eliminating the previous triple-expression "try dot-notation key / try env-key / use default" pattern.
  • ConfigSource, ConfigurationError, and the deprecated CelestraConfig.createCloudKitService() are removed.

Positives

  • The duplicated key-pair pattern (e.g. containerID + containerIDEnv) is gone; the lookup cascade is now centralized.
  • internal import Foundation visibility fix on CelestraConfig.swift follows the project's explicit-ACL-on-imports convention.
  • Removing the deprecated createCloudKitService() reduces dead-code surface.

Issues / Suggestions

1. The read overloads may be reinventing ConfigKeyKit.
The six private func read() overloads each walk ConfigKeySource.allCases manually. If ConfigKeyKit's ConfigKey/OptionalConfigKey types already expose a value(from: ConfigReader) or similar method, this layer is redundant. Worth checking whether a direct call exists — if so, the entire MARK section can collapse to a single generic.

2. read(_ key: ConfigKey<Bool>) CLI semantics are surprising.
The boolean helper treats any present CLI key as true regardless of its string value. This is correct for flag-style arguments (--skip-robots-check) but could cause subtle breakage if a caller passes --skip-robots-check false — the value "false" would still return true. The docstring covers this, but a comment in ConfigurationKeys that boolean keys are flags (not value options) would prevent future confusion.

3. readDate implementation is worth verifying.

private func readDate(forKey key: String) -> Date? {
  configReader.string(forKey: ConfigKey(key), as: Date.self)
}

This relies on configReader.string(forKey:as:) accepting Date.self to perform ISO8601 conversion. That's a non-standard overload — confirm this API exists on Configuration.ConfigReader and works as expected. If it doesn't, this will silently return nil for all date keys.

4. Missing read(_ key: OptionalConfigKey<Double>) overload.
There's no read(_ key: OptionalConfigKey<Double>) helper. A future Double? config key would produce a compile error. Not a blocker, but worth adding for symmetry with the other optional overloads.

5. readString(forKey:) and readInt(forKey:) helpers are now only used internally.
These remain post-refactor as primitives for the new read() overloads — that's fine architecturally. Just verify Periphery doesn't flag them as dead code.


BushelCloud: Test File Housekeeping

Copyright year updates (2025 to 2026) and missing MIT license headers added across test files. The lint.sh change to run header.sh over Tests/ (in addition to Sources/) explains this — good catch.

FieldValueURLTests.swift was previously attributed to Claude Code; now correctly attributed to Leo Dion.


Documentation

New articles under docs/cloudkit-guide/ (auth, deployment, MistKit rebuild series) plus docs/why-mistkit.md and supporting talk/social assets. No code concerns.


Summary

The ConfigKeyKit refactor is a clear improvement — the duplicated key-pair pattern is gone and the cascade logic is centralized. Three things to verify before merging:

  1. Confirm the v-prefix change doesn't break setup-mistkit action tag resolution.
  2. Confirm configReader.string(forKey:as: Date.self) is a real Configuration API (or replace with explicit ISO8601 parsing).
  3. Check ConfigKeyKit for a native value(from:) method to avoid manually walking ConfigKeySource.allCases in six separate overloads.

@codecov

codecov Bot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.45299% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.25%. Comparing base (7fe8090) to head (8d53fa4).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...istKit/Models/FieldValues/FieldValue+Codable.swift 50.00% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #408      +/-   ##
==========================================
+ Coverage   71.67%   76.25%   +4.58%     
==========================================
  Files         168      158      -10     
  Lines        3844     3761      -83     
==========================================
+ Hits         2755     2868     +113     
+ Misses       1089      893     -196     
Flag Coverage Δ
mistdemo-spm-macos 11.30% <8.54%> (-0.13%) ⬇️
mistdemo-swift-6.2-jammy 11.30% <8.54%> (-0.13%) ⬇️
mistdemo-swift-6.2-noble 11.30% <8.54%> (-0.13%) ⬇️
mistdemo-swift-6.3-jammy 11.30% <8.54%> (-0.13%) ⬇️
mistdemo-swift-6.3-noble 11.30% <8.54%> (-0.13%) ⬇️
spm 74.23% <91.45%> (+2.62%) ⬆️
swift-6.1-jammy 74.06% <91.45%> (+2.49%) ⬆️
swift-6.1-noble 74.14% <91.45%> (+2.25%) ⬆️
swift-6.2-jammy 74.41% <91.45%> (+2.84%) ⬆️
swift-6.2-noble 74.20% <91.45%> (+2.57%) ⬆️
swift-6.3-jammy 74.04% <91.45%> (+2.41%) ⬆️
swift-6.3-noble 74.09% <91.45%> (+2.55%) ⬆️

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.

leogdion and others added 3 commits June 30, 2026 19:47
…ang 20)

The windows-2025 runner now resolves the newest installed MSVC toolset
(14.51, VS18) whose STL hard-asserts STL1000: expected Clang 20 or newer.
Swift 6.1/6.2 bundle Clang 19, so swift-crypto's CCryptoBoringSSL fails to
compile. Swift 6.3 bundles Clang 20 and passes; windows-2022 defaults to an
older 14.4x toolset compatible with Clang 19.

Exclude windows-2025 x {6.1, 6.2}: those keep building on windows-2022, and
only Swift 6.3 builds on windows-2025.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Removes the `Packages/ConfigKeyKit` git-subrepo (vendored copy of
brightdigit/ConfigKeyKit) and switches the example backends to the remote
package, pinned to the released tag:

  .package(name: "ConfigKeyKit", path: "../../Packages/ConfigKeyKit")
  → .package(url: "https://github.com/brightdigit/ConfigKeyKit.git", from: "1.0.0-beta.2")

- Examples/BushelCloud, Examples/CelestraCloud, Examples/MistDemo manifests +
  Package.resolved updated (ConfigKeyKit pinned at 1.0.0-beta.2 / 6949abb).
- MistKit core never depended on ConfigKeyKit; Packages/ is now empty and removed.
- Removed the now-dead `setup-configkeykit` action steps and `CONFIGKEYKIT_BRANCH`
  env from the BushelCloud and CelestraCloud workflows (BushelCloud.yml, codeql.yml,
  bushel-cloud-build.yml, cloudkit-sync composite action incl. its configkeykit-branch
  input; CelestraCloud.yml, codeql.yml, update-feeds.yml). SwiftPM now fetches
  ConfigKeyKit directly, so the fresh-build fallback action is unnecessary.

Verified: `swift package resolve` succeeds for all three examples (ConfigKeyKit
resolves to 1.0.0-beta.2) and the `mistdemo` executable builds. All seven edited
workflow/action YAML files still parse. The pre-existing MistDemoApp SwiftUI build
errors are unrelated to this change.

Tracks brightdigit/ConfigKeyKit#6.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
brightdigit/swift-build@v1 no longer needs an explicit scheme — the
MistKit and MistDemo workflows already omit it. Remove the now-obsolete
`scheme:` input from the BushelCloud and CelestraCloud workflows to match.

These are subrepo workflows; propagate upstream via `git subrepo push`
after review. (ConfigKeyKit is excluded — that subrepo is being removed
entirely in a separate PR.)

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

claude Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review: PR #408 — V1.0.0 beta.3

This is the beta.3 release-branch merge into main. It touches no code in Sources/MistKit, Sources/MistKitOpenAPI, or Tests/MistKitTests — the diff is entirely: (1) vendored subrepo syncs for Examples/BushelCloud, Examples/CelestraCloud, and the ConfigKeyKit migration from a local path dependency to a published remote package, (2) CI workflow updates, and (3) new documentation (docs/internals/*.md, docs/cloudkit-guide/*). The ConfigKeyKit vendoring removal is clean — verified no dangling references to the deleted local package remain, and version pins line up consistently across BushelCloud/CelestraCloud/MistDemo.

Found one real CI bug and three documentation accuracy issues worth fixing before merge:

1. Examples/CelestraCloud/.github/workflows/{CelestraCloud,update-feeds,codeql}.ymlMISTKIT_BRANCH dropped its v prefix, likely breaking MistKit dependency resolution in CI.
All three CelestraCloud workflows changed MISTKIT_BRANCH from v1.0.0-beta.2 to 1.0.0-beta.2, while the equivalent BushelCloud workflows in this same PR kept v1.0.0-beta.2 unchanged. MistKit's release branches are actually named with the v prefix (e.g. this PR's own head branch is v1.0.0-beta.3, and the prior release branch was v1.0.0-beta.2). The shared ./.github/actions/setup-mistkit/action.yml resolves this value via an exact git ls-remote https://github.com/brightdigit/MistKit.git "$BRANCH" match; if it can't resolve, it falls back to pinning Package.swift with branch: "1.0.0-beta.2" — which also isn't a real branch. Net effect: CelestraCloud's CI likely fails to resolve MistKit at the intended commit (or fails outright), while BushelCloud's identical workflow keeps working. Worth aligning both to the same (correct, v-prefixed) value.

2. docs/internals/error-code-parsing.md — the "Parsing Pipeline" section describes a fabricated implementation that doesn't match the actual code.
The doc describes an errorExtractors: [(any CloudKitResponseType) -> CloudKitError?] array and per-status properties (badRequestResponse, unauthorizedResponse, etc.) on CloudKitResponseType, and calls .httpErrorWithDetails "the primary case." In reality, CloudKitResponseType (Sources/MistKit/OpenAPI/CloudKitResponseType.swift) is a one-method protocol — func toCloudKitError() -> CloudKitError? — and CloudKitError+OpenAPI.swift builds from a single Components.Responses.Failure type, switching on serverErrorCode to produce dedicated .quotaExceeded/.badRequest/.atomicFailure cases with .httpErrorWithDetails as the fallback, not the primary case. This section should be rewritten against the real implementation.

3. docs/internals/field-type-polymorphism.md:157 — wrong file location for the asset-upload functions.
States the two-step upload flow (uploadAssets()requestAssetUploadURL()uploadAssetData()) lives in CloudKitService+WriteOperations.swift. Both uploadAssets() and requestAssetUploadURL() are actually defined in CloudKitService+AssetOperations.swift (matching the table already in the repo's CLAUDE.md).

4. docs/cloudkit-guide/articles/authenticating-cloudkit-backend-services.md:198 — broken source links.
Links to Sources/MistKit/AuthenticationMiddleware.swift and Sources/MistKit/Authentication/Internal/RequestSignature.swift. The real paths are Sources/MistKit/Authentication/AuthenticationMiddleware.swift and Sources/MistKit/Authentication/RequestSignature.swift — there's no Internal/ subfolder and AuthenticationMiddleware.swift lives under Authentication/, not directly under MistKit/.

Minor (not blocking): a few of the new docs/internals/*.md and docs/cloudkit-guide/* files restate content that's already in CLAUDE.md or elsewhere in the same doc set (e.g. authentication-middleware.md's PublicAuthPreference section duplicates CLAUDE.md's "Per-call attribution for .public", and docs/cloudkit-guide/README.md's theme table is printed twice). Worth a pass to cross-reference instead of restate, but not a correctness issue.

No security, performance, or test-coverage concerns — this PR doesn't touch runtime code paths.

leogdion and others added 2 commits June 30, 2026 20:34
…387)

Empirical probing shows CloudKit enforces subscription uniqueness on
(recordType, firesOn), not subscriptionID; duplicates surface as a
misleading INTERNAL_ERROR. Captures how MistKit infers this via the
hedged isLikelyDuplicate hint / subscriptionLikelyDuplicate error.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…382)

Apple's archived CloudKit Web Services REST reference documents
tokens/create and tokens/register under /database/, but the live
service only routes them under /device/ (the /database/ path returns
405 Method Not Allowed). MistKit already uses /device/; this captures
the divergence so it isn't re-discovered.

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

claude Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review: PR #408 (V1.0.0 beta.3)

This is a large rollup PR (134 files, 8 commits) merging v1.0.0-beta.3 into main. Most of the diff is mechanical and low-risk:

  • Deleting the vendored Packages/ConfigKeyKit/ subrepo (pure deletions) now that CelestraCloud, BushelCloud, and MistDemo consume it as a remote SPM dependency instead (https://github.com/brightdigit/ConfigKeyKit.git, from: "1.0.0-beta.2") — consistent across all three Package.swift/Package.resolved pairs.
  • CI workflow cleanup (dropping unused scheme: inputs, excluding Swift 6.1/6.2 from the windows-2025 matrix with a clear comment explaining the MSVC/Clang mismatch).
  • Re-adding docs/ content and BushelCloud test file license headers — no logic changes.

The one substantive code change is CelestraCloud's configuration layer moving from raw string-keyed env/CLI reads to typed ConfigKey/OptionalConfigKey from ConfigKeyKit. Findings from that part:

  1. Examples/CelestraCloud/Sources/CelestraCloudKit/Configuration/ConfigurationLoader.swift (~line 141, the read(_ key: ConfigKeyKit.ConfigKey<Bool>) helper) — the CLI branch treats presence of the flag as true regardless of its actual value:

    if let cliKey = key.key(for: .commandLine),
      configReader.string(forKey: ConfigKey(cliKey)) != nil
    {
      return true
    }

    CommandLineArgumentsProvider reads --flag value pairs as key/value strings, not presence-only switches, so a user passing --update-skip-robots-check false to explicitly disable the flag would still get true back, since the check only asks "is a string present for this key" and never inspects it. Worth confirming against CommandLineArgumentsProvider's actual parsing semantics and, if confirmed, parsing the value the same way the env branch does ("true"/"1"/"yes") rather than short-circuiting on presence. There's also no test in Examples/CelestraCloud/Tests/ exercising ConfigurationLoader's CLI/env parsing at all (unlike BushelCloud, which has ConfigurationLoaderTests.swift), so this path isn't covered either way.

  2. Examples/CelestraCloud/CLAUDE.md:98 — still documents CelestraConfig.createCloudKitService() (no-arg) as the current pattern ("Environment-based configuration (dev/prod)"), but this commit deletes that method entirely (CelestraConfig.swift) in favor of createCloudKitService(from:) + ConfigurationLoader. The doc should be updated so it doesn't point contributors at removed API.

Nothing else in the diff stood out as a correctness/security issue — the internal import/public import split in the touched files (CelestraConfig.swift, EnhancedConfigurationError.swift) correctly follows the repo's import-visibility convention, and the deleted ConfigSource/ConfigurationError types have no remaining call sites.

…#414)

* refactor: cut cyclomatic complexity in FieldValue+Codable, drop lint disable (#154)

Re-scoped from the now-removed CustomFieldValue(Payload).swift to the
remaining hand-written disable in FieldValue+Codable.swift. Extracted
helpers so the cyclomatic_complexity swiftlint disable can be removed;
behavior and serialization output unchanged. Generated Operations.*.Output
disables are out of scope.

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

* test: cover FieldValue encode scalar/complex paths after refactor

The #154 refactor split encodeValue into encodeScalar/encodeComplex but
added no tests; the only encode-path test covered .string. Add a
parameterized encode→decode round-trip over the scalar and complex cases
(driving the encodeScalar→encodeComplex delegation), plus explicit
encode-shape assertions for .date (milliseconds) and .bytes (string
payload), which do not round-trip by design.

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

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review

This PR is large by file count (136 files) but small by actual code-risk surface — most of the diff is mechanical: .gitrepo/Package.resolved bumps for the BushelCloud/CelestraCloud subrepos, CI workflow tweaks, and new docs/transcripts. I focused the review on the substantive changes.

Sources/MistKit/Models/FieldValues/FieldValue+Codable.swift

Clean refactor: splits the (previously swiftlint:disable:next cyclomatic_complexity) encodeValue switch into encodeScalar (bool return signaling "handled") + encodeComplex, removing the lint suppression instead of just silencing it. The encodeComplex default: throws EncodingError.invalidValue with a clear comment that it's an unreachable defensive guard (every case is routed by one arm or the other) — this matches the codebase's fail-loud philosophy from CLAUDE.md rather than silently dropping a value. Good.

Test coverage (FieldValueTests.swift) is meaningfully improved: the old single fieldValueEncodable test is replaced with a parameterized round-trip test across scalar and complex cases (exercising both encodeScalar/encodeComplex arms), plus two new targeted tests for .date (milliseconds-on-the-wire, non-round-tripping by design) and .bytes (shares the scalar arm with .string, decodes back as .string). The doc comments explain why each asymmetry exists rather than just what the test does — good adherence to the "why not what" comment convention in CLAUDE.md.

Sources/MistKit/Documentation.docc/HandlingErrors.md

New section documents isLikelyDuplicate / subscriptionLikelyDuplicate — I verified these symbols already exist in Sources/MistKit/CloudKitService/CloudKitService+ModifySubscriptions.swift, CloudKitError.swift, and Models/SubscriptionOperationFailure.swift, so this is genuine documentation for existing code, not describing something unimplemented. Content is accurate and appropriately hedged ("likely", not a confirmed server signal).

CelestraCloud Configuration/ refactor (ConfigKeyKit adoption)

Good simplification — replaces hand-rolled key/keyEnv string pairs and repeated ?? readX(...) ?? readX(...) fallback chains with typed ConfigKey<T>/OptionalConfigKey<T> + a small set of generic read(_:) overloads. Dead code removed cleanly: the deprecated CelestraConfig.createCloudKitService() (env-var-only, superseded by ConfigurationLoader) is deleted along with ConfigurationError.swift and the ConfigSource field on EnhancedConfigurationError — I checked and there are no remaining callers passing source: or referencing ConfigSource/ConfigurationError, so this isn't a stray breaking deletion.

One thing worth a second look: read(_ key: ConfigKeyKit.ConfigKey<Bool>) treats any non-nil CLI value for the flag's key as true — i.e. presence-only, not value-parsing (configReader.string(forKey: ConfigKey(cliKey)) != nil). This matches the documented flag semantics (--update-skip-robots-check is a bare flag per Examples/CelestraCloud/Sources/CelestraCloud/Celestra.swift:82 and the project's own CLAUDE.md), so it's intentional, not a bug — but it does mean --update-skip-robots-check=false or --update-skip-robots-check false would silently resolve to true if a caller ever tried that form. Might be worth a one-line doc note on the flag's help text making clear it doesn't accept a value, if it doesn't already.

Minor doc-drift (not introduced incorrectly by this PR, but not corrected either): Examples/CelestraCloud/CLAUDE.md's "Configuration Key Mapping" section still documents internal keys as dot+underscore (update.skip_robots_check), but ConfigurationKeys.swift now uses dot+dash (update.skip-robots-check) per StandardNamingStyle. Not user-facing (CLI flags and env vars derived from it are unchanged), but worth a follow-up doc touch-up so the internal key convention described there doesn't mislead future contributors.

Packages/ConfigKeyKit removal

This is a full deletion of the vendored git-subrepo, not an accidental drop — confirmed the three example apps (BushelCloud, CelestraCloud, MistDemo) all switch their Package.swift dependency from the local path (../../Packages/ConfigKeyKit / path:) to the external https://github.com/brightdigit/ConfigKeyKit.git pinned at 1.0.0-beta.2, with matching Package.resolved pins. Clean graduation of the package to its own repo.

CI (MistKit.yml)

The new windows-2025 matrix exclusion for Swift 6.1/6.2 has a clear inline comment explaining the root cause (MSVC 14.51 STL requires Clang 20+, but those toolchains ship Clang 19 → STL1000 via swift-crypto's CCryptoBoringSSL). Good — this is exactly the kind of non-obvious constraint CLAUDE.md asks comments to capture. The scheme: ${{ env.PACKAGE_NAME }}-Package removals across three workflow files look like they track an upstream default change in brightdigit/swift-build@v1; I can't verify that action's behavior from this repo, but the change is consistent across all call sites so it's not a partial/inconsistent edit.

Nothing blocking

No security concerns found (no new network/auth code paths, no secrets touched — CommandLineArgumentsProvider's secretsSpecifier for cloudkit-key-id/cloudkit-private-key-path is preserved). No test coverage regressions; the FieldValue tests actually got stronger. The one item worth a maintainer glance is the stale key-naming convention in Examples/CelestraCloud/CLAUDE.md, but it's cosmetic.

leogdion and others added 3 commits July 1, 2026 11:48
Signing into the web demo triggers Apple's macOS trusted-device
two-factor prompt. Clicking Allow is supposed to display a 6-digit
code for the idmsa.apple.com window, but macOS sometimes fails to
show the code modal, stalling sign-in. This is Apple/macOS behavior
(CloudKit JS owns the challenge; MistDemo only captures the resulting
token), not a MistDemo/MistKit bug.

Add a Troubleshooting subsection to the Web section of the MistDemo
README documenting the symptom and the reliable "Get Verification
Code" workaround via System Settings.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…View (#419)

NoteEditView and RecordDetailView mix non-private stored inputs with
@State private / @Environment private state. Swift derives the synthesized
memberwise initializer's access level from the most restrictive stored
property, dropping the init to private. Both views are constructed from other
files (QueryView.swift, RecordDetailView.swift), so under Swift 6.3.2 the
compiler reports "cannot be constructed because it has no accessible
initializers" (plus cascade errors inferring Mode for .create/.edit).

Add an explicit internal init to each view exposing only the externally-set
properties, mirroring CompositionDisclosure. RecordDetailView seeds its
@State note through State(initialValue:). No call sites change.

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

claude Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review: V1.0.0 beta.3 (release-consolidation branch)

This PR bundles several already-separately-reviewed changes into the beta.3 release branch (164 files, ~9.8k/-3.7k additions/deletions). I focused on the substantive, non-mechanical changes; CI-matrix tweaks, license-header year bumps, .gitrepo/Package.resolved bumps, and docs-only additions were spot-checked but not deep-reviewed.

Code quality & best practices

  • Solid. The CloudKitService+Operations.swift / +WriteOperations.swift split into +Operations+Deprecated.swift and +RecordWriteConvenience.swift (commit 'Add documented request options to query/modify/changes', Add documented request options to query/modify/changes (#383 #384 #385) #412) is clean: old overloads are moved verbatim into the deprecated file with correct @available(*, deprecated, message:) annotations, and each deprecated overload delegates to the new implementation with nil defaults for the new params (zoneWide, numbersAsStrings, desiredKeys, desiredRecordTypes, zoneID) — so there is no silent behavior change for existing callers.
  • The FieldValue+Codable.swift cyclomatic-complexity refactor (encodeValue -> encodeScalar/encodeComplex) is a good simplification with a fail-loud default branch in encodeComplex, matching the codebase's existing fail-loud philosophy, and lands with genuinely new test coverage (round-trip cases + explicit .date/.bytes wire-shape assertions) rather than just refactoring untested code.
  • Sources/MistKitOpenAPI/Types.swift changes trace 1:1 to the corresponding openapi.yaml schema additions (matching doc comments, init params, CodingKeys) — looks correctly regenerated rather than hand-edited, consistent with the CLAUDE.md rule against manually touching generated code.
  • The windows-2025 CI matrix exclude (Swift 6.1/6.2 skipped due to the MSVC 14.51/Clang-20 STL assertion) is well-commented and syntactically correct against the existing runs-on x swift{version,build} matrix shape.
  • ConfigKeyKit de-vendoring (local subrepo -> remote package pin at 1.0.0-beta.2) is mechanically consistent across all three example manifests, with the now-dead setup-configkeykit workflow steps cleanly removed.

Potential bugs / gaps

  • Minor: queryAllRecords (the auto-paginating convenience) wasn't updated to accept the new zoneWide/numbersAsStrings options that its sibling primitive queryRecords just gained. Per the codebase's own primitive+convenience pairing pattern documented in CLAUDE.md, these two should probably stay in sync — worth a follow-up if not intentional.
  • Test gap: MistDemoConfiguration.optionalBool(forKey:) — the new parsing primitive backing zoneWide/numbersAsStrings/etc. flag detection — has no direct unit test. The new QueryConfigTests+RequestOptions.swift / ModifyConfigTests.swift / FetchChangesConfigTests.swift all exercise the memberwise init, not the init(configuration:base:) CLI/env-parsing path, so a regression in 'flag present vs. absent' detection wouldn't be caught by CI.
  • Test gap: Examples/CelestraCloud/Sources/CelestraCloudKit/Configuration/ConfigurationLoader.swift has no dedicated test file post-refactor (only the plain data structs it populates are tested); the CLI->ENV fallback logic and credential-path handling (--cloudkit-key-id, --cloudkit-private-key-path) are untested.

Security

  • No credentials, tokens, or secrets appear in the diff. ConfigurationLoader's handling of key/secret paths looks consistent with existing patterns (paths and env var names, not raw secret values, are what's logged/stored) — but see the test-gap note above, since that logic is currently unverified by tests.

Everything else checked and clean
ModifyConfig's public import Foundation (vs. siblings' internal import Foundation) is correctly justified — its public parseOperations(from data: Data) API genuinely exposes Data in its signature, unlike QueryConfig/FetchChangesConfig. The Swift 6.3.2 explicit-init fix for NoteEditView/RecordDetailView (access-level-inference-from-most-restrictive-stored-property issue) correctly resolves the build error without changing call sites. New request-options tests (CloudKitServiceTests.RequestOptions.swift) assert on actual decoded JSON request-body shape rather than just mock-success, which is good coverage discipline.

Net: no blockers. The two test-coverage gaps above are worth a follow-up (either in this PR or a fast-follow), but nothing here should hold up the beta.3 release.

@leogdion leogdion marked this pull request as ready for review July 1, 2026 19:58
@claude

claude Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review of #408 (v1.0.0-beta.3)

This is a large release-branch merge (13 squashed PRs plus vendored Examples//Packages/ subrepo syncs). I focused the review on the core Sources/MistKit, Sources/MistKitOpenAPI, Tests/MistKitTests, and openapi.yaml changes, since the Examples//Packages/ trees are vendored via .gitrepo and largely out of scope for a MistKit-focused review.

Overall

Solid, well-organized work. Highlights:

Minor / non-blocking notes

  1. queryRecords still hardcodes zoneID: .init(zoneName: "_defaultZone") (CloudKitService+Operations.swift) even after this PR adds zoneWide. There's still no way to target a specific non-default zone via queryRecords — only default-zone or (with zoneWide: true) all zones. This predates the PR (tracked separately per the existing MistDemo QueryCommand comment referencing Feature: Add pagination support with continuation markers for query results #145/Feature: Add custom CloudKit zone support for queries #146), but worth double-checking against CloudKit's wire semantics: does sending both a zoneID and zoneWide: true in the same request body work as expected, or does CloudKit expect zoneID omitted when zoneWide is set? Might be worth a quick verification against webservices.md or a live call, since right now every zoneWide: true request also carries a _defaultZone zoneID.
  2. .github/workflows/MistDemo.yml: the added -Xswiftc -disable-batch-mode WASM flag has no accompanying explanation in the diff/commit — a short comment or commit message noting why it was needed (flaky batch-mode build under wasm-swift?) would help future maintainers avoid re-removing it.
  3. The throwing default branch in encodeComplex(to:) (FieldValue+Codable.swift) is explicitly documented as untested/defensive-only (guards against a future FieldValue case added without routing). That's a reasonable call given the exhaustiveness argument in the comment, just flagging it as an intentional coverage gap rather than an oversight.

Security / performance

No concerns — no new network surfaces, no injection vectors, commaSeparatedList/optionalBool config parsing is straightforward string handling, and the new options are all opt-in (nil by default, omitted from the wire unless set).

Test coverage

Strong. New/changed behavior (complex-type mismatch throwing, encode refactor, all three new request-option surfaces) all have both unit tests (mock-transport body inspection) and live-integration-test phases. Nice touch: the integration phases explicitly handle propagation lag (schema indexing, change-feed lag) as non-fatal rather than flaking the suite.

leogdion and others added 2 commits July 1, 2026 17:13
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Delete docs/transcriptions/ — the same dry-run transcript in five
renderings (.txt/.vtt/.srt + paragraphs.json/timestamps.json, ~1.3MB
of raw transcription-tool output). Durable talk feedback already lives
in talk-feedback.md; drop its now-dangling raw-transcript link.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@leogdion leogdion merged commit 5a58120 into main Jul 9, 2026
1 of 2 checks passed
@leogdion leogdion deleted the v1.0.0-beta.3 branch July 10, 2026 17:19
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