Skip to content

fix: launch root-owned apps under a stock /Applications - #31408

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/15036-stock-applications
Nov 7, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/15036-stock-applications

Conversation

@bolichen97

@bolichen97 bolichen97 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Root-owned apps under a stock /Applications launch through computer_launch_app for admin users, while apps this user owns stay refused.

On a stock Mac, computer_launch_app refuses every third-party app under /Applications for an admin user, root-owned ones from a .pkg or the App Store included: "'Keynote' is installed in a directory this user can write, so it was not launched". Only apps under /System/Applications launch.

Why it matters

A Mac's first account is an admin, so for most users the launch verb can open only Apple's bundled apps. Every root-owned app installed from a .pkg or the App Store (Microsoft Office, Keynote, WeChat) is refused with a reason the user cannot act on.

Not a goal

  • Launching an app this user owns (a drag-install or a Homebrew cask): it stays refused.
  • Changing the Windows launcher, the refusal text, the catalog roots, or ~/Applications.
  • Any new setting, allow-list or governance scope for computer use.

What changed (motivation → approach → change)

macOS ships /Applications as root:admin with mode 0775, so every admin user can create files in it. The launch check refuses a bundle whose parent this user can write, so it refused every bundle there.

launch_macos.py now recognises that one directory: /Applications with owner root, group admin (gid 80) and mode 0775 exactly. There it skips the parent probe and judges the bundle, Contents and Contents/MacOS by ownership as well as mode, the rule the executables already follow, because an owner can chmod their own directory at will. apple_speech already trusts an Xcode bundle under /Applications by ownership in the same way. Any other parent, or a failed stat, keeps today's probes. The module docstrings and the macOS launch section of computer-use.md describe the rule.

Bundle Before After
root-owned, under a stock /Applications refused launches
owned by this user, under a stock /Applications refused refused
under any other parent unchanged unchanged

This narrows a security refusal, so it needs a design sign-off from a maintainer before it merges.

Backwards compatibility

Breaking: under a stock /Applications, a bundle whose own directory this user owns is now refused even while that directory is read-only, as an executable this user owns already is. Only a non-admin user could launch such a bundle on main, since an admin was refused every bundle there. Writer sweep on origin/main @ aca93ab: the one writer of a bundle there is the desktop app's updater (website/electron/auto-update.js), which replaces only a bundle this user can write, so that bundle is refused on main and here alike.

Reader: src/kiro_crew/computer_use/macos_driver.py:MacOSBackend.launch_app -- chat -- returns the same refusal text it already returns for a writable bundle; test_a_bundle_directory_this_user_OWNS_is_refused_though_read_only

Tests

  • test_computer_use_launch_macos_stock.py (new, injected stat, runs on every platform): a root-owned bundle under a stock parent resolves; a bundle directory this user owns at mode 0555 is refused, at each of the three levels; a parent with mode 0777, a non-admin group or a non-root owner keeps the parent probe.
  • test_computer_use_launch.py: TestMacOSBundleVerification pins _is_stock_applications off. Its synthetic /Applications/Foo.app has a real stock parent on a Mac, and without the pin three of its tests fail there. Every existing assertion is kept.
  • Determinism: the new file plus TestMacOSBundleVerification passed 20 runs at -n0 and 10 at -n 2 --dist loadgroup --max-worker-restart=2 beside test_computer_use_launch_windows_catalog.py and test_computer_use_unsupported.py; all 115 ids in both files ran green in a shuffled order (seed 24238): 108 passed, 7 skipped. The flake-pattern ratchet and the repo semgrep rules pass on the diff.

Proof: PROVEN test/test_computer_use_launch_macos_stock.py::TestMacOSStockApplicationsParent::test_a_ROOT_OWNED_bundle_under_a_stock_parent_resolves (head ddbe803)

Manual verification

On a real Mac (macOS 26.7.2, build 25G332, Apple silicon), ls -ld /Applications shows drwxrwxr-x root admin and the user is in admin. Each app was not running. kirocrew computer call computer_launch_app app=<App> ran from a source checkout (kirocrew 0.13.0) with computer use enabled in an isolated data home:

App Bundle owner main c9b3e26a82 this branch
Keynote (App Store) root refused launched, window "Welcome to Keynote" after 7.2s
Paintbrush (drag-install) this user refused refused

stat -f %Sm /Applications was the same before and after the branch run. That launch ran on an earlier revision of this commit, which differs from head only in comments and the position of one constant. On head ddbe80354b18, resolve_target (the check the launch runs before open -a) resolves Keynote and refuses Paintbrush, again with the /Applications mtime unchanged.

