Land release blocker fixes and workspace cleanup
Some checks failed
check / cargo check (macos-latest) (push) Has been cancelled
check / cargo check (ubuntu-22.04) (push) Has been cancelled
check / cargo check (windows-latest) (push) Has been cancelled
check / svelte build + lint (push) Has been cancelled

This commit is contained in:
2026-04-23 00:16:09 +01:00
parent d7363cc913
commit 9b0067b4c0
36 changed files with 1529 additions and 418 deletions

View File

@@ -225,13 +225,19 @@ mod tests {
assert_eq!(LlmPromptPreset::parse("EMAIL"), LlmPromptPreset::Email);
assert_eq!(LlmPromptPreset::parse("notes"), LlmPromptPreset::Notes);
assert_eq!(LlmPromptPreset::parse("meeting"), LlmPromptPreset::Notes);
assert_eq!(LlmPromptPreset::parse("meeting-notes"), LlmPromptPreset::Notes);
assert_eq!(
LlmPromptPreset::parse("meeting-notes"),
LlmPromptPreset::Notes
);
assert_eq!(LlmPromptPreset::parse("code"), LlmPromptPreset::Code);
assert_eq!(LlmPromptPreset::parse("software"), LlmPromptPreset::Code);
// Unknown values and explicit default fall back safely.
assert_eq!(LlmPromptPreset::parse("default"), LlmPromptPreset::Default);
assert_eq!(LlmPromptPreset::parse(""), LlmPromptPreset::Default);
assert_eq!(LlmPromptPreset::parse("random-unknown"), LlmPromptPreset::Default);
assert_eq!(
LlmPromptPreset::parse("random-unknown"),
LlmPromptPreset::Default
);
}
#[test]
@@ -240,7 +246,10 @@ mod tests {
// be empty so it composes cleanly with dictionary suffix.
assert!(LlmPromptPreset::Default.suffix().is_empty());
assert!(LlmPromptPreset::Email.suffix().contains("email"));
assert!(LlmPromptPreset::Notes.suffix().to_lowercase().contains("bullet"));
assert!(LlmPromptPreset::Notes
.suffix()
.to_lowercase()
.contains("bullet"));
assert!(LlmPromptPreset::Code.suffix().contains("technical"));
}
}

View File

@@ -540,8 +540,12 @@ mod tests {
fn is_hallucination_allows_dialogue_containing_thanks_mid_sentence() {
// Exact-match on trail phrases means legitimate dialogue that
// mentions "thanks" or "subscribe" is never dropped.
assert!(!is_hallucination("Thanks for the heads up on the migration"));
assert!(!is_hallucination("Please subscribe to the RSS feed and tell me when it updates"));
assert!(!is_hallucination(
"Thanks for the heads up on the migration"
));
assert!(!is_hallucination(
"Please subscribe to the RSS feed and tell me when it updates"
));
}
#[test]

View File

@@ -168,7 +168,10 @@ mod tests {
];
for (input, expected) in cases {
let out = to_plain_text(&[seg(input)]);
assert_eq!(out, expected, "input {input:?} should strip to {expected:?}");
assert_eq!(
out, expected,
"input {input:?} should strip to {expected:?}"
);
}
}