everruns-integrations-github 0.8.37

GitHub-backed agent blueprints for Everruns
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
//! Private tools for the GitHub Scout blueprint.

use async_trait::async_trait;
use everruns_core::ToolHints;
use everruns_core::tool_output_sanitizer::{
    READ_FILE_DEFAULT_LIMIT, build_text_read_file_result, parse_read_file_window_args,
};
use everruns_core::tools::{Tool, ToolExecutionResult};
use everruns_core::traits::ToolContext;
use serde_json::{Value, json};
use tracing::{debug, error};

use crate::client::GitHubClient;
use crate::{GITHUB_API_BASE, GITHUB_CONNECTION_PROVIDER, GITHUB_TOKEN_SECRET};

const DEFAULT_LIMIT: u32 = 10;
const MAX_LIMIT: u32 = 30;

async fn get_github_token(context: &ToolContext) -> Result<String, ToolExecutionResult> {
    if let Some(resolver) = context.connection_resolver.as_ref() {
        match resolver
            .get_connection_token(context.session_id, GITHUB_CONNECTION_PROVIDER)
            .await
        {
            Ok(Some(token)) if !token.trim().is_empty() => return Ok(token),
            Ok(_) => {}
            Err(e) => debug!("GitHub connection resolver failed: {e}"),
        }
    }

    if let Some(storage) = context.storage_store.as_ref() {
        match storage
            .get_secret(context.session_id, GITHUB_TOKEN_SECRET)
            .await
        {
            Ok(Some(token)) if !token.trim().is_empty() => return Ok(token),
            Ok(_) => {}
            Err(e) => {
                error!(
                    "Failed to read {GITHUB_TOKEN_SECRET} session secret for {}: {e}",
                    context.session_id
                );
                return Err(ToolExecutionResult::internal_error_msg(
                    "Failed to read GitHub token",
                ));
            }
        }
    }

    Err(ToolExecutionResult::connection_required(
        GITHUB_CONNECTION_PROVIDER,
    ))
}

fn github_client(token: String) -> GitHubClient {
    GitHubClient::new(token)
}

fn enforce_github_network_access(context: &ToolContext) -> Result<(), ToolExecutionResult> {
    if let Some(acl) = context.network_access.as_ref()
        && !acl.is_url_allowed(GITHUB_API_BASE)
    {
        return Err(ToolExecutionResult::tool_error(format!(
            "URL blocked by network access policy: {GITHUB_API_BASE}"
        )));
    }
    Ok(())
}

fn required_str<'a>(arguments: &'a Value, name: &str) -> Result<&'a str, ToolExecutionResult> {
    arguments
        .get(name)
        .and_then(|v| v.as_str())
        .map(str::trim)
        .filter(|v| !v.is_empty())
        .ok_or_else(|| {
            ToolExecutionResult::tool_error(format!("Missing required parameter: {name}"))
        })
}

fn limit(arguments: &Value) -> u32 {
    arguments
        .get("limit")
        .and_then(|v| v.as_u64())
        .map(|v| (v as u32).clamp(1, MAX_LIMIT))
        .unwrap_or(DEFAULT_LIMIT)
}

fn repo_scope(arguments: &Value) -> String {
    arguments
        .get("repos")
        .and_then(|v| v.as_array())
        .map(|repos| {
            repos
                .iter()
                .filter_map(|repo| repo.as_str())
                .map(str::trim)
                .filter(|repo| is_valid_owner_repo(repo))
                .map(|repo| format!("repo:{repo}"))
                .collect::<Vec<_>>()
                .join(" ")
        })
        .unwrap_or_default()
}

fn is_valid_owner_repo(repo: &str) -> bool {
    let mut parts = repo.split('/');
    let Some(owner) = parts.next() else {
        return false;
    };
    let Some(name) = parts.next() else {
        return false;
    };
    parts.next().is_none() && is_valid_repo_segment(owner) && is_valid_repo_segment(name)
}

fn is_valid_repo_segment(segment: &str) -> bool {
    !segment.is_empty()
        && segment != "."
        && segment != ".."
        && segment
            .bytes()
            .all(|b| b.is_ascii_alphanumeric() || matches!(b, b'-' | b'_' | b'.'))
}

fn is_valid_repo_path(path: &str) -> bool {
    let path = path.trim();
    !path.is_empty()
        && !path.starts_with('/')
        && path.split('/').all(|segment| {
            !segment.is_empty() && segment != "." && segment != ".." && !segment.contains('\\')
        })
}

