[M0] Foundation clean-room baseline#34
Conversation
|
Warning Review limit reached
More reviews will be available in 45 minutes and 38 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe PR establishes the M0 Xcode foundation for LinguistMac, transitioning from Swift Package Manager to a native Xcode project, and introducing core domain models, service protocols, test infrastructure, and clean-room governance documentation. Package.swift is removed; LinguistMac.xcodeproj becomes canonical. ChangesM0 foundation and clean-room baseline
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
@codex review |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/clean-room-rules.md`:
- Around line 49-57: Update the PR checklist entry currently phrased as "Which
public/product source describes that behavior?" to require an immutable
provenance citation: mandate a URL plus accessed date and, when available, a
version/tag/commit identifier (or other immutable snapshot) and include an
example format; change the checklist line and any related question text in
docs/clean-room-rules.md to explicitly require "URL + accessed date +
version/tag/commit (or immutable snapshot)" and add a short note or template
showing the expected citation format for auditability.
In `@docs/reference-feature-inventory.md`:
- Around line 3-5: The inventory currently cites an inspection date but not the
exact artifacts; update the text that references `Peerapat-J/translateOnScreen`
and the inspection date (2026-06-04) to include immutable source references—add
the repository URL plus the specific release tag or commit SHA (and optional
release archive URL) you inspected so the record is reproducible and auditable;
ensure the same change appears where the repository name is mentioned in
docs/reference-feature-inventory.md and keep the original inspection date
alongside the added URL and tag/SHA.
In `@LinguistMac.xcodeproj/project.pbxproj`:
- Around line 349-399: The project-level build configurations (entries
B70000000000000000000002 "Debug" and B70000000000000000000003 "Release")
hard-pin ARCHS = arm64 in their buildSettings, which forces all targets to arm64
and breaks xcodebuild on Intel hosts; remove the ARCHS = arm64 override (or set
ARCHS to the default/standard architectures, e.g. "$(ARCHS_STANDARD)" or simply
delete the ARCHS key) from those XCBuildConfiguration blocks so targets inherit
normal architecture settings instead of being forced to arm64.
In `@Tests/LinguistMacCoreTests/ServiceMocksTests.swift`:
- Around line 6-77: Add a failing orchestration-path test that mirrors
testServicesCanDriveMockTranslationFlow but makes one service fail and asserts
the flow surfaces that failure: create a TranslationRequest, build
LinguistServices where one stub returns a failure (e.g.,
StubScreenCaptureService(result: .failure(MockError.some)) or a
StubTranslationProvider configured to throw on translate), then call the same
orchestration methods (services.screenCapture.captureSelection(),
services.ocr.recognizeText(...), services.translatorRegistry.provider(...),
translator.translate(request)) and assert the expected throw using
XCTAssertThrowsError; reference the existing
testServicesCanDriveMockTranslationFlow, StubScreenCaptureService,
StubOCRService, StubTranslationProvider, captureSelection, recognizeText,
provider(for:), and translate to locate where to add the new failing test.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 79c04d3f-7631-4c59-a2e6-ea4bae1af0f4
📒 Files selected for processing (27)
.github/workflows/ci.ymlConfiguration/LinguistMac/Info.plistConfiguration/LinguistMac/LinguistMac.entitlementsLinguistMac.xcodeproj/project.pbxprojLinguistMac.xcodeproj/xcshareddata/xcschemes/LinguistMac.xcschemePackage.swiftSources/LinguistMacCore/AppFeature.swiftSources/LinguistMacCore/AppIdentity.swiftSources/LinguistMacCore/AppSettings.swiftSources/LinguistMacCore/LinguistServices.swiftSources/LinguistMacCore/Permissions.swiftSources/LinguistMacCore/ServiceProtocols.swiftSources/LinguistMacCore/TranslationModels.swiftTests/LinguistMacCoreTests/AppFeatureTests.swiftTests/LinguistMacCoreTests/AppIdentityTests.swiftTests/LinguistMacCoreTests/AppSettingsTests.swiftTests/LinguistMacCoreTests/PermissionBaselineTests.swiftTests/LinguistMacCoreTests/ServiceMocks.swiftTests/LinguistMacCoreTests/ServiceMocksTests.swiftTests/LinguistMacCoreTests/TranslationModelsTests.swiftdocs/app-identity-permissions.mddocs/ci-cd.mddocs/clean-room-rules.mddocs/contribution-notes.mddocs/parity-roadmap.mddocs/reference-feature-inventory.mdscript/build_and_run.sh
💤 Files with no reviewable changes (1)
- Package.swift
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 90ba558668
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b5453ec12
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
Implement the M0 foundation baseline for the clean-room LinguistMac rewrite, with
LinguistMac.xcodeprojas the canonical project entrypoint.This PR intentionally keeps the open M0 issues together because they are one reviewable foundation slice: clean-room docs, core architecture boundaries, test/mocking baseline, and app identity/permission posture. Commits are split by issue or review/correction so review can still inspect each concern separately.
Scope
LinguistMacCorestatic library, andLinguistMacCoreTestsunit test targets.LinguistServicesas the first dependency container for future feature implementation.Info.plist, sandbox entitlement baseline, and permission posture docs.xcodebuild -project LinguistMac.xcodeproj.Base Branch Note
The requested
devbranch does not exist on the remote. The repository default branch ismain, so this branch was created from the latestorigin/main.Clean-Room Notes
Commits
bbb12a0Document clean-room M0 baseline22bcf6aAdd M0 core architecture boundaries0941024Add M0 service mocks and tests725e282Add M0 app identity and permissions baseline2a10df8Format M0 service mock importsde558a7Fix M0 SwiftLint analyzer import finding90ba558Convert M0 baseline to Xcode projectValidation
git diff --checkrg -n "SwiftPM|Swift Package|Package\\.swift|swift build|swift test|LinguistMac-Package" . --glob "!/.git/**" --glob "!/.build/**" --glob "!dist/**"returned no matchesxcodebuild -list -project LinguistMac.xcodeprojswiftlint lint --strict --no-cacheswiftformat --lint . --config .swiftformat --cache ignoreplutil -lint Configuration/LinguistMac/Info.plist Configuration/LinguistMac/LinguistMac.entitlementsbash -n script/build_and_run.shxcodebuild -project LinguistMac.xcodeproj -scheme LinguistMac -configuration Debug -destination "platform=macOS" -derivedDataPath /private/tmp/linguistmac-xcode-debug CODE_SIGNING_ALLOWED=NO buildxcodebuild -quiet -project LinguistMac.xcodeproj -scheme LinguistMac -configuration Release -destination "platform=macOS" -derivedDataPath /private/tmp/linguistmac-xcode-release CODE_SIGNING_ALLOWED=NO buildxcodebuild -quiet -project LinguistMac.xcodeproj -scheme LinguistMac -configuration Debug -destination "platform=macOS" -derivedDataPath /private/tmp/linguistmac-xcode-debug-test CODE_SIGNING_ALLOWED=NO ENABLE_TESTABILITY=YES testxcodebuild -quiet -project LinguistMac.xcodeproj -scheme LinguistMac -configuration Release -destination "platform=macOS" -derivedDataPath /private/tmp/linguistmac-xcode-release-test CODE_SIGNING_ALLOWED=NO ENABLE_TESTABILITY=YES testxcodebuild -project LinguistMac.xcodeproj -scheme LinguistMac -configuration Debug -destination "platform=macOS" -derivedDataPath /private/tmp/linguistmac-swiftlint-xcode CODE_SIGNING_ALLOWED=NO clean build > /private/tmp/linguistmac-swiftlint-xcode.log 2>&1swiftlint analyze --strict --compiler-log-path /private/tmp/linguistmac-swiftlint-xcode.logxcodebuild -quiet -project LinguistMac.xcodeproj -scheme LinguistMac -configuration Debug -destination "platform=macOS" -derivedDataPath /private/tmp/linguistmac-xcode-strict CODE_SIGNING_ALLOWED=NO SWIFT_TREAT_WARNINGS_AS_ERRORS=YES GCC_TREAT_WARNINGS_AS_ERRORS=YES buildxcodebuild -quiet -project LinguistMac.xcodeproj -scheme LinguistMac -configuration Debug -destination "platform=macOS" -derivedDataPath /private/tmp/linguistmac-xcode-analyze CODE_SIGNING_ALLOWED=NO SWIFT_TREAT_WARNINGS_AS_ERRORS=YES GCC_TREAT_WARNINGS_AS_ERRORS=YES CLANG_ANALYZER_NONNULL=YES analyze./script/build_and_run.sh --packageplutil -extract CFBundleIdentifier raw dist/LinguistMac.app/Contents/Info.plistplutil -extract LSMinimumSystemVersion raw dist/LinguistMac.app/Contents/Info.plistCloses #2
Closes #3
Closes #5
Closes #6
Summary by CodeRabbit
New Features
Chores