diff --git a/adapters/afd_plugin/manifest.yaml b/adapters/afd_plugin/manifest.yaml index 23245337..ba9e0329 100644 --- a/adapters/afd_plugin/manifest.yaml +++ b/adapters/afd_plugin/manifest.yaml @@ -234,3 +234,23 @@ knowledge_lifecycle: release: trigger: none upstream_visibility: public + # kb init (doc/design: kb-init-design.md §3). Read by `kb init afd-plugin` + # only; the service ignores it. Values checked against upstream + # vllm-project/afd-plugin main on 2026-09-30. + init: + seeds: + # linked, never copied: the repo-neutral review rules every vLLM-plugin + # review applies (design reuse, compatibility, tests-with-the-change) + - general/review/rules.md + # linked: afd-plugin wraps vLLM workers/model runners; algorithm-level + # choices must be checked against upstream vLLM first + - general/review/guides/upstream-first-for-algorithm.md + # adapt-copied: afd_plugin/compat/** and the v1 worker subclasses track + # vLLM releases, so the vLLM upstream API-drift patterns (renamed + # params, constructor migrations, subclass missing new fields) transfer; + # claims that do not resolve in afd-plugin are dropped by kb init + - repos/vllm-omni/rebase/upstream-api-drift.md + # the Python package only: csrc/ is C++/CUDA, which the Python module scan + # does not read (its knowledge stays with the execution-platforms owner) + source_roots: [afd_plugin/] + exclude: ["*/__init__.py", "*/py.typed"] diff --git a/test/test_kb_init_pilot_afd.py b/test/test_kb_init_pilot_afd.py new file mode 100644 index 00000000..a1c7f91d --- /dev/null +++ b/test/test_kb_init_pilot_afd.py @@ -0,0 +1,18 @@ +"""kb init pilot 1: the real afd-plugin adapter's init block parses and its +seeds exist in the real knowledge tree (design kb-init §12).""" + +from __future__ import annotations + +from infermatrix_copilot.kb_service.config import load_registry, validate_seeds +from infermatrix_copilot.sdk._resources import adapters_root, knowledge_root + + +def test_afd_plugin_init_block_is_valid_on_the_real_tree(): + lifecycle = load_registry(adapters_root())["afd-plugin"] + assert lifecycle.enabled is False and lifecycle.mode == "shadow" # init flips it, not this PR + init = lifecycle.init + assert init is not None + assert init.source_roots == ("afd_plugin/",) + assert init.seeds, "the pilot seeds from existing knowledge" + assert all(seed.startswith(("general/", "repos/vllm-omni/")) for seed in init.seeds) + assert validate_seeds(init, knowledge_root()) == []