Related Issues

Closes #15036

Builds on #20132 (honest refusal text) and #20367 (no mtime bump on a refused launch).

Sibling sweep

Swept: git grep -n "_directory_is_writable(" -- src/ and git grep -n "/Applications" -- src/
Sibling: src/kiro_crew/computer_use/launch_windows.py -- not affected -- Program Files denies creates to an unelevated admin token, so its root probe does not refuse every install there
Sibling: src/kiro_crew/apple_speech/init.py -- not affected -- already trusts an Xcode bundle under /Applications by root ownership up to the bundle root, not by the parent's mode
Sibling: src/kiro_crew/dashboard_verify.py -- not affected -- its browser check runs on Linux only, because no browser under an admin-writable /Applications can pass it

Pattern harvest

Not generalizable: the rule rests on one macOS install-location fact (a stock /Applications is admin-writable), and the one other module that meets it, apple_speech, already judges ownership instead of the parent's mode, so there is no repeated code shape to turn into a rule.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributed under the project's Apache-2.0 license.

@bolichen97 bolichen97 added the ci:macos Run the on-demand macOS suite against this PR head label Nov 6, 2026
@bolichen97
bolichen97 requested a review from a team as a code owner November 6, 2026 12:19
@bolichen97
bolichen97 requested a review from Zedmor November 6, 2026 12:19
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision ddbe80354b1829c43ac178129f557f2fe1acba77 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of ddbe80354b1829c43ac178129f557f2fe1acba77 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks. Under an admin-writable parent, bundle ownership is the right test: this user cannot create a root-owned directory, so a bundle they planted there stays refused. Any other parent, or a failed stat, keeps the old probe.

Notes

  • The parent is still writable, so between resolve_target and open -a the user can rename a root-owned bundle away and put their own under the same name. The old rule had no such gap, because it refused the whole parent. The verified realpath limits this, but the spec section should name the race rather than imply the check is atomic.

[DESIGN-REVIEWED] ddbe803

Description read

[DESCRIPTION-READ] a989a37eadccb2eda0cd3ced9e69e9ae8b62db5a1c1442309476a75887e3ce57

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of ddbe80354b1829c43ac178129f557f2fe1acba77 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks: the fix targets the cause (a parent-mode probe that cannot tell installed bundles from planted ones on a stock /Applications), reuses _file_is_replaceable, and is backed by issue #15036.

What this change ships

Inventory (5 items) — 5 justified

Intent: let admin users on a stock Mac launch root-owned apps from /Applications (installed by .pkg or the App Store), while bundles they own stay refused. This is a FIX.

  1. Root-owned apps under a stock /Applications now launch for admin users — justified
  2. Under a stock /Applications, a bundle directory this user owns is refused even when it is read-only (0555) — justified
  3. The parent probe is skipped only when /Applications is exactly root, gid 80, mode 0775; any other parent, or a failed stat, keeps today's probes — justified
  4. The spec and docstrings drop the "indistinguishable from installed" premise and state the ownership rule — justified
  5. TestMacOSBundleVerification turns off the stock-parent check so its synthetic /Applications paths still exercise the parent probe on a Mac — justified

[FIRST-PRINCIPLES-REVIEWED] ddbe803

Description read

[DESCRIPTION-READ] 758e3acc06c2a1a2dc330b40b0593589b904d4afbbda5ecc136737a4f32c3ae7

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ human override accepted

Reviewed ddbe80354b1829c43ac178129f557f2fe1acba77 — this comment is updated in place on each push.

Human judgment by @bolichen97 overrides the Opus 5.5 finding for ddbe80354b1829c43ac178129f557f2fe1acba77; the recorded reason is authoritative for this commit.

[OPUS-OVERRIDE] ddbe803

Verdict recorded from an authorized human decision for commit ddbe80354b1829c43ac178129f557f2fe1acba77.

False positive or not applicable? A repository writer can comment:
/ai-review override fable ddbe80354b1829c43ac178129f557f2fe1acba77 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of ddbe80354b1829c43ac178129f557f2fe1acba77 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] ddbe803

False positive or not applicable? A repository writer can comment:
/ai-review override gpt ddbe80354b1829c43ac178129f557f2fe1acba77 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 6, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97]

  • span=ad1cffc3acc4 Parent exception permits replacing the verified bundle before launch

