Skip to content

Homebrew 7 - #25

Merged
manuelgruber merged 7 commits into
mainfrom
C/Homebrew7
Sep 19, 2026
Merged

manuelgruber merged 7 commits into
mainfrom
C/Homebrew7

Conversation

@manuelgruber

@manuelgruber manuelgruber commented Sep 19, 2026

Copy link
Copy Markdown
Member

Rewrites the Homebrew cask's Ruby postflight block as declarative postflight_steps, which clears the cask audit warning and survives the steps sandbox's throwaway HOME by addressing files through base: :home / {{appdir}} and spelling launchctl paths as /Users/{{user}} (all launchctl and pluginkit calls stay best-effort, since the agent also loads at next login).

Bumps the workspace to 3.1.1 across Cargo.toml, crates/git-same-cli/Cargo.toml, tauri.conf.json, ui/package.json, and macos/GitSameBadges/Info.plist.

Picks up security-driven dependency bumps (postcss 8.5.28, devalue 5.9.2, actions/setup-node v7, action-gh-release 3.0.3) and adds a Dependabot ignore rule so minor/patch releases of taiki-e/install-action stop reopening the same PR every week, while major bumps still get one.

Summary by Sourcery

Prepare the 3.1.1 release with a sandbox-safe Homebrew cask migration and refreshed dependencies and automation.

Enhancements:

  • Migrate the Homebrew cask installation lifecycle to declarative postflight steps that correctly handle real user-home paths and best-effort macOS service registration.

Build:

  • Bump the workspace, CLI dependency, macOS extension, and UI versions from 3.1.0 to 3.1.1.

CI:

  • Update Node setup and GitHub release actions to newer versions.

Chores:

  • Update dependency lockfiles and security-related package versions, and prevent repetitive minor and patch Dependabot updates for the install action.

Summary by cubic

Migrates the Homebrew cask from the Ruby postflight block to declarative postflight_steps, so brew no longer warns on every tap load and the steps keep working under the sandbox's throwaway HOME. Also bumps the workspace to 3.1.1 and updates dependencies flagged by Dependabot.

Bug Fixes

  • postflight_steps writes the monitor plist via base: :home and {{appdir}} instead of Dir.home, and spells launchctl paths as /Users/{{user}}.
  • The launchctl and pluginkit calls remain best-effort, so the agent still loads at next login if immediate load fails.

Dependencies

  • Bumps the workspace to 3.1.1 in the Cargo, Tauri, UI, and macOS plist version files.
  • Updates postcss to 8.5.28, devalue to 5.9.2, actions/setup-node to v7, and action-gh-release to 3.0.3 for security and compatibility fixes.
  • Ignores minor and patch Dependabot updates for taiki-e/install-action so its floating @v2 reference stops generating weekly PRs; major bumps still get one.

Written for commit 25f6789. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Release

    • Updated the application, command-line tool, macOS extension, and related packages to version 3.1.1.
  • Bug Fixes

    • Improved Homebrew installation and post-installation behavior on macOS.
    • Improved cleanup and registration handling for background services and Finder integration during upgrades.

Homebrew 7 deprecated Ruby `postflight` blocks in casks and warns on
every brew run that loads the tap. Replace the block with the
declarative `postflight_steps` DSL (available since Homebrew 5.1.14).

The steps run in Homebrew's sandbox with a throwaway HOME, so file
steps use `base: :home` instead of "~", and the plist render becomes
`copy` + `inreplace` with the `{{appdir}}` token. `run` args have no
home token, so launchctl paths are spelled /Users/{{user}}. On a
relocated home the plist is still written correctly and only the
immediate best-effort `launchctl load` no-ops; the agent then starts
at next login.

Verified with `brew style` and `brew audit --strict` via
toolkit/homebrew/verify-tap.sh --offline. The install smoke test still
needs an interactive terminal: the cask's `uninstall delete:` stanza
always invokes sudo.
Resolves Dependabot alerts 16 (GHSA-r28c-9q8g-f849) and 19 (GHSA-fxqj-rqcc-2cmp). postcss is transitive via vite; lockfile-only refresh, also lifts nanoid to 3.3.19.
Resolves Dependabot alert 21 (GHSA-9rgm-9g3h-6x36). devalue is transitive via svelte; lockfile-only refresh.
Supersedes Dependabot PR 22. v7 is an ESM migration with no input changes; we only pass node-version.
Supersedes Dependabot PR 24. SHA verified against the v3.0.3 tag.
Supersedes Dependabot PR 23, which rewrote the floating @v2 tag to a patch pin that would be reopened weekly. Major bumps still get a PR.
Copilot AI lite review requested due to automatic review settings September 19, 2026 14:34
@sourcery-ai

sourcery-ai Bot commented Sep 19, 2026

Copy link
Copy Markdown

Reviewer's Guide

Migrates the Homebrew cask to declarative, real-home-aware postflight steps, bumps all product metadata and workspace versions to 3.1.1, and incorporates security, CI, release-action, and Dependabot maintenance updates.

Sequence diagram for Homebrew cask postflight installation

sequenceDiagram
    participant Homebrew
    participant Filesystem
    participant Launchctl
    participant Pluginkit

    Homebrew->>Filesystem: if_path_exists Library/LaunchAgents/com.zaai.git-same.daemon.plist base: :home
    opt legacy plist exists
        Homebrew->>Launchctl: run /bin/launchctl unload /Users/{{user}}/Library/LaunchAgents/com.zaai.git-same.daemon.plist
        Homebrew->>Filesystem: remove legacy plist base: :home
    end
    Homebrew->>Filesystem: copy monitor plist source_base: :appdir target_base: :home
    Homebrew->>Filesystem: inreplace monitor binary with {{appdir}} path base: :home
    Homebrew->>Launchctl: run /bin/launchctl unload monitor plist
    Homebrew->>Launchctl: run /bin/launchctl load monitor plist
    Homebrew->>Pluginkit: run /usr/bin/pluginkit ignore stale FinderSync id
