@@ -3026,7 +3026,7 @@ mod tests {
30263026
30273027 #[ test]
30283028 fn workspace_binary_candidates_prefers_debug_for_dev_builds ( ) {
3029- let candidates = workspace_binary_candidates ( Path :: new ( "C:/Users /testuser" ) , true ) ;
3029+ let candidates = workspace_binary_candidates ( Path :: new ( "C:/cortex-test /testuser" ) , true ) ;
30303030 assert_eq ! ( candidates. len( ) , 3 ) ;
30313031 assert ! ( candidates[ 0 ]
30323032 . to_string_lossy( )
@@ -3042,7 +3042,7 @@ mod tests {
30423042
30433043 #[ test]
30443044 fn workspace_binary_candidates_prefers_release_for_packaged_builds ( ) {
3045- let candidates = workspace_binary_candidates ( Path :: new ( "C:/Users /testuser" ) , false ) ;
3045+ let candidates = workspace_binary_candidates ( Path :: new ( "C:/cortex-test /testuser" ) , false ) ;
30463046 assert_eq ! ( candidates. len( ) , 3 ) ;
30473047 assert ! ( candidates[ 0 ]
30483048 . to_string_lossy( )
@@ -3071,7 +3071,7 @@ mod tests {
30713071 #[ test]
30723072 fn budget_editor_snapshot_parses_valid_config ( ) {
30733073 let snapshot = budget_snapshot_from_contents (
3074- Path :: new ( "C:/Users /testuser/.cortex/budgets.toml" ) ,
3074+ Path :: new ( "C:/cortex-test /testuser/.cortex/budgets.toml" ) ,
30753075 r#"
30763076[defaults]
30773077enabled = true
@@ -3095,7 +3095,7 @@ window_seconds = 60
30953095 #[ test]
30963096 fn budget_editor_snapshot_returns_structured_errors ( ) {
30973097 let snapshot = budget_snapshot_from_contents (
3098- Path :: new ( "C:/Users /testuser/.cortex/budgets.toml" ) ,
3098+ Path :: new ( "C:/cortex-test /testuser/.cortex/budgets.toml" ) ,
30993099 r#"
31003100[endpoints.unknown]
31013101limit = 1
@@ -3239,7 +3239,7 @@ window_seconds = 60
32393239 let target_build_script = PathBuf :: from ( "C:/repo/daemon-rs/target/debug/build/cortex.exe" ) ;
32403240 assert ! ( is_disallowed_daemon_binary_path( & target_build_script) ) ;
32413241
3242- let safe = PathBuf :: from ( "C:/Users /testuser/.cortex/bin/cortex.exe" ) ;
3242+ let safe = PathBuf :: from ( "C:/cortex-test /testuser/.cortex/bin/cortex.exe" ) ;
32433243 assert ! ( !is_disallowed_daemon_binary_path( & safe) ) ;
32443244 }
32453245
@@ -3384,7 +3384,7 @@ window_seconds = 60
33843384 assert_eq ! (
33853385 cortex_readiness_state(
33863386 200 ,
3387- r#"{"status":"ready","ready":true,"runtime":{"port":7437},"stats":{"home":"C:/Users /testuser/.cortex"}}"# ,
3387+ r#"{"status":"ready","ready":true,"runtime":{"port":7437},"stats":{"home":"C:/cortex-test /testuser/.cortex"}}"# ,
33883388 Some ( 7437 ) ,
33893389 None
33903390 ) ,
@@ -3393,7 +3393,7 @@ window_seconds = 60
33933393 assert_eq ! (
33943394 cortex_readiness_state(
33953395 503 ,
3396- r#"{"status":"starting","ready":false,"runtime":{"port":7437},"stats":{"home":"C:/Users /testuser/.cortex"}}"# ,
3396+ r#"{"status":"starting","ready":false,"runtime":{"port":7437},"stats":{"home":"C:/cortex-test /testuser/.cortex"}}"# ,
33973397 Some ( 7437 ) ,
33983398 None
33993399 ) ,
@@ -3406,7 +3406,7 @@ window_seconds = 60
34063406 assert_eq ! (
34073407 cortex_readiness_state(
34083408 200 ,
3409- r#"{"status":"ready","runtime":{"port":7437},"stats":{"home":"C:/Users /testuser/.cortex"}}"# ,
3409+ r#"{"status":"ready","runtime":{"port":7437},"stats":{"home":"C:/cortex-test /testuser/.cortex"}}"# ,
34103410 Some ( 7437 ) ,
34113411 None
34123412 ) ,
@@ -3415,7 +3415,7 @@ window_seconds = 60
34153415 assert_eq ! (
34163416 cortex_readiness_state(
34173417 500 ,
3418- r#"{"status":"starting","ready":false,"runtime":{"port":7437},"stats":{"home":"C:/Users /testuser/.cortex"}}"# ,
3418+ r#"{"status":"starting","ready":false,"runtime":{"port":7437},"stats":{"home":"C:/cortex-test /testuser/.cortex"}}"# ,
34193419 Some ( 7437 ) ,
34203420 None
34213421 ) ,
@@ -3426,22 +3426,22 @@ window_seconds = 60
34263426 #[ test]
34273427 fn cortex_health_probe_rejects_identity_mismatch ( ) {
34283428 let expected = ResolvedCortexPaths {
3429- home : Some ( PathBuf :: from ( "C:/Users /testuser/.cortex" ) ) ,
3430- token : Some ( PathBuf :: from ( "C:/Users /testuser/.cortex/cortex.token" ) ) ,
3431- db : Some ( PathBuf :: from ( "C:/Users /testuser/.cortex/cortex.db" ) ) ,
3432- pid : Some ( PathBuf :: from ( "C:/Users /testuser/.cortex/cortex.pid" ) ) ,
3429+ home : Some ( PathBuf :: from ( "C:/cortex-test /testuser/.cortex" ) ) ,
3430+ token : Some ( PathBuf :: from ( "C:/cortex-test /testuser/.cortex/cortex.token" ) ) ,
3431+ db : Some ( PathBuf :: from ( "C:/cortex-test /testuser/.cortex/cortex.db" ) ) ,
3432+ pid : Some ( PathBuf :: from ( "C:/cortex-test /testuser/.cortex/cortex.pid" ) ) ,
34333433 port : Some ( 7437 ) ,
34343434 bind : Some ( "127.0.0.1" . to_string ( ) ) ,
34353435 } ;
34363436 assert ! ( !is_cortex_health_response(
34373437 200 ,
3438- r#"{"status":"ok","runtime":{"port":7437,"token_path":"C:/other/cortex.token","db_path":"C:/Users /testuser/.cortex/cortex.db","pid_path":"C:/Users /testuser/.cortex/cortex.pid"},"stats":{"home":"C:/Users /testuser/.cortex","memories":1}}"# ,
3438+ r#"{"status":"ok","runtime":{"port":7437,"token_path":"C:/other/cortex.token","db_path":"C:/cortex-test /testuser/.cortex/cortex.db","pid_path":"C:/cortex-test /testuser/.cortex/cortex.pid"},"stats":{"home":"C:/cortex-test /testuser/.cortex","memories":1}}"# ,
34393439 Some ( 7437 ) ,
34403440 Some ( & expected)
34413441 ) ) ;
34423442 assert ! ( is_cortex_health_response(
34433443 200 ,
3444- r#"{"status":"ok","runtime":{"port":7437,"token_path":"C:/Users /testuser/.cortex/cortex.token","db_path":"C:/Users /testuser/.cortex/cortex.db","pid_path":"C:/Users /testuser/.cortex/cortex.pid"},"stats":{"home":"C:/Users /testuser/.cortex","memories":1}}"# ,
3444+ r#"{"status":"ok","runtime":{"port":7437,"token_path":"C:/cortex-test /testuser/.cortex/cortex.token","db_path":"C:/cortex-test /testuser/.cortex/cortex.db","pid_path":"C:/cortex-test /testuser/.cortex/cortex.pid"},"stats":{"home":"C:/cortex-test /testuser/.cortex","memories":1}}"# ,
34453445 Some ( 7437 ) ,
34463446 Some ( & expected)
34473447 ) ) ;
@@ -3450,10 +3450,10 @@ window_seconds = 60
34503450 #[ test]
34513451 fn readiness_identity_fallback_classifies_starting_payload_on_path_mismatch ( ) {
34523452 let expected = ResolvedCortexPaths {
3453- home : Some ( PathBuf :: from ( "C:/Users /testuser/.cortex" ) ) ,
3454- token : Some ( PathBuf :: from ( "C:/Users /testuser/.cortex/cortex.token" ) ) ,
3455- db : Some ( PathBuf :: from ( "C:/Users /testuser/.cortex/cortex.db" ) ) ,
3456- pid : Some ( PathBuf :: from ( "C:/Users /testuser/.cortex/cortex.pid" ) ) ,
3453+ home : Some ( PathBuf :: from ( "C:/cortex-test /testuser/.cortex" ) ) ,
3454+ token : Some ( PathBuf :: from ( "C:/cortex-test /testuser/.cortex/cortex.token" ) ) ,
3455+ db : Some ( PathBuf :: from ( "C:/cortex-test /testuser/.cortex/cortex.db" ) ) ,
3456+ pid : Some ( PathBuf :: from ( "C:/cortex-test /testuser/.cortex/cortex.pid" ) ) ,
34573457 port : Some ( 7437 ) ,
34583458 bind : Some ( "127.0.0.1" . to_string ( ) ) ,
34593459 } ;
@@ -3470,10 +3470,10 @@ window_seconds = 60
34703470 #[ test]
34713471 fn health_identity_fallback_detects_reachable_payload_on_path_mismatch ( ) {
34723472 let expected = ResolvedCortexPaths {
3473- home : Some ( PathBuf :: from ( "C:/Users /testuser/.cortex" ) ) ,
3474- token : Some ( PathBuf :: from ( "C:/Users /testuser/.cortex/cortex.token" ) ) ,
3475- db : Some ( PathBuf :: from ( "C:/Users /testuser/.cortex/cortex.db" ) ) ,
3476- pid : Some ( PathBuf :: from ( "C:/Users /testuser/.cortex/cortex.pid" ) ) ,
3473+ home : Some ( PathBuf :: from ( "C:/cortex-test /testuser/.cortex" ) ) ,
3474+ token : Some ( PathBuf :: from ( "C:/cortex-test /testuser/.cortex/cortex.token" ) ) ,
3475+ db : Some ( PathBuf :: from ( "C:/cortex-test /testuser/.cortex/cortex.db" ) ) ,
3476+ pid : Some ( PathBuf :: from ( "C:/cortex-test /testuser/.cortex/cortex.pid" ) ) ,
34773477 port : Some ( 7437 ) ,
34783478 bind : Some ( "127.0.0.1" . to_string ( ) ) ,
34793479 } ;
@@ -3489,7 +3489,7 @@ window_seconds = 60
34893489
34903490 #[ test]
34913491 fn editor_registration_uses_explicit_agent_args ( ) {
3492- let home = Path :: new ( "C:/Users /testuser" ) ;
3492+ let home = Path :: new ( "C:/cortex-test /testuser" ) ;
34933493 let targets = editor_targets ( home) ;
34943494 let cursor = targets. iter ( ) . find ( |target| target. id == "cursor" ) . unwrap ( ) ;
34953495 let claude = targets
@@ -3503,12 +3503,12 @@ window_seconds = 60
35033503
35043504 #[ test]
35053505 fn editor_registration_includes_attach_only_env_contract ( ) {
3506- let home = Path :: new ( "C:/Users /testuser" ) ;
3506+ let home = Path :: new ( "C:/cortex-test /testuser" ) ;
35073507 let targets = editor_targets ( home) ;
35083508 let codex = targets. iter ( ) . find ( |target| target. id == "codex" ) . unwrap ( ) ;
35093509
35103510 let registration =
3511- cortex_mcp_registration ( codex, "C:/Users /testuser/.cortex/bin/cortex.exe" ) ;
3511+ cortex_mcp_registration ( codex, "C:/cortex-test /testuser/.cortex/bin/cortex.exe" ) ;
35123512 let cortex_entry = registration
35133513 . as_object ( )
35143514 . expect ( "registration should be an object" ) ;
@@ -3546,7 +3546,7 @@ window_seconds = 60
35463546
35473547 #[ test]
35483548 fn registration_matchers_require_attach_only_env_contract ( ) {
3549- let home = Path :: new ( "C:/Users /testuser" ) ;
3549+ let home = Path :: new ( "C:/cortex-test /testuser" ) ;
35503550 let targets = editor_targets ( home) ;
35513551 let cursor = targets. iter ( ) . find ( |target| target. id == "cursor" ) . unwrap ( ) ;
35523552 let codex = targets. iter ( ) . find ( |target| target. id == "codex" ) . unwrap ( ) ;
0 commit comments