Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
a2a5daa
[NO-JIRA] Add Apache-2.0 modification notices and fix the Nix dev she…
johnnymo87 Nov 22, 2026
3e56b8e
gcp_vertex_ai: GCP_VERTEX_HOST routes requests through a proxy; GCP_V…
johnnymo87 Nov 22, 2026
0ea725d
gcpauth: GCP_AUTH_SCOPES sets the scopes for authorized-user token re…
johnnymo87 Nov 22, 2026
5699d58
vendor: agent-client-protocol-http 2.2.0 with takeover and SSE replay…
johnnymo87 Nov 22, 2026
b845a91
model_config: a restored session keeps its stored prompt-cache TTL un…
johnnymo87 Nov 22, 2026
81168fa
[NO-JIRA] GOOSE_GLOBAL_SKILLS=false limits skill discovery to project…
johnnymo87 Nov 22, 2026
8892390
[NO-JIRA] gcp_vertex_ai: route Gemini through its own proxy and name …
johnnymo87 Nov 22, 2026
7bb4e47
[NO-JIRA] Role recipes set their own thinking effort (settings.thinki…
johnnymo87 Nov 22, 2026
0a56c0c
Stream Claude thinking deltas instead of buffering them to content_bl…
johnnymo87 Nov 22, 2026
3a48bd7
ci: release workflows for patched Linux and macOS CLI builds
johnnymo87 Nov 22, 2026
f181f22
recipe: add Apache-2.0 modification notices to patch 23 files
johnnymo87 Nov 22, 2026
91b4523
stream: retry on error during thinking deltas and respect held orderi…
johnnymo87 Nov 22, 2026
a3f54b0
ci: add omitted and streamed thinking tests and retry test to test-pa…
johnnymo87 Nov 22, 2026
8af40cb
ci: add patched-ci workflow, share test-patches via workflow_call, an…
johnnymo87 Nov 22, 2026
fbfd86a
reply_parts: close stream retry window once signed thinking or redact…
johnnymo87 Nov 22, 2026
72b2c2d
ci: replace substring test filters with explicit exact test paths
johnnymo87 Nov 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .github/workflows/patched-build-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# The aarch64-apple-darwin CLI for this fork's releases (patched-release.yml and
# patched-release-darwin.yml). It is upstream's bundle-macos.yml build-goose +
# package-cli steps (same toolchain via hermit, default features, unsigned,
# same tarball layout), with two differences:
#
# 1. CMAKE_DISABLE_FIND_PACKAGE_OpenSSL=ON. llama-cpp-sys-2 passes CMAKE_* env
# through to llama.cpp's CMake, whose vendored cpp-httplib otherwise links any
# OpenSSL it finds. On current macOS runner images that is Homebrew's, which
# (a) no longer compiles there (const X509_NAME) and (b) would make the binary
# need Homebrew's libssl at runtime. Upstream's own darwin binaries link no
# OpenSSL, so this keeps the same shape.
# 2. A portability check: the binary may link only system libraries.
on:
workflow_call:
inputs:
ref:
description: "Commit to build"
required: true
type: string

name: "Patched build (macOS CLI)"

permissions:
contents: read

jobs:
build:
name: Build goose (aarch64-apple-darwin)
runs-on: macos-latest
env:
MACOSX_DEPLOYMENT_TARGET: "13.0"
CMAKE_DISABLE_FIND_PACKAGE_OpenSSL: "ON"
TARGET: aarch64-apple-darwin
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ inputs.ref }}

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
with:
key: patched-macos-deployment-target-13

- name: Build goose
run: |
source ./bin/activate-hermit
rustup target add "$TARGET"
cargo build --release -p goose-cli --bin goose --target "$TARGET"

- name: Links only system libraries
run: |
bin="target/${TARGET}/release/goose"
otool -L "$bin"
bad="$(otool -L "$bin" | tail -n +2 | awk '{print $1}' | grep -Ev '^(/usr/lib/|/System/Library/)' || true)"
if [ -n "$bad" ]; then
echo "goose links non-system libraries:" >&2
echo "$bad" >&2
exit 1
fi
"$bin" --version

