luxe update and /update, editable question answers, and a version bump owed once per release
- luxe update and /update update Luxe with the command for however it was installed (cargo or
Homebrew), run one program at a time with the terminal attached, then check that the luxe on
PATH is the new version. Luxe never downloads or replaces its own binary. The start screen says
"Update available · /update".
- A question's typed answer edits at its caret: arrows, word jumps, Home, End and Delete work,
and up and down move through a wrapped answer before leaving it.
- The version check owes a bump once per release: the version on main is the next release, and
only a released one (a v-tag) has to move.
- Dependency updates arrive through the sync, so Dependabot and the weekly jobs no longer run here.
2026-10-17 14:14:27 -05:00
|
|
|
use super::*;
|
|
|
|
|
|
|
|
|
|
/// Two files in a temporary directory: the copy the update ran from, and another.
|
|
|
|
|
fn copies() -> (tempfile::TempDir, PathBuf, PathBuf) {
|
|
|
|
|
let dir = tempfile::tempdir().expect("tempdir");
|
|
|
|
|
let updated = dir.path().join("updated-luxe");
|
|
|
|
|
let other = dir.path().join("other-luxe");
|
|
|
|
|
for path in [&updated, &other] {
|
|
|
|
|
std::fs::write(path, b"").expect("a stand-in binary");
|
|
|
|
|
}
|
|
|
|
|
(dir, updated, other)
|
|
|
|
|
}
|
|
|
|
|
|
luxe 0.1.5: a provider picker, model ids, and a guided review that says less
The dock's provider row opens a list of providers, and the model picker opens on the provider in use, with tab to widen it; signing in opens it on the provider just signed in to. Models go by their id unless config names them, and the model row wears its maker's mark.
The guided review's guide prompt is shorter, the pull request brief shows the start of the description with the rest behind p, its commits drop the Luxe-review and Luxe-revision lines, and the weakened-gates signal is gone.
luxe update reruns the installer it was installed with, in place of luxe-cli-update. The preview's FILE tab reads files the session changed outside the project, and only those. Smaller fixes: bash headers are highlighted, the preview loses a blank row, the launcher divider sits inside its frame, and the phone app's top bar is clear of iOS's blur.
rustls-webpki 0.103.16 and webpki-roots 1.0.10 fix RUSTSEC-2026-0381 and RUSTSEC-2026-0382, and vite 8.3.4 fixes GHSA-587h-7wmj-h5pm, GHSA-698v-4r3x-3vcv and GHSA-r825-w8mm-5pxw.
2026-10-22 13:25:32 -05:00
|
|
|
/// An installer copy is updated by luxe running the script, a package manager's by its commands,
|
|
|
|
|
/// and nothing runs for a check or for a copy with no known owner.
|
A v-tag releases Luxe with installers, Homebrew and crates.io, SECURITY.md says how to report a hole, and luxe update runs the installer's updater
- release.yml, generated by dist from dist-workspace.toml, builds macOS, Linux and Windows,
attests every artifact, and publishes shell and PowerShell installers with their updater,
a luxe formula in evanwhittaker/homebrew-tap, and the crates through Trusted Publishing
(publish-crates.yml, which skips versions crates.io already has).
- luxe update recognizes an installer copy by luxe-cli-update beside it and runs that.
- The README, the install guide and the site lead with the installer, Homebrew and Windows.
- SECURITY.md: report privately through a GitHub advisory or contact@luxe.dev.
2026-10-17 15:37:45 -05:00
|
|
|
#[test]
|
luxe 0.1.5: a provider picker, model ids, and a guided review that says less
The dock's provider row opens a list of providers, and the model picker opens on the provider in use, with tab to widen it; signing in opens it on the provider just signed in to. Models go by their id unless config names them, and the model row wears its maker's mark.
The guided review's guide prompt is shorter, the pull request brief shows the start of the description with the rest behind p, its commits drop the Luxe-review and Luxe-revision lines, and the weakened-gates signal is gone.
luxe update reruns the installer it was installed with, in place of luxe-cli-update. The preview's FILE tab reads files the session changed outside the project, and only those. Smaller fixes: bash headers are highlighted, the preview loses a blank row, the launcher divider sits inside its frame, and the phone app's top bar is clear of iOS's blur.
rustls-webpki 0.103.16 and webpki-roots 1.0.10 fix RUSTSEC-2026-0381 and RUSTSEC-2026-0382, and vite 8.3.4 fixes GHSA-587h-7wmj-h5pm, GHSA-698v-4r3x-3vcv and GHSA-r825-w8mm-5pxw.
2026-10-22 13:25:32 -05:00
|
|
|
fn each_source_takes_its_own_route() {
|
|
|
|
|
assert_eq!(route(InstallSource::Installer, false), Some(Route::Installer));
|
|
|
|
|
let cargo = InstallSource::Cargo.update_steps().expect("cargo has steps");
|
|
|
|
|
assert_eq!(route(InstallSource::Cargo, false), Some(Route::Steps(cargo)));
|
|
|
|
|
assert_eq!(route(InstallSource::Archive, false), None, "no owner to ask");
|
|
|
|
|
assert_eq!(route(InstallSource::Installer, true), None, "a check runs nothing");
|
A v-tag releases Luxe with installers, Homebrew and crates.io, SECURITY.md says how to report a hole, and luxe update runs the installer's updater
- release.yml, generated by dist from dist-workspace.toml, builds macOS, Linux and Windows,
attests every artifact, and publishes shell and PowerShell installers with their updater,
a luxe formula in evanwhittaker/homebrew-tap, and the crates through Trusted Publishing
(publish-crates.yml, which skips versions crates.io already has).
- luxe update recognizes an installer copy by luxe-cli-update beside it and runs that.
- The README, the install guide and the site lead with the installer, Homebrew and Windows.
- SECURITY.md: report privately through a GitHub advisory or contact@luxe.dev.
2026-10-17 15:37:45 -05:00
|
|
|
}
|
|
|
|
|
|
luxe update and /update, editable question answers, and a version bump owed once per release
- luxe update and /update update Luxe with the command for however it was installed (cargo or
Homebrew), run one program at a time with the terminal attached, then check that the luxe on
PATH is the new version. Luxe never downloads or replaces its own binary. The start screen says
"Update available · /update".
- A question's typed answer edits at its caret: arrows, word jumps, Home, End and Delete work,
and up and down move through a wrapped answer before leaving it.
- The version check owes a bump once per release: the version on main is the next release, and
only a released one (a v-tag) has to move.
- Dependency updates arrive through the sync, so Dependabot and the weekly jobs no longer run here.
2026-10-17 14:14:27 -05:00
|
|
|
#[test]
|
|
|
|
|
fn the_version_is_the_last_word_when_it_is_semver() {
|
|
|
|
|
assert_eq!(parse_version("luxe 0.2.0\n").as_deref(), Some("0.2.0"));
|
|
|
|
|
assert_eq!(parse_version("luxe v0.2.0").as_deref(), Some("0.2.0"));
|
|
|
|
|
assert_eq!(parse_version("luxe nightly"), None);
|
|
|
|
|
assert_eq!(parse_version(""), None);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// The new version reported, or one past it, is a finished update.
|
|
|
|
|
#[test]
|
|
|
|
|
fn a_copy_reporting_the_new_version_is_updated() {
|
|
|
|
|
let (_dir, updated, _) = copies();
|
|
|
|
|
assert_eq!(outcome(Some(&updated), &updated, Some("0.2.0"), "0.2.0"), Outcome::Updated);
|
|
|
|
|
assert_eq!(outcome(Some(&updated), &updated, Some("0.2.1"), "0.2.0"), Outcome::Updated);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// The loop Codex CLI's users hit: the update lands in one file and the shell runs another.
|
|
|
|
|
#[test]
|
|
|
|
|
fn another_copy_first_on_path_is_named() {
|
|
|
|
|
let (_dir, updated, other) = copies();
|
|
|
|
|
let shadowed = outcome(Some(&other), &updated, Some("0.1.0"), "0.2.0");
|
|
|
|
|
assert_eq!(shadowed, Outcome::Shadowed { found: other, updated });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// A symlink to the copy that updated is that copy, as the development install's is, so an old
|
|
|
|
|
/// version there means the package was behind, not that a second copy is in the way.
|
|
|
|
|
#[cfg(unix)]
|
|
|
|
|
#[test]
|
|
|
|
|
fn a_link_to_the_updated_copy_is_the_same_copy() {
|
|
|
|
|
let (dir, updated, _) = copies();
|
|
|
|
|
let link = dir.path().join("luxe");
|
|
|
|
|
std::os::unix::fs::symlink(&updated, &link).expect("symlink");
|
|
|
|
|
let behind = outcome(Some(&link), &updated, Some("0.1.0"), "0.2.0");
|
|
|
|
|
assert_eq!(behind, Outcome::NotYet { reported: "0.1.0".into() });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn no_luxe_on_path_or_no_version_cannot_be_judged() {
|
|
|
|
|
let (_dir, updated, _) = copies();
|
|
|
|
|
assert_eq!(outcome(None, &updated, None, "0.2.0"), Outcome::Unknown);
|
|
|
|
|
assert_eq!(outcome(Some(&updated), &updated, None, "0.2.0"), Outcome::Unknown);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Only the reader's own command is ever named, and a check offers `luxe update` beside it.
|
|
|
|
|
#[test]
|
|
|
|
|
fn the_instructions_name_the_owners_command_or_none() {
|
2026-10-20 13:51:34 -05:00
|
|
|
let check = instructions(InstallSource::Cargo, true);
|
luxe update and /update, editable question answers, and a version bump owed once per release
- luxe update and /update update Luxe with the command for however it was installed (cargo or
Homebrew), run one program at a time with the terminal attached, then check that the luxe on
PATH is the new version. Luxe never downloads or replaces its own binary. The start screen says
"Update available · /update".
- A question's typed answer edits at its caret: arrows, word jumps, Home, End and Delete work,
and up and down move through a wrapped answer before leaving it.
- The version check owes a bump once per release: the version on main is the next release, and
only a released one (a v-tag) has to move.
- Dependency updates arrive through the sync, so Dependabot and the weekly jobs no longer run here.
2026-10-17 14:14:27 -05:00
|
|
|
assert!(check.contains("luxe update") && check.contains("cargo install"), "{check}");
|
2026-10-20 13:51:34 -05:00
|
|
|
let download = instructions(InstallSource::Archive, false);
|
luxe update and /update, editable question answers, and a version bump owed once per release
- luxe update and /update update Luxe with the command for however it was installed (cargo or
Homebrew), run one program at a time with the terminal attached, then check that the luxe on
PATH is the new version. Luxe never downloads or replaces its own binary. The start screen says
"Update available · /update".
- A question's typed answer edits at its caret: arrows, word jumps, Home, End and Delete work,
and up and down move through a wrapped answer before leaving it.
- The version check owes a bump once per release: the version on main is the next release, and
only a released one (a v-tag) has to move.
- Dependency updates arrive through the sync, so Dependabot and the weekly jobs no longer run here.
2026-10-17 14:14:27 -05:00
|
|
|
assert!(download.contains("download it from"), "{download}");
|
luxe 0.1.5: a provider picker, model ids, and a guided review that says less
The dock's provider row opens a list of providers, and the model picker opens on the provider in use, with tab to widen it; signing in opens it on the provider just signed in to. Models go by their id unless config names them, and the model row wears its maker's mark.
The guided review's guide prompt is shorter, the pull request brief shows the start of the description with the rest behind p, its commits drop the Luxe-review and Luxe-revision lines, and the weakened-gates signal is gone.
luxe update reruns the installer it was installed with, in place of luxe-cli-update. The preview's FILE tab reads files the session changed outside the project, and only those. Smaller fixes: bash headers are highlighted, the preview loses a blank row, the launcher divider sits inside its frame, and the phone app's top bar is clear of iOS's blur.
rustls-webpki 0.103.16 and webpki-roots 1.0.10 fix RUSTSEC-2026-0381 and RUSTSEC-2026-0382, and vite 8.3.4 fixes GHSA-587h-7wmj-h5pm, GHSA-698v-4r3x-3vcv and GHSA-r825-w8mm-5pxw.
2026-10-22 13:25:32 -05:00
|
|
|
// No second command to offer beside it, so it isn't named twice
|
|
|
|
|
assert_eq!(instructions(InstallSource::Installer, true), "To update: `luxe update`.");
|
luxe update and /update, editable question answers, and a version bump owed once per release
- luxe update and /update update Luxe with the command for however it was installed (cargo or
Homebrew), run one program at a time with the terminal attached, then check that the luxe on
PATH is the new version. Luxe never downloads or replaces its own binary. The start screen says
"Update available · /update".
- A question's typed answer edits at its caret: arrows, word jumps, Home, End and Delete work,
and up and down move through a wrapped answer before leaving it.
- The version check owes a bump once per release: the version on main is the next release, and
only a released one (a v-tag) has to move.
- Dependency updates arrive through the sync, so Dependabot and the weekly jobs no longer run here.
2026-10-17 14:14:27 -05:00
|
|
|
}
|