Skip to content

feat: unify snapshot and incremental Sourcerer indexing - #2

Draft
simianhacker wants to merge 1 commit into
mainfrom
poc/unified-index-schema
Draft

feat: unify snapshot and incremental Sourcerer indexing#2
simianhacker wants to merge 1 commit into
mainfrom
poc/unified-index-schema

Conversation

@simianhacker

Copy link
Copy Markdown
Owner

What

Adds an opt-in incremental update mode for moving branches while keeping immutable snapshot indexing for exact commits. Both modes now share the real sourcerer-v1-* indices, with mode-specific identity, safe query scoping, and no v2 or empty schema-anchor indices.

How to Verify

  1. Run uv run pytest -q and confirm all tests pass.
  2. Run uv build and confirm both distributions build.
  3. Rebuild local Sourcerer POC indices, then run ctx exec local-dev -- uv run sourcerer setup twice; confirm only the 3 v1 templates and the real v1 refs lookup index exist.
  4. Snapshot-index simianhacker/code-intelligence-indexer at fb82dea8cff67862268bc019877ea9ec5dcbecd3.
  5. Incremental-index elastic/serverless-gitops branch main with update: incremental.
  6. Execute every sourcerer.* tool through POST /api/agent_builder/tools/_execute in snapshot and incremental scopes; confirm no unknown-column errors and returned rows carry the scoped org, repo, and completed commit.

Breaking Changes

Existing Sourcerer POC indices must be rebuilt before setup because the v1 mappings and refs index mode changed. This temporary POC does not include migration compatibility.

- add ref-addressed incremental branch updates under the v1 schema
- use union mappings and mode-scoped Agent Builder queries without anchors
- preserve snapshot retention while making orphan cleanup mode-aware
- cover setup, updates, retries, deletions, and mixed-mode tool behavior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant