Repository navigation
feat(side-chat): run read-only tools on the goose backend - #20173
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS
Not justified as shipped
What this change shipsInventory (8 items) — 7 justifiedIntent: on goose, let Side Chat and thread replies list folders and view images while every change stays refused. This is an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] a09b80e Description read[DESCRIPTION-READ] 893b4e4f20bb5195e7252c2a9ad55d28b46c64c372c83ea1048e23d85fac4560 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS The side home leaves out only what goose 1.50.1 is known to use, so a new pre-approval source in a later goose release would skip the READ_ONLY gate without any warning. Watch
Suggestions
[DESIGN-REVIEWED] a09b80e Description read[DESCRIPTION-READ] 00fe17f00b7e9260e627c5dea380ba9b316ef47da33309f676b152efa70be38d 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 |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
On goose every Side Chat and thread-reply tool call was refused (REJECT_ALL): goose's own permission.yaml runs a tool listed under user.always_allow without asking, so a pre-approved call would skip the READ_ONLY gate. A goose side session now starts on a goose home of its own inside its scratch window (GOOSE_PATH_ROOT): the user's config entries are linked in except permission.yaml, config.yaml is copied without its extensions block, and no MCP server is mounted. On that home every tool goose 1.50.1 served asked first. A read is proved from the (extension, tool) pair goose stamps, as written: developer/tree and developer/read_image only, so another extension's tool under an allowed name is refused. The shell stays refused, so a goose side turn lists folders and views images, and its prompt says so.
d54e5a6 to
f0acaeb
Compare
|
Dispositions for the review lanes at GPT 6.1, BLOCKING Design, CONCERNS (Windows symlink
First Principles, CONCERNS (home builder oversized). Kept as is, with reasons:
|
f0acaeb to
6ad29db
Compare
The side home skipped permission.yaml by exact name, so a Permission.yaml on case-insensitive storage was linked in and goose opened it as its pre-approval store. Names are now compared case-folded. A home that cannot be built is refused as an AcpError, and a goose side turn on Windows keeps running REJECT_ALL: goose keeps its secrets under APPDATA there, outside the credential leaf the sensitive-path deny names.
6ad29db to
a09b80e
Compare
|
Dispositions for the advisory CONCERNS at First Principles, item 8 ( Design, Watch (the side home leaves out known pre-approval sources rather than allowing named ones). Accepted as advisory, not changed in this PR.
|
chenmingwei23
left a comment
There was a problem hiding this comment.
Readiness passed, all CI lanes green, no conflicts. Approving for merge.
Problem / Motivation
Goal: On the goose backend, Side Chat and thread replies can list folders and view images, while changes stay impossible.
On
agent.acp_backend: "goose"every Side Chat and thread-reply tool call is refused (REJECT_ALL), because goose is not inACP_BACKENDS_SIDE_READONLY. goose has its own pre-approval store,permission.yamlin its config directory. In theapprovemode Crew seeds, goose runs a tool listed underuser.always_allowwithout sendingsession/request_permission, so such a call would never reach theREAD_ONLYgate. A side question on goose is answered from memory, and the footer says tools are unavailable on this backend.Why it matters
Side Chat is for quick lookups while the main turn runs. On goose it cannot even look at which files exist, so its answers about the project are guesses until the main turn finishes.
Not a goal
analyze. goose serves it from an extension namedanalyze, which the identity-drift refusal turns down on every goose session; changing that refusal is a separate decision.What changed (motivation → approach → change)
Safe scope, for review. What a goose side turn (Side Chat or thread reply) may run, and what stays refused:
side_read_only,READ_ONLY)developertree,read_image~/.ssh, the linkedsecrets.yaml)path)shell,write,editanalyze,delegate,load,todo__*,apps__*,extensionmanager__*)treeApproach: goose's pre-approval store cannot be emptied from outside, but goose roots its whole config at
GOOSE_PATH_ROOT. So a side session gets a goose home of its own, built where the gateway already gives each process a private directory:GooseLaunch.prepare_spawn_envbuilds the home inside the session's scratch window (build_side_goose_root) and setsGOOSE_PATH_ROOT. Theconfigdirectory links every entry of the user's config directory (goose_config_dir, resolved as goose resolves it) exceptpermission.yaml, so provider secrets, OAuth tokens and custom providers still work.config.yamlis copied without itsextensionsblock, so no user extension starts.dataandstatestart empty. Each spawn removes the previous home first. Entry names are compared case-folded, so aPermission.yamlon case-insensitive storage stays out. With no scratch window, a home that cannot be built, or aconfig.yamlthat is not a mapping, the session is refused, never started on the user's home.side_home_supported). On Windows goose keeps its secrets under%APPDATA%, outside the credential leaf the sensitive-path deny names, and linking needs a symlink privilege, so a goose side turn there keeps runningREJECT_ALLand the footer says tools are unavailable._goose_session_mcp_serversplaces no server on a side session's array, as on claude. A server nameddeveloperwould otherwise replace goose's builtin read tools.build_permission_eventproves a read from the(extensionName, toolName)pair goose stamps on thetool_callframe, read as goose wrote it, before the prefix strip:("developer", "tree")and("developer", "read_image")map tofs_readasharness_builtin_tool(GOOSE_READ_ONLY_BUILTINS). goose names every other extension's tool<extension>__<tool>, so a shadow arrives asdeveloper__treeand matches nothing. A matched pair is goose's own extension, so the event carries no server, as goose's builtin shell already does, and theotherkind goose's permission request fills in is read asread; a kind goose does state still narrows. Side sessions only._run_side_turnand_run_thread_turntake the goose branch (side_read_only,READ_ONLY, bindinggoose_read_only), and the boundary prompt is a new listing-only variant that names no shell and no file read.ACP_BACKENDS_SIDE_READONLY;side_chat_toolsreads available on its card.No gate-tier, tool-identity or hooks file changes: the READ_ONLY proof
_is_harness_read_only_builtinfrom #19059 already accepts a mapped built-in with no server.Backwards compatibility
Compatible: a goose side turn that refused every tool now runs two read tools; normal goose sessions, and every other backend, build the same events and spawn the same way.
Removes nothing: no field, path, key or function is taken away; the prompt helpers gain a defaulted keyword.
Tests
test/test_side_readonly_goose.py(new), through the real parser, provider conversion andstream_and_collectwith goose 1.50.1's live frame shapes:tree/read_imageis approved under READ_ONLY;shell,write,edit,analyze,delegate,load,todo__todo_write,apps__create_app,extensionmanager__manage_extensionsgain no built-in on side or normal turns and are refused under READ_ONLY;developer__tree,shadowx__tree,("shadowx", "tree"),("analyze", "read_image")), a frame with no goose identity, and a proven read with a stated write kind are refused;tree/read_imageof~/.ssh/id_rsa, andread_imageof the side home's linkedsecrets.yamlwhile the user'spermission.yamllists both tools, are refused;permission.yaml(and its lock, and case variants such asPermission.yaml), dropsextensions, links secrets and custom providers, is rebuilt per spawn, and refuses an unparsable config or a link that fails;GOOSE_PATH_ROOTunder the scratch window only for a side session, refuses one with no window, and a side session mounts no MCP server.test/test_side.py: a goose side turn requestsside_read_only, streams READ_ONLY with the listing prompt and bindinggoose_read_only; the footer endpoint answersread_only_tools: trueon goose.test/test_chat_threads.py: the same for a goose thread reply.test/test_backend_cards.py: goose's core count 6 → 7.test/test_acp_refactor_facade.py: the goose host now reads the error family like every other host.On origin/main the new file fails at import (
build_side_goose_rootdoes not exist), and the side, thread and card tests fail on the REJECT_ALL posture.Manual verification
Live, goose 1.50.1 (linux x86_64 release binary) in
python:3.12-slim, spawned as Crew spawns it (goose acp --with-builtin developer,GOOSE_MODE=approve, emptymcpServers), with a scripted local OpenAI-compatible stub calling one tool per run. The user's goose config listedtree,shell,analyzeandread_imageunderpermission.yamluser.always_allow, and declared a stdio extensionshadowxservingtree,analyzeandread_image. The side home was built by this PR'sbuild_side_goose_root.treeread_imageshell(toucha file)shadowx__treeOn the side home every other tool asked too:
analyze,write,todo__todo_write,apps__create_app,load,delegate,extensionmanager__manage_extensionseach raised onesession/request_permission. A Crew server nameddeveloperservingtreereplaced the builtin extension and was stated as("developer", "developer__tree"). A config extension nameddeveloperoranalyzedid not displace the builtin tool. Only the reject answer was driven end to end. The approve path is covered by the unit tests above, not by a full gateway run.Related Issues
None filed. This closes the goose
side_chat_toolsgap on the harness capability card.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.