fix: report unknown services by what the server can see - #106
Merged
Conversation
`reindex` and `index_history` mapped every pipeline error to "Service `X` not found in config.yaml.", which names a cause the code never checked. When the server starts without config.yaml mounted (the base docker-compose.yaml deliberately omits the mount), a service that *is* listed in config.yaml reports as missing from it, sending you to the wrong file. Replace the message with the effective service list — config.yaml merged with dynamic registrations — so a typo and an unloaded config are distinguishable, and call out the empty case explicitly. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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.
Problem
reindexandindex_historycollapsed every pipeline error into:That message asserts a cause the code never verified. Hit in practice today: a force reindex of
auth-serverfailed with it, butauth-serverwas inconfig.yamlat line 10 — the container had been started from the basedocker-compose.yaml, which deliberately omits theconfig.yamlmount. The server had loaded zero services, and the error pointed at the one file that was actually correct.Fix
Report the effective service list —
config.yamlmerged with dynamic registrations, i.e. what the server can actually see:And name the empty case for what it is, since it has a different remedy:
Shared helper in
server/tools/_services.py; bothreindexandindex_historyhad the identical bug.Notes
Testing
uv run pytest— 294 passed.🤖 Generated with Claude Code