Retarget prompt adapter e2e tests to a public fixture, bump catalog SHAs, and un-gate docs

オープン
#1,655 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

@ajbozarth がすでに取り組んでいます。

2026年9月23日 から。

評価

この issue はまだ評価されていません。

説明

area/adapter-functions area/backends testing

Follow-up to #1654. #1654 ships the prompt-fallback mechanism on LocalHF, but the feature is not reachable end-to-end yet: no catalog repo publishes prompt io.yaml files at its pinned revision, and the e2e tests lean on a temporary private repo. This issue tracks making prompt fallback actually usable, in three parts.

1. Retarget the e2e tests to a public fixture

The adapter-resolution e2e tests in test/backends/test_adapters/test_adapter_resolution_e2e.py point at a temporary private repo, ajbozarth/granitelib-rag-r1.0 (a weights-stripped copy of ibm-granite/granitelib-rag-r1.0 with prompt io.yaml files added), pinned to a specific SHA. Because the repo is private, the tests xfail rather than run for anyone without read access — including CI's public-only token and any other developer's token — via the require_hf_token() marker plus the _xfail_if_test_repo_unreadable autouse fixture. They run normally only for a developer with access to that personal repo.

This is a deliberate, documented stopgap (there is a TODO at the top of the file), but a bare in-code TODO can linger silently: the tests give no real signal in CI, and the SHA pin, private-repo dependency, and xfail guard stay in place until someone removes them.

  • Identify a public repo that carries the same layout the tests exercise: the prompt io.yaml files under the adapter-function subpaths, for the model slots the tests reference (granite-4.2-3b, granite-4.2-8b, and the any slot). The natural target is ibm-granite/granitelib-rag-r1.0 itself once it adds prompt support — the temporary repo is already a copy of it — but any public repo carrying the layout works.
  • In test/backends/test_adapters/test_adapter_resolution_e2e.py, repoint _TEST_REPO and update _TEST_SHA to the public repo.
  • Remove the temporary access guard once the repo is public: the _xfail_if_test_repo_unreadable autouse fixture and its _test_repo_readable() helper, plus the require_hf_token() marker if the public repo needs no token.
  • Repoint any e2e tests the OpenAI/Ollama prompt-fallback follow-up adds against the same fixture repo.

2. Bump the catalog SHAs so the fallback actually resolves

mellea/backends/adapters/catalog.py pins each repo to a specific revision (_RAG_SHA, _CORE_R1_SHA, _GUARDIAN_SHA). Prompt fallback cannot activate for any released Mellea until a repo publishes prompt io.yaml slots and its pin here is bumped to a revision that includes them — publishing to the repo's main is not enough on its own. Bump the relevant pin(s) once the public prompt data exists. If the fixture repo from part 1 is one of the catalog repos (e.g. ibm-granite/granitelib-rag-r1.0 → _RAG_SHA), that retarget and this pin bump are the same change.

3. Remove the "Coming soon" docs markers

docs/docs/advanced/intrinsics.md marks prompt fallback coming-soon at the top of the ## Prompt fallback section, and the PromptBinding table cell's ✅ shipping wording relies on that marker for context. Revisit both once the fallback is reachable end-to-end.

Acceptance criteria

  • A public repo carries the prompt io.yaml layout, and the catalog pins reference a revision that includes it.
  • The adapter-resolution e2e tests run (not xfail) under CI's token; no remaining reference to ajbozarth/granitelib-rag-r1.0 or a personal-repo SHA pin.
  • The _xfail_if_test_repo_unreadable guard and its TODO are removed.
  • The "Coming soon" markers in intrinsics.md are removed (or updated) to match the now-reachable behavior.
主要言語
Python
スター
1.8k
フォーク
161
平均マージ
4日 3時間
マージ済み PR(30日)
45

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

generative-computing/mellea のほかの issue

generative-computing/mellea の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。