Repository navigation
Readers prepare contents; fix tokens, instances and settings save - #26
Merged
Merged
Conversation
Ordinary readers may prepare the contents of one full SHA (site setting reader_prepare, on by default): per-user and per-repository limits, a reader share of 50 versions per path group with one-hour protection, 7-day retention outside the retention policy, no index or ordinary version is dropped for them, and failed fetches are remembered for an hour. HTTP prepare kind=content and MCP prepare content_only serve readers; MCP without a token answers LOGIN_REQUIRED. Raw reads repeat their media type in X-Sourcegraph-Content-Type and send nosniff. Fixes: - The SQL identity store implements UpdateAPIKeyScope and RenameScopeTag, so the API token page and the MCP visibility panel no longer fail with API_KEY_STORAGE_UNAVAILABLE. - Operations: a single-host site shows each instance's repositories. - Repository settings: saving takes a fresh preview and is not refused when only a synchronization check moved the revision. - Connect: the address section is hidden when a deployment has one site. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Agents that only hold a read-only personal token could report, but not fix, a commit that is not readable yet. This lets ordinary readers prepare the contents of one full SHA under their own limits, as the internal release does, and fixes several community-site issues.
Changes
reader_prepare, on by default): a signed-in user or token that can see a repository but does not manage it may prepare contents of a full SHA through HTTP preparekind: "content"or MCPpreparewithcontent_only: true. Limits per user (50 new tasks an hour, 5 active) and per repository (10 an hour, 10 active), plus 60 requests a minute per caller; ready commits and joined work are free. Reader versions have a share of 50 per path group with one-hour protection, are kept 7 days outside the retention policy, never cause index or ordinary-version eviction, and become ordinary once synchronized or prepared by a manager. Failed fetches are remembered for an hour. MCP without a token listsprepareand answersLOGIN_REQUIRED. Capabilities addprepare-content-reader.X-Sourcegraph-Content-Typeand sendX-Content-Type-Options: nosniff.UpdateAPIKeyScopeandRenameScopeTag; the API token page and the MCP visibility panel failed withAPI_KEY_STORAGE_UNAVAILABLE.REVISION_CONFLICT) when only a synchronization check moved the revision; real concurrent setting changes still conflict.docs/interfaces.md) and thesourcegraphskill.Risk
On by default: reader tasks use the manual worker after managers' work and count toward each repository's active-task limit. Cross-repository user concurrency is best effort across instances.
Compatibility
reader_prepare.enabled=falsekeeps the previous behaviour; all fields are additive.Testing
gofmt,go vet ./...,go test ./...,-raceon control/sso/sitesettings/httpserver/mcpserver/service,bun run check. New tests cover the permission matrix, limits, share and protection, storage low-water behaviour, marking, failure memory, MCP listings, and the SQL API key store.🤖 Generated with Claude Code