Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
6f62cb5
Initial plan
Copilot Aug 13, 2025
11b9f46
Implement Codex token counting summing logic
Copilot Aug 13, 2025
fa4c1d6
Implement engine-specific log parsing with ParseLogMetrics interface …
Copilot Aug 13, 2025
b1ad325
Merge branch 'main' into copilot/fix-24
dsyme Aug 13, 2025
0e12aeb
Refactor engine detection to use registry iteration and fix engine-sp…
Copilot Aug 13, 2025
43f15b6
Add aw_info.json generation and upload for agentic run metadata
Copilot Aug 13, 2025
5719320
Remove GetFilenamePatterns and DetectFromContent methods, simplify en…
Copilot Aug 13, 2025
4f8049b
Address code review feedback: simplify engine detection, remove fallb…
Copilot Aug 13, 2025
0e5e320
Complete singleton registry pattern implementation across all components
Copilot Aug 13, 2025
5da90ba
Enhance engine extraction from aw_info.json to support nested directo…
pelikhan Aug 13, 2025
76cff0a
Refactor log metrics handling: remove duration extraction from logs, …
pelikhan Aug 13, 2025
1b33200
Refactor log metrics handling: remove duration extraction from logs, …
pelikhan Aug 13, 2025
217f5e6
Refactor workflow run filtering: restrict to only .lock.yml workflows…
pelikhan Aug 13, 2025
af55469
Enhance workflow log fetching: increase batch sizes for agentic workf…
pelikhan Aug 13, 2025
2140de3
Enhance log metrics parsing: add JSON array support and improve error…
pelikhan Aug 13, 2025
9e62f39
Add formatNumber function and corresponding tests for human-readable …
pelikhan Aug 13, 2025
0423a46
Merge remote-tracking branch 'origin/main' into copilot/fix-24
pelikhan Aug 13, 2025
eb86f1f
Enhance GitHub Actions workflow: add agentic run info generation and …
pelikhan Aug 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/issue-triage.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions .github/workflows/test-claude.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions .github/workflows/test-codex.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions .github/workflows/weekly-research.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,15 +258,16 @@ gh aw logs -o ./workflow-logs
**Workflow Logs Features:**

- **Automated Download**: Downloads logs and artifacts from GitHub Actions
- **Metrics Analysis**: Extracts execution time, token usage, and cost information
- **Metrics Analysis**: Extracts token usage and cost information from log files
- **GitHub API Timing**: Uses GitHub API timestamps for accurate duration calculation
- **Aggregated Reporting**: Provides summary statistics across multiple runs
- **Flexible Filtering**: Filter by date range and limit number of runs
- **Cost Tracking**: Analyzes AI model usage costs when available
- **Custom Output**: Specify custom output directory for organized storage

**Log Analysis Includes:**
- Execution duration and performance metrics
- AI model token consumption and costs
- Execution duration from GitHub API timestamps (CreatedAt, StartedAt, UpdatedAt)
- AI model token consumption and costs extracted from engine-specific logs
- Success/failure rates and error patterns
- Workflow run frequency and patterns
- Artifact and log file organization
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func ListWorkflows(verbose bool) error {
// listAgenticEngines lists all available agentic engines with their characteristics
func listAgenticEngines(verbose bool) error {
// Create an engine registry directly to access the engines
registry := workflow.NewEngineRegistry()
registry := workflow.GetGlobalEngineRegistry()

// Get all supported engines from the registry
engines := registry.GetSupportedEngines()
Expand Down
32 changes: 28 additions & 4 deletions pkg/cli/compile_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,24 @@ import (
"github.com/creack/pty"
)

// copyFile copies a file from src to dst
func copyFile(src, dst string) error {
sourceFile, err := os.Open(src)
if err != nil {
return err
}
defer sourceFile.Close()

destFile, err := os.Create(dst)
if err != nil {
return err
}
defer destFile.Close()

_, err = io.Copy(destFile, sourceFile)
return err
}

// integrationTestSetup holds the setup state for integration tests
type integrationTestSetup struct {
tempDir string
Expand Down Expand Up @@ -44,16 +62,22 @@ func setupIntegrationTest(t *testing.T) *integrationTestSetup {

// Build the gh-aw binary
binaryPath := filepath.Join(tempDir, "gh-aw")
buildCmd := exec.Command("make")
projectRoot := filepath.Join(originalWd, "..", "..")
buildCmd := exec.Command("make", "build")
buildCmd.Dir = projectRoot
buildCmd.Stderr = os.Stderr
if err := buildCmd.Run(); err != nil {
t.Fatalf("Failed to build gh-aw binary: %v", err)
}
// move binary to temp directory
if err := os.Rename(filepath.Join(projectRoot, "gh-aw"), binaryPath); err != nil {
t.Fatalf("Failed to move gh-aw binary to temp directory: %v", err)

// Copy binary to temp directory (use copy instead of move to avoid cross-device link issues)
srcBinary := filepath.Join(projectRoot, "gh-aw")
if err := copyFile(srcBinary, binaryPath); err != nil {
t.Fatalf("Failed to copy gh-aw binary to temp directory: %v", err)
}
// Make the binary executable
if err := os.Chmod(binaryPath, 0755); err != nil {
t.Fatalf("Failed to make binary executable: %v", err)
}

// Create .github/workflows directory
Expand Down
24 changes: 22 additions & 2 deletions pkg/cli/gitroot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,30 @@ import (
)

func TestFindGitRoot(t *testing.T) {
// This should work in the current workspace since it's a git repo
// Save current directory
originalWd, err := os.Getwd()
if err != nil {
t.Fatalf("Failed to get current working directory: %v", err)
}

// Try to find the git root from current location
root, err := findGitRoot()
if err != nil {
t.Fatalf("Expected to find git root, but got error: %v", err)
// If we're not in a git repository, try changing to the project root
// This handles cases where tests are run from outside the git repo
projectRoot := filepath.Join(originalWd, "..", "..")
if err := os.Chdir(projectRoot); err != nil {
t.Skipf("Cannot find git root and cannot change to project root: %v", err)
}
defer func() {
_ = os.Chdir(originalWd) // Best effort restoration
}()

// Try again from project root
root, err = findGitRoot()
if err != nil {
t.Skipf("Expected to find git root, but got error: %v", err)
}
}

if root == "" {
Expand Down
Loading