refactor(mcp)!: remove remaining order integration artifacts
Remove order compatibility fields, routing notices and migration references from Wiki source, skills and documentation. Bump capability schema to v6 and validate the remaining Wiki query response contract. Move retired runtime configuration, database and completed job archives to the independent order project, uninstall legacy units and clear stale bytecode. Keep Git history for provenance. Validation: 173 Wiki tests pass; live independent order MCP authentication, queries and write rejection pass after cleanup. No integration filenames, config keys or source references remain in the Wiki working tree. BREAKING CHANGE: query results and capability metadata no longer contain legacy business-related fields. Wiki consumers must use the v6 schema.
This commit is contained in:
@@ -131,9 +131,6 @@ class McpQueryTests(unittest.TestCase):
|
||||
self.assertIn("public only", prompt)
|
||||
self.assertIn("normal wiki-query log entry is allowed", prompt)
|
||||
self.assertIn("wiki-ingest, wiki-update, wiki-rebuild", prompt)
|
||||
self.assertNotIn("obsidian-wiki business", prompt)
|
||||
self.assertIn("independent kingdee-orders MCP", prompt)
|
||||
self.assertIn("Do not read legacy order databases", prompt)
|
||||
self.assertIn("Do not run arbitrary shell commands", prompt)
|
||||
self.assertNotIn("shell commands, file writes", prompt)
|
||||
self.assertNotIn("rm -rf", prompt)
|
||||
@@ -157,11 +154,15 @@ class McpQueryTests(unittest.TestCase):
|
||||
popen.returncode = 0
|
||||
result = self.manager.get_query_job_result(job["job_id"])
|
||||
|
||||
self.assertEqual(set(result), {
|
||||
"job_id", "state", "answer", "answer_markdown", "citations", "used_wiki",
|
||||
"data_freshness", "warnings", "confidence", "mode", "public_only",
|
||||
"exit_code", "opencode_output_tail", "error",
|
||||
})
|
||||
self.assertEqual(result["state"], "succeeded")
|
||||
self.assertIn("Based on the wiki", result["answer"])
|
||||
self.assertEqual(result["answer_markdown"], result["answer"])
|
||||
self.assertEqual(result["citations"], [])
|
||||
self.assertFalse(result["used_business_facts"])
|
||||
self.assertTrue(result["used_wiki"])
|
||||
self.assertEqual(result["data_freshness"], [])
|
||||
self.assertEqual(result["confidence"], "high")
|
||||
@@ -182,7 +183,7 @@ class McpQueryTests(unittest.TestCase):
|
||||
self._json_text_event(
|
||||
"MCP_QUERY_OK\n"
|
||||
"Based on [[Mini FAKRA]] and [[BJD]].\n"
|
||||
"Business facts used. Data through 2026-06-02.\n"
|
||||
"Wiki sources updated through 2026-06-02.\n"
|
||||
"Answer body"
|
||||
),
|
||||
encoding="utf-8",
|
||||
@@ -192,7 +193,6 @@ class McpQueryTests(unittest.TestCase):
|
||||
|
||||
self.assertEqual(result["answer_markdown"], result["answer"])
|
||||
self.assertEqual(result["citations"], ["Mini FAKRA", "BJD"])
|
||||
self.assertFalse(result["used_business_facts"])
|
||||
self.assertTrue(result["used_wiki"])
|
||||
self.assertEqual(result["data_freshness"], ["2026-06-02"])
|
||||
self.assertEqual(result["confidence"], "high")
|
||||
|
||||
@@ -1081,9 +1081,9 @@ class RemoteMcpServerTests(unittest.TestCase):
|
||||
|
||||
self.assertEqual(capabilities["server_name"], "wiki-file-assets")
|
||||
self.assertIn("server_version", capabilities)
|
||||
self.assertEqual(capabilities["schema_version"], 5)
|
||||
self.assertEqual(capabilities["capabilities_schema_version"], 5)
|
||||
self.assertEqual(capabilities["tools_version"], 5)
|
||||
self.assertEqual(capabilities["schema_version"], 6)
|
||||
self.assertEqual(capabilities["capabilities_schema_version"], 6)
|
||||
self.assertEqual(capabilities["tools_version"], 6)
|
||||
self.assertEqual(capabilities["enabled_tools"], ["file-assets", "ingest", "query"])
|
||||
self.assertIn("file_index", capabilities)
|
||||
self.assertIn("record_count", capabilities["file_index"])
|
||||
|
||||
@@ -41,8 +41,6 @@ class UserOpsTests(unittest.TestCase):
|
||||
|
||||
self.assertEqual(status, 0)
|
||||
text = output.getvalue()
|
||||
self.assertNotIn("kingdee sync", text)
|
||||
self.assertNotIn("timer install", text)
|
||||
self.assertIn("mcp start", text)
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
class WikiSkillInstructionTests(unittest.TestCase):
|
||||
def test_wiki_query_keeps_order_access_in_separate_project(self):
|
||||
text = Path(".skills/wiki-query/SKILL.md").read_text()
|
||||
self.assertIn("independent `kingdee-orders-mcp` project", text)
|
||||
self.assertIn("must not read legacy order databases", text)
|
||||
self.assertNotIn("obsidian-wiki business", text)
|
||||
self.assertNotIn("Hybrid Business + Wiki Route", text)
|
||||
Reference in New Issue
Block a user