Codumentor logo Codumentor

Branch Switching Plugin

The Branch Switching plugin lets each conversation work on a different git (or SVN) branch. When Workspace Isolation is active, checkout happens inside that conversation's sandbox and does not change the host working copy.

Requirements

Configuration

plugins:
  - module: codumentor.plugins.branch_switching
    class: BranchSwitchingPlugin
    args:
      enabled: true
      overlay_indexing: true                 # default: true
      overlay_sweep_interval_seconds: 900    # default: 900; 0 disables
ParameterTypeDefaultDescription
enabledbooltrueWhether the plugin is active.
overlay_indexingbooltrueBuild a branch-specific search overlay of files that differ from the default branch, so semantic search reflects the selected branch without re-indexing the whole repository. Disable to save disk and compute; search on non-default branches then uses the default-branch index.
overlay_sweep_interval_secondsint900How often overlays are re-checked for staleness and rebuilt if the branch or base commit has moved. 0 disables the periodic sweep (overlays still rebuild after ingest/fetch).

How it works

Branch selection

Users pick a branch per repository from the Branch Selector on the welcome / repos panel. The choice is stored with the conversation. A Branch Banner in the conversation header shows the active branch. Permalink uses that branch when it builds links.

Isolated checkout

When the conversation starts:

Overlay indexing

When overlay_indexing is true, a per-branch search overlay is built in the background and rebuilt when the branch tip or the default-branch base commit changes. Overlays unused for 7 days are cleaned up. At most one build runs per (repo, branch) at a time.

Admins can inspect, force-rebuild, bulk-rebuild stale/errored, or delete overlays from Branch Overlays at the bottom of the Ingestion page (/admin/ingest).

Interrupted builds (server restart while a build was in progress) are recovered on the next startup.

See also