Skip to content

update: an engine inside a macOS app bundle is left to its app - #2820

Merged
AbirAbbas merged 2 commits into
app/v3from
fix/update-refuses-app-bundle
Nov 19, 2026
Merged

AbirAbbas merged 2 commits into
app/v3from
fix/update-refuses-app-bundle

Conversation

@AbirAbbas

Copy link
Copy Markdown
Collaborator

What was wrong

update.InstallRefusal refused an in-place replacement only for a package-managed path or an unwritable folder. A signed macOS application bundle in /Applications is usually writable by the person who installed it, and an explicit codeaf update run from an agent's shell inside the desktop app targets the engine the app carries. It could replace a file inside the bundle and break the bundle's signature.

Change

  • AppBundle(path) names the bundle (WorkAF.app) a path sits inside: a folder named *.app that holds Contents, at any depth, case-insensitively.
  • InstallRefusal refuses such a target, after the package-manager check and before the writable-folder check. The message names the app and says to update the app (or install a separate codeaf with the usual curl line). The launch offer, /update and the installer all go through InstallRefusal, so they answer the same way. The check runs on the canonical path, so a link into a bundle is answered for the file it names.
  • CODEAF_NO_UPDATE_CHECK=1 does not make update refuse. It is a documented switch for the launch check only ("/update and codeaf update still work"), anyone may set it, and the path check already covers the app's engine. The desktop app's engine is caught by where it lives, not by an environment variable another install could also carry.
  • The manual page that lists where update refuses to replace a codeaf now lists the bundle.

Validation contract

  • A codeaf at <anywhere>/X.app/Contents/... is refused even when its folder is writable; the refusal says which app updates it.
  • A codeaf outside any bundle, and lookalike paths (X.app without Contents, X.app.d/Contents, a bare .app), are unchanged.
  • A link into a bundle is refused as the bundle's file.
  • Package-managed and unwritable-folder refusals are unchanged.

🤖 Generated with Claude Code

AbirAbbas and others added 2 commits November 18, 2026 21:05
InstallRefusal refused a replacement only for a package-managed path or an
unwritable folder. A signed bundle in /Applications is usually writable by the
person who installed it, and an explicit `codeaf update` run from an agent's
shell inside the desktop app targets the bundled engine, so it could replace a
file inside the bundle and break its signature. A target whose path sits inside
`*.app/Contents` is now refused with a message that names the app and says to
update it there, in the same place as the other refusals, so the launch offer,
/update and the installer all answer the same way. CODEAF_NO_UPDATE_CHECK does
not refuse: it is a documented switch for the launch check only, and an
explicit update still works with it set.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@AbirAbbas
AbirAbbas merged commit 24d96c3 into app/v3 Nov 19, 2026
7 checks passed
@AbirAbbas
AbirAbbas deleted the fix/update-refuses-app-bundle branch November 19, 2026 02:26
AbirAbbas added a commit that referenced this pull request Nov 19, 2026
…ild (#2840)

* update: a desktop app's engine is told to update the app, not to rebuild

The engine a desktop app carries is built from a bare commit, so `codeaf
update` and the chat's /update answered it with the source-build note ("rebuild
with make build, or install a release") before the app-bundle refusal from
#2820 could be asked. That refusal was unreachable from the shipped app.

BundleRefusal is InstallRefusal's answer for a target inside a macOS
application bundle, with the wording kept in one place. Both update surfaces ask
it before turning a source build away; every other refusal still lives inside
the installer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* changelog: update tells a desktop app's engine to update the app

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
AbirAbbas added a commit that referenced this pull request Nov 23, 2026
… (#2883)

app/v3 was landed on dev on 2026-11-11. Five pull requests merged into app/v3 afterwards are now on dev, one commit each in this change:

- connect: GitHub is a connector, and it is the Factory's GitHub (app/v3 #2645)
- fix(app): connect independent custom providers and revalidate saves (app/v3 #2649)
- app: --home is a home the person keeps: other tools' skills, program copies, fence (app/v3 #2819)
- update: an engine inside a macOS app bundle is left to its app (app/v3 #2820)
- update: a desktop app's engine is told to update the app, not to rebuild (app/v3 #2840)

Co-authored-by: Santosh <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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.

1 participant