Skip to content

Load workspace config when indexing tracked repos#17

Open
alex4o wants to merge 1 commit intozzet:mainfrom
alex4o:fix/track-config-tsgo-lsp
Open

Load workspace config when indexing tracked repos#17
alex4o wants to merge 1 commit intozzet:mainfrom
alex4o:fix/track-config-tsgo-lsp

Conversation

@alex4o
Copy link
Copy Markdown

@alex4o alex4o commented May 5, 2026

Summary

  • load each tracked repo's .gortex.yaml before IndexAll creates its per-repo indexer
  • make server --track honor repo-local excludes and workspace config from the tracked destination repo
  • add regression coverage for single-repo and multi-repo IndexAll respecting workspace excludes

Test plan

  • go test ./cmd/gortex ./internal/config ./internal/indexer ./internal/excludes
  • go build -o gortex ./cmd/gortex

@alex4o alex4o force-pushed the fix/track-config-tsgo-lsp branch from d1446fb to bdba63c Compare May 5, 2026 22:47
Load each tracked repo's .gortex.yaml before IndexAll builds its per-repo Indexer. This makes server --track honor repo-local excludes and other workspace config without treating the workspace config as global state.\n\nCo-Authored-By: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
@alex4o alex4o force-pushed the fix/track-config-tsgo-lsp branch from bdba63c to 61e095d Compare May 5, 2026 22:49
@alex4o alex4o changed the title Respect server config for tracked repos Load workspace config when indexing tracked repos May 5, 2026
@zzet
Copy link
Copy Markdown
Owner

zzet commented May 6, 2026

Hey @alex4o!

Thank you for catching this nasty bug and contribution.

I followed further for the change and found MultiIndexer.IndexRepo at

cfg := mi.configMgr.GetRepoConfig(repoPrefix)
has the same bug - calls GetRepoConfig without LoadWorkspaceConfig.
It's reached from the MCP index_repository tool
result, err := s.multiIndexer.IndexRepo(prefix)
On a fresh-start daemon where immediately calls index_repository against a repo with a .gortex.yaml, you'd still get the bug. I believe it make sense to patch it the same way for completeness.
Also, tests only cover the exclude symptom and they don't lock down the workspace-slug propagation, which is the other (and arguably more impactful) thing your fix unblocks. Adding a workspace-slug assertion would harden against regressions.

Can you please take a look to those cases? If you don't have time for it - I can accept the PR and apply those patches in the follow up commit later.

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.

2 participants