Files
llmx/llmx-rs/core/tests/suite/deprecation_notice.rs
Sebastian Krüger 7be8b00b05 Phase 6: Testing & Validation - Additional Fixes
Fixed remaining references found during testing:

Rust source code fixes:
- Updated CLI bin_name and override_usage: codex → llmx
- Updated test examples in wsl_paths.rs
- Updated GitHub URLs: github.com/openai/codex → github.com/valknar/llmx
- Updated directory references: ~/.codex/ → ~/.llmx/
- Updated documentation link: "Codex docs" → "LLMX docs"
- Updated feedback URL to point to valknar/llmx repository

Configuration files:
- Regenerated llmx-cli/package-lock.json with updated package name
- Updated pnpm-lock.yaml

Test results:
- TypeScript SDK build: ✓ Success
- TypeScript lint: ✓ Pass
- Rust tests: 12/13 passed (1 locale-specific test failure unrelated to rename)
- Rust release build: In progress

Files changed: 22 files (49 insertions, 46 deletions)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 15:03:50 +01:00

51 lines
1.7 KiB
Rust

#![cfg(not(target_os = "windows"))]
use anyhow::Ok;
use llmx_core::features::Feature;
use llmx_core::protocol::DeprecationNoticeEvent;
use llmx_core::protocol::EventMsg;
use core_test_support::responses::start_mock_server;
use core_test_support::skip_if_no_network;
use core_test_support::test_codex::TestCodex;
use core_test_support::test_codex::test_codex;
use core_test_support::wait_for_event_match;
use pretty_assertions::assert_eq;
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn emits_deprecation_notice_for_legacy_feature_flag() -> anyhow::Result<()> {
skip_if_no_network!(Ok(()));
let server = start_mock_server().await;
let mut builder = test_codex().with_config(|config| {
config.features.enable(Feature::UnifiedExec);
config
.features
.record_legacy_usage_force("use_experimental_unified_exec_tool", Feature::UnifiedExec);
config.use_experimental_unified_exec_tool = true;
});
let TestCodex { codex, .. } = builder.build(&server).await?;
let notice = wait_for_event_match(&codex, |event| match event {
EventMsg::DeprecationNotice(ev) => Some(ev.clone()),
_ => None,
})
.await;
let DeprecationNoticeEvent { summary, details } = notice;
assert_eq!(
summary,
"`use_experimental_unified_exec_tool` is deprecated. Use `unified_exec` instead."
.to_string(),
);
assert_eq!(
details.as_deref(),
Some(
"Enable it with `--enable unified_exec` or `[features].unified_exec` in config.toml. See https://github.com/valknar/llmx/blob/main/docs/config.md#feature-flags for details."
),
);
Ok(())
}