okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Merge f-0213-p8merge (b5f5e38a4): the Qwen4 rehearsal's fixes - F1-F5 (make_model_release schema, mmproj KeyError, drafter: none honoured, neutral expert profile for another shape with the owner's line, budget for feed qwen4exp sizes), STRATA_CMAKE_EXTRA in the Linux packaging scripts, G14 plan line, G12 release plan, G10/G3 docs, and G2: a real-file feed-model install gate in tools/check (tools/feed_model_install_gate.py; fails if any of F2-F5 is reverted); version bump left for the release candidateb82a36810

main
1.6 KiB40 linesraw
1"""`strata launch --plan` for a feed model whose entry says `drafter: none` (found by the Q4-P8 rehearsal, G14: the plan said "Drafting: MTP" while setup fetches no draft layer)."""
2
3from __future__ import annotations
4
5import unittest
6from unittest import mock
7
8from strata_cli.launch import settings as S
9from tests.terminal.launch_support import HW_12, Home, catalog, not_intel
10
11
12class PlanLineOfAFeedModel(unittest.TestCase):
13    def setUp(self):
14        not_intel(self)
15
16    def runner(self, home, family):
17        from strata_cli.launch.runner import Runner
18        cat = catalog(HW_12)
19        models, families, contexts, source = cat.tables()
20        fam = dict(families["qwen"], feed=True, **({"drafter": "none"} if family == "none" else {"drafter": "mtp"}))
21        tables = (models, {**families, "feedmodel": fam}, contexts, source)
22        p = mock.patch.object(type(cat), "tables", lambda self: tables)
23        p.start()
24        self.addCleanup(p.stop)
25        return Runner(S.LaunchSettings(family="feedmodel", model="Q2_0", context=32768, vision="off"), catalog=cat)
26
27    def test_drafter_none_is_not_drafting_mtp(self):
28        with Home() as home:
29            line = self.runner(home, "none").drafting_plan_line()
30            self.assertEqual(line, "Drafting: Off")
31            self.assertNotIn("MTP", line)
32
33    def test_a_feed_model_with_a_drafter_keeps_the_usual_line(self):
34        with Home() as home:
35            self.assertTrue(self.runner(home, "mtp").drafting_plan_line().startswith("Drafting:"))
36            self.assertNotEqual(self.runner(home, "mtp").drafting_plan_line(), "Drafting: Off")
37
38
39if __name__ == "__main__":
40    unittest.main()