Rebutted: not a defect. The race needs a concurrent agent process that can rename entries in /Applications; in Kiro Crew that is the agent's own shell, and that shell already reaches the same outcome with no race.
The shell is not refused a LaunchServices launch of a bundle path it chose, which then runs outside its sandbox: security.is_denied denies no such launch, and sandbox_seatbelt._SEATBELT_PROFILE is (allow default) with file and host-socket denies only, nothing for LaunchServices or /Applications.
So the code the agent can get started outside the sandbox is the same set on main and on this head. Without such a process nothing renames an entry there, and a bundle this user creates is refused by ownership (test_a_bundle_directory_this_user_OWNS_is_refused_though_read_only).
Same rule already in the repo: apple_speech._is_trusted_toolchain trusts a root-owned bundle under the admin-writable /Applications by ownership, for a binary the gateway itself runs.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97]

  • span=9c3272dcba39 an agent-made /Applications entry naming a root-owned terminal passes the name list

Rebutted: not a defect. What it gets past is _REFUSED_BUNDLES, which launch_macos.py documents as "Not a security boundary"; computer-use.md says the same list "does not claim completeness", and lists typing into a terminal as the stated residual of the one-opt-in posture.
Making that entry needs an agent process that can add or rename entries in /Applications, which is the agent's shell, and that shell can already have LaunchServices start the same terminal: security.is_denied denies no such launch, and sandbox_seatbelt._SEATBELT_PROFILE has no rule for it.
The guarantee this PR keeps is that no bundle whose code this user could have written is launched. A root-owned Apple or vendor bundle is not that under any entry name, and the bundle this user owns stays refused.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] Both blocking findings on 109b4a724ab5 are security-class, so I answered each with its own rebutted disposition above and did not record an override: a security-class release is a maintainer's call, not the author's.

A maintainer who checks the reasoning and agrees can record it with these two commands, each as its own comment (they bind this head only):

/ai-review override gpt 109b4a724ab55c71e2202f9115daf351e0d289a9 false-positive: not a defect. The race needs an agent process that can rename entries in /Applications, which is the agent's shell, and that shell can already have LaunchServices start a bundle it wrote with no race, so the code that can run outside the sandbox is unchanged by this PR.
/ai-review override fable 109b4a724ab55c71e2202f9115daf351e0d289a9 false-positive: not a defect. It gets past _REFUSED_BUNDLES, which is documented as not a security boundary, and making the entry needs a shell that can already start the same terminal; no bundle whose code this user could write is launched.

If you do not accept that equivalence, the exception for a stock /Applications cannot hold against a writer racing the launch, and the shape to take instead is the issue's second option: keep the refusal and make its wording say the agent cannot launch third-party apps on this machine. Say which you prefer and I will rework the PR to match.

Either way the PR still needs a design sign-off from a maintainer, and the Sensitive Change sign-off from a maintainer other than the author.

@bolichen97
bolichen97 enabled auto-merge (squash) November 6, 2026 12:43
@bolichen97
bolichen97 force-pushed the fix/15036-stock-applications branch from 109b4a7 to 09e3afb Compare November 6, 2026 13:30
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] Rebased: main moved in docs/system-specs/modules/memory-skills-hooks.md and docs/system-specs/modules/learn-cron-dashboard.md (the same directory as docs/system-specs/modules/computer-use.md) since this head went green (090dad8 -> e2b2822); the change itself is identical. CI re-running.

The two maintainer override commands drafted above name the old head 109b4a724ab5, so they no longer bind anything; a maintainer who agrees with those rebuttals would record them against 09e3afb95938b4199ebd20c45415152c6fe547a8 once the GPT and Opus lanes have posted on it.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 6, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] The macOS Tests (on demand) red on 109b4a724ab5 (Backend Tests (macOS) (2)) was one subagent test, test/test_queue_depth_reconcile.py::test_stop_all_over_memory_deferred_rows_ends_at_zero_in_one_frame[writer-thread], which this PR does not reach: it changes only the macOS launch check, its tests and its spec. The node id passes locally on macOS on this branch, so it is recorded in the flake ledger as #31434. The rebased head runs the macOS suite again.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 6, 2026
@bolichen97
bolichen97 force-pushed the fix/15036-stock-applications branch from 09e3afb to f11b0fe Compare November 6, 2026 15:23
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] Rebased: main moved in cli.md, crew-mode.md, decisions.md, learn-cron-dashboard.md, memory-skills-hooks.md, security.md and subagent.md under docs/system-specs/modules/ (the same directory as computer-use.md; none is a file this PR changes) since this head went green (e2b2822 -> b3c17ad); the change itself is identical. CI re-running.

