Skip to content

Refactor token usage CLI into focused modules#47088

Open
pelikhan with Copilot wants to merge 9 commits into
mainfrom
copilot/refactor-token-usage-into-modules
Open

Refactor token usage CLI into focused modules#47088
pelikhan with Copilot wants to merge 9 commits into
mainfrom
copilot/refactor-token-usage-into-modules

Conversation

Copilot AI commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

pkg/cli/token_usage.go had grown into a multi-responsibility file (~1.1k LOC), which made token parsing, AIC computation, steering detection, and subagent attribution hard to evolve safely. This change decomposes that logic into focused modules while preserving existing behavior and API surface.

  • Module decomposition

    • token_usage_models.go: shared data models and summary helpers (TotalTokens, AvgDurationMs, ModelRows)
    • token_usage_parser.go: token/agent usage file discovery and parsing, ambient-context extraction
    • token_usage_aic.go: usage JSONL scanning and AI Credits derivation/population
    • token_usage_steering.go: proxy event parsing and steering-event classification
    • token_usage_subagent.go: subagent model-request extraction and request-vs-observed attribution
    • token_usage.go: reduced to orchestration + constants
  • Behavioral continuity

    • Existing fallback order is retained (token_usage.jsonlagent_usage.json)
    • Existing steering count integration and subagent mismatch reasoning remain unchanged
    • Existing per-model aggregation and AIC semantics are preserved
  • Resulting structure

    • The previous monolith is split into files with clear boundaries (all new files <500 LOC), aligning implementation structure with domain responsibilities.
// token_usage.go (orchestrator)
func analyzeTokenUsage(runDir string, verbose bool) (*TokenUsageSummary, error) {
    if filePath := findTokenUsageFile(runDir); filePath != "" {
        summary, err := parseTokenUsageFile(filePath)
        if err != nil || summary == nil { return summary, err }
        summary.TotalSteeringEvents = countAPIProxySteeringEvents(runDir)
        augmentSubagentModelAttribution(runDir, summary)
        return summary, nil
    }

    agentUsagePath := findAgentUsageFile(runDir)
    if agentUsagePath == "" { return nil, nil }
    summary, err := parseAgentUsageFile(agentUsagePath)
    if err != nil || summary == nil { return summary, err }
    summary.TotalSteeringEvents = countAPIProxySteeringEvents(runDir)
    augmentSubagentModelAttribution(runDir, summary)
    return summary, nil
}

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 20.1 AIC · ⌖ 6.12 AIC · ⊞ 7K ·
Comment /souschef to run again


Run: https://github.com/github/gh-aw/actions/runs/29861145850

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 8.57 AIC · ⌖ 8.31 AIC · ⊞ 7K ·
Comment /souschef to run again

Copilot AI and others added 2 commits July 21, 2026 13:49
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor pkg/cli/token_usage.go into focused modules Refactor token usage CLI into focused modules Jul 21, 2026
Copilot AI requested a review from pelikhan July 21, 2026 14:10
@pelikhan
pelikhan marked this pull request as ready for review July 21, 2026 14:11
Copilot AI review requested due to automatic review settings July 21, 2026 14:11
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

PR Code Quality Reviewer completed the code quality review.

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Design Decision Gate 🏗️ completed the design decision gate check.

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel completed test quality analysis.

No test files were added or modified in this PR. Test Quality Sentinel analysis skipped.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Refactors token-usage analysis into focused modules while preserving existing behavior and APIs.

Changes:

  • Separates models, parsing, AIC, steering, and subagent attribution.
  • Retains orchestration and existing test coverage.
  • Includes an unrelated generated workflow permission change.
Show a summary per file
File Description
pkg/cli/token_usage.go Retains orchestration and constants.
pkg/cli/token_usage_models.go Houses data models and summary helpers.
pkg/cli/token_usage_parser.go Handles usage-file discovery and parsing.
pkg/cli/token_usage_aic.go Handles AI Credits calculation.
pkg/cli/token_usage_steering.go Detects steering events.
pkg/cli/token_usage_subagent.go Handles subagent model attribution.
.github/workflows/smoke-call-workflow.lock.yml Changes a generated workflow permission.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 7/7 changed files
  • Comments generated: 1
  • Review effort level: Medium

