Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Remove dormant and disabled GitHub Actions workflows (#58975)

John D. Swanson74e65edf512f
diff --git a/.github/workflows/assign-reviewers.yml b/.github/workflows/assign-reviewers.yml
deleted file mode 100644
index 2a12a69defd..00000000000
--- a/.github/workflows/assign-reviewers.yml
+++ /dev/null
@@ -1,104 +0,0 @@
-# Assign Reviewers — Smart team assignment based on diff weight
-#
-# Triggers on PR open and ready_for_review events. Checks out the coordinator
-# repo (zed-industries/codeowner-coordinator) to access the assignment script and rules,
-# then assigns the 1-2 most relevant teams as reviewers.
-#
-# NOTE: This file is stored in the codeowner-coordinator repo but must be deployed to
-# the zed repo at .github/workflows/assign-reviewers.yml. See INSTALL.md.
-#
-# AUTH NOTE: Uses a GitHub App (COORDINATOR_APP_ID + COORDINATOR_APP_PRIVATE_KEY)
-# for all API operations: cloning the private coordinator repo, requesting team
-# reviewers, and setting PR assignees. GITHUB_TOKEN is not used.
-#
-# SECURITY INVARIANTS (pull_request_target):
-# This workflow runs with access to secrets for ALL PRs including forks.
-# It is safe ONLY because:
-# 1. The checkout is the coordinator repo at ref: main — NEVER the PR head/branch
-# 2. No ${{ }} interpolation of event fields in run: blocks — all routed via env:
-# 3. The script never executes, sources, or reads files from the PR branch
-# Violating any of these enables remote code execution with secret access.
-
-name: Assign Reviewers
-
-on:
- # zizmor: ignore[dangerous-triggers] reviewed — no PR code checkout, only coordinator repo at ref: main
- pull_request_target:
- types: [opened, ready_for_review]
-
-# GITHUB_TOKEN is not used — all operations use the GitHub App token.
-# Declare minimal permissions so the default token has no write access.
-permissions: {}
-
-# Prevent duplicate runs for the same PR (e.g., rapid push + ready_for_review).
-concurrency:
- group: assign-reviewers-${{ github.event.pull_request.number }}
- cancel-in-progress: true
-
-# NOTE: For ready_for_review events, the webhook payload may still carry
-# draft: true due to a GitHub race condition (payload serialized before DB
-# update). We trust the event type instead — the script rechecks draft status
-# via a live API call as defense-in-depth.
-#
-# No author_association filter — external and fork PRs also get reviewer
-# assignments. Assigned reviewers are inherently scoped to org team members
-# by the GitHub Teams API.
-jobs:
- assign-reviewers:
- if: >-
- github.event.action == 'ready_for_review' || github.event.pull_request.draft == false
- runs-on: ubuntu-latest
- steps:
- - name: Generate app token
- id: app-token
- uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
- with:
- app-id: ${{ vars.COORDINATOR_APP_ID }}
- private-key: ${{ secrets.COORDINATOR_APP_PRIVATE_KEY }}
- repositories: codeowner-coordinator,zed
-
- # SECURITY: checks out the coordinator repo at ref: main, NOT the PR branch.
- # persist-credentials: false prevents the token from leaking into .git/config.
- - name: Checkout coordinator repo
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- with:
- repository: zed-industries/codeowner-coordinator
- ref: main
- path: codeowner-coordinator
- token: ${{ steps.app-token.outputs.token }}
- persist-credentials: false
-
- - name: Setup Python
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
- with:
- python-version: "3.11"
-
- - name: Install dependencies
- run: |
- pip install --no-deps -q --only-binary ':all:' \
- -r /dev/stdin <<< "pyyaml==6.0.3 --hash=sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d"
-
- - name: Assign reviewers
- env:
- GH_TOKEN: ${{ steps.app-token.outputs.token }}
- PR_URL: ${{ github.event.pull_request.html_url }}
- TARGET_REPO: ${{ github.repository }}
- ASSIGN_INTERNAL: ${{ vars.ASSIGN_INTERNAL || 'false' }}
- ASSIGN_EXTERNAL: ${{ vars.ASSIGN_EXTERNAL || 'true' }}
- run: |
- cd codeowner-coordinator
- python .github/scripts/assign-reviewers.py \
- --pr "$PR_URL" \
- --apply \
- --rules-file team-membership-rules.yml \
- --repo "$TARGET_REPO" \
- --org zed-industries \
- 2>&1 | tee /tmp/assign-reviewers-output.txt
-
- - name: Upload output
- if: always()
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
- with:
- name: assign-reviewers-output
- path: /tmp/assign-reviewers-output.txt
- retention-days: 30
diff --git a/.github/workflows/assign_contributor_issue.yml b/.github/workflows/assign_contributor_issue.yml
deleted file mode 100644
index 5e968611299..00000000000
--- a/.github/workflows/assign_contributor_issue.yml
+++ /dev/null
@@ -1,70 +0,0 @@
-# Assign Contributor Issue — auto-assign labeled contributor issues
-#
-# When an issue has both a `.contrib/good *` label and an `area:` label,
-# finds the least-busy contributor interested in that area (via Tally form
-# responses), assigns the issue, updates the project board, and notifies
-# the contributor on Slack.
-#
-# Errors and "no candidates" conditions are reported to the Slack activity
-# channel.
-
-name: Assign Contributor Issue
-
-on:
- issues:
- types: [labeled]
- workflow_dispatch:
- inputs:
- issue_number:
- description: "Issue number to test against"
- required: true
- type: number
-
-permissions:
- contents: read
-
-concurrency:
- group: assign-contributor-${{ github.event.issue.number || inputs.issue_number }}
- cancel-in-progress: true
-
-jobs:
- assign-contributor:
- if: >-
- github.event_name == 'workflow_dispatch' ||
- (github.repository == 'zed-industries/zed' &&
- github.event.issue.state == 'open' &&
- (startsWith(github.event.label.name, '.contrib/good ') || startsWith(github.event.label.name, 'area:')))
- runs-on: namespace-profile-2x4-ubuntu-2404
- timeout-minutes: 5
-
- steps:
- - name: Generate app token
- id: app-token
- uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
- with:
- app-id: ${{ secrets.ZED_COMMUNITY_BOT_APP_ID }}
- private-key: ${{ secrets.ZED_COMMUNITY_BOT_PRIVATE_KEY }}
- owner: zed-industries
-
- - name: Checkout repository
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- with:
- sparse-checkout: script/github-assign-contributor-issue.py
- sparse-checkout-cone-mode: false
-
- - name: Set up Python
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
- with:
- python-version: "3.12"
-
- - name: Install dependencies
- run: pip install requests
-
- - name: Assign contributor
- env:
- GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
- TALLY_API_KEY: ${{ secrets.TALLY_API_KEY }}
- TALLY_FORM_ID: ${{ vars.TALLY_CONTRIBUTOR_FORM_ID }}
- SLACK_BOT_TOKEN: ${{ secrets.SLACK_CONTRIBUTOR_BOT_TOKEN }}
- ISSUE_NUMBER: ${{ github.event.issue.number || inputs.issue_number }}
- run: python script/github-assign-contributor-issue.py "$ISSUE_NUMBER"
diff --git a/.github/workflows/background_agent_mvp.yml b/.github/workflows/background_agent_mvp.yml
deleted file mode 100644
index 2f048d572df..00000000000
--- a/.github/workflows/background_agent_mvp.yml
+++ /dev/null
@@ -1,331 +0,0 @@
-name: background_agent_mvp
-
-# NOTE: Scheduled runs disabled as of 2026-02-24. The workflow can still be
-# triggered manually via workflow_dispatch. See Notion doc "Background Agent
-# for Zed" for current status and contact info to resume this work.
-on:
- # schedule:
- # - cron: "0 16 * * 1-5"
- workflow_dispatch:
- inputs:
- crash_ids:
- description: "Optional comma-separated Sentry issue IDs (e.g. ZED-4VS,ZED-123)"
- required: false
- type: string
- reviewers:
- description: "Optional comma-separated GitHub reviewer handles"
- required: false
- type: string
- top:
- description: "Top N candidates when crash_ids is empty"
- required: false
- type: string
- default: "3"
-
-permissions:
- contents: write
- pull-requests: write
-
-env:
- FACTORY_API_KEY: ${{ secrets.FACTORY_API_KEY }}
- DROID_MODEL: claude-opus-4-5-20251101
- SENTRY_ORG: zed-dev
-
-jobs:
- run-mvp:
- runs-on: ubuntu-latest
- timeout-minutes: 180
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- with:
- fetch-depth: 0
-
- - name: Install Droid CLI
- run: |
- curl -fsSL https://app.factory.ai/cli | sh
- echo "${HOME}/.local/bin" >> "$GITHUB_PATH"
- echo "DROID_BIN=${HOME}/.local/bin/droid" >> "$GITHUB_ENV"
- "${HOME}/.local/bin/droid" --version
-
- - name: Setup Python
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
- with:
- python-version: "3.12"
-
- - name: Resolve reviewers
- id: reviewers
- env:
- INPUT_REVIEWERS: ${{ inputs.reviewers }}
- DEFAULT_REVIEWERS: ${{ vars.BACKGROUND_AGENT_REVIEWERS }}
- run: |
- set -euo pipefail
- if [ -z "$DEFAULT_REVIEWERS" ]; then
- DEFAULT_REVIEWERS="eholk,morgankrey,osiewicz,bennetbo"
- fi
- REVIEWERS="${INPUT_REVIEWERS:-$DEFAULT_REVIEWERS}"
- REVIEWERS="$(echo "$REVIEWERS" | tr -d '[:space:]')"
- echo "reviewers=$REVIEWERS" >> "$GITHUB_OUTPUT"
-
- - name: Select crash candidates
- id: candidates
- env:
- INPUT_CRASH_IDS: ${{ inputs.crash_ids }}
- INPUT_TOP: ${{ inputs.top }}
- SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_BACKGROUND_AGENT_MVP_TOKEN }}
- run: |
- set -euo pipefail
-
- PREFETCH_DIR="/tmp/crash-data"
- ARGS=(--select-only --prefetch-dir "$PREFETCH_DIR" --org "$SENTRY_ORG")
- if [ -n "$INPUT_CRASH_IDS" ]; then
- ARGS+=(--crash-ids "$INPUT_CRASH_IDS")
- else
- TARGET_DRAFT_PRS="${INPUT_TOP:-3}"
- if ! [[ "$TARGET_DRAFT_PRS" =~ ^[0-9]+$ ]] || [ "$TARGET_DRAFT_PRS" -lt 1 ]; then
- TARGET_DRAFT_PRS="3"
- fi
- CANDIDATE_TOP=$((TARGET_DRAFT_PRS * 5))
- if [ "$CANDIDATE_TOP" -gt 100 ]; then
- CANDIDATE_TOP=100
- fi
- ARGS+=(--top "$CANDIDATE_TOP" --sample-size 100)
- fi
-
- IDS="$(python3 script/run-background-agent-mvp-local "${ARGS[@]}")"
-
- if [ -z "$IDS" ]; then
- echo "No candidates selected"
- exit 1
- fi
-
- echo "Using crash IDs: $IDS"
- echo "ids=$IDS" >> "$GITHUB_OUTPUT"
-
- - name: Run background agent pipeline per crash
- id: pipeline
- env:
- GH_TOKEN: ${{ github.token }}
- REVIEWERS: ${{ steps.reviewers.outputs.reviewers }}
- CRASH_IDS: ${{ steps.candidates.outputs.ids }}
- TARGET_DRAFT_PRS_INPUT: ${{ inputs.top }}
- run: |
- set -euo pipefail
-
- git config user.name "factory-droid[bot]"
- git config user.email "138933559+factory-droid[bot]@users.noreply.github.com"
-
- # Crash ID format validation regex
- CRASH_ID_PATTERN='^[A-Za-z0-9]+-[A-Za-z0-9]+$'
- TARGET_DRAFT_PRS="${TARGET_DRAFT_PRS_INPUT:-3}"
- if ! [[ "$TARGET_DRAFT_PRS" =~ ^[0-9]+$ ]] || [ "$TARGET_DRAFT_PRS" -lt 1 ]; then
- TARGET_DRAFT_PRS="3"
- fi
- CREATED_DRAFT_PRS=0
-
- IFS=',' read -r -a CRASH_ID_ARRAY <<< "$CRASH_IDS"
-
- for CRASH_ID in "${CRASH_ID_ARRAY[@]}"; do
- if [ "$CREATED_DRAFT_PRS" -ge "$TARGET_DRAFT_PRS" ]; then
- echo "Reached target draft PR count ($TARGET_DRAFT_PRS), stopping candidate processing"
- break
- fi
-
- CRASH_ID="$(echo "$CRASH_ID" | xargs)"
- [ -z "$CRASH_ID" ] && continue
-
- # Validate crash ID format to prevent injection via branch names or prompts
- if ! [[ "$CRASH_ID" =~ $CRASH_ID_PATTERN ]]; then
- echo "ERROR: Invalid crash ID format: '$CRASH_ID' — skipping"
- continue
- fi
-
- BRANCH="background-agent/mvp-${CRASH_ID,,}-$(date +%Y%m%d)"
- echo "Running crash pipeline for $CRASH_ID on $BRANCH"
-
- # Deduplication: skip if a draft PR already exists for this crash
- EXISTING_BRANCH_PR="$(gh pr list --head "$BRANCH" --state open --json number --jq '.[0].number' || echo "")"
- if [ -n "$EXISTING_BRANCH_PR" ]; then
- echo "Draft PR #$EXISTING_BRANCH_PR already exists for $CRASH_ID — skipping"
- continue
- fi
-
- if ! git fetch origin main; then
- echo "WARNING: Failed to fetch origin/main for $CRASH_ID — skipping"
- continue
- fi
-
- if ! git checkout -B "$BRANCH" origin/main; then
- echo "WARNING: Failed to create checkout branch $BRANCH for $CRASH_ID — skipping"
- continue
- fi
-
- CRASH_DATA_FILE="/tmp/crash-data/crash-${CRASH_ID}.md"
- if [ ! -f "$CRASH_DATA_FILE" ]; then
- echo "WARNING: No pre-fetched crash data for $CRASH_ID at $CRASH_DATA_FILE — skipping"
- continue
- fi
-
- python3 -c "
- import sys
- crash_id, data_file = sys.argv[1], sys.argv[2]
- prompt = f'''You are running the weekly background crash-fix MVP pipeline for crash {crash_id}.
-
- The crash report has been pre-fetched and is available at: {data_file}
- Read this file to get the crash data. Do not call script/sentry-fetch.
-
- Required workflow:
- 1. Read the crash report from {data_file}
- 2. Read and follow .rules.
- 3. Follow .factory/prompts/crash/investigate.md and write ANALYSIS.md
- 4. Follow .factory/prompts/crash/link-issues.md and write LINKED_ISSUES.md
- 5. Follow .factory/prompts/crash/fix.md to implement a minimal fix with tests
- 6. Run validators required by the fix prompt for the affected code paths
- 7. Write PR_BODY.md with sections:
- - Crash Summary
- - Root Cause
- - Fix
- - Validation
- - Potentially Related Issues (High/Medium/Low from LINKED_ISSUES.md)
- - Reviewer Checklist
- - Release Notes (final section; format as Release Notes:, then a blank line, then one bullet like - N/A)
-
- Constraints:
- - Do not merge or auto-approve.
- - Keep changes narrowly scoped to this crash.
- - Do not modify files in .github/, .factory/, or script/ directories.
- - When investigating git history, limit your search to the last 2 weeks of commits. Do not traverse older history.
- - If the crash is not solvable with available context, write a clear blocker summary to PR_BODY.md.
- '''
- import textwrap
- with open('/tmp/background-agent-prompt.md', 'w') as f:
- f.write(textwrap.dedent(prompt))
- " "$CRASH_ID" "$CRASH_DATA_FILE"
-
- if ! "$DROID_BIN" exec --auto medium -m "$DROID_MODEL" -f /tmp/background-agent-prompt.md; then
- echo "Droid execution failed for $CRASH_ID, continuing to next candidate"
- continue
- fi
-
- for REPORT_FILE in ANALYSIS.md LINKED_ISSUES.md PR_BODY.md; do
- if [ -f "$REPORT_FILE" ]; then
- echo "::group::${CRASH_ID} ${REPORT_FILE}"
- cat "$REPORT_FILE"
- echo "::endgroup::"
- fi
- done
-
- if git diff --quiet; then
- echo "No code changes produced for $CRASH_ID"
- continue
- fi
-
- # Stage only expected file types — not git add -A
- git add -- '*.rs' '*.toml' 'Cargo.lock' 'ANALYSIS.md' 'LINKED_ISSUES.md' 'PR_BODY.md'
-
- # Reject changes to protected paths
- PROTECTED_CHANGES="$(git diff --cached --name-only | grep -E '^(\.github/|\.factory/|script/)' || true)"
- if [ -n "$PROTECTED_CHANGES" ]; then
- echo "ERROR: Agent modified protected paths — aborting commit for $CRASH_ID:"
- echo "$PROTECTED_CHANGES"
- git reset HEAD -- .
- continue
- fi
-
- if ! git diff --cached --quiet; then
- git commit -m "Fix crash ${CRASH_ID}"
- fi
-
- git push -u origin "$BRANCH"
-
- CRATE_PREFIX=""
- CHANGED_CRATES="$(git diff --cached --name-only | awk -F/ '/^crates\/[^/]+\// {print $2}' | sort -u)"
- if [ -n "$CHANGED_CRATES" ] && [ "$(printf "%s\n" "$CHANGED_CRATES" | wc -l | tr -d ' ')" -eq 1 ]; then
- CRATE_PREFIX="${CHANGED_CRATES}: "
- fi
-
- TITLE="${CRATE_PREFIX}Fix crash ${CRASH_ID}"
- BODY_FILE="PR_BODY.md"
- if [ ! -f "$BODY_FILE" ]; then
- BODY_FILE="/tmp/pr-body-${CRASH_ID}.md"
- printf "Automated draft crash-fix pipeline output for %s.\n\nNo PR_BODY.md was generated by the agent; please review commit and linked artifacts manually.\n" "$CRASH_ID" > "$BODY_FILE"
- fi
-
- python3 -c '
- import re
- import sys
-
- path = sys.argv[1]
- body = open(path, encoding="utf-8").read()
- pattern = re.compile(r"(^|\n)Release Notes:\r?\n(?:\r?\n)*(?P<bullets>(?:\s*-\s+.*(?:\r?\n|$))+)", re.MULTILINE)
- match = pattern.search(body)
-
- if match:
- bullets = [
- re.sub(r"^\s*", "", bullet)
- for bullet in re.findall(r"^\s*-\s+.*$", match.group("bullets"), re.MULTILINE)
- ]
- if not bullets:
- bullets = ["- N/A"]
- section = "Release Notes:\n\n" + "\n".join(bullets)
- body_without_release_notes = (body[: match.start()] + body[match.end() :]).rstrip()
- if body_without_release_notes:
- normalized_body = f"{body_without_release_notes}\n\n{section}\n"
- else:
- normalized_body = f"{section}\n"
- else:
- normalized_body = body.rstrip() + "\n\nRelease Notes:\n\n- N/A\n"
-
- with open(path, "w", encoding="utf-8") as file:
- file.write(normalized_body)
- ' "$BODY_FILE"
-
- EXISTING_PR="$(gh pr list --head "$BRANCH" --json number --jq '.[0].number')"
- if [ -n "$EXISTING_PR" ]; then
- gh pr edit "$EXISTING_PR" --title "$TITLE" --body-file "$BODY_FILE"
- PR_NUMBER="$EXISTING_PR"
- else
- PR_URL="$(gh pr create --draft --base main --head "$BRANCH" --title "$TITLE" --body-file "$BODY_FILE")"
- PR_NUMBER="$(basename "$PR_URL")"
- fi
-
- if [ -n "$REVIEWERS" ]; then
- IFS=',' read -r -a REVIEWER_ARRAY <<< "$REVIEWERS"
- for REVIEWER in "${REVIEWER_ARRAY[@]}"; do
- [ -z "$REVIEWER" ] && continue
- gh pr edit "$PR_NUMBER" --add-reviewer "$REVIEWER" || true
- done
- fi
-
- CREATED_DRAFT_PRS=$((CREATED_DRAFT_PRS + 1))
- echo "Created/updated draft PRs this run: $CREATED_DRAFT_PRS/$TARGET_DRAFT_PRS"
- done
-
- echo "created_draft_prs=$CREATED_DRAFT_PRS" >> "$GITHUB_OUTPUT"
- echo "target_draft_prs=$TARGET_DRAFT_PRS" >> "$GITHUB_OUTPUT"
-
- - name: Cleanup pre-fetched crash data
- if: always()
- run: rm -rf /tmp/crash-data
-
- - name: Workflow summary
- if: always()
- env:
- SUMMARY_CRASH_IDS: ${{ steps.candidates.outputs.ids }}
- SUMMARY_REVIEWERS: ${{ steps.reviewers.outputs.reviewers }}
- SUMMARY_CREATED_DRAFT_PRS: ${{ steps.pipeline.outputs.created_draft_prs }}
- SUMMARY_TARGET_DRAFT_PRS: ${{ steps.pipeline.outputs.target_draft_prs }}
- run: |
- {
- echo "## Background Agent MVP"
- echo ""
- echo "- Crash IDs: ${SUMMARY_CRASH_IDS:-none}"
- echo "- Reviewer routing: ${SUMMARY_REVIEWERS:-NOT CONFIGURED}"
- echo "- Draft PRs created: ${SUMMARY_CREATED_DRAFT_PRS:-0}/${SUMMARY_TARGET_DRAFT_PRS:-3}"
- echo "- Pipeline: investigate -> link-issues -> fix -> draft PR"
- } >> "$GITHUB_STEP_SUMMARY"
-
-concurrency:
- group: background-agent-mvp
- cancel-in-progress: false
diff --git a/.github/workflows/compare_perf.yml b/.github/workflows/compare_perf.yml
deleted file mode 100644
index 154276a7104..00000000000
--- a/.github/workflows/compare_perf.yml
+++ /dev/null
@@ -1,84 +0,0 @@
-# Generated from xtask::workflows::compare_perf
-# Rebuild with `cargo xtask workflows`.
-name: compare_perf
-on:
- workflow_dispatch:
- inputs:
- head:
- description: head
- required: true
- type: string
- base:
- description: base
- required: true
- type: string
- crate_name:
- description: crate_name
- type: string
- default: ''
-jobs:
- run_perf:
- runs-on: namespace-profile-16x32-ubuntu-2204
- steps:
- - name: steps::checkout_repo
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
- with:
- clean: false
- - name: steps::setup_cargo_config
- run: |
- mkdir -p ./../.cargo
- cp ./.cargo/ci-config.toml ./../.cargo/config.toml
- - name: steps::setup_linux
- run: ./script/linux
- - name: steps::download_wasi_sdk
- run: ./script/download-wasi-sdk
- - name: compare_perf::run_perf::install_hyperfine
- uses: taiki-e/install-action@b4f2d5cb8597b15997c8ede873eb6185efc5f0ad
- - name: steps::git_checkout
- run: git fetch origin "$REF_NAME" && git checkout "$REF_NAME"
- env:
- REF_NAME: ${{ inputs.base }}
- - name: compare_perf::run_perf::cargo_perf_test
- run: |2-
-
- if [ -n "$CRATE_NAME" ]; then
- cargo perf-test -p "$CRATE_NAME" -- --json="$REF_NAME";
- else
- cargo perf-test -p vim -- --json="$REF_NAME";
- fi
- env:
- REF_NAME: ${{ inputs.base }}
- CRATE_NAME: ${{ inputs.crate_name }}
- - name: steps::git_checkout
- run: git fetch origin "$REF_NAME" && git checkout "$REF_NAME"
- env:
- REF_NAME: ${{ inputs.head }}
- - name: compare_perf::run_perf::cargo_perf_test
- run: |2-
-
- if [ -n "$CRATE_NAME" ]; then
- cargo perf-test -p "$CRATE_NAME" -- --json="$REF_NAME";
- else
- cargo perf-test -p vim -- --json="$REF_NAME";
- fi
- env:
- REF_NAME: ${{ inputs.head }}
- CRATE_NAME: ${{ inputs.crate_name }}
- - name: compare_perf::run_perf::compare_runs
- run: cargo perf-compare --save=results.md "$BASE" "$HEAD"
- env:
- BASE: ${{ inputs.base }}
- HEAD: ${{ inputs.head }}
- - name: run_bundling::upload_artifact
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
- with:
- name: results.md
- path: results.md
- if-no-files-found: error
- - name: steps::cleanup_cargo_config
- if: always()
- run: |
- rm -rf ./../.cargo
-defaults:
- run:
- shell: bash -euxo pipefail {0}
diff --git a/.github/workflows/randomized_tests.yml b/.github/workflows/randomized_tests.yml
deleted file mode 100644
index 9655a81235d..00000000000
--- a/.github/workflows/randomized_tests.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-name: Randomized Tests
-
-concurrency: randomized-tests
-
-on:
- push:
- branches:
- - randomized-tests-runner
- # schedule:
- # - cron: '0 * * * *'
-
-env:
- CARGO_TERM_COLOR: always
- CARGO_INCREMENTAL: 0
- RUST_BACKTRACE: 1
- ZED_SERVER_URL: https://zed.dev
-
-jobs:
- tests:
- name: Run randomized tests
- if: github.repository_owner == 'zed-industries'
- runs-on:
- - namespace-profile-16x32-ubuntu-2204
- steps:
- - name: Install Node
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
- with:
- node-version: "18"
-
- - name: Checkout repo
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- with:
- clean: false
-
- - name: Run randomized tests
- run: script/randomized-test-ci
diff --git a/.github/workflows/run_cron_unit_evals.yml b/.github/workflows/run_cron_unit_evals.yml
deleted file mode 100644
index 7cc0d40760a..00000000000
--- a/.github/workflows/run_cron_unit_evals.yml
+++ /dev/null
@@ -1,79 +0,0 @@
-# Generated from xtask::workflows::run_cron_unit_evals
-# Rebuild with `cargo xtask workflows`.
-name: run_cron_unit_evals
-env:
- CARGO_TERM_COLOR: always
- CARGO_INCREMENTAL: '0'
- RUST_BACKTRACE: '1'
- ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
-on:
- workflow_dispatch: {}
-jobs:
- cron_unit_evals:
- runs-on: namespace-profile-16x32-ubuntu-2204
- strategy:
- matrix:
- model:
- - anthropic/claude-sonnet-4-5-latest
- - anthropic/claude-opus-4-5-latest
- - google/gemini-3.1-pro
- - openai/gpt-5
- fail-fast: false
- steps:
- - name: steps::checkout_repo
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
- with:
- clean: false
- - name: steps::setup_cargo_config
- run: |
- mkdir -p ./../.cargo
- cp ./.cargo/ci-config.toml ./../.cargo/config.toml
- - name: steps::cache_rust_dependencies_namespace
- uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
- with:
- cache: rust
- path: ~/.rustup
- - name: steps::setup_linux
- run: ./script/linux
- - name: steps::download_wasi_sdk
- run: ./script/download-wasi-sdk
- - name: steps::cargo_install_nextest
- uses: taiki-e/install-action@921e2c9f7148d7ba14cd819f417db338f63e733c
- - name: steps::clear_target_dir_if_large
- run: ./script/clear-target-dir-if-larger-than 350 200
- - name: steps::setup_sccache
- run: ./script/setup-sccache
- env:
- R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
- R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
- R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
- SCCACHE_BUCKET: sccache-zed
- - name: ./script/run-unit-evals
- run: ./script/run-unit-evals
- env:
- ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
- OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- GOOGLE_AI_API_KEY: ${{ secrets.GOOGLE_AI_API_KEY }}
- GOOGLE_CLOUD_PROJECT: ${{ secrets.GOOGLE_CLOUD_PROJECT }}
- ZED_AGENT_MODEL: ${{ matrix.model }}
- - name: steps::show_sccache_stats
- run: sccache --show-stats || true
- - name: steps::cleanup_cargo_config
- if: always()
- run: |
- rm -rf ./../.cargo
- - name: run_agent_evals::cron_unit_evals::send_failure_to_slack
- if: ${{ failure() }}
- uses: slackapi/slack-github-action@b0fa283ad8fea605de13dc3f449259339835fc52
- with:
- method: chat.postMessage
- token: ${{ secrets.SLACK_APP_ZED_UNIT_EVALS_BOT_TOKEN }}
- payload: |
- channel: C04UDRNNJFQ
- text: "Unit Evals Failed: https://github.com/zed-industries/zed/actions/runs/${{ github.run_id }}"
-concurrency:
- group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
- cancel-in-progress: true
-defaults:
- run:
- shell: bash -euxo pipefail {0}
diff --git a/.github/workflows/run_unit_evals.yml b/.github/workflows/run_unit_evals.yml
deleted file mode 100644
index 4b70d15012c..00000000000
--- a/.github/workflows/run_unit_evals.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Generated from xtask::workflows::run_unit_evals
-# Rebuild with `cargo xtask workflows`.
-name: run_unit_evals
-env:
- CARGO_TERM_COLOR: always
- CARGO_INCREMENTAL: '0'
- RUST_BACKTRACE: '1'
- ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
- ZED_EVAL_TELEMETRY: '1'
- MODEL_NAME: ${{ inputs.model_name }}
-on:
- workflow_dispatch:
- inputs:
- model_name:
- description: model_name
- required: true
- type: string
- commit_sha:
- description: commit_sha
- required: true
- type: string
-jobs:
- run_unit_evals:
- runs-on: namespace-profile-16x32-ubuntu-2204
- steps:
- - name: steps::checkout_repo
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
- with:
- clean: false
- - name: steps::setup_cargo_config
- run: |
- mkdir -p ./../.cargo
- cp ./.cargo/ci-config.toml ./../.cargo/config.toml
- - name: steps::cache_rust_dependencies_namespace
- uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
- with:
- cache: rust
- path: ~/.rustup
- - name: steps::setup_linux
- run: ./script/linux
- - name: steps::download_wasi_sdk
- run: ./script/download-wasi-sdk
- - name: steps::cargo_install_nextest
- uses: taiki-e/install-action@921e2c9f7148d7ba14cd819f417db338f63e733c
- - name: steps::clear_target_dir_if_large
- run: ./script/clear-target-dir-if-larger-than 350 200
- - name: steps::setup_sccache
- run: ./script/setup-sccache
- env:
- R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
- R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
- R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
- SCCACHE_BUCKET: sccache-zed
- - name: ./script/run-unit-evals
- run: ./script/run-unit-evals
- env:
- ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
- OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- GOOGLE_AI_API_KEY: ${{ secrets.GOOGLE_AI_API_KEY }}
- GOOGLE_CLOUD_PROJECT: ${{ secrets.GOOGLE_CLOUD_PROJECT }}
- UNIT_EVAL_COMMIT: ${{ inputs.commit_sha }}
- - name: steps::show_sccache_stats
- run: sccache --show-stats || true
- - name: steps::cleanup_cargo_config
- if: always()
- run: |
- rm -rf ./../.cargo
-concurrency:
- group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.run_id }}
- cancel-in-progress: true
-defaults:
- run:
- shell: bash -euxo pipefail {0}
diff --git a/tooling/xtask/src/tasks/workflows.rs b/tooling/xtask/src/tasks/workflows.rs
index 6f21be93907..14516c18f22 100644
--- a/tooling/xtask/src/tasks/workflows.rs
+++ b/tooling/xtask/src/tasks/workflows.rs
@@ -12,7 +12,6 @@ mod autofix_pr;
mod bump_patch_version;
mod bump_zed_version;
mod cherry_pick;
-mod compare_perf;
mod compliance_check;
mod danger;
mod deploy_collab;
@@ -28,7 +27,6 @@ mod release_nightly;
mod run_bundling;
mod release;
-mod run_agent_evals;
mod run_tests;
mod runners;
mod steps;
@@ -227,7 +225,6 @@ pub fn run_workflows(args: GenerateWorkflowArgs) -> Result<()> {
WorkflowFile::zed(bump_patch_version::bump_patch_version),
WorkflowFile::zed(bump_zed_version::bump_zed_version),
WorkflowFile::zed(cherry_pick::cherry_pick),
- WorkflowFile::zed(compare_perf::compare_perf),
WorkflowFile::zed(compliance_check::compliance_check),
WorkflowFile::zed(danger::danger),
WorkflowFile::zed(deploy_collab::deploy_collab),
@@ -241,8 +238,6 @@ pub fn run_workflows(args: GenerateWorkflowArgs) -> Result<()> {
WorkflowFile::zed(publish_extension_cli::publish_extension_cli),
WorkflowFile::zed(release::release),
WorkflowFile::zed(release_nightly::release_nightly),
- WorkflowFile::zed(run_agent_evals::run_cron_unit_evals),
- WorkflowFile::zed(run_agent_evals::run_unit_evals),
WorkflowFile::zed(run_bundling::run_bundling),
WorkflowFile::zed(run_tests::run_tests),
/* workflows used for CI/CD in extension repositories */
diff --git a/tooling/xtask/src/tasks/workflows/compare_perf.rs b/tooling/xtask/src/tasks/workflows/compare_perf.rs
deleted file mode 100644
index 39f17b8d148..00000000000
--- a/tooling/xtask/src/tasks/workflows/compare_perf.rs
+++ /dev/null
@@ -1,73 +0,0 @@
-use gh_workflow::*;
-
-use crate::tasks::workflows::run_bundling::upload_artifact;
-use crate::tasks::workflows::steps::FluentBuilder;
-use crate::tasks::workflows::{
- runners,
- steps::{self, NamedJob, named},
- vars::WorkflowInput,
-};
-
-pub fn compare_perf() -> Workflow {
- let head = WorkflowInput::string("head", None);
- let base = WorkflowInput::string("base", None);
- let crate_name = WorkflowInput::string("crate_name", Some("".to_owned()));
- let run_perf = run_perf(&base, &head, &crate_name);
- named::workflow()
- .on(Event::default().workflow_dispatch(
- WorkflowDispatch::default()
- .add_input(head.name, head.input())
- .add_input(base.name, base.input())
- .add_input(crate_name.name, crate_name.input()),
- ))
- .add_job(run_perf.name, run_perf.job)
-}
-
-pub fn run_perf(
- base: &WorkflowInput,
- head: &WorkflowInput,
- crate_name: &WorkflowInput,
-) -> NamedJob {
- fn cargo_perf_test(ref_name: &WorkflowInput, crate_name: &WorkflowInput) -> Step<Run> {
- named::bash(
- r#"
- if [ -n "$CRATE_NAME" ]; then
- cargo perf-test -p "$CRATE_NAME" -- --json="$REF_NAME";
- else
- cargo perf-test -p vim -- --json="$REF_NAME";
- fi"#,
- )
- .add_env(("REF_NAME", ref_name.to_string()))
- .add_env(("CRATE_NAME", crate_name.to_string()))
- }
-
- fn install_hyperfine() -> Step<Use> {
- named::uses(
- "taiki-e",
- "install-action",
- "b4f2d5cb8597b15997c8ede873eb6185efc5f0ad", // hyperfine
- )
- }
-
- fn compare_runs(head: &WorkflowInput, base: &WorkflowInput) -> Step<Run> {
- named::bash(r#"cargo perf-compare --save=results.md "$BASE" "$HEAD""#)
- .add_env(("BASE", base.to_string()))
- .add_env(("HEAD", head.to_string()))
- }
-
- named::job(
- Job::default()
- .runs_on(runners::LINUX_DEFAULT)
- .add_step(steps::checkout_repo())
- .add_step(steps::setup_cargo_config(runners::Platform::Linux))
- .map(steps::install_linux_dependencies)
- .add_step(install_hyperfine())
- .add_step(steps::git_checkout(base))
- .add_step(cargo_perf_test(base, crate_name))
- .add_step(steps::git_checkout(head))
- .add_step(cargo_perf_test(head, crate_name))
- .add_step(compare_runs(head, base))
- .add_step(upload_artifact("results.md"))
- .add_step(steps::cleanup_cargo_config(runners::Platform::Linux)),
- )
-}
diff --git a/tooling/xtask/src/tasks/workflows/run_agent_evals.rs b/tooling/xtask/src/tasks/workflows/run_agent_evals.rs
deleted file mode 100644
index 8146552e656..00000000000
--- a/tooling/xtask/src/tasks/workflows/run_agent_evals.rs
+++ /dev/null
@@ -1,124 +0,0 @@
-use gh_workflow::{Event, Expression, Job, Run, Step, Strategy, Use, Workflow, WorkflowDispatch};
-use serde_json::json;
-
-use crate::tasks::workflows::{
- runners::{self, Platform},
- steps::{self, FluentBuilder as _, NamedJob, named},
- vars::{self, WorkflowInput},
-};
-
-pub(crate) fn run_unit_evals() -> Workflow {
- let model_name = WorkflowInput::string("model_name", None);
- let commit_sha = WorkflowInput::string("commit_sha", None);
-
- let unit_evals = named::job(unit_evals(Some(&commit_sha)));
-
- named::workflow()
- .name("run_unit_evals")
- .on(Event::default().workflow_dispatch(
- WorkflowDispatch::default()
- .add_input(model_name.name, model_name.input())
- .add_input(commit_sha.name, commit_sha.input()),
- ))
- .concurrency(vars::allow_concurrent_runs())
- .add_env(("CARGO_TERM_COLOR", "always"))
- .add_env(("CARGO_INCREMENTAL", 0))
- .add_env(("RUST_BACKTRACE", 1))
- .add_env(("ZED_CLIENT_CHECKSUM_SEED", vars::ZED_CLIENT_CHECKSUM_SEED))
- .add_env(("ZED_EVAL_TELEMETRY", 1))
- .add_env(("MODEL_NAME", model_name.to_string()))
- .add_job(unit_evals.name, unit_evals.job)
-}
-
-fn add_api_keys(step: Step<Run>) -> Step<Run> {
- step.add_env(("ANTHROPIC_API_KEY", vars::ANTHROPIC_API_KEY))
- .add_env(("OPENAI_API_KEY", vars::OPENAI_API_KEY))
- .add_env(("GOOGLE_AI_API_KEY", vars::GOOGLE_AI_API_KEY))
- .add_env(("GOOGLE_CLOUD_PROJECT", vars::GOOGLE_CLOUD_PROJECT))
-}
-
-pub(crate) fn run_cron_unit_evals() -> Workflow {
- let unit_evals = cron_unit_evals();
-
- named::workflow()
- .name("run_cron_unit_evals")
- .on(Event::default()
- // .schedule([
- // // GitHub might drop jobs at busy times, so we choose a random time in the middle of the night.
- // Schedule::default().cron("47 1 * * 2"),
- // ])
- .workflow_dispatch(WorkflowDispatch::default()))
- .concurrency(vars::one_workflow_per_non_main_branch())
- .add_env(("CARGO_TERM_COLOR", "always"))
- .add_env(("CARGO_INCREMENTAL", 0))
- .add_env(("RUST_BACKTRACE", 1))
- .add_env(("ZED_CLIENT_CHECKSUM_SEED", vars::ZED_CLIENT_CHECKSUM_SEED))
- .add_job(unit_evals.name, unit_evals.job)
-}
-
-fn cron_unit_evals() -> NamedJob {
- fn send_failure_to_slack() -> Step<Use> {
- named::uses(
- "slackapi",
- "slack-github-action",
- "b0fa283ad8fea605de13dc3f449259339835fc52",
- )
- .if_condition(Expression::new("${{ failure() }}"))
- .add_with(("method", "chat.postMessage"))
- .add_with(("token", vars::SLACK_APP_ZED_UNIT_EVALS_BOT_TOKEN))
- .add_with(("payload", indoc::indoc!{r#"
- channel: C04UDRNNJFQ
- text: "Unit Evals Failed: https://github.com/zed-industries/zed/actions/runs/${{ github.run_id }}"
- "#}))
- }
-
- named::job(cron_unit_evals_job().add_step(send_failure_to_slack()))
-}
-
-const UNIT_EVAL_MODELS: &[&str] = &[
- "anthropic/claude-sonnet-4-5-latest",
- "anthropic/claude-opus-4-5-latest",
- "google/gemini-3.1-pro",
- "openai/gpt-5",
-];
-
-fn cron_unit_evals_job() -> Job {
- let script_step = add_api_keys(steps::script("./script/run-unit-evals"))
- .add_env(("ZED_AGENT_MODEL", "${{ matrix.model }}"));
-
- Job::default()
- .runs_on(runners::LINUX_DEFAULT)
- .strategy(Strategy::default().fail_fast(false).matrix(json!({
- "model": UNIT_EVAL_MODELS
- })))
- .add_step(steps::checkout_repo())
- .add_step(steps::setup_cargo_config(Platform::Linux))
- .add_step(steps::cache_rust_dependencies_namespace())
- .map(steps::install_linux_dependencies)
- .add_step(steps::cargo_install_nextest())
- .add_step(steps::clear_target_dir_if_large(Platform::Linux))
- .add_step(steps::setup_sccache(Platform::Linux))
- .add_step(script_step)
- .add_step(steps::show_sccache_stats(Platform::Linux))
- .add_step(steps::cleanup_cargo_config(Platform::Linux))
-}
-
-fn unit_evals(commit: Option<&WorkflowInput>) -> Job {
- let script_step = add_api_keys(steps::script("./script/run-unit-evals"));
-
- Job::default()
- .runs_on(runners::LINUX_DEFAULT)
- .add_step(steps::checkout_repo())
- .add_step(steps::setup_cargo_config(Platform::Linux))
- .add_step(steps::cache_rust_dependencies_namespace())
- .map(steps::install_linux_dependencies)
- .add_step(steps::cargo_install_nextest())
- .add_step(steps::clear_target_dir_if_large(Platform::Linux))
- .add_step(steps::setup_sccache(Platform::Linux))
- .add_step(match commit {
- Some(commit) => script_step.add_env(("UNIT_EVAL_COMMIT", commit)),
- None => script_step,
- })
- .add_step(steps::show_sccache_stats(Platform::Linux))
- .add_step(steps::cleanup_cargo_config(Platform::Linux))
-}
diff --git a/tooling/xtask/src/tasks/workflows/steps.rs b/tooling/xtask/src/tasks/workflows/steps.rs
index 8e73906396e..fde9150b1a7 100644
--- a/tooling/xtask/src/tasks/workflows/steps.rs
+++ b/tooling/xtask/src/tasks/workflows/steps.rs
@@ -754,11 +754,6 @@ pub fn download_artifact() -> DownloadArtifactStep {
}
}
-pub fn git_checkout(ref_name: &dyn std::fmt::Display) -> Step<Run> {
- named::bash(r#"git fetch origin "$REF_NAME" && git checkout "$REF_NAME""#)
- .add_env(("REF_NAME", ref_name.to_string()))
-}
-
/// Non-exhaustive list of the permissions to be set for a GitHub app token.
///
/// See https://github.com/actions/create-github-app-token?tab=readme-ov-file#permission-permission-name
diff --git a/tooling/xtask/src/tasks/workflows/vars.rs b/tooling/xtask/src/tasks/workflows/vars.rs
index 5923c7a1c54..8b4ff10bc5a 100644
--- a/tooling/xtask/src/tasks/workflows/vars.rs
+++ b/tooling/xtask/src/tasks/workflows/vars.rs
@@ -19,10 +19,6 @@ macro_rules! var {
};
}
-secret!(ANTHROPIC_API_KEY);
-secret!(OPENAI_API_KEY);
-secret!(GOOGLE_AI_API_KEY);
-secret!(GOOGLE_CLOUD_PROJECT);
secret!(APPLE_NOTARIZATION_ISSUER_ID);
secret!(APPLE_NOTARIZATION_KEY);
secret!(APPLE_NOTARIZATION_KEY_ID);
@@ -41,7 +37,6 @@ secret!(SENTRY_AUTH_TOKEN);
secret!(ZED_CLIENT_CHECKSUM_SEED);
secret!(ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON);
secret!(ZED_SENTRY_MINIDUMP_ENDPOINT);
-secret!(SLACK_APP_ZED_UNIT_EVALS_BOT_TOKEN);
secret!(ZED_ZIPPY_APP_ID);
secret!(ZED_ZIPPY_APP_PRIVATE_KEY);
secret!(DISCORD_WEBHOOK_RELEASE_NOTES);
@@ -104,12 +99,6 @@ pub fn one_workflow_per_non_main_branch_and_token<T: AsRef<str>>(token: T) -> Co
.cancel_in_progress(true)
}
-pub(crate) fn allow_concurrent_runs() -> Concurrency {
- Concurrency::default()
- .group("${{ github.workflow }}-${{ github.ref_name }}-${{ github.run_id }}")
- .cancel_in_progress(true)
-}
-
// Represents a pattern to check for changed files and corresponding output variable
pub struct PathCondition {
pub name: &'static str,