fn scoped_query(query: &str, arguments: &Value) -> String {
    let scope = repo_scope(arguments);
    if scope.is_empty() {
        query.to_string()
    } else {
        format!("{query} {scope}")
    }
}

pub struct SearchGitHubCodeTool;

#[async_trait]
impl Tool for SearchGitHubCodeTool {
    fn name(&self) -> &str {
        "search_github_code"
    }

    fn description(&self) -> &str {
        "Search GitHub code. Use GitHub code search qualifiers such as repo:, path:, language:, symbol:, and filename:."
    }

    fn parameters_schema(&self) -> Value {
        json!({
            "type": "object",
            "properties": {
                "query": {
                    "type": "string",
                    "description": "GitHub code search query."
                },
                "repos": {
                    "type": "array",
                    "items": { "type": "string" },
                    "description": "Optional repositories to scope the query, in owner/repo format."
                },
                "limit": {
                    "type": "integer",
                    "description": "Maximum number of results to return (1-30, default 10).",
                    "minimum": 1,
                    "maximum": 30
                }
            },
            "required": ["query"],
            "additionalProperties": false
        })
    }

    fn hints(&self) -> ToolHints {
        ToolHints::default()
            .with_readonly(true)
            .with_idempotent(true)
            .with_open_world(true)
            .with_requires_secrets(true)
    }

    async fn execute(&self, _arguments: Value) -> ToolExecutionResult {
        ToolExecutionResult::tool_error(
            "search_github_code requires context. This tool must be executed with session context.",
        )
    }

    async fn execute_with_context(
        &self,
        arguments: Value,
        context: &ToolContext,
    ) -> ToolExecutionResult {
        let query = match required_str(&arguments, "query") {
            Ok(query) => query,
            Err(e) => return e,
        };
        if let Err(e) = enforce_github_network_access(context) {
            return e;
        }
        let token = match get_github_token(context).await {
            Ok(token) => token,
            Err(e) => return e,
        };

        let scoped_query = scoped_query(query, &arguments);
        match github_client(token)
            .search_code(&scoped_query, limit(&arguments))
            .await
        {
            Ok(response) => {
                let results: Vec<Value> = response
                    .items
                    .into_iter()
                    .map(|item| {
                        json!({
                            "repository": item.repository.full_name,
                            "path": item.path,
                            "name": item.name,
                            "sha": item.sha,
                            "url": item.html_url,
                        })
                    })
                    .collect();
                ToolExecutionResult::success(json!({
                    "query": scoped_query,
                    "total_count": response.total_count,
                    "incomplete_results": response.incomplete_results,
                    "results": results,
                }))
            }
            Err(e) => ToolExecutionResult::tool_error(e),
        }
    }

    fn requires_context(&self) -> bool {
        true
    }
}

pub struct ReadGitHubFileTool;

#[async_trait]
impl Tool for ReadGitHubFileTool {
    fn name(&self) -> &str {
        "read_github_file"
    }

    fn description(&self) -> &str {
        "Read a UTF-8 file from a GitHub repository by owner/repo, path, and optional ref."
    }

