Skip to content

Commit 1f7ee27

Browse files
committed
Merge branch 'main' into micn/multi-model-multi-provider-autopilot
* main: Align Dynamic Task Interface with Recipe Interface (#4311) docs: copilot auth and mcp-ui links (#4497) docs: July and August 2025 Community All-Stars Update (#4501) remove clicking outside to close recipe warning (#4502) lower min width to 450 for small screens Convert recipe create and import forms to use tanstack form and zod schema validation (#4499) Repo CI: use a writable location for Goose home directory (#4500) feat: Add functionality to delete session in history list view (#4480) fix: recipe deeplink "+" characters and folder change (#4471) Add session to agents (#4216) fix: need to send errors to appropriate stream (#4491) Add Docker support for Goose in CI/CD pipelines (#4434) Add visual indicator while recipe loads (#4447) Disable chat input while extensions load (#4417) chore(release): release version 1.7.0 (#4391) fix double filtering (#4409) Rewrite the developer mcp using the rmcp sdk (#4297) docs: sessions reorg and conversation features (#4462)
2 parents c79beed + 3897345 commit 1f7ee27

File tree

141 files changed

+8730
-6235
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+8730
-6235
lines changed

.dockerignore

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Build artifacts
2+
target/
3+
**/target/
4+
5+
# Node modules and build outputs
6+
node_modules/
7+
**/node_modules/
8+
ui/desktop/out/
9+
ui/desktop/dist/
10+
ui/desktop/src/bin/
11+
12+
# Git
13+
.git/
14+
.gitignore
15+
16+
# Documentation builds
17+
documentation/build/
18+
documentation/.docusaurus/
19+
documentation/.cache-loader/
20+
21+
# IDE and editor files
22+
.vscode/
23+
.idea/
24+
*.swp
25+
*.swo
26+
*~
27+
.DS_Store
28+
29+
# Environment and config files
30+
.env
31+
.env.*
32+
*.log
33+
34+
# CI/CD
35+
.github/
36+
.hermit/
37+
38+
# Temporary files
39+
tmp/
40+
temp/
41+
*.tmp
42+
43+
# Test coverage
44+
coverage/
45+
*.lcov
46+
47+
# Python
48+
__pycache__/
49+
*.py[cod]
50+
*$py.class
51+
.pytest_cache/
52+
53+
# Rust analyzer
54+
rust-project.json
55+
56+
# Benchmarks
57+
bench_results/
58+
59+
# Local configuration
60+
.config/
61+
.local/
62+
63+
# Docker files (don't need to copy these into context)
64+
Dockerfile
65+
.dockerignore
66+
docker-compose.yml
67+
68+
# Development scripts that aren't needed in build
69+
scripts/bench-postprocess-scripts/
70+
71+
# macOS
72+
.DS_Store
73+
.AppleDouble
74+
.LSOverride
75+
76+
# Windows
77+
Thumbs.db
78+
ehthumbs.db
79+
80+
# Linux
81+
.directory
82+
.Trash-*
83+
84+
# Archives
85+
*.tar
86+
*.tar.gz
87+
*.tar.bz2
88+
*.zip
89+
*.7z
90+
*.rar
91+
92+
# Backup files
93+
*.bak
94+
*.backup
95+
*.old
96+
97+
# Session files
98+
*.jsonl
99+
sessions/
100+
101+
# Generated files
102+
ui/desktop/openapi.json
103+
ui/desktop/src/api/
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Publish Docker Image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- 'v*.*.*'
9+
- 'v*.*.*-*' # For pre-releases like v1.2.3-beta
10+
paths-ignore:
11+
- 'documentation/**'
12+
- '*.md'
13+
workflow_dispatch:
14+
15+
permissions:
16+
contents: read
17+
packages: write
18+
19+
jobs:
20+
docker:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4
25+
26+
- name: Set up Docker Buildx
27+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # [email protected]
28+
29+
- name: Log in to GitHub Container Registry
30+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # [email protected]
31+
with:
32+
registry: ghcr.io
33+
username: ${{ github.actor }}
34+
password: ${{ secrets.GITHUB_TOKEN }}
35+
36+
- name: Extract metadata
37+
id: meta
38+
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # [email protected]
39+
with:
40+
images: ghcr.io/${{ github.repository_owner }}/goose
41+
tags: |
42+
# For main branch: latest, main, and sha
43+
type=ref,event=branch
44+
type=sha,prefix={{branch}}-
45+
type=raw,value=latest,enable={{is_default_branch}}
46+
# For tags: v1.2.3 -> 1.2.3, 1.2, 1, latest (if not pre-release)
47+
type=semver,pattern={{version}}
48+
type=semver,pattern={{major}}.{{minor}}
49+
type=semver,pattern={{major}}
50+
# For pre-release tags: keep the full version
51+
type=raw,value={{tag}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
52+
53+
- name: Build and push Docker image
54+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # [email protected]
55+
with:
56+
context: .
57+
push: true
58+
tags: ${{ steps.meta.outputs.tags }}
59+
labels: ${{ steps.meta.outputs.labels }}
60+
cache-from: type=gha
61+
cache-to: type=gha,mode=max
62+
platforms: linux/amd64,linux/arm64

.github/workflows/test-finder.yml

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
name: Daily Test Coverage Finder
2+
3+
on:
4+
schedule:
5+
# Run daily at 2 AM UTC
6+
- cron: '0 2 * * *'
7+
workflow_dispatch:
8+
inputs:
9+
dry_run:
10+
description: 'Dry run (no PR creation)'
11+
required: false
12+
default: false
13+
type: boolean
14+
15+
permissions:
16+
contents: write
17+
pull-requests: write
18+
19+
jobs:
20+
find-untested-code:
21+
runs-on: ubuntu-latest
22+
container:
23+
image: ghcr.io/block/goose:latest
24+
options: --user root
25+
env:
26+
GOOSE_PROVIDER: ${{ vars.GOOSE_PROVIDER || 'openai' }}
27+
GOOSE_MODEL: ${{ vars.GOOSE_MODEL || 'gpt-4o' }}
28+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
29+
HOME: /tmp/goose-home
30+
31+
steps:
32+
- name: Checkout code
33+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4
34+
with:
35+
fetch-depth: 0
36+
37+
- name: Install analysis tools
38+
run: |
39+
apt-get update
40+
apt-get install -y jq ripgrep
41+
42+
- name: Find untested code and create working test
43+
id: find_untested
44+
run: |
45+
# Ensure the HOME directory structure exists
46+
mkdir -p $HOME/.local/share/goose/sessions
47+
mkdir -p $HOME/.config/goose
48+
49+
# Create analysis and test creation script
50+
cat << 'EOF' > /tmp/create_working_test.txt
51+
Your task is to find ONE untested function in the Rust codebase and create a working test for it.
52+
53+
Requirements:
54+
1. The function MUST be in the crates/ directory
55+
2. It MUST have actual logic (not just a simple getter/setter)
56+
3. It MUST not already have a test
57+
4. Prefer functions with complexity but that are still testable in isolation
58+
5. Focus on the goose crate first, then goose-cli, then others
59+
60+
Process:
61+
1. Find a suitable untested function
62+
2. Write a comprehensive unit test for it
63+
3. Apply your changes to the codebase
64+
4. Run the test with: cargo test --test <test_name>
65+
5. If the test fails:
66+
- Read and understand the error message
67+
- Fix the test code
68+
- Apply the fix and run the test again
69+
- Repeat up to 3 times until the test passes
70+
6. Once the test passes (or after 3 attempts), save the final changes as a git diff to /tmp/test_addition.patch
71+
7. Report the outcome:
72+
- If successful: write "SUCCESS" to /tmp/test_result.txt
73+
- If no suitable function found: write "NO_FUNCTION_FOUND" to /tmp/test_result.txt
74+
- If test couldn't be fixed: write "TEST_FAILED" to /tmp/test_result.txt
75+
76+
Important:
77+
- Only add ONE test for ONE function
78+
- The test MUST compile and pass before creating the patch
79+
- Keep changes minimal and focused
80+
- Include a descriptive test name that explains what is being tested
81+
EOF
82+
83+
goose run -i /tmp/create_working_test.txt
84+
85+
# Check the result
86+
if [ -f /tmp/test_result.txt ]; then
87+
RESULT=$(cat /tmp/test_result.txt)
88+
echo "Test creation result: $RESULT"
89+
90+
if [ "$RESULT" = "SUCCESS" ] && [ -f /tmp/test_addition.patch ]; then
91+
echo "patch_created=true" >> $GITHUB_OUTPUT
92+
# Extract function name from patch for PR title
93+
FUNC_NAME=$(grep -E "fn test_|#\[test\]" /tmp/test_addition.patch | head -1 | sed 's/.*test_//' | sed 's/(.*//' || echo "function")
94+
echo "function_name=${FUNC_NAME}" >> $GITHUB_OUTPUT
95+
else
96+
echo "patch_created=false" >> $GITHUB_OUTPUT
97+
echo "Reason: $RESULT"
98+
fi
99+
else
100+
echo "patch_created=false" >> $GITHUB_OUTPUT
101+
echo "No result file created"
102+
fi
103+
104+
- name: Create Pull Request
105+
if: steps.find_untested.outputs.patch_created == 'true' && github.event.inputs.dry_run != 'true'
106+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # [email protected]
107+
with:
108+
token: ${{ secrets.GITHUB_TOKEN }}
109+
commit-message: "test: add test for ${{ steps.find_untested.outputs.function_name }}"
110+
title: "test: add test coverage for ${{ steps.find_untested.outputs.function_name }}"
111+
body: |
112+
## 🤖 Automated Test Addition
113+
114+
This PR was automatically generated by Goose to improve test coverage.
115+
116+
### What changed?
117+
Added a unit test for a previously untested function.
118+
119+
### Why?
120+
Part of our daily automated test coverage improvement initiative. Goose analyzes the codebase to find untested but important functions and creates focused unit tests for them.
121+
122+
### Review checklist
123+
- [ ] Test is meaningful and actually tests the function
124+
- [ ] Test name is descriptive
125+
- [ ] Test passes locally
126+
- [ ] No unnecessary changes included
127+
128+
---
129+
*Generated by the Daily Test Coverage Finder workflow*
130+
branch: goose/test-coverage-${{ github.run_number }}
131+
delete-branch: true
132+
labels: |
133+
goose-generated
134+
test
135+
automated
136+
137+
- name: Summary
138+
if: always()
139+
env:
140+
PATCH_CREATED: ${{ steps.find_untested.outputs.patch_created }}
141+
FUNCTION_NAME: ${{ steps.find_untested.outputs.function_name }}
142+
run: |
143+
if [ "$PATCH_CREATED" == "true" ]; then
144+
echo "✅ Successfully found untested code and created a test"
145+
echo "📝 Function tested: $FUNCTION_NAME"
146+
else
147+
echo "ℹ️ No suitable untested code found today"
148+
fi

0 commit comments

Comments
 (0)