- name: Package CLI
run: |
mkdir -p package dist
cp "target/${TARGET}/release/goose" package/goose
chmod +x package/goose
tar -cjf "dist/goose-${TARGET}.tar.bz2" -C package .
tar -czf "dist/goose-${TARGET}.tar.gz" -C package .

- name: Upload CLI artifact
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: goose-aarch64-apple-darwin
path: |
dist/goose-aarch64-apple-darwin.tar.bz2
dist/goose-aarch64-apple-darwin.tar.gz
if-no-files-found: error
overwrite: true
43 changes: 43 additions & 0 deletions .github/workflows/patched-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# CI workflow for pull requests targeting the fork's patched branches (patched/**).
# Runs upstream's Linux CLI build workflow and the shared patched-test.yml suite.
on:
pull_request:
branches:
- "patched/**"
workflow_dispatch:

name: "Patched CI"

permissions:
contents: read

jobs:
build:
name: build-linux
uses: ./.github/workflows/build-cli-linux.yml
permissions:
contents: read
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}

test-patches:
name: test-patches
uses: ./.github/workflows/patched-test.yml
permissions:
contents: read
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}

gate:
name: "patched-ci"
needs: [build, test-patches]
if: always()
runs-on: ubuntu-latest
steps:
- name: Check status of build and test-patches
run: |
if [ "${{ needs.build.result }}" != "success" ] || [ "${{ needs.test-patches.result }}" != "success" ]; then
echo "CI checks failed: build=${{ needs.build.result }}, test-patches=${{ needs.test-patches.result }}" >&2
exit 1
fi
echo "All CI checks succeeded."
77 changes: 77 additions & 0 deletions .github/workflows/patched-release-darwin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Adds the aarch64-apple-darwin CLI to an EXISTING patched-* release that was published
# before patched-release.yml built darwin. The binary is built from the release's own tag,
# so it is the same source as the Linux assets already on that release; the Linux assets
# are left untouched and SHA256SUMS is regenerated over every asset. It refuses a release
# that already has darwin assets.
#
# Run: push a tag named darwin-backfill-<release tag>, e.g. darwin-backfill-patched-1.54.0.15,
# at any commit that has this file (the build checks out the release tag, not the pushed one).
# A tag push rather than workflow_dispatch: dispatch needs the file on the default branch,
# which here is an upstream mirror.
on:
push:
tags:
- "darwin-backfill-patched-*"

name: "Patched release (darwin backfill)"

permissions:
contents: read

jobs:
check:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.resolve.outputs.tag }}
sha: ${{ steps.resolve.outputs.sha }}
steps:
- id: resolve
env:
GH_TOKEN: ${{ github.token }}
PUSHED: ${{ github.ref_name }}
run: |
TAG="${PUSHED#darwin-backfill-}"
case "$TAG" in patched-*) ;; *) echo "not a patched-* tag: $TAG" >&2; exit 1 ;; esac
gh release view "$TAG" --repo "$GITHUB_REPOSITORY" > /dev/null
sha="$(gh api "repos/$GITHUB_REPOSITORY/commits/$TAG" --jq .sha)"
test -n "$sha"
# A Rust build is not reproducible: replacing a darwin asset would break every
# pinned hash of it. Refuse rather than clobber; delete the asset by hand to redo.
if gh release view "$TAG" --repo "$GITHUB_REPOSITORY" --json assets --jq '.assets[].name' \
| grep -qx 'goose-aarch64-apple-darwin.tar.gz'; then
echo "$TAG already has darwin assets; refusing to replace them" >&2
exit 1
fi
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
echo "sha=$sha" >> "$GITHUB_OUTPUT"

build-macos:
needs: check
uses: ./.github/workflows/patched-build-macos.yml
permissions:
contents: read
with:
ref: ${{ needs.check.outputs.sha }}

