Skip to content

kb init(afd-plugin): skeleton - #265

Closed
tzhouam wants to merge 1 commit into
mainfrom
kb/init-afd-plugin-skeleton
Closed

tzhouam wants to merge 1 commit into
mainfrom
kb/init-afd-plugin-skeleton

Conversation

@tzhouam

@tzhouam tzhouam commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

kb init stage skeleton for afd-plugin (vllm-project/afd-plugin).

  • Upstream pin: 9cae2d2ddaae7e1752fc12ead577d59540b17f27
  • Knowledge base: 3118067936332f671dcd8b7281ad6f8150adc103
  • Model spend (accounted): $15.08

Human-merged. Rules were screened by the docs redundancy filter, checked at the pin, and given an advisory verdict; fail rules are already removed.

rule page verdict
AFD-I1 repos/afd-plugin/rules.md pass
AFD-I2 repos/afd-plugin/rules.md pass
AFD-I4 repos/afd-plugin/rules.md unsure
AFD-I6 repos/afd-plugin/rules.md unsure
AFD-I7 repos/afd-plugin/rules.md unsure
AFD-I9 repos/afd-plugin/rules.md unsure
AFD-I10 repos/afd-plugin/rules.md unsure
AFD-I11 repos/afd-plugin/rules.md unsure
AFD-I12 repos/afd-plugin/rules.md unsure
AFD-I15 repos/afd-plugin/rules-seed-vllm-omni-rebase-upstream-api-drift.md pass
AFD-I16 repos/afd-plugin/rules-seed-vllm-omni-rebase-upstream-api-drift.md unsure
AFD-I17 repos/afd-plugin/rules-seed-vllm-omni-rebase-upstream-api-drift.md pass
AFD-I18 repos/afd-plugin/rules-seed-vllm-omni-rebase-upstream-api-drift.md unsure
AFD-I19 repos/afd-plugin/rules-seed-vllm-omni-rebase-upstream-api-drift.md pass
AFD-I20 repos/afd-plugin/rules-seed-vllm-omni-rebase-upstream-api-drift.md pass
AFD-I22 repos/afd-plugin/rules-seed-vllm-omni-rebase-upstream-api-drift.md unsure
AFD-I23 repos/afd-plugin/rules-seed-vllm-omni-rebase-upstream-api-drift.md pass
AFD-I24 repos/afd-plugin/rules-seed-vllm-omni-rebase-upstream-api-drift.md pass

Seeds (adapted, provenance only here):

  • repos/vllm-omni/rebase/upstream-api-drift.md @ 311806793633 → repos/afd-plugin/rules-seed-vllm-omni-rebase-upstream-api-drift.md (AFD-I13, AFD-I14, AFD-I15, AFD-I16, AFD-I17, AFD-I18, AFD-I19, AFD-I20, AFD-I21, AFD-I22, AFD-I23, AFD-I24)
