Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions adapters/afd_plugin/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
18 changes: 18 additions & 0 deletions test/test_kb_init_pilot_afd.py
Original file line number Diff line number Diff line change
@@ -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()) == []
Loading