The maintainer override request is no longer needed: the two commands drafted for 109b4a724ab5, and the note about re-recording them on the next head, are moot, because on 09e3afb95938 neither the GPT nor the Opus lane posted a blocking finding. The PR still needs a design sign-off from a maintainer and the Sensitive Change sign-off from a maintainer other than the author.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision readiness: checking Automated validation is still running labels Nov 6, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97]

  • span=9c3272dcba39 an agent-made /Applications entry passes the terminal name list, or is re-pointed after the check

Rebutted: not a defect. Same class as the ruling at 109b4a724ab5, re-raised on this head with a re-pointing variant.
The name it gets past is _REFUSED_BUNDLES, which launch_macos.py documents as "Not a security boundary"; computer-use.md lists terminals as drivable and typing into one as the stated residual of the one-opt-in posture, and policy._DENIED_BUNDLE_PREFIXES covers no terminal on purpose.
Adding or re-pointing an entry in /Applications needs an agent process that writes there, which is the agent's shell, and that shell can already have LaunchServices start the same terminal or a bundle it wrote, with no race: no security denied rule names such a launch, and sandbox_seatbelt._SEATBELT_PROFILE is (allow default) with no rule for it.
So the code that can be started outside the sandbox is the same set on main and on this head. With no such writer nothing changes an entry there, and a bundle this user owns stays refused by ownership (test_a_bundle_directory_this_user_OWNS_is_refused_though_read_only).
The same ownership rule is already in the repo: apple_speech._is_trusted_toolchain trusts a root-owned bundle under the admin-writable /Applications.
No override recorded: this is security-class, so releasing it is a maintainer's call.

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] Correction to my earlier note: on f11b0fed720e the Opus lane re-raised span 9c3272dcba39, adding that the entry can be re-pointed between the check and the launch. It has its own rebutted disposition above. It is security-class, so the maintainer ruling is needed after all. A maintainer who checks the reasoning and agrees can record it for this head with:

/ai-review override fable f11b0fed720eaf8b6de0d8c9cdd026dca7ed2e23 false-positive: not a defect. Adding or re-pointing an /Applications entry needs the agent's shell, which can already have LaunchServices start the same terminal or a bundle it wrote; the terminal list is documented as not a security boundary, so the code that can run outside the sandbox is unchanged.

If you do not accept that equivalence, the shape to take is the issue's second option (keep the refusal and say plainly that third-party apps cannot be launched on this machine). Say which you prefer and I will rework the PR.

The red backend shard 2 on Linux, Windows and macOS is one test, test/test_security_gate_liveness.py::test_the_package_stays_within_its_line_budget, in a package this PR does not touch. The same node id was red on main at 85ce466709, and #31469 fixed it there. The branch gets rebased onto that fix once the macOS run on this head finishes.

The PR still needs a design sign-off from a maintainer and the Sensitive Change sign-off from a maintainer other than the author.

computer_launch_app refused every third-party bundle under /Applications
for an admin user, including root-owned ones installed from a pkg or the
App Store. macOS ships /Applications as root:admin 0775, so the parent
writability probe fired for every admin, which is the default account on
a Mac. Only /System/Applications apps could be launched.

When the parent is exactly /Applications with that owner, group (gid 80)
and mode, the parent probe is skipped. The bundle, Contents and
Contents/MacOS are then judged by ownership as well as mode, because a
directory's owner can chmod it at will. A bundle this user owns is still
refused. Any other parent, or a failed stat, keeps today's probes.

The new tests live in test_computer_use_launch_macos_stock.py and inject
the parent's stat. The existing bundle tests build a synthetic
/Applications/Foo.app; on a Mac that parent is a real stock directory,
so they pin the stock answer off and keep every assertion. The module
docstrings and the computer-use spec describe the stock-parent rule.

Closes #15036
@bolichen97
bolichen97 force-pushed the fix/15036-stock-applications branch from f11b0fe to ddbe803 Compare November 6, 2026 17:01
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] Rebased: main moved in src/kiro_crew/hooks.py (which imports the computer-use package this PR changes) and in acp-client.md, metrics.md and security.md under docs/system-specs/modules/ (the same directory as computer-use.md; none is a file this PR changes) since this head went green (b3c17ad -> aca93ab); the change itself is identical. CI re-running.

