Repository navigation
fix(cli): stop the upgrade path from reporting success it did not have - #424
Merged
Merged
Conversation
Two ways `xlings` told a user things had gone fine when they had not. Both found while measuring whether an existing 0.4.69 user can reach 2026.7.27.3 without noticing. `self update` swallowed a failed upgrade. cmd_update ran `xlings install xlings@latest -y` and, on a non-zero exit, logged a *warning* and returned 0. The error scrolled past under the progress bar and the command reported success, so the user carried on with the old binary believing they were current. Reproduced end to end: a 0.4.69 client resolving 2026.7.27.3 against a CN mirror that had not been topped up yet got HTTP 404, and `self update` still exited 0. Now the install and the activation both propagate, and the message says plainly that the version did not change. Report panels were clipped to one screen. ftxui's Dimension::Fit takes extend_beyond_screen = false by default, which clamps the fitted height to the terminal's -- and with stdout on a pipe ftxui reports a default 80x24. Everything past row 24 was dropped with no marker. Findings print first and totals last, so on a real home `self doctor` showed a wall of red and lost the line saying "broken payloads 23"; measured on one, output went 24 -> 86 lines with the fix. `xlings list` was capped the same way. The redraw-in-place progress renderers deliberately keep the old behaviour: they overwrite a counted number of rows and have to stay inside the screen. Both regressions are older than this release -- 0.4.69 and 2026.7.27.3 behave identically -- so this is not a fix for something 2026.7.27.x introduced. Tests: E2E-38 self_update_failure_test.sh (new) and self_doctor S12. Both verified to fail against the released 2026.7.27.3 binary and pass against this one.
Member
Author
|
Third command hit by the same clamp, found while sanity-checking the change: So the block telling an AI agent to run Unchanged and out of scope here: the width half of the same problem ( |
This was referenced Jul 27, 2026
Sunrisepeak
added a commit
that referenced
this pull request
Jul 27, 2026
…tely leaves The harness filed `self-update-effective` as a blocker because the recorded client version stayed at v0.4.69 across the upgrade. That is now designed behaviour, and a findings table with a known-false row is a table people learn to skip. `self update` runs the OLD binary. It cannot know whether the new one will find anything to migrate, so it does not claim the home is reconciled; `self doctor --fix` stamps the field when the migration actually happens, and the mismatch in between is precisely what the new client reads to know it should tell the user. The defect became the marker. So the phase now asserts the two things separately: - self update REPLACED THE BINARY -- fingerprinted before and after, because its exit code is not evidence of anything (a 0.4.69 client answered 404 from a CN mirror and still reported success, #424) - the recorded version deliberately did NOT move The second assertion is the interesting one: it fails if someone later makes `self update` stamp the field, which would silently switch the migration hint off for every home that upgrades without being repaired.
Sunrisepeak
added a commit
that referenced
this pull request
Jul 27, 2026
…tely leaves (#438) The harness filed `self-update-effective` as a blocker because the recorded client version stayed at v0.4.69 across the upgrade. That is now designed behaviour, and a findings table with a known-false row is a table people learn to skip. `self update` runs the OLD binary. It cannot know whether the new one will find anything to migrate, so it does not claim the home is reconciled; `self doctor --fix` stamps the field when the migration actually happens, and the mismatch in between is precisely what the new client reads to know it should tell the user. The defect became the marker. So the phase now asserts the two things separately: - self update REPLACED THE BINARY -- fingerprinted before and after, because its exit code is not evidence of anything (a 0.4.69 client answered 404 from a CN mirror and still reported success, #424) - the recorded version deliberately did NOT move The second assertion is the interesting one: it fails if someone later makes `self update` stamp the field, which would silently switch the migration hint off for every home that upgrades without being repaired.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two places where
xlingsreported success it did not have. Both found while measuring whether an existing 0.4.69 user reaches 2026.7.27.3 without noticing.1.
self updateswallowed a failed upgradecmd_updateranxlings install xlings@latest -yand on non-zero logged a warning and returned 0. The error scrolled past under the progress bar; the command reported success; the user kept running the old binary.Reproduced end to end — a 0.4.69 client resolving
2026.7.27.3against a CN mirror not yet topped up got HTTP 404, andself updatestill exited 0:Install and activation now both propagate, and the message says the version did not change.
2. Report panels clipped to one screen
Dimension::Fit(doc)takesextend_beyond_screen = falseby default, clamping the fitted height to the terminal's. With stdout on a pipe ftxui reports a default 80×24, so every row past 24 was dropped with no marker.Findings print first and totals last, so
self doctoron a real home showed a wall of red and lost the line saying how bad it is:self doctor(real DB)broken payloads 23list --all(246 targets)The redraw-in-place progress renderers keep the old behaviour on purpose — they overwrite a counted number of rows and must stay inside the screen.
Not a regression from this release
0.4.69 and 2026.7.27.3 behave identically on both. Byte-for-byte on the truncation: 24 lines / 7007 bytes from each.
Tests
self_update_failure_test.sh(new) — a fixture whose install hook fails; asserts non-zero exit and an actionable messageself_doctor_test.shS12 — 30 broken-payload entries; asserts the report exceeds 24 rows and the summary survivesBoth verified to fail against the released 2026.7.27.3 binary and pass against this branch.
mcpp test: 22/22.Also checked, not changed
A
missing shimreport for library-only packages (zlib, openssl) looked like a third defect, but it only appears in a home with no binary at<home>/bin/xlings. On a faithful layout the unfixed binary reportsstatus OK. It was an artifact of the test home, so the change I had written for it was reverted rather than shipped.