Repository navigation
ci: allow the iOS workspace SwiftPM lockfile in the resolved-policy check - #8191
azooz2003-bit wants to merge 1 commit into
Conversation
…heck #8180 committed ios/cmux.xcworkspace/xcshareddata/swiftpm/Package.resolved, but check-package-resolved-policy.py only recognized the macOS project's workspace lockfile, so workflow-guard-tests fails on main and on every branch cut from it ("Unexpected cmux Package.resolved location"). It went unnoticed because PR CI is currently disabled for the advisory experiment. The iOS workspace is a cmux-owned Xcode workspace whose resolution should be tracked at exactly that fixed location, matching the policy's intent that resolution changes stay visible in PR diffs. Generalize the expected-location check to a tuple of workspace lockfiles and add the iOS one. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe package resolution policy now recognizes both the existing project-level and additional workspace-level Xcode ChangesWorkspace Package.resolved validation
Estimated code review effort: 1 (Trivial) | ~3 minutes 🚥 Pre-merge checks | ✅ 25✅ Passed checks (25 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Greptile SummaryThis PR fixes a CI breakage introduced by PR #8180, which committed the iOS workspace lockfile at
Confidence Score: 4/5Safe to merge; the change is a targeted one-line fix to a CI policy script with no production runtime impact. The fix is correct and minimal—the tuple membership check works as intended, and scripts/check-package-resolved-policy.py — the Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[tracked_lockfiles from git ls-files] --> B{is_allowed_vendor_path?}
B -- yes --> C[skip]
B -- no --> D{is_expected_lockfile_path?}
D -- yes: lockfile in WORKSPACE_PACKAGE_RESOLVED --> E[pass]
D -- yes: has_skipped_part --> F[skip]
D -- yes: parent in Package.swift roots --> E
D -- no --> G[error: Unexpected Package.resolved location]
subgraph WORKSPACE_PACKAGE_RESOLVED
WR1["cmux.xcodeproj/project.xcworkspace/.../Package.resolved"]
WR2["ios/cmux.xcworkspace/.../Package.resolved NEW"]
end
D --> WORKSPACE_PACKAGE_RESOLVED
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[tracked_lockfiles from git ls-files] --> B{is_allowed_vendor_path?}
B -- yes --> C[skip]
B -- no --> D{is_expected_lockfile_path?}
D -- yes: lockfile in WORKSPACE_PACKAGE_RESOLVED --> E[pass]
D -- yes: has_skipped_part --> F[skip]
D -- yes: parent in Package.swift roots --> E
D -- no --> G[error: Unexpected Package.resolved location]
subgraph WORKSPACE_PACKAGE_RESOLVED
WR1["cmux.xcodeproj/project.xcworkspace/.../Package.resolved"]
WR2["ios/cmux.xcworkspace/.../Package.resolved NEW"]
end
D --> WORKSPACE_PACKAGE_RESOLVED
|
|
Superseded: main got a fuller rework of check-package-resolved-policy.py that accepts the iOS workspace lockfile (verified passing on a current checkout). Closing in favor of that. |
workflow-guard-testsfails on current main (and every branch cut from it) withUnexpected cmux Package.resolved location: ios/cmux.xcworkspace/xcshareddata/swiftpm/Package.resolved. #8180 committed that iOS workspace lockfile, butcheck-package-resolved-policy.pyonly recognized the macOS project's workspace lockfile. It slipped through because PR CI is disabled during the advisory experiment; found while dispatching CI for #8186.The iOS workspace is a cmux-owned Xcode workspace whose resolution should be tracked at exactly that fixed location (same intent as the macOS lockfile: resolution changes visible in PR diffs), so the fix generalizes the expected-location check to a tuple of workspace lockfiles and adds the iOS one.
python3 scripts/check-package-resolved-policy.pygoes red -> green on this branch.🤖 Generated with Claude Code
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by cubic
Allows the iOS workspace SwiftPM
Package.resolvedpath incheck-package-resolved-policy.pyto stopworkflow-guard-testsfailures. Extends the lockfile policy to cover both macOS and iOS cmux-owned workspaces.ios/cmux.xcworkspace/xcshareddata/swiftpm/Package.resolved.Written for commit 4355072. Summary will update on new commits.
Summary by CodeRabbit