Repository navigation
Context 0.7.108: batch refreshes record one version; verified repository registrations - #121
Merged
Merged
Conversation
…d commits; keep skipped sources out of scope expansion - A source update input may set more_batches: true. Its revision batch is reviewed, closed and built as usual, but the Route does not ask for a workspace version, so the next batch can start right after the build; the last batch records the one version of the whole refresh. The flag follows the update's later pages as version_deferred. - context source add repo rejects a commit that neither the checkout nor its origin (fetched once) has. With a remote source mode, Sourcegraph is asked instead; a commit it cannot read yet gets a warning, because it answers the same for an unprepared and a nonexistent commit, and the returned status carries no checkout advice. - A cited source outside the update that remote mode cannot read is listed in skipped_sources only, not in outside_scope or expand_scope, so the update request is the same as with a readable checkout. - Guidance: refresh batches set more_batches until the last one, which records the version once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tering In a remote source mode, context source add repo now checks the commit before writing sources/repo/index.yaml: it registers a commit Sourcegraph can read, or one that a remote branch or tag points at (from the refs catalog, with a brief retry while the catalog is prepared), the latter with an info that update --pending can prepare it. Anything else, including a missing token or an unreachable site, is refused without checkout hints; a missing authorization reports the top-level source_authorization step. --allow-unverified-ref registers such a commit with a warning, for example an older commit no branch or tag points at. Local mode is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… mode Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ped scopes - Auto mode keeps the reason code when it falls back to the checkout, so source add repo also checks remote branch and tag heads there, and its refusal carries no checkout fallback text. - An in-scope source remote mode skips is filtered out of outside_scope and expand_scope like an out-of-scope one. - The refs check makes three requests at most while the catalog is being prepared, clears a rejected temporary token and asks for authorization, treats a truncated catalog or a repeating cursor as unverified, and reads the catalog state from the response. - Guidance: the last batch of a committed multi-batch refresh inspects and records the version against the commit before the first batch when the workspace has no version tag. - Comment fixes in repoSources. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
A real remote-mode documentation update on 0.7.107 (two batches by requirement) exposed friction in batch refreshes and repository registration.
Changes
context update --inputacceptsmore_batches: true: a batch followed by another builds without recording the workspace version; the last batch records it once. Guidance explains the version base when earlier batches were committed separately.context source add repoverifies the commit before registering: local mode checks the checkout and fetches the commit from origin once; remote/auto mode confirms it through Sourcegraph (readable, or the head of a remote branch or tag) and otherwise refuses unless--allow-unverified-ref.skipped_sources, not inoutside_scope/expand_scope, and do not change the update revision.Risks
Registration now refuses unknown commits;
--allow-unverified-refkeeps the old behaviour for an unusual older commit.Compatibility
more_batchesand--allow-unverified-refare optional; without them behaviour matches 0.7.107 except the added commit check.Testing
Build, typecheck and lint pass; new and existing tests of the touched modules pass per file; remote-mode registration was checked against a real Sourcegraph site.
🤖 Generated with Claude Code