The new base carries #31469, the fix for test/test_security_gate_liveness.py::test_the_package_stays_within_its_line_budget, the one test that was red in backend shard 2 on Linux, Windows and macOS on f11b0fed720e; it passes locally on this head. The Opus finding 9c3272dcba39 keeps its rebutted disposition and still needs a maintainer ruling, and the PR still needs a design sign-off from a maintainer and the Sensitive Change sign-off from a maintainer other than the author.

@bolichen97

bolichen97 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] The macOS Tests (on demand) red on ddbe80354b18 is Backend Tests (macOS) (2) reaching its 40-minute job cap, not a failing test: the shard log shows only passes and skips up to [ 95%] when the job was cancelled. The same shard finished in 36:30 on the previous head, so it has about three minutes of headroom and a slow runner crosses it. Recorded in the flake ledger as #31637 and re-run once.

The other reds on this head (Opus, GPT, Design, First Principles, UX, Sensitive Change Review, Dependency License Gate, and the readiness signal) all failed reading the API under the shared token's rate limit before producing a verdict. Each failed lane job was re-run once; readiness re-evaluates as they finish.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 6, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97]

  • span=9c3272dcba39 an /Applications entry swapped or re-pointed between the check and the launch

Rebutted: not a defect. Same class as the rulings at 109b4a724ab5 (#31408 (comment)) and f11b0fed720e (#31408 (comment)), re-raised on this third head as a same-parent swap; the code it judges is unchanged.
Swapping or re-pointing an entry in /Applications needs the agent's own shell, and that shell can already have LaunchServices start a bundle it wrote, with no race: no security denied rule names such a launch, and sandbox_seatbelt._SEATBELT_PROFILE is (allow default). So the code that can start outside the sandbox is the same set on main and on this head.
No override recorded: this is security-class, so releasing it is a maintainer's call.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 6, 2026
@bolichen97
bolichen97 disabled auto-merge November 6, 2026 21:53
@bolichen97

Copy link
Copy Markdown
Contributor Author

/ai-review override fable ddbe803 false-positive: agent: posted at the operator's direction after they reviewed the rebuttal. Not a defect: adding or re-pointing an /Applications entry needs the agent's shell, which can already have LaunchServices start the same terminal or a bundle it wrote; the terminal list is documented as not a security boundary, so the code that can run outside the sandbox is unchanged.

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Human judgment recorded

@bolichen97 recorded a false-positive release (class false-positive) for the fable AI finding on ddbe80354b1829c43ac178129f557f2fe1acba77.

agent: posted at the operator's direction after they reviewed the rebuttal. Not a defect: adding or re-pointing an /Applications entry needs the agent's shell, which can already have LaunchServices start the same terminal or a bundle it wrote; the terminal list is documented as not a security boundary, so the code that can run outside the sandbox is unchanged.

This decision applies only to this commit. A new push requires a new judgment.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention labels Nov 7, 2026

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved for the on-call. Review lanes pass on ddbe803, no conflict, no open change request.

@KiroCrewCaptain
KiroCrewCaptain merged commit e4611c5 into main Nov 7, 2026
112 of 123 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/15036-stock-applications branch November 7, 2026 04:32
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 7, 2026
buluoray added a commit that referenced this pull request Nov 8, 2026
computer_launch_app refused every third-party bundle under /Applications
for an admin user, including root-owned ones installed from a pkg or the
App Store. macOS ships /Applications as root:admin 0775, so the parent
writability probe fired for every admin, which is the default account on
a Mac. Only /System/Applications apps could be launched.

When the parent is exactly /Applications with that owner, group (gid 80)
and mode, the parent probe is skipped. The bundle, Contents and
Contents/MacOS are then judged by ownership as well as mode, because a
directory's owner can chmod it at will. A bundle this user owns is still
refused. Any other parent, or a failed stat, keeps today's probes.

The new tests live in test_computer_use_launch_macos_stock.py and inject
the parent's stat. The existing bundle tests build a synthetic
/Applications/Foo.app; on a Mac that parent is a real stock directory,
so they pin the stock answer off and keep every assertion. The module
docstrings and the computer-use spec describe the stock-parent rule.

Closes #15036

(cherry picked from commit e4611c5)

Original author: Bolin Chen (#31408).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:macos Run the on-demand macOS suite against this PR head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

computer-use (macOS): launch refuses every /Applications bundle for admin users; remedy text unsatisfiable

2 participants