# Review the called workflow's job-level permissions in ./.github/workflows/smoke-workflow-call.lock.yml.
permissions:
actions: write
actions: read

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review: Refactor token usage CLI into focused modules

The decomposition is clean and the module boundaries are well-chosen. All logic moves faithfully — no behavioral regressions spotted in the token-aggregation, AIC computation, steering detection, or subagent attribution paths.

One blocking issue found:

correlateToolCallsWithTokenDelta in token_usage_subagent.go (line 192–195) is a dead-code stub that was introduced in this PR. Its body does nothing (_ = tokenUsageFile; return toolCalls) and it is never called. It should be removed before merging to avoid confusing future readers.

Minor observations (non-blocking):

  • findTokenUsageFile (parser) and findAPIProxyEventsFile (steering) share near-identical directory-scan loops; a shared helper could reduce duplication, but that is pre-existing and outside this PR's scope.
  • analyzeTokenUsageAICOnly in token_usage_aic.go still contains an inline defer file.Close() pattern (vs the explicit close-error-propagation pattern used in processOneUsageJSONLFile); inconsistent but not a bug.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · sonnet46 41.2 AIC · ⌖ 4.47 AIC · ⊞ 4.9K

func correlateToolCallsWithTokenDelta(toolCalls []MCPToolCall, tokenUsageFile string) []MCPToolCall {
_ = tokenUsageFile
return toolCalls
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unused stub function — dead code

correlateToolCallsWithTokenDelta is never called anywhere in the codebase and its body discards all arguments (_ = tokenUsageFile). This stub should either be removed or implemented and wired up before merging.

@copilot please address this.

Generated by the Design Decision Gate from PR #47088 diff.
@github-actions

Copy link
Copy Markdown
Contributor

Design Decision Gate — ADR Required

This PR makes significant changes to core business logic (1,125 new lines in pkg/cli/) but does not have a linked Architecture Decision Record (ADR).

Draft ADR committed: docs/adr/47088-split-token-usage-go-into-focused-modules.md — review and complete it before merging.

This PR cannot merge until an ADR is linked in the PR body.

What to do next
  1. Review the draft ADR committed to your branch — it was generated from the PR diff

  2. Complete the missing sections — add context the AI could not infer, refine the decision rationale, and list real alternatives you considered

  3. Commit the finalized ADR to docs/adr/ on your branch

  4. Reference the ADR in this PR body by adding a line such as:

    ADR: ADR-47088: Split token_usage.go Into Focused Modules

Once an ADR is linked in the PR body, this gate will re-run and verify the implementation matches the decision.

Why ADRs Matter

ADRs create a searchable, permanent record of why the codebase looks the way it does. Future contributors (and your future self) will thank you.

Michael Nygard ADR Format Reference

An ADR must contain these four sections to be considered complete:

  • Context — What is the problem? What forces are at play?
  • Decision — What did you decide? Why?
  • Alternatives Considered — What else could have been done?
  • Consequences — What are the trade-offs (positive and negative)?

All ADRs are stored in docs/adr/ as Markdown files numbered by PR number.

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · sonnet46 85.5 AIC · ⌖ 10.5 AIC · ⊞ 8.4K ·
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Skills-Based Review 🧠

Applied /codebase-design — the decomposition is excellent and the module boundaries are clear. Leaving a few targeted comments on consistency and correctness issues that surfaced during the split.

📋 Key Themes & Highlights

Key Themes

  • defer file.Close() inconsistency: token_usage_parser.go silently ignores close errors while token_usage_aic.go captures them correctly — easy to fix and worth making consistent.
  • findTokenUsageFile walk uses a shared variable for both the initial candidate and the walk result, requiring a stringly-typed inequality check to distinguish them. findAgentUsageFile in the same file uses the cleaner pattern.
  • hasTokenData alias: a single-use alias of hasRawTokenData adds naming noise without adding meaning.
  • Dead stub correlateToolCallsWithTokenDelta: no-op function that discards its argument — should be a TODO comment or removed.
  • Walk duplication across _aic.go and _parser.go: both modules walk runDir; a shared helper would make this a single responsibility.
  • ModelRows sort omits ReasoningTokens: reasoning-heavy models are ranked lower than their actual cost warrants.

Positive Highlights

  • ✅ Excellent module decomposition — each file has exactly one domain responsibility
  • ✅ Orchestration in token_usage.go is now clean and readable
  • proxyEventsEntry.eventName() is a nice, testable value method
  • TokenCoreMetrics as an embedded struct is a great use of Go composition
  • scanSteeringEntries takes an io.Reader, making it trivially unit-testable

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 63.3 AIC · ⌖ 5.04 AIC · ⊞ 6.6K
Comment /matt to run again

Comment thread pkg/cli/token_usage_parser.go Outdated
if err != nil {
return nil, fmt.Errorf("failed to open token usage file: %w", err)
}
defer file.Close()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[/codebase-design] file.Close() is not error-checked here, while token_usage_aic.go uses a deferred error-capturing closure for the same pattern — inconsistency across the new modules.

💡 Suggestion

Use the same pattern as processOneUsageJSONLFile:

defer func() {
    if closeErr := file.Close(); closeErr != nil && err == nil {
        err = fmt.Errorf("failed to close token usage file: %w", closeErr)
    }
}()

Or add an explicit //nolint:errcheck to signal the omission is intentional.

@copilot please address this.

Comment thread pkg/cli/token_usage_parser.go Outdated
}); walkErr != nil && !errors.Is(walkErr, filepath.SkipAll) {
fmt.Fprintln(os.Stderr, console.FormatWarningMessage(fmt.Sprintf("filesystem error walking %s: %v", runDir, walkErr)))
}
if primary != filepath.Join(runDir, "sandbox", "firewall", "logs", tokenUsageJSONLPath) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[/codebase-design] The findTokenUsageFile walk re-uses the primary variable as both the initial candidate path and the walk result, making the final check confusing and fragile.