    fn parameters_schema(&self) -> Value {
        json!({
            "type": "object",
            "properties": {
                "repo": {
                    "type": "string",
                    "description": "Repository in owner/repo format."
                },
                "path": {
                    "type": "string",
                    "description": "File path inside the repository."
                },
                "ref": {
                    "type": "string",
                    "description": "Optional branch, tag, or commit SHA."
                },
                "offset": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0,
                    "description": "Zero-based line offset to start reading from"
                },
                "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "default": READ_FILE_DEFAULT_LIMIT,
                    "description": "Maximum number of lines to return"
                }
            },
            "required": ["repo", "path"],
            "additionalProperties": false
        })
    }

    fn hints(&self) -> ToolHints {
        ToolHints::default()
            .with_readonly(true)
            .with_idempotent(true)
            .with_open_world(true)
            .with_requires_secrets(true)
    }

    async fn execute(&self, _arguments: Value) -> ToolExecutionResult {
        ToolExecutionResult::tool_error(
            "read_github_file requires context. This tool must be executed with session context.",
        )
    }

    async fn execute_with_context(
        &self,
        arguments: Value,
        context: &ToolContext,
    ) -> ToolExecutionResult {
        let repo = match required_str(&arguments, "repo") {
            Ok(repo) => repo,
            Err(e) => return e,
        };
        if !is_valid_owner_repo(repo) {
            return ToolExecutionResult::tool_error(
                "Invalid repo. Expected owner/repo with alphanumeric, dot, dash, or underscore segments.",
            );
        }
        let path = match required_str(&arguments, "path") {
            Ok(path) => path,
            Err(e) => return e,
        };
        if !is_valid_repo_path(path) {
            return ToolExecutionResult::tool_error(
                "Invalid path. Expected a relative repository file path without empty, dot, or dot-dot segments.",
            );
        }
        let reference = arguments.get("ref").and_then(|v| v.as_str()).map(str::trim);
        let (offset, limit) = match parse_read_file_window_args(&arguments) {
            Ok(window) => window,
            Err(err) => return ToolExecutionResult::tool_error(err),
        };

        if let Err(e) = enforce_github_network_access(context) {
            return e;
        }
        let token = match get_github_token(context).await {
            Ok(token) => token,
            Err(e) => return e,
        };

        match github_client(token).read_file(repo, path, reference).await {
            Ok(file) => match file.decoded_content() {
                Ok(content) => {
                    let mut result = build_text_read_file_result(
                        "read_github_file",
                        &file.path,
                        &content,
                        "text",
                        offset,
                        limit,
                    );
                    result["repo"] = json!(repo);
                    result["name"] = json!(file.name);
                    result["sha"] = json!(file.sha);
                    result["url"] = json!(file.html_url);
                    result["download_url"] = json!(file.download_url);
                    ToolExecutionResult::success(result)
                }
                Err(e) => ToolExecutionResult::tool_error(e),
            },
            Err(e) => ToolExecutionResult::tool_error(e),
        }
    }

    fn requires_context(&self) -> bool {
        true
    }
}

pub struct SearchGitHubIssuesTool;

#[async_trait]
impl Tool for SearchGitHubIssuesTool {
    fn name(&self) -> &str {
        "search_github_issues"
    }

    fn description(&self) -> &str {
        "Search GitHub issues and pull requests. Use GitHub search qualifiers such as repo:, is:issue, is:pr, state:, author:, and label:."
    }

    fn parameters_schema(&self) -> Value {
        json!({
            "type": "object",
            "properties": {
                "query": {
                    "type": "string",
                    "description": "GitHub issues search query."
                },
                "repos": {
                    "type": "array",
                    "items": { "type": "string" },
                    "description": "Optional repositories to scope the query, in owner/repo format."
                },
                "limit": {
                    "type": "integer",
                    "description": "Maximum number of results to return (1-30, default 10).",
                    "minimum": 1,
                    "maximum": 30
                }
            },
            "required": ["query"],
            "additionalProperties": false
        })
    }

    fn hints(&self) -> ToolHints {
        ToolHints::default()
            .with_readonly(true)
            .with_idempotent(true)
            .with_open_world(true)
            .with_requires_secrets(true)
    }

    async fn execute(&self, _arguments: Value) -> ToolExecutionResult {
        ToolExecutionResult::tool_error(
            "search_github_issues requires context. This tool must be executed with session context.",
        )
    }

    async fn execute_with_context(
        &self,
        arguments: Value,
        context: &ToolContext,
    ) -> ToolExecutionResult {
        let query = match required_str(&arguments, "query") {
            Ok(query) => query,
            Err(e) => return e,
        };
        if let Err(e) = enforce_github_network_access(context) {
            return e;
        }
        let token = match get_github_token(context).await {
            Ok(token) => token,
            Err(e) => return e,
        };

        let scoped_query = scoped_query(query, &arguments);
        match github_client(token)
            .search_issues(&scoped_query, limit(&arguments))
            .await
        {
            Ok(response) => {
                let results: Vec<Value> = response
                    .items
                    .into_iter()
                    .map(|item| {
                        json!({
                            "number": item.number,
                            "title": item.title,
                            "state": item.state,
                            "author": item.user.map(|user| user.login),
                            "kind": if item.pull_request.is_some() { "pull_request" } else { "issue" },
                            "url": item.html_url,
                            "body": item.body.unwrap_or_default(),
                        })
                    })
                    .collect();
                ToolExecutionResult::success(json!({
                    "query": scoped_query,
                    "total_count": response.total_count,
                    "incomplete_results": response.incomplete_results,
                    "results": results,
                }))
            }
            Err(e) => ToolExecutionResult::tool_error(e),
        }
    }

