From 76e5288b32010fb17bfdab430acc812061997745 Mon Sep 17 00:00:00 2001 From: Tor Colvin Date: Mon, 15 Jun 2026 11:12:51 -0400 Subject: [PATCH 1/7] Add droid as available reviewer --- .droid.yaml | 26 ++++++++++++++++ .github/workflows/droid.yml | 61 +++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 .droid.yaml create mode 100644 .github/workflows/droid.yml diff --git a/.droid.yaml b/.droid.yaml new file mode 100644 index 0000000000..f3b830304d --- /dev/null +++ b/.droid.yaml @@ -0,0 +1,26 @@ +review: + # --- Auto-review settings --- + auto_review: + enabled: false + draft: false + bot: false + ignore_title_keywords: + - "WIP" + - "DO NOT MERGE" + ignore_labels: + - "droid-skip" + - "Abandoned" + excluded_base_branches: + - "main" + + # --- Output settings --- + pr_summary: true + file_summaries: true + tips: true + github_action_repair: true + enable_skip_reason_comments: true + + guidelines: + - path: "*" + guideline: "Follow our ui-review.instructions.md style guide." + context_document_path: ".github/copilot-instructions.md" diff --git a/.github/workflows/droid.yml b/.github/workflows/droid.yml new file mode 100644 index 0000000000..f5f8a87041 --- /dev/null +++ b/.github/workflows/droid.yml @@ -0,0 +1,61 @@ +name: Droid + +on: + issue_comment: + types: [created] + pull_request_review_comment: + types: [created] + issues: + types: [opened, assigned] + pull_request_review: + types: [submitted] + +concurrency: + # factory-droid[bot] dispatches get a unique per-run suffix so the bot's own status comments cannot cancel an in-flight @droid run. + group: >- + ${{ github.workflow }}-${{ + github.event.pull_request.number || + github.event.issue.number || + github.ref + }}${{ + github.actor == 'factory-droid[bot]' && + format('-bot-{0}', github.run_id) || '' + }} + cancel-in-progress: true + +jobs: + droid: + if: | + ( + (github.event_name == 'issue_comment' + && contains(github.event.comment.body, '@droid') + && !contains(github.event.comment.body, '@droid security')) || + (github.event_name == 'pull_request_review_comment' + && contains(github.event.comment.body, '@droid') + && !contains(github.event.comment.body, '@droid security')) || + (github.event_name == 'pull_request_review' + && contains(github.event.review.body, '@droid') + && !contains(github.event.review.body, '@droid security')) || + (github.event_name == 'issues' + && (contains(github.event.issue.body, '@droid') + || contains(github.event.issue.title, '@droid')) + && !contains(github.event.issue.body, '@droid security') + && !contains(github.event.issue.title, '@droid security')) + ) + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + issues: write + id-token: write + actions: read + steps: + - name: Checkout repository + uses: actions/checkout@v5 + with: + fetch-depth: 1 + - name: Run Droid Exec + uses: Factory-AI/droid-action@e3d1f5e7861c36fe4a9c4dca3edec87b964b2bc4 #v5.0.0 + with: + factory_api_key: ${{ secrets.FACTORY_API_KEY }} + review_model: gpt-5.3-codex From 09aaf464cc996d79b09c8dc9279f426672b525cc Mon Sep 17 00:00:00 2001 From: Tor Colvin Date: Mon, 15 Jun 2026 11:46:16 -0400 Subject: [PATCH 2/7] fix naming --- .droid.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.droid.yaml b/.droid.yaml index f3b830304d..886231c61a 100644 --- a/.droid.yaml +++ b/.droid.yaml @@ -22,5 +22,5 @@ review: guidelines: - path: "*" - guideline: "Follow our ui-review.instructions.md style guide." + guideline: "Follow our copilot-instructions.md style guide." context_document_path: ".github/copilot-instructions.md" From ffaf01589514221789c8432a94d67206c6c6f0da Mon Sep 17 00:00:00 2001 From: Tor Colvin Date: Wed, 17 Jun 2026 10:38:42 -0400 Subject: [PATCH 3/7] remove unused droid security --- .github/workflows/droid.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/droid.yml b/.github/workflows/droid.yml index f5f8a87041..aacdfa641e 100644 --- a/.github/workflows/droid.yml +++ b/.github/workflows/droid.yml @@ -28,19 +28,14 @@ jobs: if: | ( (github.event_name == 'issue_comment' - && contains(github.event.comment.body, '@droid') - && !contains(github.event.comment.body, '@droid security')) || + && contains(github.event.comment.body, '@droid')) || (github.event_name == 'pull_request_review_comment' - && contains(github.event.comment.body, '@droid') - && !contains(github.event.comment.body, '@droid security')) || + && contains(github.event.comment.body, '@droid')) || (github.event_name == 'pull_request_review' - && contains(github.event.review.body, '@droid') - && !contains(github.event.review.body, '@droid security')) || + && contains(github.event.review.body, '@droid')) || (github.event_name == 'issues' && (contains(github.event.issue.body, '@droid') - || contains(github.event.issue.title, '@droid')) - && !contains(github.event.issue.body, '@droid security') - && !contains(github.event.issue.title, '@droid security')) + || contains(github.event.issue.title, '@droid'))) ) runs-on: ubuntu-latest permissions: From 049608cab8d02dc25844485ff1e06de72fdd9b99 Mon Sep 17 00:00:00 2001 From: Tor Colvin Date: Wed, 17 Jun 2026 13:45:18 -0400 Subject: [PATCH 4/7] try to fix ability to talk to droid --- .github/workflows/droid.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/droid.yml b/.github/workflows/droid.yml index aacdfa641e..874ec93ca2 100644 --- a/.github/workflows/droid.yml +++ b/.github/workflows/droid.yml @@ -2,13 +2,15 @@ name: Droid on: issue_comment: - types: [created] + types: [created, edited] pull_request_review_comment: - types: [created] + types: [created, edited] issues: types: [opened, assigned] pull_request_review: types: [submitted] + pull_request: + types: [opened, edited] concurrency: # factory-droid[bot] dispatches get a unique per-run suffix so the bot's own status comments cannot cancel an in-flight @droid run. @@ -35,7 +37,10 @@ jobs: && contains(github.event.review.body, '@droid')) || (github.event_name == 'issues' && (contains(github.event.issue.body, '@droid') - || contains(github.event.issue.title, '@droid'))) + || contains(github.event.issue.title, '@droid'))) || + (github.event_name == 'pull_request' + && (contains(github.event.pull_request.body, '@droid') + || contains(github.event.pull_request.title, '@droid'))) ) runs-on: ubuntu-latest permissions: From b3ac97e52d109388f14b426565fbc6c3ad7bdd4c Mon Sep 17 00:00:00 2001 From: Tor Colvin Date: Thu, 18 Jun 2026 09:21:42 -0400 Subject: [PATCH 5/7] remove unncessary workflows for testing droid --- .github/workflows/ci.yml | 360 ---------------------------------- .github/workflows/service.yml | 54 ----- 2 files changed, 414 deletions(-) delete mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/service.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 9342b4d0aa..0000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,360 +0,0 @@ -# Copyright 2021-Present Couchbase, Inc. -# -# Use of this software is governed by the Business Source License included in -# the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that -# file, in accordance with the Business Source License, use of this software -# will be governed by the Apache License, Version 2.0, included in the file -# licenses/APL2.txt. - -name: ci -permissions: - contents: read - -on: - push: - branches: - - 'master' - - 'main' - - 'release/*' - - 'feature/*' - - 'beryllium' - - 'CBG*' - - 'ci-*' - pull_request: - branches: - - 'master' - - 'main' - - 'release/*' - - 'beryllium' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: ${{ !contains(github.ref, 'release/') && !contains(github.ref, 'main') }} - -env: - ACTIONS_CHECKOUT_VERSION: &actions_checkout_version actions/checkout@v6 - ACTIONS_SETUP_GO_VERSION: &actions_setup_go_version actions/setup-go@v6 - ACTIONS_RUFF_VERSION: &actions_ruff_version astral-sh/ruff-action@v4.0.0 - GO_VERSION: &go_version 1.26.4 - GOTESTSUM_VERSION: 1.13.0 - GO_TEST_ANNOTATIONS_VERSION: &go_test_annotations_version guyarb/golang-test-annotations@v0.9.0 - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: *actions_checkout_version - - uses: *actions_setup_go_version - with: - go-version: *go_version - - name: go-build - run: go build "./..." - - addlicense: - name: addlicense - runs-on: ubuntu-latest - steps: - - uses: *actions_checkout_version - - uses: *actions_setup_go_version - with: - go-version: *go_version - - run: go install github.com/google/addlicense@latest - - run: addlicense -check -f licenses/addlicense.tmpl . - - golangci: - name: lint - runs-on: ubuntu-latest - steps: - - uses: *actions_checkout_version - - uses: *actions_setup_go_version - with: - go-version: *go_version - - name: golangci-lint - uses: golangci/golangci-lint-action@v9 - with: - version: v2.12.2 - args: --config=.golangci-strict.yml - - test: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - include: - - os: macos-latest - name: macos - - os: windows-latest - name: windows - - os: ubuntu-latest - name: ubuntu - env: - GOPRIVATE: github.com/couchbaselabs - MallocNanoZone: 0 - name: test (${{ matrix.name }}) - steps: - - uses: *actions_checkout_version - - uses: *actions_setup_go_version - with: - go-version: *go_version - - name: Install gotestsum - run: go install gotest.tools/gotestsum@v${{ env.GOTESTSUM_VERSION }} - - name: Build - run: go build -v "./..." - - name: Run Tests - run: gotestsum --format pkgname-and-test-fails --hide-summary=skipped --hide-summary=output --jsonfile test.json -- -tags cb_sg_devmode -shuffle=on -timeout=30m -count=1 "./..." - shell: bash - - name: Test Summary - if: always() - shell: bash - run: .github/scripts/test-summary.sh - - name: Annotate Failures - if: always() - uses: *go_test_annotations_version - with: - test-results: test.json - - name: Render test log - if: failure() - shell: bash - run: gotestsum --format standard-verbose --raw-command -- cat test.json > test.log 2>&1 || true - - name: Upload test logs artifact - if: failure() - uses: actions/upload-artifact@v7 - with: - name: test-logs-${{ github.job }}-${{ matrix.name || matrix.os || 'default' }} - path: test.log - retention-days: 7 - if-no-files-found: warn - - test-race: - runs-on: ubuntu-latest - env: - GOPRIVATE: github.com/couchbaselabs - steps: - - uses: *actions_checkout_version - - uses: *actions_setup_go_version - with: - go-version: *go_version - - name: Install gotestsum - run: go install gotest.tools/gotestsum@v${{ env.GOTESTSUM_VERSION }} - - name: Run Tests - run: gotestsum --format pkgname-and-test-fails --hide-summary=skipped --hide-summary=output --jsonfile test.json -- -tags cb_sg_devmode -race -shuffle=on -timeout=30m -count=1 "./..." - shell: bash - - name: Test Summary - if: always() - shell: bash - run: .github/scripts/test-summary.sh - - name: Annotate Failures - if: always() - uses: *go_test_annotations_version - with: - test-results: test.json - - name: Render test log - if: failure() - shell: bash - run: gotestsum --format standard-verbose --raw-command -- cat test.json > test.log 2>&1 || true - - name: Upload test logs artifact - if: failure() - uses: actions/upload-artifact@v7 - with: - name: test-logs-${{ github.job }} - path: test.log - retention-days: 7 - if-no-files-found: warn - - test-default-collection: - runs-on: ubuntu-latest - env: - GOPRIVATE: github.com/couchbaselabs - SG_TEST_USE_DEFAULT_COLLECTION: true - steps: - - uses: *actions_checkout_version - - uses: *actions_setup_go_version - with: - go-version: *go_version - - name: Install gotestsum - run: go install gotest.tools/gotestsum@v${{ env.GOTESTSUM_VERSION }} - - name: Run Tests - run: gotestsum --format pkgname-and-test-fails --hide-summary=skipped --hide-summary=output --jsonfile test.json -- -tags cb_sg_devmode -shuffle=on -timeout=30m -count=1 "./..." - shell: bash - - name: Test Summary - if: always() - shell: bash - run: .github/scripts/test-summary.sh - - name: Annotate Failures - if: always() - uses: *go_test_annotations_version - with: - test-results: test.json - - name: Render test log - if: failure() - shell: bash - run: gotestsum --format standard-verbose --raw-command -- cat test.json > test.log 2>&1 || true - - name: Upload test logs artifact - if: failure() - uses: actions/upload-artifact@v7 - with: - name: test-logs-${{ github.job }} - path: test.log - retention-days: 7 - if-no-files-found: warn - test-benchmark-compile: - runs-on: ubuntu-latest - env: - GOPRIVATE: github.com/couchbaselabs - steps: - - uses: *actions_checkout_version - - uses: *actions_setup_go_version - with: - go-version: *go_version - - name: Install gotestsum - run: go install gotest.tools/gotestsum@v${{ env.GOTESTSUM_VERSION }} - - name: Run Tests - run: gotestsum --format pkgname-and-test-fails --hide-summary=skipped --hide-summary=output --jsonfile test.json -- -tags cb_sg_devmode -shuffle=on -timeout=30m -count=1 -short -bench=. -benchtime=1x -run '!' "./..." - shell: bash - - name: Test Summary - if: always() - shell: bash - run: .github/scripts/test-summary.sh - - name: Annotate Failures - if: always() - uses: *go_test_annotations_version - with: - test-results: test.json - - name: Render test log - if: failure() - shell: bash - run: gotestsum --format standard-verbose --raw-command -- cat test.json > test.log 2>&1 || true - - name: Upload test logs artifact - if: failure() - uses: actions/upload-artifact@v7 - with: - name: test-logs-${{ github.job }} - path: test.log - retention-days: 7 - if-no-files-found: warn - - - test-disable-rev-cache: - runs-on: ubuntu-latest - env: - GOPRIVATE: github.com/couchbaselabs - SG_TEST_DISABLE_REV_CACHE: true - steps: - - uses: *actions_checkout_version - - uses: *actions_setup_go_version - with: - go-version: *go_version - - name: Install gotestsum - run: go install gotest.tools/gotestsum@v${{ env.GOTESTSUM_VERSION }} - - name: Run Tests - run: gotestsum --format pkgname-and-test-fails --hide-summary=skipped --hide-summary=output --jsonfile test.json -- -tags cb_sg_devmode -shuffle=on -timeout=30m -count=1 "./..." - shell: bash - - name: Test Summary - if: always() - shell: bash - run: .github/scripts/test-summary.sh - - name: Annotate Failures - if: always() - uses: *go_test_annotations_version - with: - test-results: test.json - - name: Render test log - if: failure() - shell: bash - run: gotestsum --format standard-verbose --raw-command -- cat test.json > test.log 2>&1 || true - - name: Upload test logs artifact - if: failure() - uses: actions/upload-artifact@v7 - with: - name: test-logs-${{ github.job }} - path: test.log - retention-days: 7 - if-no-files-found: warn - - python-format: - runs-on: ubuntu-latest - steps: - - uses: *actions_checkout_version - - uses: *actions_ruff_version - with: - args: 'format --check' - python-lint: - runs-on: ubuntu-latest - steps: - - uses: *actions_checkout_version - - uses: *actions_ruff_version - test-sgcollect: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-latest, windows-latest, ubuntu-latest] - steps: - - uses: *actions_checkout_version - - uses: astral-sh/setup-uv@v7 - - name: Run test - run: | - uv run -- pytest - - name: Run mypy - run: | - uv run -- mypy - - test-stats-definition-exporter: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-latest, windows-latest, ubuntu-latest] - steps: - - uses: *actions_checkout_version - - uses: *actions_setup_go_version - with: - go-version: *go_version - - name: Build - run: go build -v "./tools/stats-definition-exporter" - - name: Install gotestsum - run: go install gotest.tools/gotestsum@v${{ env.GOTESTSUM_VERSION }} - - name: Run Tests - run: gotestsum --format pkgname-and-test-fails --hide-summary=skipped --hide-summary=output --jsonfile test.json -- -shuffle=on -timeout=5m -count=1 "./tools/stats-definition-exporter" - shell: bash - - name: Test Summary - if: always() - shell: bash - run: .github/scripts/test-summary.sh - - name: Annotate Failures - if: always() - uses: *go_test_annotations_version - with: - test-results: test.json - - name: Render test log - if: failure() - shell: bash - run: gotestsum --format standard-verbose --raw-command -- cat test.json > test.log 2>&1 || true - - name: Upload test logs artifact - if: failure() - uses: actions/upload-artifact@v7 - with: - name: test-logs-${{ github.job }}-${{ matrix.name || matrix.os || 'default' }} - path: test.log - retention-days: 7 - if-no-files-found: warn - cache_perf_tool_build: - runs-on: ubuntu-latest - name: build cache perf tool - steps: - - uses: *actions_checkout_version - - uses: *actions_setup_go_version - with: - go-version: *go_version - - name: Build - run: go build "./tools/cache_perf_tool" - govulncheck: - runs-on: ubuntu-latest - name: Run govulncheck - steps: - - id: govulncheck - # tag for repo at v1 is not updated - uses: golang/govulncheck-action@31f7c5463448f83528bd771c2d978d940080c9fd - with: - go-version-input: *go_version - go-package: ./... diff --git a/.github/workflows/service.yml b/.github/workflows/service.yml deleted file mode 100644 index 97ef6a1f51..0000000000 --- a/.github/workflows/service.yml +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright 2022-Present Couchbase, Inc. -# -# Use of this software is governed by the Business Source License included in -# the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that -# file, in accordance with the Business Source License, use of this software -# will be governed by the Apache License, Version 2.0, included in the file -# licenses/APL2.txt. - -name: service -permissions: - contents: read - -on: - push: - # Only run when we modify service files - paths: - - 'service/**' - - 'integration-test/**' - - '.github/workflows/service.yml' - branches: - - 'main' - - 'release/*' - - 'feature/*' - - 'beryllium' - - 'CBG*' - - 'ci-*' - - 'api-ci-*' - pull_request: - # Only run when we modify service files - paths: - - 'service/**' - - 'integration-test/**' - branches: - - 'main' - - 'release/*' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: ${{ !contains(github.ref, 'release/')}} - -jobs: - scripts: - runs-on: ubuntu-latest - name: Verify service script installation. - steps: - - uses: actions/checkout@v6 - # build sync gateway since the executable is needed for service installation - - uses: actions/setup-go@v6 - with: - go-version: 1.26.4 - - name: "Build Sync Gateway" - run: mkdir -p ./bin && go build -o ./bin ./... - - name: "Run test scripts" - run: ./integration-test/service-install-tests.sh From 1df6e7911e11f6a8bad228fb0645825d2e1c5148 Mon Sep 17 00:00:00 2001 From: Tor Colvin Date: Thu, 18 Jun 2026 09:22:24 -0400 Subject: [PATCH 6/7] remove if statement to see if droid action will execute --- .github/workflows/droid.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/droid.yml b/.github/workflows/droid.yml index 874ec93ca2..b27a7432ec 100644 --- a/.github/workflows/droid.yml +++ b/.github/workflows/droid.yml @@ -27,21 +27,21 @@ concurrency: jobs: droid: - if: | - ( - (github.event_name == 'issue_comment' - && contains(github.event.comment.body, '@droid')) || - (github.event_name == 'pull_request_review_comment' - && contains(github.event.comment.body, '@droid')) || - (github.event_name == 'pull_request_review' - && contains(github.event.review.body, '@droid')) || - (github.event_name == 'issues' - && (contains(github.event.issue.body, '@droid') - || contains(github.event.issue.title, '@droid'))) || - (github.event_name == 'pull_request' - && (contains(github.event.pull_request.body, '@droid') - || contains(github.event.pull_request.title, '@droid'))) - ) +# if: | +# ( +# (github.event_name == 'issue_comment' +# && contains(github.event.comment.body, '@droid')) || +# (github.event_name == 'pull_request_review_comment' +# && contains(github.event.comment.body, '@droid')) || +# (github.event_name == 'pull_request_review' +# && contains(github.event.review.body, '@droid')) || +# (github.event_name == 'issues' +# && (contains(github.event.issue.body, '@droid') +# || contains(github.event.issue.title, '@droid'))) #|| +# (github.event_name == 'pull_request' +# && (contains(github.event.pull_request.body, '@#droid') +# || contains(github.event.pull_request.title, '@#droid'))) +# ) runs-on: ubuntu-latest permissions: contents: write From 11e722fc65031383392d897153d3d04d3aa81a3c Mon Sep 17 00:00:00 2001 From: Tor Colvin Date: Wed, 22 Jul 2026 17:01:07 -0400 Subject: [PATCH 7/7] add workflow dispatch --- .github/workflows/droid.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/droid.yml b/.github/workflows/droid.yml index b27a7432ec..8649e53633 100644 --- a/.github/workflows/droid.yml +++ b/.github/workflows/droid.yml @@ -11,6 +11,7 @@ on: types: [submitted] pull_request: types: [opened, edited] + workflow_dispatch: concurrency: # factory-droid[bot] dispatches get a unique per-run suffix so the bot's own status comments cannot cancel an in-flight @droid run.