Releases Release 6.2
APRIL 23, 2025

Sourcegraph 6.2

A newer version of Sourcegraph is available: Sourcegraph 6.12.

Highlights

Personalized search ranking now live

Batch spec library now customizable via API

Find Batch Changes with title-based search

Batch Changes support for GitHub fine-grained access tokens (experimental)

Bulk rebase changesets available in Batch Changes

Commit signing with SSH keys in Batch Changes (experimental)

Claude 3.7 Sonnet now available in Cody

Details

Improvements

  • Code Search Enable personalized ranking by default

    We've enabled personalized ranking for search results in the new web app—marking the first step in integrating user-specific ranking signals into our search pipeline. As a result, queries spanning multiple repositories will prioritize results from repositories the user has frequently contributed to.

    User can disable the feature by setting boostRelevantRepositories to false in the settings

    {
      "experimentalFeatures": {
        "boostRelevantRepositories": false,
      },
    }
    
  • Code Search Use `patterntype=nls` for Cody context

    The GetCodyContext endpoint is now deprecated. Instead, clients should use the search API with patterntype=nls. Here's an example of how Cody calls the search API: (nlsSearchQuery).

  • Batch Changes Find batch changes with title-based search
  • Batch Changes Bulk rebase changesets available in Batch Changes
  • Batch Changes New api for batch spec examples

    feat(batches): new batch spec examples library api

  • Batch Changes Add fine-grained access tokens to credential modal

    feat(batches): Batch Changes now supports fine-grained access tokens as user and site-admin credentials

  • Batch Changes Commit signing with ssh keys

    Feature is behind batches-commit-signing feature flag.

    Adds the UI form elements needed for submitting a private SSH key and passphrase for git commit signing.

    note: only UI elements and graphql changes in this PR, backend changes are still required.

    image

    image

  • Cody Claude 3.7 Sonnet now available in Cody
  • Cody Add a site config for "enforced" Guardrails and transmit it to Cody clients
    • Adds a site config setting, "attribution.mode": "enforced", which configures Cody IDE extensions after v1.82 (VSCode) or v7.82 (JetBrains) to not display code until attribution checks have finished.
  • Agents Add rule stats to the `./api/rules` API

    Added rule stats to the .api/agents/{agent_id}/rules REST endpoint when the query string ?include=revision.stats is present

  • Agents Auto-generate feedback from changeset conversations

    When a pull request is merged, diagnostic feedback is auto-generated via LLM judge from the comments and reactions

  • Agents Add multiple table view UIs
    • New UIs to view an agent repos, conversations, PRs, reviews, and diagnostics
  • Agents Mirror pull requests in our database
    • It's now possible to POST /.api/agents/{agent_id}/runs to trigger a background review of a pull request
    • It's now possible to list pull requests for an agent with GET /.api/agents/{agent_id}/changesets
    • It's now possible to list repositories for an agent with GET /.api/agents/{agent_id}/repos
    • It's now possible to trigger a background sync of pull requests via POST /.api/agents/{agent_id}/runs.
  • Agents Link to original rule URL in GitHub review comments
    • Review comments on GitHub now link to the original rule. Previously, it only displayed the rule slug (short ID like logic) and it was difficult to find the source of the rule. Now, it's easy to find both the rule instructions or identify the rule author (via git blame).
  • Agents Add $-based cost estimates in agent overview
    • There is now a new "Spend" tab in the agent overview that gives insights into how expensive it is to run an operate an agent, which is helpful among other reasons when making a decision about what LLM model to use.
    • The LLM API /.api/completions/stream now returns the used "modelref" (Sourcegraph canonical representation) alongside the used "model" (LLM provider canonical representation).
  • Agents Rename all-inferred to repo-rules
    • Use the setting rules: ["repo-rules"] instead of rules: ["all-inferred"] to pick up *.rule.md files in the repository based on the changed files in the diff.
  • Dev Add CLAUDE.md file for claude code

    N/A

  • Smart Apply Add instant apply model for smart apply
    • feat(smart-apply): Add instant apply models
  • Source Graphql: add databaseID field to repository graphql field

    The repository graphql API now supports fetchinig the databaseID field.
    Backport cac91705f82f1221766f1576cdadd0b5c2c7502a from #4953

  • Source Create different proxy interpretation modes for sub repo ip perms matching

    authz: Add Perforce IP rule interpretation modes (unified (default), directOnly, proxyOnly) in site configuration via rulesInterpretationMode field to provide more predictable sub-repo permissions behavior
    Backport 774ac0c653371b0acbae62e233764dc6729fddf3 from #4713

  • Source Create graphql endpoint for viewing sub repo perms for a repository


    Backport 34dd46a20d9d9d3a52abaaeaa845b968bf781435 from #4528

  • Source Add projectQuery option to Gerrit code host connections

    Gerrit code host connections now support a projectQuery option that allows for any arbitrary query parameters supported by the Gerrit API.

  • Source Allow adding details of an already existing GitHub App

    Site admins can now add their own pre-existing GitHub Apps to Sourcegraph. This also allows site admins to supply the App details of Enterprise GitHub Apps.

  • Uncategorized Configurable runtime for codemonitor jobs

    feat: configurable runtime for codemonitor jobs

  • Uncategorized Do-init-only flag in `sg release create`

    NA

  • Uncategorized Patch release creates git branch for version

    na

  • Uncategorized Implement commit search on searcher
    • Added a feature flag to run commit search on searcher, goal being to improve stability and resource usage of gitserver
  • Uncategorized New GraphQL query evaluateFeatureFlags

    feat: new GraphQL query evaluateFeatureFlags

