lanes: a lane not prepared yet offers its Load and no Start

A lane installed on demand and not prepared yet still had "Start <lane> as installed" on its
card whenever nothing served: it started a unit with nothing to run (no venv for the image and
video lanes, no image for Kolibri; the flash lane's launcher pulled its 30 GB image inside the
start, then found no checkpoint), and the card ended on "The unit failed". Its Load, which
prepares it first, is now the one verb its card offers; a prepared lane keeps both.

Test: with nothing serving, the image and flash lanes not prepared offer Load and no Start, the
video lane prepared and the 27B offer both (the first two offered Start before this).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hasan BasbunarandClaude Opus 5.5 committed 2026-10-15 00:49:13 +02:00
1 parent 6cc8679b6e
commit e88128ecd9
2 files changed
+18 -1

No files matched your search

+3 -1
View File
@@ -110,7 +110,9 @@ function renderLanes(){
// the verbs that make sense now
c.load.hidden = !has || (seated && sameTarget);
setText(c.load, seated || LANE_TARGETS[unit].length > 1 ? `Load ${TARGET_NAME[target]}` : `Load ${LANE_NAME[unit]}`);
c.start.hidden = !has || on || !!(s && s[0] !== unit);
// installed on demand and not prepared yet: only its Load, which prepares it, can start it
const unbuilt = has && SIDE_LANE[unit] && (F.lanesReady || {})[SIDE_LANE[unit]] === false;
c.start.hidden = !has || on || !!(s && s[0] !== unit) || !!unbuilt;
setText(c.start, `Start ${LANE_NAME[unit]} as installed`);
c.stop.hidden = !has || !on;
setText(c.stop, st === 'stopping' ? 'Stopping…' : `Stop ${LANE_NAME[unit]}`);
+15
View File
@@ -90,6 +90,21 @@ class LoadingIt(unittest.TestCase):
self.assertNotIn("The next step fetches", r["desc"])
self.assertEqual(r["cmd"], "bash prepare-lane.sh flash")
def test_a_lane_not_prepared_offers_its_load_and_no_start(self):
# Start as installed would start a unit with nothing to run (the flash lane's launcher
# would pull its 30 GB image inside the start, then find no checkpoint): its Load
# prepares it first, and that is the one verb it offers
r = run(self, lanes("stopped", "image") + r"""
feed({lanes_ready: {image: false, video: true, kolibri: null, flash: false}});
showView('lanes');
const st = u => { const c = LCARDS.get(u); return {start: !c.start.hidden, load: !c.load.hidden}; };
report({image: st(IMAGE_UNIT), flash: st(UFLASH), video: st(VIDEO_UNIT), text: st(U27)});
""")
self.assertEqual(r["image"], {"start": False, "load": True})
self.assertEqual(r["flash"], {"start": False, "load": True})
self.assertEqual(r["video"], {"start": True, "load": True})
self.assertEqual(r["text"], {"start": True, "load": True})
def test_a_prepared_lane_loads_as_before(self):
r = run(self, lanes("stopped", "image", text_state="ready") + r"""
feed({lanes_ready: {image: true, video: true, kolibri: null}});