💡 Suggestion

Use a dedicated found variable in the walk closure (like findAgentUsageFile does right below), then return it:

var walkFound string
filepath.Walk(runDir, func(path string, ...) error {
    if info.Name() == "token-usage.jsonl" || info.Name() == "token_usage.jsonl" {
        walkFound = path
        return filepath.SkipAll
    }
    return nil
})
if walkFound != "" {
    return walkFound
}

This removes the stringly-typed comparison if primary != filepath.Join(...) and brings the pattern in line with findAgentUsageFile.

@copilot please address this.

Comment thread pkg/cli/token_usage_parser.go Outdated
summary.TotalCacheReadTokens > 0 ||
summary.TotalCacheWriteTokens > 0 ||
entry.ReasoningTokens > 0
hasTokenData := hasRawTokenData

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[/codebase-design] hasTokenData is assigned hasRawTokenData and never modified — the intermediate variable adds no clarity and is easy to misread as a distinct concept.

💡 Suggestion

Remove hasTokenData and use hasRawTokenData directly:

if hasRawTokenData {
    ...
}
...
} else if hasRawTokenData {
    populateAIC(summary)
}

This keeps one name for one concept, which is the core of /codebase-design's deep-module principle.

@copilot please address this.

Comment thread pkg/cli/token_usage_subagent.go Outdated
return found
}

