feat(generation): score articles with selected relevance model (#48)

This commit is contained in:
2026-11-25 18:09:36 +01:00
parent c5b8d0d4da
commit 90dd2a65d2
53 changed files with 1639 additions and 105 deletions

View File

@ -2,7 +2,7 @@
The supervisor requires Linux `/proc`, child-subreaper support and Python 3 (standard library only). Run `make test-e2e` from the project root after `make deps` and `make test-postgres`. The latter prepares the pinned embedded-postgres CLI v2.0.1/PostgreSQL 16.15.1 cache. Install Playwright's pinned Firefox beforehand if it is not already cached (`cd frontend && npx playwright install firefox`). These preparation steps may require network access; the E2E runner itself uses offline caches and never installs dependencies.
The runner builds the dedicated `backend/cmd/e2e` executable, starts a disposable `tradarr_e2e` database, applies the real migrations, and refuses a nonempty database. It ignores inherited application/test database URLs, chooses loopback ports, and bootstraps a reserved disposable admin. Exactly one fixture source is enabled. The catalogue contains one explicit fake summary model. The new user selects it in the real preferences UI; new accounts have no default selection. The injected Laya ranker and summary provider are separate test doubles, with no concrete retrieval adapter instantiated and no legacy role fallback. Production uses the same `internal/server` constructor with its existing real composition and scheduler enabled.
The runner builds the dedicated `backend/cmd/e2e` executable, starts a disposable `tradarr_e2e` database, applies the real migrations, and refuses a nonempty database. It ignores inherited application/test database URLs, chooses loopback ports, and bootstraps a reserved disposable admin. Exactly one fixture source is enabled. The catalogue contains the fake-summary synthesis model and a separate ollama/llama3 ranking model with native JSON schema capability. The new user selects both independently in the real preferences UI; new accounts have no default selection. The journey verifies both saved model IDs and the model actually called by the scoring fake. The injected Laya ranker and summary provider are separate test doubles, with no concrete retrieval adapter instantiated and no legacy role fallback. Production uses the same `internal/server` constructor with its existing real composition and scheduler enabled.
OpenFIGI, an Ollama-compatible fake Laya and a fake scraper share a loopback HTTP service with `/audit` counters and structured call events. The ranking fake extracts the real candidate UUID from the request prompt and returns it in `ranked_article_ids`; the browser assertion checks that actual UUID in audit events against the saved outcome. No hard-coded fixture ID selects a candidate.