Run orchestration directly in foreground OpenCode

This commit is contained in:
2026-09-22 21:11:28 -04:00
parent 8ddae78551
commit 2e763cfa77
16 changed files with 270 additions and 128 deletions
+10
View File
@@ -6,6 +6,7 @@ import unittest
ROOT = Path(__file__).resolve().parents[1]
RENDER = runpy.run_path(str(ROOT / "scripts/render-cycle-prompt"))["render"]
SELECT_RUNTIME = runpy.run_path(str(ROOT / "scripts/render-cycle-prompt"))["select_runtime"]
TEMPLATE = (ROOT / "templates/ORCHESTRATOR-PROMPT.template.md").read_text()
PROFILE = json.loads((ROOT / "templates/nestquest.profile.json").read_text())
@@ -44,6 +45,15 @@ class CyclePromptTests(unittest.TestCase):
with self.assertRaisesRegex(ValueError, "PROJECT_NAME"):
RENDER(TEMPLATE, other)
def test_terminal_runtime_replaces_service_controller(self):
selected = SELECT_RUNTIME(TEMPLATE, "terminal")
output = RENDER(selected, PROFILE)
self.assertIn("# 27. FOREGROUND TERMINAL RUNTIME", output)
self.assertIn("nq-orchestrate", output)
self.assertNotIn("# 27. HOST CONTROLLER RUNTIME", output)
self.assertNotIn("The persistent user service runs", output)
self.assertNotIn("---\n\n---\n\n# 27", output)
if __name__ == "__main__":
unittest.main()