Skip to content

refactor(acp): route goose2 through goose serve#101

Merged
baxen merged 1 commit intomainfrom
baxen-acpplus
Apr 4, 2026
Merged

refactor(acp): route goose2 through goose serve#101
baxen merged 1 commit intomainfrom
baxen-acpplus

Conversation

@baxen
Copy link
Copy Markdown
Collaborator

@baxen baxen commented Apr 4, 2026

Summary

Move goose2 toward a thinner ACP client by routing session lifecycle through goose serve instead of keeping provider/runtime behavior in the Tauri app.

What changed

  • add a shared Goose ACP manager that owns one long-lived goose serve connection
  • route prepare, send, cancel, and provider discovery through that manager
  • start goose serve on demand and bind streamed session events back to the local chat session
  • support provider switching, including switching back to goose
  • hide deprecated direct CLI providers from the goose2 provider picker
  • add a shared local goose-dev checkout helper so just setup can build the integration branch and just dev can cheaply detect when setup needs to be rerun
  • update ACP command/frontend plumbing to use the new provider discovery and session prep flow

Testing

  • cd src-tauri && cargo clippy --all-targets --all-features -- -D warnings
  • cd src-tauri && cargo test
  • pre-push hook passed:
    • pnpm check
    • pnpm typecheck
    • pnpm build
    • pnpm test
    • cd src-tauri && cargo check
    • cd src-tauri && cargo clippy -- -D warnings

@baxen baxen requested a review from wesbillman as a code owner April 4, 2026 17:06
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 12ab372b08

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +302 to +304
let Some(goose_session_id) = goose_session_id else {
return Ok(false);
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Honor cancel requests during session preparation

cancel_session_inner bails out when the composite key is not yet present in state.sessions, but that map is populated only after prepare_session_inner finishes creating/loading the Goose session. If a user hits Stop while preparation is still in flight, cancellation returns false and the prompt can still execute server-side (including token/tool work) despite the stop request. Please persist a pending-cancel state before preparation completes, or register the session key earlier so cancellation can be applied immediately.

Useful? React with 👍 / 👎.

fi
fi

read -r branch remote_head <<<"$(resolve_branch)"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Stop script when branch resolution fails

resolve_branch is invoked via command substitution in read -r branch remote_head <<<"$(resolve_branch)", so exit inside fail_or_skip only terminates the subshell, not the main script. When branch resolution fails, the script can continue with empty values and fall into later commands (for example git fetch with an empty ref), producing unexpected failures and bypassing the intended fail/skip control flow. Capture the function status explicitly and abort in the caller instead of relying on exit inside command substitution.

Useful? React with 👍 / 👎.

@baxen baxen merged commit da92494 into main Apr 4, 2026
8 checks passed
@baxen baxen deleted the baxen-acpplus branch April 4, 2026 17:37
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