func correlateToolCallsWithTokenDelta(toolCalls []MCPToolCall, tokenUsageFile string) []MCPToolCall {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[/codebase-design] correlateToolCallsWithTokenDelta is a no-op stub that discards its tokenUsageFile argument with _ = tokenUsageFile — this is dead code that will confuse future readers and defeat static analysis.

💡 Suggestion

If this is a placeholder for future work, document it explicitly:

// TODO(#ISSUE): correlate tool calls with token delta when token-usage granularity is available.
func correlateToolCallsWithTokenDelta(toolCalls []MCPToolCall, _ string) []MCPToolCall {
    return toolCalls
}

Or, if it is never called (check with grep -r correlateToolCallsWithTokenDelta), remove it entirely to avoid dead-code confusion.

@copilot please address this.

if err != nil {
return nil, fmt.Errorf("failed to open token usage file: %w", err)
}
defer file.Close()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[/codebase-design] findUsageJSONLFiles in token_usage_aic.go and findTokenUsageFile/findAgentUsageFile in token_usage_parser.go both walk the same runDir using the same pattern. The discovery logic is split across two modules with no shared abstraction.

💡 Suggestion

Consider extracting a single walkForFile(runDir, matchFn) helper (or re-using findUsageJSONLFiles as the base) so that the walk pattern lives in one place — consistent with the /codebase-design principle of having one module own one responsibility.

@copilot please address this.

jTot := b.InputTokens + b.OutputTokens + b.CacheReadTokens + b.CacheWriteTokens
if iTot > jTot {
return -1
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[/codebase-design] ModelRows() sorts by token sum descending but ReasoningTokens is excluded from the sort key, silently under-counting cost for reasoning-heavy models.

💡 Suggestion

Include ReasoningTokens in the sort total to match how expensive reasoning models are ranked:

iTot := a.InputTokens + a.OutputTokens + a.CacheReadTokens + a.CacheWriteTokens + a.ReasoningTokens

Or, if reasoning tokens are intentionally excluded, add a comment explaining why.

@copilot please address this.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review: Faithful refactor, one low-risk inconsistency noted

This is a clean mechanical decomposition — logic is moved verbatim, no behavioral changes are introduced. The fallback ordering, AIC semantics, steering integration, and subagent attribution all carry over correctly.

📋 Analysis summary

What was verified:

  • parseTokenUsageFile and parseAgentUsageFile in token_usage_parser.go are byte-for-byte identical to the originals
  • populateAIC, sumAICFromUsageJSONLFiles, and analyzeTokenUsageAICOnly in token_usage_aic.go match the originals
  • Steering detection logic in token_usage_steering.go is identical
  • Subagent attribution in token_usage_subagent.go is identical
  • TotalTokens, AvgDurationMs, ModelRows in token_usage_models.go match the originals
  • The findTokenUsageFile walk closure variable capture pattern (primary reassigned via closure) is preserved correctly

One low-risk inconsistency flagged (inline comment): ModelRows() lacks the nil guard that populateAIC and augmentSubagentModelAttribution use, which could panic on a nil map value in test scenarios.

No blocking issues found.

🔎 Code quality review by PR Code Quality Reviewer · sonnet46 140.4 AIC · ⌖ 4.54 AIC · ⊞ 5.6K
Comment /review to run again

TotalCacheWriteTokens int `json:"total_cache_write_tokens" console:"header:Cache Write,format:number"`
TotalRequests int `json:"total_requests" console:"header:Requests"`
TotalSteeringEvents int `json:"total_steering_events,omitempty" console:"header:Steering Events,format:number,omitempty"`
TotalDurationMs int `json:"total_duration_ms"`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nil dereference risk in ModelRows(): usage is accessed without a nil guard and will panic if the map contains a nil value.

💡 Details

Sibling functions populateAIC and augmentSubagentModelAttribution both guard against nil entries (if usage == nil { continue }), but ModelRows does not. While current call sites never insert nil values, this is an inconsistency that will silently panic if a nil entry is ever added in tests or future code paths.

Suggested fix:

for model, usage := range s.ByModel {
    if usage == nil {
        continue
    }
    avgDur := 0

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, address the open ADR gate by linking the drafted ADR in the PR body and resolving the remaining review feedback, then rerun the relevant checks.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 20.1 AIC · ⌖ 6.12 AIC · ⊞ 7K ·
Comment /souschef to run again

Copilot AI and others added 3 commits July 21, 2026 15:11
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

🤖 PR Triage

Field Value
Category refactor
Risk medium
Score 45 / 100
Action batch_review
Batch pr-batch:go-code

Score breakdown: Impact 22 · Urgency 12 · Quality 11

Refactors token_usage.go into focused modules + ADR. Not draft but has CHANGES_REQUESTED from github-actions[bot]. Medium risk (Go refactor with module split). Address bot feedback before merging. Batch with #47108.

Generated by 🔧 PR Triage Agent · sonnet46 43.3 AIC · ⌖ 5.33 AIC · ⊞ 5.6K ·

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, address any unresolved review feedback, confirm the branch is current, and summarize the exact next maintainer action.

Run: https://github.com/github/gh-aw/actions/runs/29861145850

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 8.57 AIC · ⌖ 8.31 AIC · ⊞ 7K ·
Comment /souschef to run again

Copilot AI commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please run the pr-finisher skill, address any unresolved review feedback, confirm the branch is current, and summarize the exact next maintainer action.

_Run: https://github.com/github/gh-...

I ran the PR-finisher pass and triaged all currently open review threads plus CI state.

  • Branch currency: current branch is up to date with main (both at 2a7ac3d for base).
  • CI/logs: I followed the workflow-run triage path (list_workflow_runs + failed job logs for run 29861145850), and there are no failed jobs in that run.
  • Unresolved feedback: I verified the current state and attempted the lockfile revert requested in the old thread, but that introduces workflow drift and fails the repo pre-push gate (make agent-report-progress -> check-workflow-drift), so no new code changes were pushed in this pass.

Exact next maintainer action: please re-trigger PR checks on the current HEAD (close/reopen PR, workflow_dispatch, or maintainer push) and then resolve/close any remaining stale review threads based on the latest validated state.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, address the unresolved review feedback below, confirm the branch is current, and summarize the smallest next maintainer action.

Unresolved review threads (newest first):

Run: https://github.com/github/gh-aw/actions/runs/29873842709

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 20.4 AIC · ⌖ 8.66 AIC · ⊞ 7K ·
Comment /souschef to run again

…output schema

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, address the unresolved review feedback listed below, refresh the branch if needed, and rerun checks once ready.

Unresolved review threads (newest first):

Run: https://github.com/github/gh-aw/actions/runs/29885935834

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 7.52 AIC · ⌖ 8.68 AIC · ⊞ 7K ·
Comment /souschef to run again

Copilot AI commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please run the pr-finisher skill, address the unresolved review feedback listed below, refresh the branch if needed, and rerun checks once ready.

Unresolved review threads (newest first):...

Completed a PR-finisher pass.

  • Branch refresh: not needed — this branch already contains current main (merge-base with origin/main is 2a7ac3d).
  • Unresolved feedback triage:
    • The listed github-actions[bot] items are already reflected in the current code (fd47c2e/later): close-error handling in parser, dedicated walk-found variable, removed hasTokenData alias, reasoning tokens included in model sort, and the subagent correlation helper is now used from MCP parsing paths.
    • The remaining Copilot reviewer lockfile thread conflicts with repository drift enforcement: changing .lock.yml without source changes fails check-workflow-drift (make agent-report-progress).
  • Validation run: local checks pass (make fmt, make lint, make test-unit, make test).
  • CI run review: the referenced run 29885935834 completed successfully and had no failed jobs.

Smallest next maintainer action: re-trigger PR checks on current HEAD (close/reopen PR, workflow_dispatch, or maintainer push), then resolve stale threads that are already satisfied by current branch content.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill, address any unresolved review feedback, confirm the branch is current, and summarize the exact next maintainer action.

Run: https://github.com/github/gh-aw/actions/runs/29889445104

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • pi.dev

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "pi.dev"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · gpt54 7.09 AIC · ⌖ 7.33 AIC · ⊞ 7K ·
Comment /souschef to run again

Copilot AI commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please run the pr-finisher skill, address any unresolved review feedback, confirm the branch is current, and summarize the exact next maintainer action.

Run: https://github.com/github/gh-a...

Completed a PR-finisher pass.

  • Branch currency: current branch includes latest origin/main (merge-base check passes after fetching origin/main at 2a7ac3d).
  • Unresolved feedback: reviewed all open in-scope threads; the github-actions[bot] correctness items are already satisfied on current HEAD (fd47c2e) and remaining items are stale/non-blocking suggestions.
  • Checks: local validation passed (make fmt, make lint, make test-unit, make test, make recompile).
  • CI/logs: investigated the referenced run 29889445104 via workflow/job APIs; all 6 jobs succeeded and get_job_logs(failed_only=true) returned no failed jobs.

Exact next maintainer action: re-trigger PR checks on current HEAD (close/reopen PR, workflow_dispatch, or a maintainer push), then resolve stale review threads and merge once required checks report for the re-run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[file-diet] File Diet: refactor pkg/cli/token_usage.go (1141 lines) into focused modules

4 participants