Skip to content

Fix usage summary, replace parallel plugin with sequential review - #1507

Merged
thehesiod merged 2 commits into
mainfrom
amohr/fix-usage-summary
Mar 19, 2026
Merged

Fix usage summary, replace parallel plugin with sequential review#1507
thehesiod merged 2 commits into
mainfrom
amohr/fix-usage-summary

Conversation

@thehesiod

@thehesiod thehesiod commented Mar 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

Two changes:

Fix usage-summary.py

The execution_file is a JSON array, not a single object. Now
scans for the result entry containing modelUsage,
total_cost_usd, num_turns, and duration_ms.

Sequential /review-pr command

Replace the official code-review plugin (5 parallel agents,
$2.77/review) with a forked sequential version at
.claude/commands/review-pr.md.

Same quality checks:

  • CLAUDE.md compliance
  • Bug detection with confidence scoring (>= 80 threshold)
  • False positive filtering
  • Committable suggestion blocks

Key differences:

  • Sequential instead of parallel — reuses cached context
  • Adds aiobotocore-specific async pattern checking
  • No external plugin dependency
  • Removes plugin_marketplaces/plugins from workflow

Expected cost reduction: parallel agents each load full
context independently (3.2M + 1.4M cache tokens last run).
Sequential reuses the cached context across checks.

🤖 Generated with Claude Code

The execution file is a list of messages, not a single object.
Scan the array for the entry containing modelUsage.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown

Important

Installation incomplete: to start using Gemini Code Assist, please ask the organization owner(s) to visit the Gemini Code Assist Admin Console and sign the Terms of Services.

@codecov

codecov Bot commented Mar 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.32%. Comparing base (8fca65a) to head (19918ff).
⚠️ Report is 93 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1507      +/-   ##
==========================================
+ Coverage   92.21%   93.32%   +1.10%     
==========================================
  Files          76       76              
  Lines        8233     8162      -71     
==========================================
+ Hits         7592     7617      +25     
+ Misses        641      545      -96     
Flag Coverage Δ
no-httpx 90.14% <ø> (+1.00%) ⬆️
os-ubuntu-24.04 93.32% <ø> (+1.10%) ⬆️
os-ubuntu-24.04-arm 91.35% <ø> (+1.09%) ⬆️
python-3.10 91.30% <ø> (+1.09%) ⬆️
python-3.11 91.30% <ø> (+1.09%) ⬆️
python-3.12 91.30% <ø> (+1.09%) ⬆️
python-3.13 91.30% <ø> (+1.09%) ⬆️
python-3.14 93.28% <ø> (+1.10%) ⬆️
python-3.9 91.32% <ø> (+1.09%) ⬆️
unittests 93.32% <ø> (+1.10%) ⬆️
with-awscrt 92.95% <ø> (+1.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@claude

claude Bot commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

Fork of Anthropic's code-review plugin but sequential instead
of parallel subagents. Same quality checks (CLAUDE.md compliance,
bug detection, confidence scoring, false positive filtering)
but reuses cached context instead of duplicating across 5+
parallel agents. Previous run: $2.77 for a small PR.

Also adds aiobotocore-specific async pattern checking.
Removes plugin_marketplaces and plugins from workflow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@thehesiod thehesiod changed the title Fix usage summary: parse JSON array, add turns/duration Fix usage summary, replace parallel plugin with sequential review Mar 19, 2026
@thehesiod
thehesiod merged commit 39213f4 into main Mar 19, 2026
22 checks passed
@thehesiod
thehesiod deleted the amohr/fix-usage-summary branch March 19, 2026 15:15
thehesiod added a commit that referenced this pull request Apr 19, 2026
The Claude Code GitHub Action does not auto-discover loose
.claude/commands/*.md files, so every /review-pr invocation on this
branch failed with "Commands are in the form \`/command [args]\`" —
every Claude CI run returning in 0s without actually reviewing the
PR. This packages the commands as a Claude Code plugin the action
can register explicitly.

Structure (mirrors Anthropic's own plugins/code-review/ layout):

  .claude-plugin/marketplace.json       # marketplace declaration
  plugins/aiobotocore-bot/
    .claude-plugin/plugin.json          # plugin manifest
    README.md
    commands/
      review-pr.md                      # moved from .claude/commands/
      analyze-pr-feedback.md            # moved from .claude/commands/

Workflow change in .github/workflows/claude.yml:

    plugin_marketplaces: ./.
    plugins: aiobotocore-bot@aiobotocore

Uses a local filesystem path (repo root) rather than a git URL, made
possible by anthropics/claude-code-action#761. This matters because
the action installs from the checked-out working tree, so PR branches
test their own plugin edits in their own CI run — same property as
the envsubst-from-worktree behavior for the prompt templates.

Commands become namespaced (per Claude Code plugin convention):

  /review-pr            → /aiobotocore-bot:review-pr
  /analyze-pr-feedback  → /aiobotocore-bot:analyze-pr-feedback

Also adopts structural improvements from the official code-review
plugin: allowed-tools: frontmatter restricting each command's tool
surface, agent-assumptions statement. We keep our sequential review
loop (cost constraint from #1507) and our aiobotocore-specific async
pattern check rather than switching to the official parallel flow.

Updates .github/claude-review-prompt.md and docs/ai-workflows.md to
reference the new paths and namespaced commands. No change to
botocore-sync.yml — it does not use either slash command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant