Commit 7c6b5c6
fix: validate agentDir is a directory and use dynamic label in checkDir logs
- Guard against findArtifactDir returning a file path: check os.Stat IsDir()
before probing for audit files inside the agent artifact directory
- Derive log labels from filepath.Base(agentDir) so debug output reflects
the actual on-disk name (agent-artifacts, abc123-agent, etc.) instead of
the hardcoded "agent/..." string
- Add test: file named "agent" does not panic or falsely match
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/5534ec16-9018-4e51-8a41-c13438eecaf6
Co-authored-by: pelikhan <[email protected]>1 parent e7dba46 commit 7c6b5c6
2 files changed
Lines changed: 26 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
455 | 461 | | |
456 | 462 | | |
457 | 463 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
655 | 655 | | |
656 | 656 | | |
657 | 657 | | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
658 | 669 | | |
659 | 670 | | |
660 | 671 | | |
| |||
0 commit comments