Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 3 additions & 8 deletions actions/setup/js/push_repo_memory.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,8 @@ async function main() {

// Validate file name patterns if filter is set
if (fileGlobFilter) {
const patterns = fileGlobFilter
.trim()
.split(/\s+/)
.filter(Boolean)
.map(pattern => globPatternToRegex(pattern));
const patternStrs = fileGlobFilter.trim().split(/\s+/).filter(Boolean);
const patterns = patternStrs.map(pattern => globPatternToRegex(pattern));

// Test patterns against the relative file path within the memory directory
// Patterns are specified relative to the memory artifact directory, not the branch path
Expand All @@ -212,8 +209,7 @@ async function main() {

const matchResults = patterns.map((pattern, idx) => {
const matches = pattern.test(normalizedRelPath);
const patternStr = fileGlobFilter.trim().split(/\s+/).filter(Boolean)[idx];
core.debug(` Pattern ${idx + 1}: "${patternStr}" -> ${pattern.source} -> ${matches ? "✓ MATCH" : "✗ NO MATCH"}`);
core.debug(` Pattern ${idx + 1}: "${patternStrs[idx]}" -> ${pattern.source} -> ${matches ? "✓ MATCH" : "✗ NO MATCH"}`);
return matches;
});

Expand All @@ -222,7 +218,6 @@ async function main() {
core.warning(`Skipping file that does not match allowed patterns: ${normalizedRelPath}`);
core.info(` File path being tested (relative to artifact): ${normalizedRelPath}`);
core.info(` Configured patterns: ${fileGlobFilter}`);
const patternStrs = fileGlobFilter.trim().split(/\s+/).filter(Boolean);
patterns.forEach((pattern, idx) => {
core.info(` Pattern: "${patternStrs[idx]}" -> Regex: ${pattern.source} -> ${matchResults[idx] ? "✅ MATCH" : "❌ NO MATCH"}`);
});
Expand Down
43 changes: 16 additions & 27 deletions pkg/cli/gateway_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -617,39 +617,28 @@ func renderGatewayMetricsTable(metrics *GatewayMetrics, verbose bool) string {
if server.RequestCount > 0 {
avgTime = server.TotalDuration / float64(server.RequestCount)
}
row := []string{
serverName,
strconv.Itoa(server.RequestCount),
strconv.Itoa(server.ToolCallCount),
fmt.Sprintf("%.0fms", avgTime),
strconv.Itoa(server.ErrorCount),
}
if hasFiltered {
serverRows = append(serverRows, []string{
serverName,
strconv.Itoa(server.RequestCount),
strconv.Itoa(server.ToolCallCount),
fmt.Sprintf("%.0fms", avgTime),
strconv.Itoa(server.ErrorCount),
strconv.Itoa(server.FilteredCount),
})
} else {
serverRows = append(serverRows, []string{
serverName,
strconv.Itoa(server.RequestCount),
strconv.Itoa(server.ToolCallCount),
fmt.Sprintf("%.0fms", avgTime),
strconv.Itoa(server.ErrorCount),
})
row = append(row, strconv.Itoa(server.FilteredCount))
}
serverRows = append(serverRows, row)
}

headers := []string{"Server", "Requests", "Tool Calls", "Avg Time", "Errors"}
if hasFiltered {
output.WriteString(console.RenderTable(console.TableConfig{
Title: "Server Usage",
Headers: []string{"Server", "Requests", "Tool Calls", "Avg Time", "Errors", "Filtered"},
Rows: serverRows,
}))
} else {
output.WriteString(console.RenderTable(console.TableConfig{
Title: "Server Usage",
Headers: []string{"Server", "Requests", "Tool Calls", "Avg Time", "Errors"},
Rows: serverRows,
}))
headers = append(headers, "Filtered")
}
Comment on lines +620 to 636
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The refactor changes how the “Filtered” column and headers are constructed when metrics.TotalFiltered > 0, but there doesn’t appear to be a unit test that asserts the rendered table includes the Filtered header and the per-server filtered counts. Adding a test case with TotalFiltered > 0 (and a server with FilteredCount) would help prevent regressions in column alignment/output formatting.

Copilot uses AI. Check for mistakes.
output.WriteString(console.RenderTable(console.TableConfig{
Title: "Server Usage",
Headers: headers,
Rows: serverRows,
}))
}

// DIFC filtered events table
Expand Down
Loading