migration: preserve mentor and llm streaming slice

This commit is contained in:
leefer
2026-07-31 04:18:53 +08:00
parent 4bab921d14
commit 2919229c73
26 changed files with 1705 additions and 1222 deletions
+3 -2
View File
@@ -81,8 +81,9 @@ class MentorSkillRegistryTests(unittest.TestCase):
self.assertTrue(all(item.quality_total == 6 for item in skills))
def test_server_applies_private_guard_to_every_mentor_entry_point(self):
source = (ROOT / "backend" / "application.py").read_text(encoding="utf-8")
mentor_section = source[source.index(" def mentor_setup"):source.index(" def _heaven_manual_schema")]
mentor_section = (
ROOT / "backend" / "features" / "mentor" / "service.py"
).read_text(encoding="utf-8")
self.assertGreaterEqual(
mentor_section.count('include_private=self.membership()["is_admin"]'),
4,