plugin: consolidate Apple workspace alignment - #184
Conversation
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e3cbf5769e
ℹ️ 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".
| paths = [root / "repository-skills" / "skills" / "maintain-project-repo" / "scripts" / "run_workflow.py"] | ||
| version_root = root / "repository-skills" |
There was a problem hiding this comment.
Discover the sibling runner in the Hermes tap
In the checked-in Hermes export, this script lives at skills/bootstrap-xcode-workspace, while its companion runner lives at skills/maintain-project-repo; every candidate constructed here instead requires a repository-skills/skills/... plugin layout. Consequently, a non-dry-run create invoked from the supported Hermes tap generates part of the scaffold and then fails when maintain_project_repo_runner() raises. Add the sibling skill layout to the search paths.
AGENTS.md reference: AGENTS.md:L53-L55
Useful? React with 👍 / 👎.
| if not dry_run: | ||
| for destination, (content, executable) in planned.items(): | ||
| write(destination, content, executable) | ||
| subprocess.run(["git", "config", "core.hooksPath", ".githooks"], cwd=root, check=False) |
There was a problem hiding this comment.
Avoid configuring an enclosing Git repository
When a new product is created anywhere inside an existing Git worktree, the product root has not been initialized as its own repository yet, so this git config walks upward and writes core.hooksPath=.githooks into the enclosing repository. That silently redirects or disables the parent repository's hooks even though the command is bootstrapping a child product; defer this configuration until the new root is a Git repository, as just setup already promises to do.
Useful? React with 👍 / 👎.
| payload["validation_result"] = "skipped (--dry-run)" | ||
| print(json.dumps(payload, indent=2, sort_keys=True)) | ||
| return 0 | ||
| root.mkdir(parents=True) |
There was a problem hiding this comment.
Reuse an existing empty product directory
The preceding guard deliberately permits an already-existing empty product directory, but this unconditional mkdir then raises FileExistsError outside the exception handler. Thus --destination fails with a traceback whenever <destination>/<name> was pre-created but is empty, despite the documented contract blocking only non-empty roots; use exist_ok=True or create the directory only when absent.
AGENTS.md reference: AGENTS.md:L63-L65
Useful? React with 👍 / 👎.
| command -v swiftformat >/dev/null 2>&1 || { echo "SwiftFormat is required for commits." >&2; exit 1; } | ||
| command -v swiftlint >/dev/null 2>&1 || { echo "SwiftLint is required for commits." >&2; exit 1; } |
There was a problem hiding this comment.
Check staged Swift files before formatter prerequisites
On a machine without SwiftFormat or SwiftLint, this hook rejects every commit—including documentation-only commits—because it checks the tools before determining whether any Swift file is staged. just setup does not require either formatter, and the generated Xcode build scripts treat both as optional, so a user can complete setup successfully and then be unable to commit; perform the empty-file-list exit before these checks or make setup install/require the same tools.
AGENTS.md reference: AGENTS.md:L63-L65
Useful? React with 👍 / 👎.
| - explore-apple-swift-docs for Apple, Swift, or DocC documentation lookup | ||
| - swift-package-build-run-workflow, swift-package-testing-workflow, xcode-build-run-workflow, or xcode-testing-workflow for execution follow-through | ||
| - productivity-skills maintain-project-* workflows for general README, CONTRIBUTING, AGENTS, ROADMAP, ACCESSIBILITY, API, or architecture document edits | ||
| - documentation-skills maintain-project-* workflows for general README, CONTRIBUTING, AGENTS, ROADMAP, ACCESSIBILITY, API, or architecture document edits |
There was a problem hiding this comment.
Route steward findings to the surviving Xcode workflow
This edited routing block still sends Xcode app guidance findings to sync-xcode-project-guidance on line 23, but this commit deletes that skill and a repo-wide search finds no remaining implementation. Such findings therefore produce an unusable handoff; route them to bootstrap-xcode-workspace --operation align, matching the new consolidated workflow.
AGENTS.md reference: AGENTS.md:L63-L65
Useful? React with 👍 / 👎.
|
|
||
| versioned_plugin_root="$root/repository-skills" | ||
| if [[ -d "$versioned_plugin_root" ]]; then | ||
| for version_dir in "$versioned_plugin_root"/*; do |
There was a problem hiding this comment.
Prefer the newest cached repository-skills runner
When a Codex cache contains more than one version directory, shell glob order is ascending and the function returns the first executable runner, so an upgraded Apple skill can invoke an older repository-skills implementation or one that does not support the expected profile. Sort the version directories newest-first, as the new Python runner discovery already does, and cover a cache containing at least two versions.
Useful? React with 👍 / 👎.
Unifies Apple product bootstrap and existing-workspace alignment under
bootstrap-xcode-workspace, removes the retired app/bootstrap sync skills, and refreshes exports and documentation.Validation: Apple Dev tests, Repository Skills tests, Hermes export check, and Socket compatibility profile.