Something went wrong. Try again.
small gleam coding and persistent agent daemon with a detachable cli and a canvas ui forked from okami.mom/albedo
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132"""A session's composition is prepared without booting a Python kernel.
The lazy-kernel path needs a session's tools, instructions and hooks before anycell runs; only the daemon's real runtime can show that no kernel process wasstarted for it, so this runs through an inspected daemon."""
import unittest
from harness import ROOT, Albedo, Provider, exclusive, textfrom inspect_support import Inspection
@exclusiveclass PrepareWithoutKernelTests(unittest.TestCase): def test_a_prepared_session_has_tools_and_no_kernel(self): provider = Provider(lambda request: text("ok")) self.addCleanup(provider.close)
def prepare(app): app.daemon.env["ALBEDO_INSPECT"] = "1"
with Albedo(provider, prepare=prepare) as app: session = app.session() probe = Inspection(app, ROOT / "test/e2e/albedo_prepare_probe.erl") report = probe.call_json( "prepare_json", f'[<<"{session}">>, <<"{app.workspace}">>]' ) self.assertGreater(report["tools"], 0, report) self.assertTrue(report["instructions"], report) self.assertFalse(report["kernel_held"], report)