    fn requires_context(&self) -> bool {
        true
    }
}

#[cfg(test)]
mod tests {
    use super::*;
    use chrono::Utc;
    use everruns_core::error::Result;
    use everruns_core::traits::{
        KeyInfo, SecretInfo, SessionStorageStore, SessionStore, UserConnectionResolver,
    };
    use everruns_core::typed_id::SessionId;
    use everruns_core::{HarnessId, PrincipalId, Session, SessionStatus};
    use std::collections::HashMap;
    use std::sync::Arc;
    use tokio::sync::Mutex;

    struct MockConnectionResolver {
        tokens: HashMap<SessionId, String>,
    }

    #[async_trait]
    impl UserConnectionResolver for MockConnectionResolver {
        async fn get_connection_token(
            &self,
            session_id: SessionId,
            provider: &str,
        ) -> Result<Option<String>> {
            assert_eq!(provider, GITHUB_CONNECTION_PROVIDER);
            Ok(self.tokens.get(&session_id).cloned())
        }
    }

    struct MockStorageStore {
        secrets: Mutex<HashMap<String, String>>,
    }

    impl MockStorageStore {
        fn new() -> Self {
            Self {
                secrets: Mutex::new(HashMap::new()),
            }
        }

        async fn seed_secret(&self, session_id: SessionId, name: &str, value: &str) {
            self.secrets
                .lock()
                .await
                .insert(format!("{session_id}:{name}"), value.to_string());
        }
    }

    #[async_trait]
    impl SessionStorageStore for MockStorageStore {
        async fn set_value(&self, _session_id: SessionId, _key: &str, _value: &str) -> Result<()> {
            Ok(())
        }
        async fn get_value(&self, _session_id: SessionId, _key: &str) -> Result<Option<String>> {
            Ok(None)
        }
        async fn delete_value(&self, _session_id: SessionId, _key: &str) -> Result<bool> {
            Ok(false)
        }
        async fn list_keys(&self, _session_id: SessionId) -> Result<Vec<KeyInfo>> {
            Ok(vec![])
        }
        async fn set_secret(&self, session_id: SessionId, name: &str, value: &str) -> Result<()> {
            self.seed_secret(session_id, name, value).await;
            Ok(())
        }
        async fn get_secret(&self, session_id: SessionId, name: &str) -> Result<Option<String>> {
            Ok(self
                .secrets
                .lock()
                .await
                .get(&format!("{session_id}:{name}"))
                .cloned())
        }
        async fn delete_secret(&self, session_id: SessionId, name: &str) -> Result<bool> {
            Ok(self
                .secrets
                .lock()
                .await
                .remove(&format!("{session_id}:{name}"))
                .is_some())
        }
        async fn list_secrets(&self, _session_id: SessionId) -> Result<Vec<SecretInfo>> {
            Ok(vec![])
        }
    }

    #[tokio::test]
    async fn token_prefers_connection_resolver() {
        let session_id = SessionId::new();
        let tokens = HashMap::from([(session_id, "connection-token".into())]);
        let context = ToolContext::new(session_id)
            .with_connection_resolver(Arc::new(MockConnectionResolver { tokens }));
        assert_eq!(
            get_github_token(&context).await.unwrap(),
            "connection-token"
        );
    }

    #[tokio::test]
    async fn token_falls_back_to_session_secret() {
        let session_id = SessionId::new();
        let storage = Arc::new(MockStorageStore::new());
        storage
            .seed_secret(session_id, GITHUB_TOKEN_SECRET, "secret-token")
            .await;
        let context = ToolContext::with_storage_store(session_id, storage);
        assert_eq!(get_github_token(&context).await.unwrap(), "secret-token");
    }

    #[tokio::test]
    async fn missing_token_returns_connection_required() {
        let context = ToolContext::new(SessionId::new());
        match get_github_token(&context).await {
            Err(ToolExecutionResult::ConnectionRequired { provider }) => {
                assert_eq!(provider, GITHUB_CONNECTION_PROVIDER)
            }
            other => panic!("expected connection required, got {other:?}"),
        }
    }

    struct MockSessionStore {
        session: Session,
    }

    #[async_trait]
    impl SessionStore for MockSessionStore {
        async fn get_session(&self, session_id: SessionId) -> Result<Option<Session>> {
            if self.session.id == session_id {
                return Ok(Some(self.session.clone()));
            }
            Ok(None)
        }
    }

