Second CI run got past collection and failed twelve pipeline tests on 3.11:
bin/corpus.py:612: IndexError: list index out of range
).format(context, question, ids[0])
With no retrieval index corpus.retrieve returns [], and build_messages indexed
ids[0] to show the model an example of a rule id. cmd_ask has always guarded
that and stopped with a message. pipeline.run did not, so it built a prompt out
of an empty list and died on the way.
Reproduced by assembling the one combination never tested before: the router
present AND no index. Both are true in CI, neither is true here, and the two
previous reproductions each had only one of them.
Two guards, because a caller forgetting is exactly what happened:
pipeline.run stops with "No rules indexed for 'odoo'" and exit 1, the same
answer ask gives. An ungrounded run is not worth making, since the whole
claim is that the answer is checked against retrieved rules.
build_messages drops the example line rather than indexi…
ci: the first pipeline run found four things, all real
Exit code 3 on both test jobs, which is pytest's INTERNALERROR rather than a
test failure. Reproduced in a fresh clone under the CI environment, in WSL.
1. pipeline.py called sys.exit() at import time.
When the optional LLM Workflow Router is absent it exited the process from
module scope. tests/test_pipeline.py imports it at module level, so SystemExit
fired during collection and took down the ENTIRE suite -- all 268 tests, not
the sixteen that need a router. It passed here only because a router checkout
happens to sit beside the repo; any fresh clone hit it.
The router failure is recorded as ROUTER_ERROR and raised by require_router()
where routing actually happens. The message and the exit code a user sees are
unchanged. The topology still builds and validates AT IMPORT when the router is
present, because that declaration is the escalation bound and validating it
late would let a malformed one reach a run.
test_pipeline.py skips rather than fails when the router is missing, and …
tests: pytest suite seeded from the fixed defects
147 tests, no Ollama, no GPU. Includes a replayed-Ollama fixture so the escalation topology is reachable on purpose rather than by luck.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>