upload:
needs: [check, build-macos]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
name: goose-aarch64-apple-darwin
path: dist
- name: Upload to the release
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ needs.check.outputs.tag }}
run: |
test -f dist/goose-aarch64-apple-darwin.tar.gz
mkdir all
gh release download "$TAG" --repo "$GITHUB_REPOSITORY" --dir all --pattern 'goose-*'
cp dist/* all/
(cd all && sha256sum goose-* > SHA256SUMS && cat SHA256SUMS)
gh release upload "$TAG" dist/* --repo "$GITHUB_REPOSITORY"
gh release upload "$TAG" all/SHA256SUMS --repo "$GITHUB_REPOSITORY" --clobber
74 changes: 74 additions & 0 deletions .github/workflows/patched-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Modified by Jonathan Mohrbacher, 2026: the release builds with upstream's Linux CLI build workflow and patched-build-macos.yml (macOS CLI build, unsigned); tests run via shared patched-test.yml.
# Builds this branch (an upstream release tag plus a few local patches) with upstream's own
# Linux CLI build workflow and patched-build-macos.yml (upstream's macOS CLI build, unsigned), so the result
# differs from the upstream release only by the patches, and publishes the gnu tarballs and the
# aarch64-apple-darwin tarballs as a release of this fork.
#
# A release made before the darwin build was added gets its darwin assets from
# patched-release-darwin.yml (push a darwin-backfill-<tag> tag).
#
# Run: push a tag named patched-<upstream version>.<n>, e.g. patched-1.54.0.1, on the patched branch.
# The name must not start with "v": upstream's release.yml and publish-docker.yml fire on v* tags.
on:
push:
tags:
- "patched-*"

name: "Patched release"

permissions:
contents: read

jobs:
build:
uses: ./.github/workflows/build-cli-linux.yml
permissions:
contents: read
with:
ref: ${{ github.sha }}

# The Mac runs the same patched goose as the Linux hosts (workstation pkgs/goose).
# Unsigned: the Nix fetch never sets a quarantine attribute, and the linker's ad-hoc
# signature is all Apple Silicon needs to exec a binary.
build-macos:
uses: ./.github/workflows/patched-build-macos.yml
permissions:
contents: read
with:
ref: ${{ github.sha }}

# Unit tests for the patched code paths (including the vendored acp-http crate), on the same toolchain.
test-patches:
uses: ./.github/workflows/patched-test.yml
permissions:
contents: read
with:
ref: ${{ github.sha }}

release:
needs: [build, build-macos, test-patches]
if: ${{ !cancelled() && needs.test-patches.result == 'success' }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: goose-*-unknown-linux-gnu
merge-multiple: true
path: dist
- uses: actions/download-artifact@v4
with:
name: goose-aarch64-apple-darwin
path: dist
- name: Create release
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.ref_name }}
run: |
ls -la dist
test -f dist/goose-aarch64-unknown-linux-gnu.tar.gz
test -f dist/goose-aarch64-apple-darwin.tar.gz
(cd dist && sha256sum -- * > SHA256SUMS)
gh release create "$TAG" dist/* --repo "$GITHUB_REPOSITORY" --target "$GITHUB_SHA" \
--title "$TAG" --notes "Upstream goose v$(echo "$TAG" | sed -E 's/^patched-([0-9]+[.][0-9]+[.][0-9]+).*/\1/') plus the local patches committed after that tag at $GITHUB_SHA."
110 changes: 110 additions & 0 deletions .github/workflows/patched-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# Reusable workflow to run unit tests and graph checks for the fork's patches.
# Shared by patched-release.yml (on tag release) and patched-ci.yml (on PRs to patched/**).
on:
workflow_call:
inputs:
ref:
description: "Commit ref to test"
required: true
type: string

name: "Patched tests"

permissions:
contents: read

jobs:
test-patches:
name: test-patches
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ inputs.ref }}
- name: Dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential pkg-config libssl-dev libdbus-1-dev libxcb1-dev protobuf-compiler cmake clang libclang-dev
- name: Vendored acp-http is the one in the build graph
# An unused [patch] is only a cargo warning; fail loudly instead. --locked also
# fails if Cargo.lock is stale (build-cli-linux.yml does not pass --locked).
run: |
cargo tree --locked -p goose-cli --features acp-http -i agent-client-protocol-http --depth 0 \
| tee /dev/stderr | grep -F 'vendor/agent-client-protocol-http'
- name: Test patched modules
run: |
run_exact_tests() {
local cargo_args=()
local tests=()
local seen_sep=false

for arg in "$@"; do
if [ "$arg" = "--" ]; then
seen_sep=true
continue
fi
if [ "$seen_sep" = true ]; then
tests+=("$arg")
else
cargo_args+=("$arg")
fi
done

echo "Verifying ${#tests[@]} exact test(s) exist for: cargo test ${cargo_args[*]}..."
local list
list="$(cargo test "${cargo_args[@]}" -- "${tests[@]}" --exact --list)"
for t in "${tests[@]}"; do
if ! echo "$list" | grep -q "^$t: \(test\|benchmark\)$"; then
echo "Error: exact test '$t' not found in cargo test ${cargo_args[*]}" >&2
exit 1
fi
done
echo "All ${#tests[@]} exact test(s) verified to exist."

cargo test "${cargo_args[@]}" -- "${tests[@]}" --exact
}

