mirror of
https://github.com/hasso5703/alzeo.git
synced 2026-12-06 04:44:19 +01:00
cockpit: a 64 GB box's Decide offers the 27B, and its versions follow the box
The Decide view offered Load flash 176B whenever System One did not answer, on a 64 GB box too, where it ended on the toast that the flash lane needs a 128 GB DGX Spark (found in review, 2026-10-23). There it offers the 27B, and says the 27B answers System One. The 27B card's versions were disabled once, when the card was built: a card built before the machine panel said the box's class (the first second after the cockpit started, or a machine collector in error) kept its FP8 versions to be picked until a reload, and the arrow keys stopped on a disabled one, which took neither the click nor the focus. Each render says which versions fit, and the arrows pass over the others. The page's tests run both on a 64 GB box, the machine panel coming after the card, and fail on the old scripts; a mutant with the old arrow handler is caught. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9e50f901e0
commit
d62285c6ea
3 files changed
+57
-7
No files matched your search
@@ -110,7 +110,8 @@ function s1Sync(){
|
||||
// with a text lane serving, what holds it back is the note's to say (the proxy mute, a 401):
|
||||
// the line named the lanes that answer it over the one that served (found in review, 2026-10-15)
|
||||
const text = (() => { const s = servingEngine(); return !!s && (s[0] === U27 || s[0] === UFLASH); })();
|
||||
const off = text ? 'System One does not answer right now: the note says why.' : 'System One is not served right now: the 27B or the flash lane answers it.';
|
||||
const off = text ? 'System One does not answer right now: the note says why.'
|
||||
: `System One is not served right now: ${laneFits(UFLASH) ? 'the 27B or the flash lane answers it' : 'the 27B answers it'}.`;
|
||||
const why = wait || (s1Available === false ? off : s1Running ? '' : s1Problem());
|
||||
b.disabled = !!wait || s1Available === false || s1Running || !!s1Problem();
|
||||
show('s1-why', !!why && !s1Running); setText('s1-why', why);
|
||||
@@ -173,7 +174,10 @@ async function s1Probe(){
|
||||
const why = cap1(String(d.reason || 'the proxy in front of this box does not answer /v1/systemone').replace(/\.?\s*$/, '.'));
|
||||
note.style.display = 'flex'; note.style.alignItems = 'center'; note.style.gap = 'var(--s-3)'; note.style.flexWrap = 'wrap';
|
||||
const t = el('span', null, why); t.style.flex = '1'; t.style.minWidth = '240px';
|
||||
const b = el('button', 'btn primary sm', 'Load flash 176B'); b.type = 'button'; b.addEventListener('click', () => askJourney('flash'));
|
||||
// a 64 GB box holds no flash lane: the lane it offers is the 27B, which answers it too (found in
|
||||
// review, 2026-10-23)
|
||||
const [label, target] = laneFits(UFLASH) ? ['Load flash 176B', 'flash'] : ['Load 27B stock', 'stock'];
|
||||
const b = el('button', 'btn primary sm', label); b.type = 'button'; b.addEventListener('click', () => askJourney(target));
|
||||
note.append(t, b);
|
||||
}
|
||||
badge('decide', d.available ? '' : 'off', '');
|
||||
|
||||
@@ -23,20 +23,19 @@ function laneCard(unit){
|
||||
const pick = el('div', 'pick'); pick.setAttribute('role', 'radiogroup'); pick.setAttribute('aria-label', `Version of ${LANE_NAME[unit]}`);
|
||||
const opts = LANE_TARGETS[unit].map(t => {
|
||||
const b = el('button', 'opt', TARGET_SHORT_NAME[t] || TARGET_NAME[t]); b.type = 'button'; b.setAttribute('role', 'radio'); b.dataset.target = t;
|
||||
b.title = TARGET_NAME[t];
|
||||
// a version a 64 GB box cannot hold is shown, and not to be picked (its Load would stop at the switch)
|
||||
if (!targetFits(t)){ b.disabled = true; b.title = `${TARGET_NAME[t]}: ${NEEDS_128}`; }
|
||||
b.addEventListener('click', () => { if (!targetFits(t)) return; c.target = t; c.touched = true; renderLanes(); });
|
||||
return b;
|
||||
});
|
||||
const pickLine = el('p', 'pick-line');
|
||||
pick.append(...opts); pickBox.append(pickLab, pick, pickLine);
|
||||
// the arrow keys move the choice, as in any group of radio buttons
|
||||
// the arrow keys move the choice, as in any group of radio buttons, over the versions to be picked:
|
||||
// a disabled one took neither the click nor the focus, and the focus stayed (found in review, 2026-10-23)
|
||||
pick.addEventListener('keydown', ev => {
|
||||
const step = {ArrowRight: 1, ArrowDown: 1, ArrowLeft: -1, ArrowUp: -1}[ev.key];
|
||||
if (!step || ev.altKey || ev.ctrlKey || ev.metaKey) return;
|
||||
ev.preventDefault();
|
||||
const i = opts.indexOf(document.activeElement), next = opts[(Math.max(0, i) + step + opts.length) % opts.length];
|
||||
const live = opts.filter(b => !b.disabled); if (!live.length) return;
|
||||
const i = live.indexOf(document.activeElement), next = live[(Math.max(0, i) + step + live.length) % live.length];
|
||||
next.click(); next.focus();
|
||||
});
|
||||
const load = el('button', 'btn primary'); load.type = 'button';
|
||||
@@ -105,6 +104,10 @@ function renderLanes(){
|
||||
const live = seated && (st === 'ready' || st === 'degraded');
|
||||
c.opts.forEach(b => {
|
||||
const t = b.dataset.target;
|
||||
// a version a 64 GB box cannot hold is shown, and not to be picked (its Load would stop at the
|
||||
// switch); said at each render, as the box's class comes with the machine panel, which may come
|
||||
// after the card was built (found in review, 2026-10-23)
|
||||
const fits = targetFits(t); b.disabled = !fits; b.title = fits ? TARGET_NAME[t] : `${TARGET_NAME[t]}: ${NEEDS_128}`;
|
||||
b.setAttribute('aria-checked', String(t === target)); b.tabIndex = t === target ? 0 : -1;
|
||||
b.classList.toggle('served', live && t === served);
|
||||
});
|
||||
|
||||
@@ -2306,6 +2306,49 @@ class TheBoxItIs(unittest.TestCase):
|
||||
self.assertNotIn("Download", fp8)
|
||||
self.assertIn("Download", stock)
|
||||
|
||||
MACHINE_64 = r"""{mem: {MemTotal: 57.6 * GIB, MemAvailable: 20 * GIB, Cached: 2 * GIB, SwapTotal: 0, SwapFree: 0},
|
||||
box: {cls: '64', name: 'ASUS Ascent GX10', fits: ['qwen38-nemotron.service', 'qwen38-sglang.service'],
|
||||
targets: ['nemotron', 'stock', 'uncensored']}, cpu_pct: {cpu: 1}, load: [0, 0, 0], disks: {}}"""
|
||||
|
||||
def test_decide_offers_the_27b_on_a_64_gb_box(self):
|
||||
# it offered Load flash 176B whatever the box, and that ended on the toast that the flash lane
|
||||
# needs a 128 GB DGX Spark (found in review, 2026-10-23)
|
||||
r = run(self, r"""
|
||||
__fetch = async url => url === '/api/systemone' ? __response(200, {available: false, lane: '', reason: 'no text lane is serving'}) : new Promise(() => {});
|
||||
feed({config: CONFIG, units: UNITS, lifecycle: life({'qwen38-nemotron.service': eng('ready')}), machine: %s});
|
||||
showView('decide'); await __settle();
|
||||
const btn = $('s1-note').querySelector('button');
|
||||
report({label: btn && btn.textContent, why: txt('s1-why')});
|
||||
btn.click(); await __settle();
|
||||
report({label: btn.textContent, why: txt('s1-why'), title: txt('sh-title'), toast: toastText()});
|
||||
""" % self.MACHINE_64)
|
||||
self.assertEqual(r["label"], "Load 27B stock")
|
||||
self.assertIn("the 27B answers it", r["why"])
|
||||
self.assertNotIn("flash", r["why"])
|
||||
self.assertEqual(r["title"], "Load 27B stock, NVFP4")
|
||||
self.assertNotIn("128 GB", r["toast"])
|
||||
|
||||
def test_the_versions_follow_a_machine_panel_that_comes_after_the_card(self):
|
||||
# the card was built before the box's class was known, and its FP8 versions stayed to be
|
||||
# picked until a reload; the arrow keys stopped on a version that could not take the focus
|
||||
# (found in review, 2026-10-23)
|
||||
r = run(self, r"""
|
||||
feed({config: CONFIG, units: UNITS, lifecycle: life({'qwen38-sglang.service': eng('ready')})});
|
||||
showView('lanes');
|
||||
const opt = t => [...document.querySelectorAll('#view-lanes .opt')].find(b => b.dataset.target === t);
|
||||
const before = opt('fp8').disabled;
|
||||
feed({machine: %s});
|
||||
const after = [opt('fp8').disabled, opt('uncensored-fp8').disabled, opt('stock').disabled];
|
||||
const unc = opt('uncensored'); unc.focus();
|
||||
unc.parentNode.dispatchEvent({type: 'keydown', key: 'ArrowRight', preventDefault(){}});
|
||||
report({before, after, focus: document.activeElement && document.activeElement.dataset.target,
|
||||
title: opt('fp8').title});
|
||||
""" % self.MACHINE_64)
|
||||
self.assertFalse(r["before"], "no class known is no refusal")
|
||||
self.assertEqual(r["after"], [True, True, False], r)
|
||||
self.assertEqual(r["focus"], "stock", "the arrow passes over the versions this box cannot hold")
|
||||
self.assertIn("needs a 128 GB DGX Spark", r["title"])
|
||||
|
||||
def test_a_128_gb_box_still_names_the_command_that_installs_a_lane_left_out(self):
|
||||
r = self.page("128", 121.6)
|
||||
self.assertIn("./install.sh --with-flash", r["notes"][0])
|
||||
|
||||
Reference in new issue
Block a user