Dropped rules
  • AFD-I3: advisory judge: fail {"faithful": "The graph-cache claim is too broad. The FFN runtime evidence describes a cache keyed by DP metadata, but execution_platforms.md:L287-L292 says the Ascend key uses stage token counts and A/F topology. The evidence also does not establish the stated ban on an independent control-plane li
  • AFD-I5: advisory judge: fail {"faithful": "证据支持延迟初始化、部分初始化后的清理,以及文档对归属的不同说法(attention_runtime.md:L113-L129;connector_contracts.md:L243-L254、L275-L279、L294-L295)。但证据没有明确要求重复调用 close() 无害;所引 FFN 文档也只说 model runner 持有 connector,未说由它调用 close()(ffn_runtime.md:L125-L127)。", "non_contradictory": "与现有 AFD-I17 的初始化时机和清理要求一致;它明确指出了文档中的归属
  • AFD-I8: advisory judge: fail {"faithful": "证据支持 vLLM 版本同步、复制函数体的刷新要求,以及 Ascend commit 80d8c194f;但没有提供 tests/unit/package/test_package.py 的内容,无法证实它也是版本目标。更关键的是,“只靠包的固定版本兜底”被同时用于 Ascend 补丁,而 compatibility_and_patches.md:L61-L71 明确说仓库未在 pyproject.toml 中声明 vLLM-Ascend 依赖。", "non_contradictory": "AFD-I22 和 `compatibility_and
  • AFD-I13: advisory judge: fail {"faithful": "The cited compatibility inventory says the package pin and review discipline guard engine_core.py, but describes npu/force_load_balance.py separately as having no patch-local version guard. The proposed text incorrectly applies the package-pin claim to both patches (compatibility_a
  • AFD-I14: advisory judge: fail {"faithful": "证据支持 best-effort 导入、运行时缺失检查和 reload 守卫;但新规则把 Ascend patch 的应用路径限定为 config facade 或 NPU worker runtime facade。compatibility_and_patches.md:L86-L110 明确记载,force-load-balance patch 在 FFN worker 构造时直接导入,因此这项概括不准确。", "non_contradictory": "所示其他规则没有要求所有 Ascend patch 都经 facade 应用;AFD-I9 与新规则关于延
  • AFD-I21: advisory judge: fail {"faithful": "证据只要求后端仍依赖状态时不得丢弃或替换 AFDTransferContext.states,新规则却无条件要求原样传递(connector_contracts.md:L157-L183)。证据也没有表明 NPU 图缓存必须使用 make_ffn_graph_key();它只说明 NPU 的键包含 stage token 计数和 A/F 拓扑(execution_platforms.md:L287-L292)。", "non_contradictory": "现有 AFD-I6 允许图 key 由 make_ffn_graph_key() 或 stage

Needs human edit:

  • repos/afd-plugin/_index.md: new entries were appended as a list; move them into the page's table if you prefer its style
  • owner compatibility: prefix afd_plugin/compat/ is an ancestor of the prefixes of execution-platforms; those files count for the more specific owner only — narrow it if it is a catch-all
  • owner compatibility: prefix tests/unit/compat/ is an ancestor of the prefixes of execution-platforms; those files count for the more specific owner only — narrow it if it is a catch-all
  • owner components: prefix afd_plugin/compat/ is an ancestor of the prefixes of execution-platforms; those files count for the more specific owner only — narrow it if it is a catch-all
  • owner components: prefix afd_plugin/model_executor/ is an ancestor of the prefixes of compatibility; those files count for the more specific owner only — narrow it if it is a catch-all
  • owner docs-recipes: prefix .agents/ is an ancestor of the prefixes of e2e-ci; those files count for the more specific owner only — narrow it if it is a catch-all
  • owner docs-recipes: prefix docs/ is an ancestor of the prefixes of execution-platforms, compatibility, e2e-ci; those files count for the more specific owner only — narrow it if it is a catch-all
  • owner model-integration: prefix afd_plugin/model_executor/ is an ancestor of the prefixes of compatibility; those files count for the more specific owner only — narrow it if it is a catch-all
  • no route reaches repos/afd-plugin/architecture.md
  • no route reaches repos/afd-plugin/rules-seed-vllm-omni-rebase-upstream-api-drift.md

Notes:

  • owners from existing pages: attention-runtime, components, connectors, ffn-runtime, model-integration, plugin-boundary

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-30T16:34:11.312403Z 4bc2844 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4bc2844e88

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +2 to +5
schema_version: 1
owners:
- owner: components
path: repos/afd-plugin/components/_index.md

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve adapter coverage before enabling this route table

Adding a nonempty _routes.yaml makes _direct_knowledge_routes bypass the existing AFD adapter mapping, but this table omits established paths such as afd_plugin/config.py, afd_plugin/v1/worker/attention_worker.py, and afd_plugin/v1/worker/ffn_worker.py. For a PR with a generic description, each of those now returns description_unrouted with no route or scope validation, and PYTHONPATH=src pytest -q test/test_knowledge_view_routing.py::test_golden_routes_unchanged_by_extraction fails for both AFD fixtures. Because Direct reviews consume only the exact routes returned, either retain the adapter fallback or make this table reach parity before activating it.

AGENTS.md reference: knowledge/AGENTS.md:L16-L16

Useful? React with 👍 / 👎.


# AFD plugin 评审规则:上游漂移与跨文档隐含不变量

## AFD-I15 — 保持 CPU-safe 导入边界,CUDA/Ascend 类互不继承

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Move seeded conclusions to their nearest owner rules

Do not keep this repository-root seed page as a catch-all: its rules span plugin-boundary/CPU imports (AFD-I15), connectors (I16–I17), execution platforms (I18/I23), compatibility (I20/I22), and CI (I24), despite those owners already having dedicated directories, and several conclusions duplicate the new root rules (for example I15 versus I10/I11 and I20 versus I7). This both leaves the rules outside the exact component routes and creates competing copies that can drift; merge each conclusion union-first into the nearest owner's rules.md and remove the heterogeneous seed page.

AGENTS.md reference: AGENTS.md:L11-L17

Useful? React with 👍 / 👎.

@tzhouam

tzhouam commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator Author

Closing: this bootstrap PR fails CI for a reason that is a kb init defect, not a content problem, so it will be regenerated rather than hand-fixed.

afd-plugin is routed by its adapter manifest (review_routes → components/<owner>/rules.md, each with a Direct quick map, pinned by the golden routes and the SDK tests). The skeleton stage wrote a knowledge-side _routes.yaml, which takes precedence over the manifest: owners pointed at _index.md pages with no Direct quick map, routing status went ready → scope_fallback, and the golden routes drifted (3 test failures). It also appended its 16 rules to the top-level rules.md, which is one of the two knowledge.briefing_docs: the 8000-char always-on briefing then truncated the index (the 4th failure).

Fix (kb init): for a manifest-routed repository, never write _routes.yaml; use the manifest's review_routes as the owner table; place rules on the owner pages it routes to (never on briefing_docs pages); require every routed page to yield a Direct quick map. Then re-run the skeleton stage. Record: /data/zhoutaichang/kb-init-state/init/afd-plugin/skeleton.json ($15.08, pin 9cae2d2d).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant