Adopt configkeykit in celestracloud#406
Conversation
Replace the string-pair constants in ConfigurationKeys.swift with typed ConfigKey/OptionalConfigKey definitions, and collapse ConfigurationLoader's per-option `?? ...Env ?? default` fallback chains into generic read(_:) helpers that iterate ConfigKeySource.allCases (matching MistDemo/BushelCloud). Base keys use dashes throughout for consistency and conventional kebab-case CLI flags (e.g. --cloudkit-container-id, --update-skip-robots-check). ENV var names and defaults are unchanged; this also makes the loader's --cloudkit-key-id / --cloudkit-private-key-path secrets specifier match. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
subrepo: subdir: "Examples/CelestraCloud" merged: "e46bd41" upstream: origin: "git@github.com:brightdigit/CelestraCloud.git" branch: "mistkit" commit: "e46bd41" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "10a163ac12"
subrepo: subdir: "Examples/BushelCloud" merged: "b0c3985" upstream: origin: "git@github.com:brightdigit/BushelCloud.git" branch: "mistkit" commit: "b0c3985" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "10a163ac12"
The recorded parent abff797 was orphaned by the docs/ removal + beta.2 history rewrite. Reset to 2537f39 (a valid ancestor of HEAD) per git-subrepo's recovery guidance. ConfigKeyKit is already content-synced with upstream (no push/pull needed); this only repairs the parent pointer. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The ConfigKeyKit dependency uses a path that only resolves inside the MistKit monorepo (../../Packages/ConfigKeyKit). In CelestraCloud's standalone CI the package isn't present, so swift build failed with "the package at '.../Packages/ConfigKeyKit' cannot be accessed". Mirror BushelCloud: pair each setup-mistkit step with a setup-configkeykit step (brightdigit/ConfigKeyKit) which rewrites the local path dependency to the published https://github.com/brightdigit/ConfigKeyKit.git URL. Adds CONFIGKEYKIT_BRANCH=main to CelestraCloud.yml and update-feeds.yml. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
subrepo: subdir: "Examples/CelestraCloud" merged: "4a00a8c" upstream: origin: "git@github.com:brightdigit/CelestraCloud.git" branch: "mistkit" commit: "4a00a8c" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "10a163ac12"
…#405) The history rewrite that re-staged docs/ for beta.3 replaced the MistKit 'v1.0.0-beta.2' tag with '1.0.0-beta.2' (no v-prefix). setup-mistkit's `git ls-remote` then resolves nothing and falls back to a branch: pin, so SwiftPM fails with "could not find a branch named 'v1.0.0-beta.2'". Point MISTKIT_BRANCH (and codeql's hardcoded ref) at the tag that exists. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
subrepo: subdir: "Examples/CelestraCloud" merged: "bdc0dbf" upstream: origin: "git@github.com:brightdigit/CelestraCloud.git" branch: "mistkit" commit: "bdc0dbf" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "10a163ac12"
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Code Review — PR #406: Adopt ConfigKeyKit in CelestraCloudOverviewThis PR replaces the dual-string constant pattern ( The core logic change is small and well-targeted. Overall this is a clean refactor. What's Good
Issues / SuggestionsPotential bug —
|
| Category | Finding |
|---|---|
| Potential bug | Date read() may silently return nil — worth a targeted test |
| Design | ConfigKeySource.allCases ordering assumption undocumented |
| Design | Bool overload asymmetry — documented but visually surprising |
| Test coverage | No new tests for new read() generics (especially Bool and Date) |
| Minor | 5 near-identical overloads; section comment name stale |
The mechanical changes (copyright years, license headers, lint script) are correct. The ConfigKeyKit adoption is a clear improvement. The main asks before merge are a test confirming Date parsing works end-to-end, and a comment noting the allCases ordering dependency.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v1.0.0-beta.3 #406 +/- ##
================================================
Coverage ? 72.12%
================================================
Files ? 156
Lines ? 3698
Branches ? 0
================================================
Hits ? 2667
Misses ? 1031
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
After adopting ConfigKeyKit, several configuration types are no longer reachable: - Drop the deprecated, unused CelestraConfig.createCloudKitService() no-arg overload that read ProcessInfo env vars directly; all call sites use createCloudKitService(from:) via ConfigurationLoader. - Delete Errors/ConfigurationError.swift — only referenced by that deprecated method. - Delete Configuration/ConfigSource.swift — the ConfigSource enum was only referenced by EnhancedConfigurationError.source, which was never set non-nil; drop that property/parameter too. - Downgrade CelestraConfig's Foundation import to internal (no longer in a public signature). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
subrepo: subdir: "Examples/CelestraCloud" merged: "32138a8" upstream: origin: "git@github.com:brightdigit/CelestraCloud.git" branch: "mistkit" commit: "32138a8" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "10a163ac12"
Code Review: Adopt ConfigKeyKit in CelestraCloudOverviewThis PR migrates CelestraCloud's configuration system from parallel string constant pairs (one for CLI, one for env var) to typed What Works Well
Issues and Suggestions1. Implicit dependency on
|
No description provided.