mirror of
https://github.com/hasso5703/alzeo.git
synced 2026-12-05 12:24:28 +01:00
The installer's last line and the cockpit's Settings say that a star helps
Alzeo is found by what its users say of it, and nothing in it said so (Hasan, 2026-11-09). A run of the installer that ends whole now ends with one line that names the repository, at each of its four endings, and the run started again for another lane says nothing. The Repo panel of the cockpit's Settings view gets a row, What's new: a link to the notes of the version this box runs and the same sentence as a second link. No prompt, no reminder, no window, and no new call from the page. tests/test_install_star_line.py and the new class of dashboard/tests/test_page_details.py fail on the code before. Two checks of tests/test_install_records_release.py read the record one line higher, the new line standing between it and the exit. Two review passes found the page rebuilt the two links at every frame of its stream (focus and clicks lost), linked this version's notes before the release existed, and that the first correction dropped the two lines filling the Mode and Usable pool share rows: the links stay in the page and change only when their value does, the notes of this version are linked once a release at least as new is out, compared number by number, and the two rows are back with a test. The full CI's touch check found the second link broken over two lines on a phone, its middle not under a finger: each link is one box. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
90556f0049
commit
237b973f2c
7 files changed
+194
-5
No files matched your search
@@ -290,6 +290,12 @@ img,svg,video,canvas{display:block; max-width:100%}
|
||||
.facts dt{color:var(--fg-2); padding-right:var(--s-5)}
|
||||
.facts dd{text-align:right; font-variant-numeric:tabular-nums; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
|
||||
.facts dd.wrap{white-space:normal}
|
||||
/* a link in a cell: its focus ring inside the link, as the cell clips what leaves it */
|
||||
.facts dd a:focus-visible{outline-offset:-2px}
|
||||
/* each link of the What's new row is short and one box, moved whole to the next line when it does not fit: a link
|
||||
broken over two lines has its middle outside its own text, where a finger then lands on the cell (the touch
|
||||
check on three phones, 2026-11-10) */
|
||||
#rp-new a{display:inline-block; max-width:100%}
|
||||
.facts dd.lines{white-space:pre-line} /* one address a line (Connect a client) */
|
||||
.facts dd .code{font-size:var(--t-13)}
|
||||
|
||||
|
||||
@@ -612,6 +612,7 @@
|
||||
<dt>Working tree</dt><dd id="rp-dirty">…</dd>
|
||||
<dt>Keepalive proxy</dt><dd id="rp-proxy">…</dd>
|
||||
<dt>Update</dt><dd class="wrap" id="rp-upd">…</dd>
|
||||
<dt>What's new</dt><dd class="wrap" id="rp-new"><a id="rp-notes" href="https://github.com/hasso5703/alzeo/releases" target="_blank" rel="noopener" title="Opens on GitHub, in a new tab">The release notes</a>. If Alzeo serves you well, <a id="rp-star" href="https://github.com/hasso5703/alzeo" target="_blank" rel="noopener" title="Opens on GitHub, in a new tab">a star on GitHub</a> helps other owners find it.</dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section class="panel">
|
||||
|
||||
@@ -554,6 +554,7 @@ function renderConformity(d){
|
||||
}
|
||||
on('update', d => {
|
||||
renderConformity(d);
|
||||
whatsNew();
|
||||
const parts = [];
|
||||
if (d.installed) parts.push(d.installed);
|
||||
const run = d.install_running;
|
||||
@@ -564,8 +565,28 @@ on('update', d => {
|
||||
else parts.push('up to date');
|
||||
setText('rp-upd', parts.join(', '));
|
||||
});
|
||||
// What the version this box runs changed, and the one place the cockpit says a star helps (Hasan, 2026-11-09):
|
||||
// two links in the page, which the user opens or not. The page itself asks GitHub nothing, and nothing reminds or
|
||||
// pops up. The release is published after its code, the reference box being updated in between: the link names
|
||||
// this version's notes only once the latest release GitHub gave the cockpit's check is this version or a later
|
||||
// one, compared number by number, and every release until then (the check off or offline, a box ahead of the
|
||||
// releases). Not by the check's "behind", which compares with the last install this box recorded: a cockpit
|
||||
// restarted in the middle of an update already runs the new version. Only what changed is written: the stream
|
||||
// brings the whole state about once a second, and links rebuilt each time lost the keyboard's focus and a click
|
||||
// that straddled a frame (both found in review, 2026-11-10).
|
||||
function whatsNew(){
|
||||
const a = $('rp-notes'); if (!a) return;
|
||||
const nums = s => (/^v?(\d+)\.(\d+)\.(\d+)$/.exec(s || '') || []).slice(1).map(Number);
|
||||
const cur = nums((F.config || {}).version), last = nums((F.update || {}).latest);
|
||||
const older = i => i < 3 && (last[i] < cur[i] || (last[i] === cur[i] && older(i + 1)));
|
||||
const out = cur.length === 3 && last.length === 3 && !older(0), v = 'v' + cur.join('.');
|
||||
const href = 'https://github.com/hasso5703/alzeo/releases' + (out ? '/tag/' + v : '');
|
||||
setText(a, out ? `The notes of ${v}` : 'The release notes');
|
||||
if (a.getAttribute('href') !== href) a.setAttribute('href', href);
|
||||
}
|
||||
on('config', d => {
|
||||
setText('ck-ver', d.version || '?');
|
||||
whatsNew();
|
||||
setText('ck-mode', d.dry_run ? 'dry run: logged and audited, nothing executed' : 'live: actions execute after your confirmation');
|
||||
setText('ck-usable', Math.round((d.usable_frac || F.usable) * 100) + ' % of the KV pool for one prompt');
|
||||
const per = d.periods || {}, pv = Object.values(per);
|
||||
|
||||
@@ -676,6 +676,84 @@ class TheEditEstimateCountsItsReferences(unittest.TestCase):
|
||||
self.assertAlmostEqual(got, measured, delta=measured * 0.1)
|
||||
|
||||
|
||||
class SettingsLinksTheNotesAndSaysAStarHelps(unittest.TestCase):
|
||||
"""v1.46.0 (Hasan, 2026-11-09): the Repo panel of Settings links the release notes and says, once and only
|
||||
there, that a star helps other owners find the project. Two links in the page, which the user opens or not: the
|
||||
page itself asks GitHub nothing. The notes of the version that runs are linked only once the latest release
|
||||
GitHub gave the cockpit's check is that version or a later one (a release is published after its code), and
|
||||
every release until then."""
|
||||
|
||||
NOTES, REPO = "https://github.com/hasso5703/alzeo/releases", "https://github.com/hasso5703/alzeo"
|
||||
GENERIC = ["The release notes", NOTES, "_blank", "noopener"]
|
||||
|
||||
def row(self, version="'1.46.0'", update="{installed: 'v1.46.0', latest: 'v1.46.0'}"):
|
||||
return run(self, r"""
|
||||
feed({config: Object.assign({}, CONFIG, {version: %s}), update: %s});
|
||||
const at = a => ['href', 'target', 'rel'].map(k => a.getAttribute(k));
|
||||
report({text: txt('rp-new'), notes: [txt('rp-notes')].concat(at($('rp-notes'))), star: at($('rp-star')),
|
||||
starText: txt('rp-star'), links: $('rp-new').querySelectorAll('a').length});
|
||||
""" % (version, update))
|
||||
|
||||
def test_the_notes_of_the_version_that_runs_once_it_is_out(self):
|
||||
for version in ("'1.46.0'", "'v1.46.0'"):
|
||||
for latest in ("v1.46.0", "v1.46.1", "v1.47.0", "v1.100.0", "v2.0.0"):
|
||||
with self.subTest(version=version, latest=latest):
|
||||
r = self.row(version, "{installed: 'v1.45.4', latest: '%s', behind: true}" % latest)
|
||||
self.assertEqual(r["notes"], ["The notes of v1.46.0", self.NOTES + "/tag/v1.46.0", "_blank", "noopener"])
|
||||
self.assertEqual(r["star"], [self.REPO, "_blank", "noopener"])
|
||||
self.assertEqual(r["text"], "The notes of v1.46.0. If Alzeo serves you well, "
|
||||
"a star on GitHub helps other owners find it.")
|
||||
self.assertEqual(r["starText"], "a star on GitHub")
|
||||
self.assertEqual(r["links"], 2)
|
||||
|
||||
def test_every_release_until_this_one_is_known_to_be_out(self):
|
||||
"""The reference box is updated before the release is tagged, a box can be offline, and the check can be
|
||||
off: a link to a tag GitHub does not have yet would open on a 404. The check's `behind` does not tell: it
|
||||
compares the latest release with the last install this box recorded, and a cockpit restarted in the
|
||||
middle of an update already runs the new version (both found in review, 2026-11-10)."""
|
||||
for update in ("{installed: 'v1.46.0', latest: 'v1.45.4'}", "{installed: 'v1.45.3', latest: 'v1.45.4', behind: true}",
|
||||
"{installed: 'v1.45.3', latest: 'v1.9.9', behind: true}", "{installed: 'v1.46.0', latest: null}",
|
||||
"{installed: 'v1.46.0', latest: 'nightly'}", "{installed: 'v1.46.0', checked: false}", "{}", "undefined"):
|
||||
with self.subTest(update=update):
|
||||
r = self.row(update=update)
|
||||
self.assertEqual(r["notes"], self.GENERIC)
|
||||
self.assertEqual(r["star"], [self.REPO, "_blank", "noopener"])
|
||||
|
||||
def test_a_version_it_cannot_read_links_every_release(self):
|
||||
for version in ("''", "'dev'", "undefined", "'1.46.0<script>'", "'1.46'"):
|
||||
with self.subTest(version=version):
|
||||
self.assertEqual(self.row(version, "{latest: 'v1.47.0', behind: true}")["notes"], self.GENERIC)
|
||||
|
||||
def test_the_links_stay_the_same_nodes_from_one_frame_to_the_next(self):
|
||||
"""The stream brings the whole state about once a second: links rebuilt each time lost the keyboard's focus
|
||||
and a click that straddled a frame (found in review, 2026-11-10)."""
|
||||
r = run(self, r"""
|
||||
const state = {config: Object.assign({}, CONFIG, {version: '1.46.0'}), update: {latest: 'v1.46.0'}};
|
||||
feed(state);
|
||||
const notes = $('rp-notes'), star = $('rp-star'), kids = $('rp-new').childNodes.length;
|
||||
let writes = 0; const set = notes.setAttribute.bind(notes); notes.setAttribute = (...a) => { writes++; set(...a); };
|
||||
feed(state); feed(state);
|
||||
report({same: notes === $('rp-notes') && star === $('rp-star'), inside: notes.parentNode === $('rp-new'),
|
||||
kids: $('rp-new').childNodes.length === kids, writes, links: $('rp-new').querySelectorAll('a').length});
|
||||
""")
|
||||
self.assertEqual(r, {"same": True, "inside": True, "kids": True, "writes": 0, "links": 2})
|
||||
|
||||
|
||||
class TheCockpitsOwnPanelSaysItsModeAndItsShare(unittest.TestCase):
|
||||
"""The rework of the row above dropped the two lines that fill these rows, which then read "…" for good, and
|
||||
no test read them (found in review, 2026-11-10)."""
|
||||
|
||||
def test_the_two_rows_are_filled(self):
|
||||
for dry, mode in (("true", "dry run: logged and audited, nothing executed"),
|
||||
("false", "live: actions execute after your confirmation")):
|
||||
with self.subTest(dry=dry):
|
||||
r = run(self, r"""
|
||||
feed({config: Object.assign({}, CONFIG, {dry_run: %s, usable_frac: 0.92})});
|
||||
report([txt('ck-mode'), txt('ck-usable')]);
|
||||
""" % dry)
|
||||
self.assertEqual(r, [mode, "92 % of the KV pool for one prompt"])
|
||||
|
||||
|
||||
class TheUpdateCommandsNameThisCheckout(unittest.TestCase):
|
||||
"""U40: the update banner and the Agent view's install hint said cd ~/dgx-spark-qwen38
|
||||
whatever the checkout; the cockpit knows its own. And an update is the one command, run
|
||||
|
||||
+11
@@ -2956,6 +2956,13 @@ bolt_first_load() { # Bolt loaded as the cockpit's Load does it; 0 when it answ
|
||||
sudo systemctl start "$UNIT_NAME" || true
|
||||
return 1
|
||||
}
|
||||
# One quiet line, the last of a run that ended whole (Hasan, 2026-11-09): the project is found by what its users say
|
||||
# of it, and this is the only place the installer says so. No prompt, no reminder, nothing the run waits for. Not
|
||||
# from the installer started again for another lane (SECONDARY): its end is not the run's.
|
||||
star_line() {
|
||||
if [ -n "$SECONDARY" ]; then return 0; fi
|
||||
echo " If Alzeo serves you well, a star helps other owners find it: https://github.com/hasso5703/alzeo"
|
||||
}
|
||||
record_install() { # $1 how the run ended: full, side-boot, no-start or no-service
|
||||
if [ -n "$SECONDARY" ]; then return 0; fi
|
||||
local chose=()
|
||||
@@ -2984,6 +2991,7 @@ if [ "$NO_SERVICE" -eq 1 ]; then
|
||||
echo " Remove that provider with the key, or opencode refuses to start."
|
||||
echo " No cockpit either: it is a systemd unit, and --no-service installs none."
|
||||
record_install no-service
|
||||
star_line
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -3391,6 +3399,7 @@ else
|
||||
esac
|
||||
fi
|
||||
record_install side-boot
|
||||
star_line
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -3403,6 +3412,7 @@ if [ "$NO_START" -eq 1 ]; then
|
||||
echo "also start the keepalive proxy with: sudo systemctl start $KEEPALIVE_UNIT"
|
||||
[ "$COCKPIT" -eq 1 ] && echo "the cockpit is not installed on the --no-start path: ./dashboard/install-dashboard.sh once the engine runs"
|
||||
record_install no-start
|
||||
star_line
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -3905,6 +3915,7 @@ except Exception as e:
|
||||
fi
|
||||
fi
|
||||
record_install full
|
||||
star_line
|
||||
exit 0
|
||||
fi
|
||||
ST="$(systemctl is-active "$UNIT_NAME" || true)"
|
||||
|
||||
@@ -79,11 +79,17 @@ def written(cfg):
|
||||
class EveryRunThatEndsWellRecordsIt(unittest.TestCase):
|
||||
def test_each_successful_end_of_a_run_records_how_it_ended(self):
|
||||
"""Six lines end a run with exit 0 past the flags (--help ends on its own line): four
|
||||
end the run that serves, each right after record_install with its path, one ends the
|
||||
run for the other text lane, and one --plan, before step 1: neither records anything."""
|
||||
end the run that serves, each right after record_install with its path and the run's
|
||||
last line (star_line, v1.46.0), one ends the run for the other text lane, and one --plan,
|
||||
before step 1: neither records anything."""
|
||||
ends = [i for i, ln in enumerate(LINES) if ln.strip() == "exit 0"]
|
||||
self.assertEqual(len(ends), 6, "a new way for install.sh to end: decide what it records")
|
||||
before = [LINES[i - 1].strip() for i in ends]
|
||||
self.assertEqual([i for i in ends if LINES[i - 1].strip().startswith("record_install ")], [],
|
||||
"a record is followed by the run's last line, then the exit")
|
||||
for i in ends:
|
||||
if LINES[i - 1].strip() == "star_line":
|
||||
self.assertTrue(LINES[i - 2].strip().startswith("record_install "), "star_line only ends a recorded run")
|
||||
before = [LINES[i - 2].strip() if LINES[i - 1].strip() == "star_line" else LINES[i - 1].strip() for i in ends]
|
||||
self.assertEqual(sorted(b for b in before if b.startswith("record_install ")),
|
||||
["record_install full", "record_install no-service", "record_install no-start",
|
||||
"record_install side-boot"])
|
||||
@@ -102,8 +108,8 @@ class EveryRunThatEndsWellRecordsIt(unittest.TestCase):
|
||||
('if [ "$NO_START" -eq 1 ]; then\n step "Done (service installed', "no-start"),
|
||||
('lane_line "Super VL "', "full")):
|
||||
at = TEXT.index(marker)
|
||||
self.assertEqual(TEXT[at:TEXT.index("exit 0\n", at)].rstrip().splitlines()[-1].strip(),
|
||||
f"record_install {how}", how)
|
||||
self.assertEqual([ln.strip() for ln in TEXT[at:TEXT.index("exit 0\n", at)].rstrip().splitlines()[-2:]],
|
||||
[f"record_install {how}", "star_line"], how)
|
||||
|
||||
|
||||
class WhatItWrites(unittest.TestCase):
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
#!/usr/bin/env python3
|
||||
"""A run of the installer that ends whole says once, in its last line, that a star helps (v1.46.0).
|
||||
|
||||
Hasan, 2026-11-09: the project is found by what its users say of it, and nothing in it said so. The installer now
|
||||
prints one line at the end of an install and of every update, and that is all: no prompt, no reminder, nothing the
|
||||
run waits for. The run started again for another lane (QWEN38_SECONDARY) is not the end of the run and says nothing.
|
||||
The function runs here as install.sh has it, and each of the four endings of a run is read in the script itself.
|
||||
"""
|
||||
import pathlib
|
||||
import subprocess
|
||||
import unittest
|
||||
|
||||
REPO = pathlib.Path(__file__).resolve().parents[1]
|
||||
TEXT = (REPO / "install.sh").read_text()
|
||||
LINES = TEXT.splitlines()
|
||||
URL = "https://github.com/hasso5703/alzeo"
|
||||
|
||||
|
||||
def star_line(secondary=""):
|
||||
start = TEXT.index("star_line() {")
|
||||
func = TEXT[start:TEXT.index("\n}\n", start) + 3]
|
||||
return subprocess.run(["bash", "-c", f"set -euo pipefail\nSECONDARY='{secondary}'\n{func}star_line\n"],
|
||||
capture_output=True, text=True, timeout=30, env={"PATH": "/usr/bin:/bin"})
|
||||
|
||||
|
||||
class TheLastLineOfARun(unittest.TestCase):
|
||||
def test_one_line_that_names_the_repository(self):
|
||||
r = star_line()
|
||||
self.assertEqual((r.returncode, r.stderr), (0, ""))
|
||||
self.assertEqual(len(r.stdout.splitlines()), 1, r.stdout)
|
||||
self.assertTrue(r.stdout.rstrip("\n").endswith(URL), r.stdout)
|
||||
self.assertIn("a star helps", r.stdout)
|
||||
|
||||
def test_the_run_for_another_lane_says_nothing(self):
|
||||
r = star_line(secondary="flash")
|
||||
self.assertEqual((r.returncode, r.stdout, r.stderr), (0, "", ""))
|
||||
|
||||
def test_it_is_called_four_times_and_nowhere_else(self):
|
||||
"""Not before the exit of --plan, of --help or of the run for another lane: only where a run was recorded."""
|
||||
calls = [i for i, ln in enumerate(LINES) if ln.strip() == "star_line"]
|
||||
self.assertEqual(len(calls), 4)
|
||||
for i in calls:
|
||||
self.assertTrue(LINES[i - 1].strip().startswith("record_install "), LINES[i - 1])
|
||||
self.assertEqual(LINES[i + 1].strip(), "exit 0")
|
||||
|
||||
def test_every_ending_of_a_run_says_it_last(self):
|
||||
for how in ("no-service", "side-boot", "no-start", "full"):
|
||||
with self.subTest(how=how):
|
||||
calls = [i for i, ln in enumerate(LINES) if ln.strip() == f"record_install {how}"]
|
||||
self.assertEqual(len(calls), 1, f"record_install {how} is called once")
|
||||
self.assertEqual([ln.strip() for ln in LINES[calls[0] + 1:calls[0] + 3]], ["star_line", "exit 0"])
|
||||
|
||||
def test_no_ending_is_left_out(self):
|
||||
ends = {ln.strip().split()[1] for ln in LINES if ln.strip().startswith("record_install ")}
|
||||
self.assertEqual(ends, {"no-service", "side-boot", "no-start", "full"},
|
||||
"a new way for a run to end whole says the line too")
|
||||
|
||||
def test_it_asks_nothing_and_is_said_nowhere_else(self):
|
||||
start = TEXT.index("star_line() {")
|
||||
func = TEXT[start:TEXT.index("\n}\n", start) + 3]
|
||||
self.assertNotRegex(func, r"\bread\b|\bsleep\b|curl|xdg-open", "one echo, nothing the run waits for")
|
||||
self.assertEqual(TEXT.count("a star helps"), 1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user