Fixes

  • Code Search Fix bug that wasn't setting a default tab selection
    • Fixes a bug where default selections were not being set.
  • Code Search Disallow rev filters with repo predicates

    Fixes a search bug where queries like repo:has.file(...) rev:1.0 would completely ignore the rev filter. Now, these types of searches are explicitly disallowed.

  • Code Search Ensure we ignore context canceled errors in searcher client

    Fix a rare bug in repo:has.file queries where some searches could return no results.

  • Code Search Truncate all Rockskip tables

    With this change we delete all Rockskip indexes. In Sourcegraph v5.5.0 we shipped a bug in Rockskip which causes some unindexed symbol searches to return no results. The bug has been fixed in 6.2 and was backported to 6.1. However indexes that have been created prior to the fix are corrupted. Hence, we have to reindex all Rockskip repositories. A new index job will automatically be triggered. This requires no further action. However, during the reindex, symbol search at older revisions of very large repos will likely time out, so we encourage all customers to communicate this to their users ahead of the rollout of the new version.

  • Analytics Deprecate admin analytics
    • Deprecate the admin analytics pages (/site-admin/analytics) and redirect users to Sourcegraph Analytics (analytics.sourcegraph.com).
  • Cody Add new bedrock fields to legacy completions config


    Backport 0d9f70dd54a4c20621fe7404d3c7598e60264f59 from #4771

  • Cody Update auditlog API to have cursor-based pagination
    • Improve usability of auditlog API
  • Cody Prevent panic in chat completions API by checking error first
    • The API POST /.api/llm/chat/completions now does not panic anymore when sending a bad request (HTTP 400), which was possible to trigger if you used tool with an incorrect schema.
  • Agents Filter out empty diagnostic paths
    • Fixed error "empty string is not a valid pathspec" when loading diagnostics page
      Backport ac2034bc8b71c5983a94946777cc1f75b168c287 from #4407
  • Agents Automatically add feature-flag trigger
    • When creating a new agent program, it now automatically includes a feature flag trigger for the feature flag named agents-auto-review. You must create this feature flag to have the trigger activate.
  • Agents Skip draft PRs with the `feature_flag_enabled` trigger
    • The review agent no longer automatically reviews draft PRs with the feature_flag_enabled trigger. Instead, users must explicitly request reviews on draft PRs through a comment (comment_starts_with) or a label (label_exists)
  • Agents Correctly chunk diffs wrt generated files
    • Fix a bug where the review agent would error if a generated file had more than 100k tokens.
    • Updated docs to describe the algorithm to detect and ignore generated files
  • Agents Mark run as "errored" on panic
    • Fixed a bug where an agent run would be stuck in "running" mode forever. Now, these runs get correctly marked as "errored"
  • Agents Several small fixes for agents
    • The review agent now posts a comment reply when it's triggered by a comment trigger (example: @sourcegraph review). This is makes the agent behave more like a colleague would.
    • The agent run page now links back to the pull request at the top of the page
    • "Duration: 0s" is no longer shown on the agent run page while it's running.
    • The links to the "applied_rules" in the agent run page now work correctly. Previously, the links were a 404 because they were one long ", " joined string. We plan to further improve the design of how rules are displayed in this page, so this is not a final solution, just a quick fix for the most immediate bug.
  • Ci Make minor_nightly_cut.sh executable

    na

  • Perf Remove quadratic behavior in rune counting
    • (perf) Fixed quadratic behavior in commit and diff search
  • Release Add runtype names

    na

  • Rr v2 and v1 next patch return same values

    na

  • Smart Apply Change the deployment id for the custom model
    • fix(smart-apply): Change deployment id
  • Source Sub-repo-perms: adjust ipv4 string prefix matcher to use stack instead of heap allocations

    N/A

  • Uncategorized Fetch user by username for Bitbucket Server
    • Fixes an issue where we OAuth would fail for Bitbucket Server users with special characters in their usernames
      Backport 28317328924ae0139edacc3711d169b37179c31f from #4490
  • Uncategorized Enforce file size limits for highlighting
    • Enforces limits of 1.5 MiB and 50K lines for highlighting code files.
  • Uncategorized Unset cxx instead of NoCC

    na

  • Uncategorized Use pathspec literal to avoid colons
    • Fixed a bug where paths that start with colons may be reported as not found.
  • Uncategorized Batch workspaces to reduce memory pressure

    fix(batches): batch workspaces to reduce memory pressure

  • Uncategorized Mark releases as development in the releaseregistry

    NA

  • Uncategorized Remove vertical scrollbar from pre block
    • (minor bugfix) Fixed an issue where we would show scrollbars on unscrollable items in the dynamic search filters sidebar
  • Uncategorized Nightly Minor Release Pipeline

    NA

  • Uncategorized Call bazel directly for generating stitched migration graph in nightly release pipeline

    NA

  • Uncategorized /latest releaseregistry endpoint returns latest by semver

    NA

  • Uncategorized Nightly release pipeline must test do-init step

    na

Self-hosted resources