Conversation
This commit adds two CloudKit sync workflows for development and production environments: - `.github/workflows/cloudkit-sync-dev.yml` - Development environment sync - Scheduled sync: 3x daily (02:17, 10:43, 18:29 UTC) - Manual trigger via workflow_dispatch - Automatic trigger after binary build completes - Exports artifacts with CloudKit data and Markdown summaries - `.github/workflows/cloudkit-sync-prod.yml` - Production environment sync - Scheduled sync: 2x daily (06:23, 14:47 UTC) - Manual trigger via workflow_dispatch - Production-only secrets - `.github/actions/cloudkit-sync/action.yml` - Reusable composite action - Handles artifact download with fallback build strategy - PEM validation and authentication setup - CloudKit sync execution with verbose logging - JSON export and Markdown summary generation Key features: - Manual workflow dispatch enabled for both environments - Randomized cron schedules to avoid GitHub Actions traffic spikes - 90-day artifact retention with build fallback - VirtualBuddy TSS API integration for signing status 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* docs: add gradual migration plan for moving code to BushelKit - 7-week phased approach with BushelCloudData intermediate target - Deprecation warnings and incremental migration strategy - Complete implementation details for each phase * docs: update migration plan to use BushelKit v3.0.0-alpha.2 - Change target version from v3.1.0 to v3.0.0-alpha.2 - Update all version references throughout migration plan (7 locations) - Maintain alpha release within v3.0.0 series 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * refactoring modules * fix: resolve compilation errors by using MistKit's CloudKitRecord protocol This commit fixes all compilation errors by addressing the duplicate CloudKitRecord protocol definition and missing imports. Changes: - Remove duplicate CloudKitRecord protocol in BushelCloudKit - Project now uses MistKit's CloudKitRecord protocol exclusively - All extensions already conform to the complete protocol (Codable, Sendable, recordName) - Fix SyncEngine DataSourcePipeline initialization - Remove invalid cloudKitService parameter - DataSourcePipeline constructor only takes configuration parameter - Add missing BushelCloudData imports to all CLI commands - Required for types like RestoreImageRecord, DataSourceMetadata, FetchConfiguration, ConsoleOutput The root cause was a duplicate CloudKitRecord protocol definition that conflicted with MistKit's version. MistKit's protocol requires Codable, Sendable conformance and a recordName property, while the local duplicate did not. This caused the compiler to see types as not conforming to the protocol that MistKit's generic methods required. Build now succeeds with only deprecation warnings (types moving to BushelKit in future release). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: add missing BushelCloudData imports to test files All test files were missing the BushelCloudData import, causing compilation errors when trying to access types like RestoreImageRecord, XcodeVersionRecord, SwiftVersionRecord, FetchConfiguration, DataSourceMetadata, and ConsoleOutput. Changes: - Add @testable import BushelCloudData to all test files - Tests now compile and pass successfully Test results: 122 tests in 20 suites all passing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * git subrepo clone --branch=bushelcloud git@github.com:brightdigit/BushelKit.git Packages/BushelKit subrepo: subdir: "Packages/BushelKit" merged: "f811a28" upstream: origin: "git@github.com:brightdigit/BushelKit.git" branch: "bushelcloud" commit: "f811a28" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "e8b7739de9" * feat: migrate selected BushelCloudData code from BushelCloud Add models, core fetchers, and utilities from BushelCloud's deprecated BushelCloudData target (20 files) to BushelFoundation and BushelUtilities. BushelFoundation (19 files): - Models (4): RestoreImageRecord, XcodeVersionRecord, SwiftVersionRecord, DataSourceMetadata - Configuration (1): FetchConfiguration - DataSources (14): - DataSourcePipeline with deduplication logic - DataSourceFetcher protocol, HTTPHeaderHelpers - AppleDBFetcher + AppleDB support (9 files) - MESUFetcher, XcodeReleasesFetcher BushelUtilities (2 files): - FormattingHelpers, ConsoleOutput Note: BushelHub is deprecated. Web scraping fetchers (IPSWFetcher, MrMacintoshFetcher, SwiftVersionFetcher, TheAppleWikiFetcher) remain in BushelCloud. * refactor: remove DataSourcePipeline from BushelFoundation [skip ci] DataSourcePipeline orchestrates all fetchers including web scraping ones that depend on SwiftSoup/IPSWDownloads. Keep it in BushelCloud's BushelCloudData target instead of migrating to BushelKit. * refactor: migrate to local BushelKit subrepo [skip ci] - Use local path dependency (Packages/BushelKit) - Add BushelFoundation and BushelUtilities to BushelCloudKit - Add BushelFoundation to BushelCloudData for model access - Remove BushelCloudData from BushelCloudCLI (deprecated) - Keep IPSWDownloads/SwiftSoup for remaining fetchers * refactor: cleanup BushelCloudData after migration [skip ci] Removed 20 files migrated to BushelKit: - Models (4): RestoreImageRecord, XcodeVersionRecord, SwiftVersionRecord, DataSourceMetadata - Configuration (1): FetchConfiguration - DataSources (13): DataSourceFetcher, HTTPHeaderHelpers, MESUFetcher, XcodeReleasesFetcher, AppleDB/* - Utilities (2): FormattingHelpers, ConsoleOutput Kept 8 web scraping fetchers: - IPSWFetcher, MrMacintoshFetcher, SwiftVersionFetcher, TheAppleWikiFetcher - TheAppleWiki support files Updated all remaining files to import BushelFoundation for model types. * refactor: update BushelCloudKit for BushelFoundation migration [skip ci] - Replace BushelCloudData imports with BushelFoundation - Add BushelUtilities import for FormattingHelpers/ConsoleOutput - Delete custom CloudKitRecord protocol (use MistKit's instead) - Add recordName property to CloudKitRecord extensions - Change BushelCloudData import to public in SyncEngine - Qualify ConsoleOutput calls to avoid ambiguity Note: Build errors remain due to incomplete migration, will be fixed in follow-up. * refactor: update BushelCloudCLI for migration [skip ci] - Qualify ConsoleOutput calls with full module path - Remove direct BushelCloudData dependency (now via BushelCloudKit) Note: Build errors remain, will be fixed in follow-up. * fixing some compilation errors [skip ci] * fixing dependencies * fixing builds and tests * git subrepo push Packages/BushelKit subrepo: subdir: "Packages/BushelKit" merged: "eef7536" upstream: origin: "git@github.com:brightdigit/BushelKit.git" branch: "bushelcloud" commit: "eef7536" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "1383417817" * Update BushelCloud.yml * Update BushelCloud.yml * moving fetchers back to BushelCLoudKit * git subrepo push Packages/BushelKit subrepo: subdir: "Packages/BushelKit" merged: "d0695b2" upstream: origin: "git@github.com:brightdigit/BushelKit.git" branch: "bushelcloud" commit: "d0695b2" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "1383417817" * Fixing Ubunutu tests * Fix BushelKit subrepo parent commit reference * git subrepo pull (merge) Packages/BushelKit subrepo: subdir: "Packages/BushelKit" merged: "15cb101" upstream: origin: "git@github.com:brightdigit/BushelKit.git" branch: "bushelcloud" commit: "3487928" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "e8b7739de9" * git subrepo push --force Packages/BushelKit subrepo: subdir: "Packages/BushelKit" merged: "3255ba9" upstream: origin: "git@github.com:brightdigit/BushelKit.git" branch: "bushelcloud" commit: "3255ba9" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "e8b7739de9" * Change downloadURL from String to URL type in all record models Update RestoreImageRecord, XcodeVersionRecord, and SwiftVersionRecord to use URL instead of String for downloadURL fields. This improves type safety and prevents invalid URLs at compile time. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Add FieldValue+URL extension and update all fetchers for URL type - Create FieldValue+URL extension following MistKit's boolean pattern - Update all CloudKit extensions to use FieldValue(url:) and .urlValue - Update all fetchers to construct URL objects with validation - Update all test fixtures to use URL type - Add comprehensive FieldValue+URL tests (15 tests) All 137 tests passing. Type safety improved - invalid URLs caught at compile time instead of runtime. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * git subrepo push Packages/BushelKit subrepo: subdir: "Packages/BushelKit" merged: "674acc0" upstream: origin: "git@github.com:brightdigit/BushelKit.git" branch: "bushelcloud" commit: "674acc0" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "e8b7739de9" * Address PR review comments: remove duplicate, add documentation - Remove duplicate FormattingHelpers from BushelCloudKit - Add comprehensive BushelKit architecture documentation to CLAUDE.md - Add git subrepo workflow and type design decisions to CLAUDE.md - Add BushelKit integration section to README.md - Enhance code documentation for fileSize fields Addresses review comments from: - User review on brightdigit/BushelKit#122 - Claude bot review on #5 All tests passing (137 tests in 21 suites) * git subrepo push Packages/BushelKit subrepo: subdir: "Packages/BushelKit" merged: "eb5bb24" upstream: origin: "git@github.com:brightdigit/BushelKit.git" branch: "bushelcloud" commit: "eb5bb24" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "1383417817" * Replace FormattingHelpers with FormatStyle-based Formatters - Add modern FormatStyle properties to Formatters enum (dateFormat, dateTimeFormat, fileSizeFormat) - Replace FormattingHelpers static methods with Swift's modern .formatted() API - Update and rename FormattingHelpersTests to FormattersTests - Remove deprecated FormattingHelpers utility class 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * git subrepo push Packages/BushelKit subrepo: subdir: "Packages/BushelKit" merged: "6968872" upstream: origin: "git@github.com:brightdigit/BushelKit.git" branch: "bushelcloud" commit: "6968872" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "e8b7739de9" * Fix BushelKit unit test build issues - Remove duplicate FormattersTests.swift from BushelUtlitiesTests - Merge formatter tests into BushelFoundationTests where they belong - Update test expectations for ByteCountFormatStyle output format - Fix URL type usage in RestoreImageRecordTests (use URL instead of String) - Fix URL type usage in XcodeVersionRecordTests (use URL instead of String) - Fix URL type usage in SwiftVersionRecordTests (use URL instead of String) All 129 BushelKit tests now pass successfully. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Replace FormattingHelpers with FormatStyle-based Formatters - Update DataSourceMetadata+CloudKit to use Formatters.dateTimeFormat - Update XcodeVersionRecord+CloudKit to use Formatters.dateFormat and fileSizeFormat - Update RestoreImageRecord+CloudKit (no FormattingHelpers usage) - Update SwiftVersionRecord+CloudKit (no FormattingHelpers usage) Fixes compilation errors after FormattingHelpers was removed in commit 991a95a. All 137 BushelCloud tests pass successfully. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * git subrepo push Packages/BushelKit subrepo: subdir: "Packages/BushelKit" merged: "b28ba54" upstream: origin: "git@github.com:brightdigit/BushelKit.git" branch: "bushelcloud" commit: "b28ba54" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "e8b7739de9" * git subrepo pull Packages/BushelKit subrepo: subdir: "Packages/BushelKit" merged: "9224ceb" upstream: origin: "git@github.com:brightdigit/BushelKit.git" branch: "bushelcloud" commit: "9224ceb" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "1383417817" * fixing BushelKit updates * Fix BushelKit subrepo parent reference * fixing Linux builds * Removing SubRepo --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
* feat: add VirtualBuddy TSS signing status verification (#1) Integrates tss.virtualbuddy.app to verify real-time signing status of macOS restore images. VirtualBuddy signing status is treated as authoritative (same priority as MESU) and enriches existing images with TSS verification results. - Add BushelVirtualBuddy dependency from BushelKit - Implement VirtualBuddyFetcher with enrichment pattern - Update merge logic to treat VirtualBuddy as authoritative source - Add VIRTUALBUDDY_API_KEY environment variable support - Graceful degradation when API key unavailable 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat: add VIRTUALBUDDY_API_KEY to .env.example and Xcode setup script - Add VIRTUALBUDDY_API_KEY documentation to .env.example - Create Scripts/add-env-to-scheme.sh to sync .env to Xcode scheme - Script handles paths with spaces and creates automatic backups - Skips existing variables to avoid duplicates 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fixing env vars * fix: add missing sourceUpdatedAt field to RestoreImage schema Resolves sync failure where all 243 RestoreImage records were failing. The field was being written by RestoreImageRecord+CloudKit.swift but was missing from the CloudKit schema definition, causing CloudKit to reject all records with unknown field errors. This field is critical for the deduplication logic that determines which data source has the freshest information when merging records from multiple sources (ipsw.me, AppleDB, MESU, etc.). Also includes documentation updates for VirtualBuddy API key configuration. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: add rate limiting for VirtualBuddy TSS API requests Implements random delays (2.5-5.0 seconds) between VirtualBuddy API requests to respect the 2 requests per 5 seconds rate limit. Also adds progress tracking to show sync status during the ~3 minute enrichment phase. - Random delay between 2.5-5.0 seconds prevents HTTP 429 errors - Progress counter shows X/Y images being checked - Only delays between requests, skips delay after last image - Acceptable for scheduled syncs (every 8-16 hours) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: add comprehensive VirtualBuddy TSS API documentation to CLAUDE.md Documents the VirtualBuddy API integration including: - API endpoint, board config, and response fields - Rate limits (2 req/5 sec) and 12-hour server cache - HTTP status codes and error handling - Client-side rate limiting implementation (2.5-5.0s random delays) - Deduplication priority (authoritative source for isSigned) - Example JSON responses for signed and unsigned builds Based on TSSBuddy.pdf API documentation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * refactor: improve VirtualBuddy fetcher logging and rate limiting - Streamline logging to show only results (signed/unsigned status or errors) - Add visual status indicators (✅/❌) for signing status - Include progress counter in all log messages for consistency - Refine random delay to 2.5-3.5 seconds with 1-second tolerance - Remove obsolete add-env-to-scheme.sh script - Update CLAUDE.md to reflect improved timing and performance 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: address PR review comments for VirtualBuddy integration - Add VirtualBuddy to documentation data sources lists - Update deduplication rules to show VirtualBuddy as authoritative source - Remove duplicate VirtualBuddy section from .env.example - Update CLOUDKIT_KEY_FILE to CLOUDKIT_PRIVATE_KEY_PATH in CLAUDE.md - Remove unused OSVer import from VirtualBuddyFetcher.swift - Fix summary message to show accurate enriched count - Clarify schema system fields documentation Addresses review feedback from PR #9 (CodeRabbit and Claude Code reviewers) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * refactor: reduce force unwraps in VirtualBuddyFetcher using static base URL Replace per-request URLComponents initialization with a static base URL: - Add static baseURLComponents property (single force unwrap at type load) - Copy base components for each request instead of parsing URL repeatedly - Improves performance and reduces force unwrap occurrences from N to 1 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fixing a few linux issues * fix: resolve PR #9 review comments and complete test/linting fixes This commit addresses all remaining issues for PR #9 (VirtualBuddy TSS integration): Critical PR Review Fixes: - Fix VirtualBuddy test isolation by wrapping all tests in serialized suite - Fix date parsing fallback in MrMacintoshFetcher (skip invalid dates with warning) - Fix devcontainer name mismatch (6.2 → 6.3) - Fix format specifier escaping in header.sh - Fix FieldValueURLTests invalid URL assertions - Fix MockRecordInfo to use errorCode and reason parameters Linting Fixes (LINT_MODE=STRICT): - Replace force unwraps with guard statements in IPSWFetcher and TheAppleWikiFetcher - Fix naming conventions (sha2_256 → sha2256, BuildVersion → buildVersion, etc.) - Remove unused code: RestoreInfo struct, FetchError enum, queryDataSourceMetadata - Remove unused imports from 5 files - Mark unused parameters with underscore Test Results: - All 160 tests passing (100%) - All 23 VirtualBuddy tests now passing with serialized execution - Ready for PR approval 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
|
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 You can disable this status message by setting the 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 #20 - v0.0.1 subrepo prepSummaryThis PR updates the ✅ Strengths
🔍 Observations
|
No description provided.