    fn child_session_with_parent(session_id: SessionId, parent_session_id: SessionId) -> Session {
        Session {
            id: session_id,
            organization_id: "org_00000000000000000000000000000001".to_string(),
            harness_id: HarnessId::new(),
            agent_id: None,
            agent_version_id: None,
            agent_identity_id: None,
            owner_principal_id: PrincipalId::from_seed(1),
            resolved_owner_user_id: None,
            owner: None,
            effective_owner: None,
            title: Some("child".to_string()),
            locale: None,
            preview: None,
            output_preview: None,
            tags: vec![],
            model_id: None,
            capabilities: vec![],
            tools: vec![],
            mcp_servers: Default::default(),
            system_prompt: None,
            initial_files: vec![],
            hints: None,
            network_access: None,
            max_iterations: None,
            status: SessionStatus::Idle,
            created_at: Utc::now(),
            updated_at: Utc::now(),
            started_at: None,
            finished_at: None,
            usage: None,
            is_pinned: None,
            active_schedule_count: None,
            features: vec![],
            parent_session_id: Some(parent_session_id),
            subagent_name: None,
            subagent_task: None,
            subagent_status: None,
            blueprint_id: None,
            blueprint_config: None,
        }
    }

    // Regression: even when the session has a parent and the connection
    // resolver holds a token for the parent, the active session must not
    // fall back to the parent's GitHub credentials.
    #[tokio::test]
    async fn token_does_not_fall_back_to_parent_session_connection() {
        let session_id = SessionId::new();
        let parent_session_id = SessionId::new();
        let session = child_session_with_parent(session_id, parent_session_id);

        let context = ToolContext::new(session_id)
            .with_session_store(Arc::new(MockSessionStore { session }))
            .with_connection_resolver(Arc::new(MockConnectionResolver {
                tokens: HashMap::from([(parent_session_id, "parent-connection-token".into())]),
            }));

        match get_github_token(&context).await {
            Err(ToolExecutionResult::ConnectionRequired { provider }) => {
                assert_eq!(provider, GITHUB_CONNECTION_PROVIDER)
            }
            other => panic!("expected connection required, got {other:?}"),
        }
    }

    // Regression: same as above for the session storage secret path —
    // a secret seeded against the parent must not satisfy the child.
    #[tokio::test]
    async fn token_does_not_fall_back_to_parent_session_secret() {
        let session_id = SessionId::new();
        let parent_session_id = SessionId::new();
        let session = child_session_with_parent(session_id, parent_session_id);

        let storage = Arc::new(MockStorageStore::new());
        storage
            .seed_secret(parent_session_id, GITHUB_TOKEN_SECRET, "parent-secret")
            .await;

        let mut context = ToolContext::with_storage_store(session_id, storage);
        context = context.with_session_store(Arc::new(MockSessionStore { session }));

        match get_github_token(&context).await {
            Err(ToolExecutionResult::ConnectionRequired { provider }) => {
                assert_eq!(provider, GITHUB_CONNECTION_PROVIDER)
            }
            other => panic!("expected connection required, got {other:?}"),
        }
    }

    #[test]
    fn builds_scoped_query_from_repos() {
        let args = json!({"repos": ["owner/repo", "../bad", "acme/app"]});
        assert_eq!(
            scoped_query("auth middleware", &args),
            "auth middleware repo:owner/repo repo:acme/app"
        );
    }

    #[test]
    fn validates_owner_repo() {
        assert!(is_valid_owner_repo("owner/repo"));
        assert!(is_valid_owner_repo("owner.name/repo-name"));
        assert!(!is_valid_owner_repo("owner"));
        assert!(!is_valid_owner_repo("../repo"));
        assert!(!is_valid_owner_repo("owner/repo/extra"));
    }

    #[test]
    fn validates_repo_path() {
        assert!(is_valid_repo_path("src/lib.rs"));
        assert!(is_valid_repo_path("README.md"));
        assert!(!is_valid_repo_path(""));
        assert!(!is_valid_repo_path("/README.md"));
        assert!(!is_valid_repo_path("src//lib.rs"));
        assert!(!is_valid_repo_path("./README.md"));
        assert!(!is_valid_repo_path("../issues"));
        assert!(!is_valid_repo_path("src/../README.md"));
        assert!(!is_valid_repo_path("src\\lib.rs"));
    }
}