Release NetExpert 0.2.0 with diagnostic and change review skills
NetExpert package / package (push) Successful in 8s

This commit is contained in:
ВяткинАртём committed 2026-11-27 14:11:56 +03:00
1 parent d1d5af9609
commit 9492db0db5
18 files changed
+765 -16

No files matched your search

+39 -3
View File
@@ -13,6 +13,7 @@ SKILLS = {
"diagnostics",
"dns",
"linux-networking",
"network-change-review",
"network-security",
"networking",
"openwrt",
@@ -102,6 +103,23 @@ def test_skill_metadata(name: str) -> None:
assert instructions.index(shared) < instructions.index("`search_docs`")
def test_diagnostic_playbooks_and_change_review_are_linked() -> None:
skills = PLUGIN / "skills"
diagnostics = (skills / "diagnostics" / "SKILL.md").read_text(encoding="utf-8")
reference = "references/symptom-playbooks.md"
assert f"]({reference})" in diagnostics
playbooks = (skills / "diagnostics" / reference).read_text(encoding="utf-8")
for title in (
"VPN shows connected and traffic stalls",
"DNS fails for some clients",
"Small requests succeed and large ones stall",
):
assert f"## {title}" in playbooks
for skill in ("xray", "sing-box", "openwrt"):
instructions = (skills / skill / "SKILL.md").read_text(encoding="utf-8")
assert "](../network-change-review/SKILL.md)" in instructions
def test_shared_knowledge_workflow() -> None:
workflow = (PLUGIN / "skills" / "knowledge-workflow.md").read_text(encoding="utf-8")
for action in (
@@ -118,13 +136,31 @@ def test_shared_knowledge_workflow() -> None:
assert "`replacement_source_id`" in workflow
def test_mcp_errors_have_specific_recovery() -> None:
workflow = (PLUGIN / "skills" / "knowledge-workflow.md").read_text(encoding="utf-8")
for signal, guidance in (
("`401`", "`NETEXPERT_MCP_TOKEN`"),
("`403`", "Host or Origin"),
("`429`", "`Retry-After`"),
("`503`", "`restore_pending`"),
("Optional tool missing", "Use the core tools"),
):
assert any(
signal in line and guidance in line for line in workflow.splitlines()
)
assert (
"Only a successful search with `not_found` indicates an index miss." in workflow
)
def test_web_fallback_follows_mcp_evidence() -> None:
workflow = (PLUGIN / "skills" / "knowledge-workflow.md").read_text(encoding="utf-8")
mcp, web = workflow.split("Use client-side web search or browsing only if")
assert "`search_docs` in `cached` mode" in mcp
assert "start with `search_docs` and set `freshness` to `cached`" in mcp
assert "`get_document`" in mcp and "at most one useful MCP follow-up" in mcp
assert "`require_check` if current evidence matters" in mcp
assert mcp.index("`miss_guidance`") < mcp.index("`get_source_status`")
assert "set `freshness` to `require_check` if current evidence matters" in mcp
gap = mcp.split("On `not_found`", 1)[1]
assert gap.index("`miss_guidance`") < gap.index("`get_source_status`")
assert "MCP is unavailable" in web and "the task permits it" in web
assert "primary publisher" in web and "what could not be verified" in web
assert "explicitly call `knowledge` with action `submit_source`" in web