F=code-mode,tree-sitter,aws-providers,telemetry,otel,rustls-tls,live-voice,system-keyring,platform-apps,chat-recall,scheduler,acp-http,online-model-meta
run_exact_tests --release -p goose --features "$F" --lib -- \
"providers::gcpvertexai::tests::test_build_vertex_url_proxy_host_keeps_target_location_in_path" \
"providers::gcpauth::tests::authorized_user_scope_defaults_and_overrides" \
"model_config::cache_ttl_tests::rederive_preserves_stored_ttl_when_config_absent" \
"model_config::cache_ttl_tests::rederive_replaces_stored_ttl_with_configured_value" \
"model_config::cache_ttl_tests::rederive_applies_configured_ttl_when_stored_absent" \
"model_config::cache_ttl_tests::rederive_leaves_unset_when_both_stored_and_config_absent" \
"skills::tests::global_skill_dirs_are_scanned_by_default" \
"skills::tests::global_skills_false_scans_only_project_dirs" \
"skills::tests::unrecognised_global_skills_value_fails_toward_project_only" \
"skills::tests::global_skills_false_also_refuses_path_resolution_into_home_roots" \
"providers::gcpvertexai::tests::test_route_host_sends_only_gemini_to_the_gemini_host" \
"session_context::tests::test_parse_header_names" \
"session_context::tests::test_session_id_request_builder_rejects_invalid_header_override" \
"session_context::tests::test_session_headers_builder_top_level_session_has_no_parent_header" \
"session_context::tests::test_session_headers_builder_sends_every_name_and_the_parent" \
"session::session_manager::tests::test_parent_link_is_visible_to_providers" \
"recipe::tests::test_format_serde_error_invalid_thinking_effort" \
"agents::platform_extensions::summon::tests::test_resolve_model_config_recipe_thinking_effort_overrides_parent_on_override" \
"agents::platform_extensions::summon::tests::test_resolve_model_config_recipe_thinking_effort_overrides_parent_on_clone" \
"agents::platform_extensions::summon::tests::test_resolve_model_config_recipe_without_thinking_effort_inherits_parent" \
"agents::platform_extensions::summon::tests::test_recipe_yaml_thinking_effort_parsing" \
"providers::formats::gcpvertexai::tests::claude_adaptive_thinking_requests_summarized_display" \
"agents::reply_parts::tests::toolshim_provider_stream_coalesces_streamed_thinking" \
"agents::reply_parts::tests::thinking_deltas_before_transient_error_retries_and_succeeds" \
"agents::reply_parts::tests::signed_thinking_close_before_transient_error_does_not_retry"

run_exact_tests --release -p goose-provider-types --lib -- \
"formats::anthropic::tests::native_claude_thinking_carries_display_and_block_binding" \
"formats::anthropic::tests::summarized_thinking_round_trips_with_its_signature" \
"formats::anthropic::tests::test_streaming_thinking_arrives_before_its_block_stops" \
"formats::anthropic::tests::test_streaming_omitted_thinking_yields_one_signed_block" \
"formats::anthropic::tests::test_streamed_thinking_text_and_tool_call_store_one_message" \
"formats::anthropic::tests::test_streaming_thinking_after_completed_tool_use" \
"formats::anthropic::tests::test_streaming_thinking_and_text" \
"formats::anthropic::tests::test_streaming_thinking_from_start_block_without_signature" \
"formats::anthropic::tests::test_streaming_thinking_text_then_tool_call" \
"formats::anthropic::tests::test_streaming_redacted_thinking"

run_exact_tests --release -p goose-cli --lib -- \
"session::builder::tests::resume_keeps_saved_cache_ttl_when_config_absent"

cargo test --release -p agent-client-protocol-http --features server --lib
Loading
Loading