Loading

File-Level Changes

Change Details Files
Replace the imperative Homebrew cask postflight Ruby code with declarative sandbox-compatible steps.
  • Use real home-directory paths via base: :home and /Users/{{user}} substitutions.
  • Copy and edit the monitor LaunchAgent plist using cask step primitives and {{appdir}}.
  • Make launchctl and pluginkit operations best-effort while preserving legacy cleanup and agent loading behavior.
toolkit/homebrew/cask.rb.tmpl
Align application, workspace, CLI dependency, and macOS extension versions at 3.1.1.
  • Bump the workspace and CLI path dependency versions.
  • Update Tauri, UI, lockfile, and badge extension metadata versions.
  • Refresh the corresponding Cargo dependency lock entries.
Cargo.toml
Cargo.lock
crates/git-same-cli/Cargo.toml
crates/git-same-app/tauri.conf.json
crates/git-same-app/ui/package.json
crates/git-same-app/ui/pnpm-lock.yaml
macos/GitSameBadges/Info.plist
Apply dependency and CI maintenance updates, including release automation changes and Dependabot filtering.
  • Upgrade setup-node and GitHub release action versions.
  • Pick up the security-related frontend dependency updates.
  • Ignore minor and patch updates for the floating taiki-e install action while retaining major-update notifications.
.github/dependabot.yml
.github/workflows/S1-Test-CI.yml
.github/workflows/S2-Release-GitHub.yml
crates/git-same-app/ui/pnpm-lock.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 3b5633f6-e031-4fe2-91b7-4145affa7cdc

📥 Commits

Reviewing files that changed from the base of the PR and between bab0c0b and 25f6789.

⛔ Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • crates/git-same-app/ui/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (9)
  • .github/dependabot.yml
  • .github/workflows/S1-Test-CI.yml
  • .github/workflows/S2-Release-GitHub.yml
  • Cargo.toml
  • crates/git-same-app/tauri.conf.json
  • crates/git-same-app/ui/package.json
  • crates/git-same-cli/Cargo.toml
  • macos/GitSameBadges/Info.plist
  • toolkit/homebrew/cask.rb.tmpl

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The pull request prepares version 3.1.1, updates GitHub Actions and Dependabot configuration, and converts Homebrew cask postflight logic to sandbox-safe declarative steps.

Changes

Release and packaging maintenance

Layer / File(s) Summary
3.1.1 release metadata
Cargo.toml, crates/git-same-app/tauri.conf.json, crates/git-same-app/ui/package.json, crates/git-same-cli/Cargo.toml, macos/GitSameBadges/Info.plist
Version values change from 3.1.0 to 3.1.1. The CLI now requires git-same-core version =3.1.1.
Automation action and update policy
.github/dependabot.yml, .github/workflows/S1-Test-CI.yml, .github/workflows/S2-Release-GitHub.yml
Dependabot ignores minor and patch updates for taiki-e/install-action. The workflows use actions/setup-node@v7 and softprops/action-gh-release v3.0.3.
Homebrew postflight migration
toolkit/homebrew/cask.rb.tmpl
The cask replaces imperative Ruby postflight logic with postflight_steps, declarative file operations, explicit home paths, and best-effort command execution.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~15 minutes

Change: Other

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the two primary changes: migrating the cask to postflight_steps and bumping the version to 3.1.1.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

A rabbit checks the release trail,
Version three point one point one sets sail,
Actions hop to newer ground,
Safe cask steps move files around,
Dependabot waits for major bounds.

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Needs a human reviewer. The cask now writes and loads a persistent LaunchAgent and changes FinderSync registration, so a wrong path or rendered plist could leave a user with a broken or stale background service after the PR is reverted. The damage is bounded and repairable by removing or reinstalling the LaunchAgent, unlike a payment, deletion, or access-control change.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 11 files

Re-trigger cubic

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Create ~/Library/LaunchAgents before copying the monitor plist.

Review effort: Lite
Findings: None

What changed in this PR

Migrates the Homebrew cask lifecycle, prepares the 3.1.1 release, and refreshes dependencies and CI actions.

Changes:

  • Replaces cask postflight logic with sandbox-safe postflight_steps.
  • Synchronizes project and package versions to 3.1.1.
  • Updates dependencies, GitHub Actions, and Dependabot configuration.
File Reviewed change
toolkit/​homebrew/​cask.rb.tmpl Declarative sandbox-safe postflight operations
macos/​GitSameBadges/​Info.plist Finder extension version bump
crates/​git-same-cli/​Cargo.toml Core dependency version bump
crates/​git-same-app/​ui/​pnpm-lock.yaml Frontend dependency refresh
crates/​git-same-app/​ui/​package.json UI version bump
crates/​git-same-app/​tauri.conf.json Tauri version bump
Cargo.toml Workspace version bump
Cargo.lock Locked package version updates
.github/​workflows/​S2-Release-GitHub.yml Release action updates
.github/​workflows/​S1-Test-CI.yml CI Node setup update
.github/​dependabot.yml Install-action update policy
Files not reviewed (1)
  • crates/git-same-app/ui/pnpm-lock.yaml: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@manuelgruber
manuelgruber merged commit 6dc6548 into main Sep 19, 2026
5 checks passed
@manuelgruber manuelgruber changed the title Migrate cask to postflight_steps and bump to 3.1.1 Homebrew 7 Sep 19, 2026
@manuelgruber
manuelgruber deleted the C/Homebrew7 branch September 19, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants