26382a7ac6
CI / Clippy (push) Failing after 15m13s
CI / Test (ubuntu-latest) (push) Failing after 16m1s
CI / Test (macos-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Build (no embeddings / no ORT) (push) Has been cancelled
CI / Format (push) Has been cancelled
CI / Cookbook (Node) (push) Has been cancelled
CI / Pi Extension (Node) (push) Has been cancelled
CI / Rust SDK (lean-ctx-client) (push) Has been cancelled
CI / Embed SDK (lean-ctx-sdk) (push) Has been cancelled
CI / Python SDK (leanctx) (push) Has been cancelled
CI / Hermes Plugin (Python) (push) Has been cancelled
CI / SDK Conformance Matrix (push) Has been cancelled
CI / Coverage (push) Has been cancelled
CI / cargo-deny (push) Has been cancelled
CI / Adversarial Safety (push) Has been cancelled
CI / Benchmarks (push) Has been cancelled
CI / Output-Quality Gate (eval A/B) (push) Has been cancelled
CI / Documentation (push) Has been cancelled
CI / CI Green (push) Has been cancelled
JetBrains Plugin / Actionlint (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (rust) (push) Has been cancelled
JetBrains Plugin / Validation (push) Has been cancelled
JetBrains Plugin / Build (push) Has been cancelled
JetBrains Plugin / Test (push) Has been cancelled
Security Check / Security Scan (push) Has been cancelled
72 lines
2.1 KiB
Rust
72 lines
2.1 KiB
Rust
#[test]
|
|
fn dispatch_inner_pre_resolves_paths() {
|
|
let dispatch_mod = include_str!("../src/server/dispatch/mod.rs");
|
|
assert!(
|
|
dispatch_mod.contains("self.resolve_path(raw)"),
|
|
"dispatch_inner must resolve paths for registry-dispatched tools"
|
|
);
|
|
|
|
for key in ["path", "project_root", "root"] {
|
|
assert!(
|
|
dispatch_mod.contains(&format!("\"{key}\"")),
|
|
"dispatch_inner must pre-resolve the '{key}' parameter"
|
|
);
|
|
}
|
|
}
|
|
|
|
#[test]
|
|
fn registry_tools_use_resolved_path() {
|
|
let registry_tools = [
|
|
(
|
|
"ctx_tree",
|
|
include_str!("../src/tools/registered/ctx_tree.rs"),
|
|
),
|
|
(
|
|
"ctx_benchmark",
|
|
include_str!("../src/tools/registered/ctx_benchmark.rs"),
|
|
),
|
|
(
|
|
"ctx_analyze",
|
|
include_str!("../src/tools/registered/ctx_analyze.rs"),
|
|
),
|
|
(
|
|
"ctx_outline",
|
|
include_str!("../src/tools/registered/ctx_outline.rs"),
|
|
),
|
|
(
|
|
"ctx_review",
|
|
include_str!("../src/tools/registered/ctx_review.rs"),
|
|
),
|
|
(
|
|
"ctx_impact",
|
|
include_str!("../src/tools/registered/ctx_impact.rs"),
|
|
),
|
|
(
|
|
"ctx_architecture",
|
|
include_str!("../src/tools/registered/ctx_architecture.rs"),
|
|
),
|
|
(
|
|
"ctx_pack",
|
|
include_str!("../src/tools/registered/ctx_pack.rs"),
|
|
),
|
|
(
|
|
"ctx_index",
|
|
include_str!("../src/tools/registered/ctx_index.rs"),
|
|
),
|
|
(
|
|
"ctx_artifacts",
|
|
include_str!("../src/tools/registered/ctx_artifacts.rs"),
|
|
),
|
|
(
|
|
"ctx_compress_memory",
|
|
include_str!("../src/tools/registered/ctx_compress_memory.rs"),
|
|
),
|
|
];
|
|
for (name, src) in registry_tools {
|
|
assert!(
|
|
src.contains("resolved_path(") || src.contains("resolve_tool_paths("),
|
|
"{name}: registry tool must use ctx.resolved_path() or resolve_tool_paths() for path access"
|
|
);
|
|
}
|
|
}
|