Skip to content

fix: report unknown services by what the server can see - #106

Merged
GoodbyePlanet merged 1 commit into
mainfrom
fix/reindex-unknown-service-error
Aug 12, 2026
Merged

fix: report unknown services by what the server can see#106
GoodbyePlanet merged 1 commit into
mainfrom
fix/reindex-unknown-service-error

Conversation

@GoodbyePlanet

Copy link
Copy Markdown
Owner

Problem

reindex and index_history collapsed every pipeline error into:

Service `X` not found in config.yaml.

That message asserts a cause the code never verified. Hit in practice today: a force reindex of auth-server failed with it, but auth-server was in config.yaml at line 10 — the container had been started from the base docker-compose.yaml, which deliberately omits the config.yaml mount. 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.yaml merged with dynamic registrations, i.e. what the server can actually see:

Service `auth-server` not found. Known services: `catalog`, `orders`.

And name the empty case for what it is, since it has a different remedy:

Service `auth-server` not found — this server has no services at all
(config.yaml is empty or was never loaded, and nothing is registered).

Shared helper in server/tools/_services.py; both reindex and index_history had the identical bug.

Notes

  • Message text only — no change to lookup or indexing behaviour.
  • The two existing unknown-service tests asserted the old string; updated, plus a new test for the empty-list branch.

Testing

uv run pytest — 294 passed.

🤖 Generated with Claude Code

`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]>
@GoodbyePlanet
GoodbyePlanet merged commit 7342759 into main Aug 12, 2026
2 checks passed
@GoodbyePlanet
GoodbyePlanet deleted the fix/reindex-unknown-service-error branch August 12, 2026 06:42
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