luxe 0.1.4: remembered models, wheel-driven lists, and a steadier phone app
- luxe starts on the model you last chose in this project, then the last one anywhere. Signing in opens the model picker instead of choosing for you. - Every list in a modal takes the mouse wheel and a draggable scrollbar. - The phone app shows reasoning in full, stays put while you read back through a long session, and shows a question's answer on its card. - On Windows, luxe update replaces the running luxe, and a signed-in install no longer sees setup again. - The file tree no longer shows "engine busy" in a large project, loop output is easier to follow, and the name is written lowercase. The CHANGELOG has the full list.
This commit is contained in:
@@ -16,7 +16,7 @@ fn committed_project(root: &std::path::Path) {
|
||||
for arguments in [
|
||||
["init"].as_slice(),
|
||||
["config", "user.email", "tests@example.invalid"].as_slice(),
|
||||
["config", "user.name", "Luxe Tests"].as_slice(),
|
||||
["config", "user.name", "luxe Tests"].as_slice(),
|
||||
["add", "test.txt"].as_slice(),
|
||||
["commit", "-m", "initial fixture"].as_slice(),
|
||||
] {
|
||||
|
||||
@@ -138,7 +138,7 @@ fn settings() -> CompactionSettings {
|
||||
/// `invoked_from` is the test's own directory on purpose.
|
||||
///
|
||||
/// Left unset, the engine takes the *process's* directory — this repository — so the system prompt
|
||||
/// these tests measure against a threshold quietly includes Luxe's own `AGENTS.md`, its skills, and
|
||||
/// these tests measure against a threshold quietly includes luxe's own `AGENTS.md`, its skills, and
|
||||
/// the name of the branch they run on. Editing `AGENTS.md` then fails three compaction tests, which
|
||||
/// is a fixture reading the room rather than a defect.
|
||||
fn config(
|
||||
|
||||
@@ -222,7 +222,7 @@ pub(crate) fn review_engine_config(
|
||||
}
|
||||
}
|
||||
|
||||
/// The session store a project keeps under `.luxe`, as Luxe does, where Guided Review never looks.
|
||||
/// The session store a project keeps under `.luxe`, as luxe does, where Guided Review never looks.
|
||||
///
|
||||
/// Anywhere else in the project, the sessions are untracked files a review reads, and on Windows
|
||||
/// an open session's claim locks its `.lock` file against that read, so the review never loads.
|
||||
@@ -322,7 +322,7 @@ pub(crate) fn base_config(
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! An interrupted turn must not brick the session.
|
||||
//!
|
||||
//! One real incident produced all of this: a model emitted three tool calls in one message, the first
|
||||
//! wedged on a host that never answered, the user interrupted, and Luxe quit. What it left behind was
|
||||
//! wedged on a host that never answered, the user interrupted, and luxe quit. What it left behind was
|
||||
//! an assistant message whose calls had no results — which the OpenAI Responses API answers with
|
||||
//! `400 No tool output found for function call <id>` on **every** later request, and Anthropic with
|
||||
//! the equivalent about `tool_use` ids. The session, and every resume of it, was over.
|
||||
|
||||
@@ -237,7 +237,7 @@ async fn new_session_reuses_an_empty_session_instead_of_orphaning_it() {
|
||||
|
||||
/// A turn with no model chosen is refused, and the transcript is left alone.
|
||||
///
|
||||
/// Luxe resolves no default: with nothing chosen the front-end hands the engine a model with an
|
||||
/// luxe resolves no default: with nothing chosen the front-end hands the engine a model with an
|
||||
/// empty id, and the gate at the top of every turn is what makes that safe. The provider is never
|
||||
/// reached, and the user's message is not committed — a refused turn must not leave a message in
|
||||
/// the history that would replay on every later request.
|
||||
|
||||
@@ -186,7 +186,7 @@ async fn a_report_beside_a_tool_call_is_read_when_the_turn_ends() {
|
||||
|
||||
/// A Guide like [`GuideManifestProvider`]'s, and fix turns answered from a script.
|
||||
///
|
||||
/// Every call a fix turn makes — the feedback itself, or Luxe asking for the report — takes the
|
||||
/// Every call a fix turn makes — the feedback itself, or luxe asking for the report — takes the
|
||||
/// next reply, with `{review}`, `{revision}`, `{first}` and `{second}` filled in from the feedback.
|
||||
/// [`UNTIL_CANCELLED`] answers nothing until the turn is cancelled, and [`CUT_OFF`] stops partway
|
||||
/// through a tool call's arguments, as a reply that hit its token limit does.
|
||||
@@ -290,7 +290,7 @@ async fn fix_two_comments(
|
||||
std::fs::write(project_root.join("tracked.rs"), "fn original() {}\n").unwrap();
|
||||
for arguments in [
|
||||
["config", "user.email", "tests@example.invalid"].as_slice(),
|
||||
["config", "user.name", "Luxe Tests"].as_slice(),
|
||||
["config", "user.name", "luxe Tests"].as_slice(),
|
||||
["add", "tracked.rs"].as_slice(),
|
||||
["commit", "-m", "initial fixture"].as_slice(),
|
||||
] {
|
||||
@@ -392,7 +392,7 @@ async fn fix_two_comments(
|
||||
(*finished, asked)
|
||||
}
|
||||
|
||||
/// What Luxe said on a comment's thread, in its own name.
|
||||
/// What luxe said on a comment's thread, in its own name.
|
||||
fn luxe_notes(finding: &luxe_core::guided_review::ReviewFinding) -> Vec<&str> {
|
||||
use luxe_core::guided_review::FindingMessageAuthor;
|
||||
let notes = finding.thread.iter().filter(|m| m.author == FindingMessageAuthor::System);
|
||||
@@ -425,7 +425,7 @@ async fn a_missing_report_is_asked_for_once_and_the_answer_counts() {
|
||||
}
|
||||
|
||||
/// An agent that cannot produce a usable report is asked once, not again and again, and then
|
||||
/// each comment says so, and why, in Luxe's name; the comments stay where the reviewer left them.
|
||||
/// each comment says so, and why, in luxe's name; the comments stay where the reviewer left them.
|
||||
#[tokio::test]
|
||||
async fn an_agent_that_never_reports_leaves_word_on_each_comment() {
|
||||
use luxe_core::guided_review::FindingState;
|
||||
|
||||
@@ -29,7 +29,7 @@ async fn a_last_turn_review_loads_the_turn_that_ran_and_refreshes_in_place() {
|
||||
std::fs::write(tmp_dir.join("test.txt"), "Hello, World!").unwrap();
|
||||
for arguments in [
|
||||
["config", "user.email", "tests@example.invalid"].as_slice(),
|
||||
["config", "user.name", "Luxe Tests"].as_slice(),
|
||||
["config", "user.name", "luxe Tests"].as_slice(),
|
||||
["add", "test.txt"].as_slice(),
|
||||
["commit", "-m", "initial fixture"].as_slice(),
|
||||
] {
|
||||
@@ -41,7 +41,7 @@ async fn a_last_turn_review_loads_the_turn_that_ran_and_refreshes_in_place() {
|
||||
.success());
|
||||
}
|
||||
|
||||
// Luxe's own planning artifact, not the harness it happens to be developed with.
|
||||
// luxe's own planning artifact, not the harness it happens to be developed with.
|
||||
std::fs::write(tmp_dir.join("PLAN.md"), "review plan evidence").unwrap();
|
||||
|
||||
// Setup session store.
|
||||
@@ -207,7 +207,7 @@ async fn p32_guided_review_refresh_persists_a_fresh_artifact_after_worktree_muta
|
||||
std::fs::write(project_root.join("tracked.rs"), "fn original() {}\n").unwrap();
|
||||
for arguments in [
|
||||
["config", "user.email", "tests@example.invalid"].as_slice(),
|
||||
["config", "user.name", "Luxe Tests"].as_slice(),
|
||||
["config", "user.name", "luxe Tests"].as_slice(),
|
||||
["add", "tracked.rs"].as_slice(),
|
||||
["commit", "-m", "initial fixture"].as_slice(),
|
||||
] {
|
||||
@@ -446,7 +446,7 @@ async fn guided_review_last_turn_loads_a_retained_baseline_after_restart() {
|
||||
std::fs::write(project_root.join("tracked.rs"), "fn original() {}\n").unwrap();
|
||||
for arguments in [
|
||||
["config", "user.email", "tests@example.invalid"].as_slice(),
|
||||
["config", "user.name", "Luxe Tests"].as_slice(),
|
||||
["config", "user.name", "luxe Tests"].as_slice(),
|
||||
["add", "tracked.rs"].as_slice(),
|
||||
["commit", "-m", "initial fixture"].as_slice(),
|
||||
] {
|
||||
|
||||
@@ -27,7 +27,7 @@ async fn the_engine_owns_a_review_from_comment_to_report_and_through_a_restart()
|
||||
std::fs::write(project_root.join("tracked.rs"), "fn original() {}\n").unwrap();
|
||||
for arguments in [
|
||||
["config", "user.email", "tests@example.invalid"].as_slice(),
|
||||
["config", "user.name", "Luxe Tests"].as_slice(),
|
||||
["config", "user.name", "luxe Tests"].as_slice(),
|
||||
["add", "tracked.rs"].as_slice(),
|
||||
["commit", "-m", "initial fixture"].as_slice(),
|
||||
] {
|
||||
@@ -150,7 +150,7 @@ async fn a_comment_saved_just_before_close_is_on_disk_when_the_engine_stops() {
|
||||
std::fs::write(project_root.join("tracked.rs"), "fn original() {}\n").unwrap();
|
||||
for arguments in [
|
||||
["config", "user.email", "tests@example.invalid"].as_slice(),
|
||||
["config", "user.name", "Luxe Tests"].as_slice(),
|
||||
["config", "user.name", "luxe Tests"].as_slice(),
|
||||
["add", "tracked.rs"].as_slice(),
|
||||
["commit", "-m", "initial fixture"].as_slice(),
|
||||
] {
|
||||
@@ -250,7 +250,7 @@ async fn closing_does_not_wait_for_a_guide_being_written() {
|
||||
std::fs::write(project_root.join("tracked.rs"), "fn original() {}\n").unwrap();
|
||||
for arguments in [
|
||||
["config", "user.email", "tests@example.invalid"].as_slice(),
|
||||
["config", "user.name", "Luxe Tests"].as_slice(),
|
||||
["config", "user.name", "luxe Tests"].as_slice(),
|
||||
["add", "tracked.rs"].as_slice(),
|
||||
["commit", "-m", "initial fixture"].as_slice(),
|
||||
] {
|
||||
|
||||
@@ -170,7 +170,7 @@ async fn a_tool_call_announces_itself_while_the_model_is_still_writing_it() {
|
||||
|
||||
/// What the reader sends is announced like any other committed message, before the reply.
|
||||
///
|
||||
/// The break this catches: announcing only messages Luxe composed, so a client joined to the
|
||||
/// The break this catches: announcing only messages luxe composed, so a client joined to the
|
||||
/// session (the phone app, `luxe join`) shows answers to questions it never saw, and its snapshot
|
||||
/// for a later joiner leaves them out too.
|
||||
#[tokio::test]
|
||||
|
||||
@@ -129,7 +129,7 @@ fn spawn_held_with(point: HookPoint, modes: luxe_core::mode::Modes) -> Held {
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
|
||||
@@ -70,7 +70,7 @@ fn empty_guided_review() -> GuidedReview {
|
||||
|
||||
/// A `ready` from a build that predates `github_writes` reads as a session that refuses writes.
|
||||
///
|
||||
/// The safe default for a client replaying a capture, or talking to an older Luxe: assuming writes
|
||||
/// The safe default for a client replaying a capture, or talking to an older luxe: assuming writes
|
||||
/// were allowed would offer buttons that can only be refused.
|
||||
#[test]
|
||||
fn a_ready_without_github_writes_reads_as_refusing_them() {
|
||||
|
||||
@@ -28,7 +28,7 @@ fn repository() -> tempfile::TempDir {
|
||||
let project = tempfile::tempdir().unwrap();
|
||||
let root = project.path();
|
||||
git(root, &["init", "--quiet"]);
|
||||
git(root, &["config", "user.name", "Luxe Tests"]);
|
||||
git(root, &["config", "user.name", "luxe Tests"]);
|
||||
git(root, &["config", "user.email", "tests@luxe.invalid"]);
|
||||
std::fs::create_dir_all(root.join("src")).unwrap();
|
||||
std::fs::write(root.join("src/lib.rs"), "one\ntwo\nthree\n").unwrap();
|
||||
@@ -250,7 +250,7 @@ async fn a_loose_files_other_states_each_read_as_themselves() {
|
||||
assert!(vanished.is_none());
|
||||
}
|
||||
|
||||
/// A file too large or too binary to retain, and one Luxe never saw, are the same answer: it
|
||||
/// A file too large or too binary to retain, and one luxe never saw, are the same answer: it
|
||||
/// cannot say what changed, so it must not present the file as new.
|
||||
#[tokio::test]
|
||||
async fn a_loose_file_with_no_retained_copy_refuses_to_guess() {
|
||||
|
||||
@@ -164,7 +164,7 @@ fn engine_config(
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
@@ -304,7 +304,7 @@ async fn tool_output_is_redacted_before_it_is_committed() {
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
|
||||
@@ -175,7 +175,7 @@ fn session(script: Vec<Reply>) -> Session {
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
|
||||
@@ -199,7 +199,7 @@ async fn test_capstone_engine_end_to_end() {
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
|
||||
@@ -240,7 +240,7 @@ async fn test_multi_phase_capstone_unattended() {
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
|
||||
@@ -165,7 +165,7 @@ fn harness() -> Harness {
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
|
||||
@@ -117,7 +117,7 @@ async fn a_repeated_identical_call_is_blocked_unattended_with_actionable_feedbac
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
|
||||
@@ -205,7 +205,7 @@ fn spawn() -> Spawned {
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
|
||||
@@ -89,7 +89,7 @@ async fn test_controller_stop_while_engine_running() {
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
|
||||
@@ -72,7 +72,7 @@ fn engine_with(
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
|
||||
@@ -210,7 +210,7 @@ async fn spawn(setup: Setup) -> Harness {
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
|
||||
@@ -138,7 +138,7 @@ async fn the_output_cap_follows_what_the_window_has_left() {
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
|
||||
@@ -172,7 +172,7 @@ fn config(
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
|
||||
@@ -101,7 +101,7 @@ fn config(
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
@@ -234,7 +234,7 @@ async fn hook_context_rides_in_the_transcript_not_the_system_prompt() {
|
||||
|
||||
/// The prompt's `cwd` is where tools run, not the directory the launch named.
|
||||
///
|
||||
/// Launched in `packages/app`, Luxe moves to the project root and keeps the launch directory only
|
||||
/// Launched in `packages/app`, luxe moves to the project root and keeps the launch directory only
|
||||
/// to pick instruction files. The prompt reported the launch directory anyway, so a real model
|
||||
/// was told it was in `packages/app` and `pwd` answered with the root.
|
||||
#[tokio::test]
|
||||
@@ -410,7 +410,7 @@ fn feedback_engine(
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
|
||||
@@ -121,7 +121,7 @@ async fn turn_after(answers: Vec<Answer>, before: &[&str]) -> (Vec<Event>, usize
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
|
||||
@@ -83,7 +83,7 @@ fn config(
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
|
||||
@@ -64,7 +64,7 @@ fn config(store: JsonlSessionStore, notices: Vec<String>) -> EngineConfig {
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
|
||||
@@ -122,7 +122,7 @@ fn engine_config(
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
@@ -345,7 +345,7 @@ impl Provider for TextOnlyProvider {
|
||||
///
|
||||
/// The delivery checkpoint only runs at the top of a tool iteration, so a turn that ends on a
|
||||
/// text-only response used to leave the steer buffered until the user's next submission — a message
|
||||
/// they watched Luxe accept and then apparently ignore.
|
||||
/// they watched luxe accept and then apparently ignore.
|
||||
#[tokio::test]
|
||||
async fn a_steer_that_lands_during_the_final_response_is_not_stranded() {
|
||||
let tmp = tempfile::tempdir().unwrap();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! A call runs as soon as the model has written it.
|
||||
//!
|
||||
//! A model writes a message's calls one after another, and Luxe used to run none of them until the
|
||||
//! A model writes a message's calls one after another, and luxe used to run none of them until the
|
||||
//! last had arrived: each card opened, finished, and sat waiting while the next was written, then the
|
||||
//! whole stack ran inside a second. Now a finished call runs while the model writes the next one.
|
||||
//!
|
||||
@@ -171,7 +171,7 @@ fn harness(first: Vec<Step>) -> Harness {
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
|
||||
@@ -109,7 +109,7 @@ fn engine_config_for(
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
|
||||
@@ -167,7 +167,7 @@ fn harness_with(
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
@@ -319,7 +319,7 @@ async fn spend_is_persisted_and_a_resumed_session_adopts_it() {
|
||||
assert!((resumed.total.cost_usd - live.total.cost_usd).abs() < 1e-9);
|
||||
}
|
||||
|
||||
/// A cache refresh is persisted as its own entry kind, so an older Luxe can skip it, and a resumed
|
||||
/// A cache refresh is persisted as its own entry kind, so an older luxe can skip it, and a resumed
|
||||
/// session still counts it, under its own source rather than as conversation.
|
||||
#[tokio::test]
|
||||
async fn a_resumed_session_counts_its_cache_refreshes_under_their_own_source() {
|
||||
|
||||
@@ -186,7 +186,7 @@ pub(crate) fn config(
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
|
||||
@@ -101,7 +101,7 @@ async fn an_interactive_merge_is_an_ordinary_prompt() {
|
||||
assert_eq!(runs.load(Ordering::SeqCst), 1);
|
||||
}
|
||||
|
||||
/// Luxe does not run commands as root, attended or not, and the refusal says how to hand the
|
||||
/// luxe does not run commands as root, attended or not, and the refusal says how to hand the
|
||||
/// command over rather than leaving the model to reword it past the rule.
|
||||
#[tokio::test]
|
||||
async fn running_as_root_is_refused_with_the_handoff_in_the_reply() {
|
||||
|
||||
@@ -263,7 +263,7 @@ async fn a_post_whose_comments_moved_since_the_preview_is_refused() {
|
||||
assert!(github.submitted.lock().unwrap().is_empty(), "nothing reached GitHub");
|
||||
}
|
||||
|
||||
/// On your own pull request only comments go: GitHub refuses the author's approval, so Luxe says so
|
||||
/// On your own pull request only comments go: GitHub refuses the author's approval, so luxe says so
|
||||
/// before asking it.
|
||||
#[tokio::test]
|
||||
async fn approving_your_own_pull_request_is_refused_before_github_is_asked() {
|
||||
|
||||
@@ -105,7 +105,7 @@ pub(crate) async fn harness_with(
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github,
|
||||
|
||||
@@ -31,7 +31,7 @@ impl Remote {
|
||||
let project = dir.path().join("project");
|
||||
git(dir.path(), &["init", "--quiet", "--bare", "-b", "main", origin.to_str().unwrap()]);
|
||||
git(dir.path(), &["init", "--quiet", "-b", "main", seed.to_str().unwrap()]);
|
||||
git(&seed, &["config", "user.name", "Luxe Tests"]);
|
||||
git(&seed, &["config", "user.name", "luxe Tests"]);
|
||||
git(&seed, &["config", "user.email", "tests@luxe.local"]);
|
||||
git(&seed, &["remote", "add", "origin", origin.to_str().unwrap()]);
|
||||
let base = commit(&seed, "parser.rs", "fn parse() {}\n", "Start");
|
||||
@@ -39,7 +39,7 @@ impl Remote {
|
||||
git(dir.path(), &["clone", "--quiet", origin.to_str().unwrap(), project.to_str().unwrap()]);
|
||||
// The project commits too, in the tests that commit a review, and a machine with no global
|
||||
// identity — a fresh CI runner, Windows under wine — would refuse
|
||||
git(&project, &["config", "user.name", "Luxe Tests"]);
|
||||
git(&project, &["config", "user.name", "luxe Tests"]);
|
||||
git(&project, &["config", "user.email", "tests@luxe.local"]);
|
||||
std::fs::create_dir(project.join(".luxe")).unwrap();
|
||||
std::fs::write(project.join(".luxe/.gitignore"), "*\n").unwrap();
|
||||
|
||||
@@ -86,7 +86,7 @@ fn git(root: &std::path::Path, arguments: &[&str]) {
|
||||
assert!(Command::new("git").args(arguments).current_dir(root).status().unwrap().success());
|
||||
}
|
||||
|
||||
/// Where the repository keeps its sessions: under `.luxe`, as Luxe does, where Guided Review never
|
||||
/// Where the repository keeps its sessions: under `.luxe`, as luxe does, where Guided Review never
|
||||
/// looks. Anywhere else they are untracked files a review reads, and on Windows an open session's
|
||||
/// claim locks its `.lock` file against that read, so the review never loads.
|
||||
fn sessions_root(root: &std::path::Path) -> std::path::PathBuf {
|
||||
@@ -99,7 +99,7 @@ fn changed_repository() -> tempfile::TempDir {
|
||||
let root = dir.path();
|
||||
git(root, &["init", "-q"]);
|
||||
git(root, &["config", "user.email", "tests@example.invalid"]);
|
||||
git(root, &["config", "user.name", "Luxe Tests"]);
|
||||
git(root, &["config", "user.name", "luxe Tests"]);
|
||||
std::fs::write(root.join("tracked.rs"), "fn original() {}\n").unwrap();
|
||||
git(root, &["add", "tracked.rs"]);
|
||||
git(root, &["commit", "-q", "-m", "initial fixture"]);
|
||||
|
||||
@@ -107,7 +107,7 @@ pub(crate) fn engine_config(
|
||||
external_work: None,
|
||||
review_context_files: Vec::new(),
|
||||
review_exclude: Vec::new(),
|
||||
remember_runtime_state: false,
|
||||
remember_choices_in: None,
|
||||
cache_warming: luxe_core::cache_warming::CacheWarming::Off,
|
||||
review_insight_provider: None,
|
||||
github: None,
|
||||
@@ -235,7 +235,7 @@ async fn a_session_held_by_another_process_is_not_switched_to() {
|
||||
_ => None,
|
||||
})
|
||||
.await;
|
||||
assert!(refusal.contains("open in another Luxe"), "{refusal}");
|
||||
assert!(refusal.contains("open in another luxe"), "{refusal}");
|
||||
let claimed = std::fs::File::open(&my_lock).unwrap().try_lock().is_err();
|
||||
assert!(claimed, "the engine doesn't hold the session it's on");
|
||||
turn(&actions, &mut events, "still in my session").await;
|
||||
|
||||
Reference in New Issue
Block a user