Repository navigation
fix: manager-scoped prepare, paced manual requests and per-repository index collection - #11
Merged
Merged
Conversation
… index collection - Prepare: site administrators, the service credential and repository managers (session or personal token); personal tokens may call the HTTP prepare route; MCP lists prepare only for tokens that can use it. The admin-only "allow index preparation" token option is removed. - Manual requests join identical queued or running work; new work is paced to one per repository every 30 seconds (429 RATE_LIMITED, Retry-After). Idempotency receipts drop the oldest instead of blocking the repository. - Index collection runs per repository under its own slot with a 30-second round budget, after retention and before a storage-budget refusal, marks disk usage for resampling and reports its status; manual cleanup falls back to expired indexes when the latest index is not ready. 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
Changes
Prepare permission
AuthorizePrepare: site administrators and the service credential; personal tokens whose owner is currently an administrator; the repository's managers (session or token). Everyone else gets 403.POST /api/admin/v1/repo/prepare; all other management routes stay closed to them.prepareonly for tokens whose owner is an administrator or manages at least one repository (cached for a minute; failures fall back to read-only).allow_preparefield are removed. The field is still accepted and ignored on creation for cached pages.Pacing
429 RATE_LIMITEDwithRetry-After. One request queuing every monorepo group counts once. Scheduler and worker follow-up work, including head indexes after a manual sync, is not paced.QUEUE_FULLfor the whole repository.Index collection
index_collection.expired_onlyin the preview), keeping every retained version's index and every job.Risks
Backward compatibility
manual_queued_at; when missing, there is no pacing.expired_onlyandindex_collectionare additive.NewWithPrepareAuthorizationnow passes the repository to its guard (internal API).Testing
go vet,go test ./...andnode scripts/check-web.mjspass.🤖 Generated with Claude Code