Repository navigation
update: a desktop app's engine is told to update the app, not to rebuild - #2840
Merged
Merged
Conversation
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]>
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
#2820 made
codeaf updaterefuse a codeaf inside a macOS application bundle with a message naming the app. The engine the desktop app carries is built from a bare commit (make app-sidecar), so its revision kind isother. Bothcodeaf update(cmd/codeaf/update.go) and the chat's/update(internal/tui3/updatecmd.go) answer a source build before they reach any refusal, so the shipped app never gets the #2820 refusal.The bundled engine from the published
workaf-devmacOS arm64 DMG (0.1.0-dev.20261119.34, engine 2097ee7) printed, with exit status 2:Nothing was replaced, but the advice is wrong for the app's engine. The manual already said "
codeaf updatesays so", which wasn't true for this build.The change
update.BundleRefusal(target, curl)returnsInstallRefusal's answer for a target inside an application bundle, and "" for any other target.InstallRefusalnow uses it, so the wording stays in one place.codeaf updateasks it before the source-build answer. The chat's/updateasks the newUpdateCoordinator.BundleRefusalhook, whichchatv3_surface.gowires to the same function. Every other refusal still runs inside the installer, as before./updateand says the app's engine is a source build.Only the bundle refusal moves ahead of the source-build answer. A source build that is package-managed or in an unwritable folder still gets the source-build note, as before.
Tests
TestSourceBuildInsideAnAppBundleIsLeftToItsApp(cmd/codeaf): a source revision at…/WorkAF.app/Contents/MacOS/codeafexits 2 with "this codeaf is part of WorkAF.app … update the app", never "built from source", and never touches the network. Before the fix it failed with the message quoted above.TestSourceBuildInsideAnAppBundleUpdateNamesTheApp(internal/tui3):/updategives the app's refusal and resolves or installs nothing.TestBundleRefusalIsInstallRefusalsAnswerForABundleOnly(internal/update).WorkAF.app/Contents/MacOS/codeafprintsthis codeaf is part of WorkAF.app · that app updates it, so update the app, or install a separate codeaf with: curl -fsSL https://agentfield.ai/get/codeaf | bashand exits 2.make test-packed-manual manual-gatesand the focused update tests in the three packages pass.make test-quickpasses exceptTestATrackedConversationIsReachedAndAForgottenOneIsNot(cmd/codeaf), which failed once withTempDir RemoveAll cleanup: … Library/Application Support/dev.furrow.furrow/store-v1: directory not empty. That failure is pre-existing and unrelated: it failed 1 of 20 runs on unpatchedorigin/app/v3and 0 of 20 on this branch.make pr-ready BASE=origin/app/v3had one failure of the same kind in cmd/codeaf:TestTheSameSentenceIsInTheJSONAnswerhitTempDir RemoveAll cleanup: … directory not empty. Run alone it passed 10 of 10 on this branch and 10 of 10 on the base. Both look like a background writer racingt.TempDircleanup under load, which this change doesn't touch. Every other package passed.🤖 Generated with Claude Code