Revamp PR body/comments + record per-skill turns and cost#782
Merged
Revamp PR body/comments + record per-skill turns and cost#782
Conversation
Adds two capture steps that parse claude-code-action's execution log (`/home/runner/work/_temp/claude-execution-output.json`) right after each skill invocation, BEFORE the next one overwrites the shared file. Exposes `turns`, `cost_usd`, and `permission_denials` as step outputs for downstream use. Surfaces the data in two places: 1. PR body: new "Run cost" subsection inside the upstream-release- docs marker block. Per-session rows plus a Total row when both sessions reported. Applies to both pull_request and workflow_dispatch runs. 2. workflow_dispatch summary comment: adds Turns and Cost columns to the existing step table, plus a Total row summing both sessions. Useful for tracking per-release spend ($6 baseline) and catching regressions -- e.g. a release that suddenly takes 10x the turns is visible at a glance rather than requiring a drill-down into the Actions Step Summary. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Ground-up redesign of everything the workflow posts on a PR. Previous output read as three authors writing on the same page (log formatter + release notes + systems docs), with no visual hierarchy and a lot of process lore competing with actionable info. Feedback after PRs #779 and #780. Key structural shift: the PR body is the single source of truth for state. Comments are point-in-time events only. Process lore goes behind <details>. Changes: **PR body** (rewritten end-to-end) - New H2: "Docs update for <project> <tag>" replaces the process-descriptive "Content additions by upstream-release-docs". - New "At a glance" table with 6 rows: Upstream (linked compare), Hand-written changes, Reference assets, Gaps, Release contributors, Action required. Answers the 5 questions a reviewer actually asks in < 5 seconds. - Single top-of-section alert (at most one), ordered by severity: CAUTION for autogen-path drift, NOTE for NO_CHANGES.md, NOTE for silent run. Never stacked. - Autogen drift promoted from inline [!WARNING] paragraph to [!CAUTION] at the top with a bulleted revert list -- it's a merge-blocker, should look like one. - "Review guidance" paragraph deleted. The one operational claim ("reference files are auto-synced") is in the At-a-glance "Reference assets" row. - "Release contributors" section dropped when everyone got auto-assigned (GitHub's sidebar already shows them). Only rendered as "Additional release contributors" when overflow @-mentions need a target. - "Run cost" table kept visible, not buried in <details>, per request. - Process narrative ("Two Claude Opus sessions...", auto-synced paths, Helper-prompt convention) collapsed into a single <details> block at the bottom. - Compare-failure warning moved from a top-of-section [!WARNING] block into the At-a-glance "Release contributors" cell. **Bootstrap PR body** - Collapsed from two paragraphs to one line ("Manually dispatched by @x. Workflow run: ..."). Mechanism narration deleted. **Pre-skill placeholder comment** (workflow_dispatch only) - From a two-paragraph explanation + parenthetical meta-note ("this comment exists because track_progress isn't supported on workflow_dispatch") to a single line: "Generating docs for <project> <tag>... (run)". **Post-skill summary comment** (workflow_dispatch only) - Table replaced with a one-line status: "Done · 93 turns · $6.04 · run · see PR body for details". On failure, identifies which step died. Duplicative detail (conclusions, commit counts) was already in the PR body. - Dropped "Skill commits produced" row -- the at-a-glance "Hand-written changes" cell covers it. **Augmentation failure comment** - Wrapped in [!CAUTION] alert, compressed to two lines with the exact retry gh command inline (not a hand-wavy "retry via the workflow" pointer). **Autogen-touch step (`detect-autogen`)** - Now emits `touched` output (comma-separated paths) directly instead of pre-formatting a warning block. The Augment step composes the alert itself. Cleaner separation of concerns. Unchanged: reviewer assignment logic, skill prompts, autofix step, concurrency config. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
JAORMX
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two related changes to how the `upstream-release-docs` workflow communicates on PRs, bundled into one review.
1. Per-skill turns and cost (previously #781)
Parses `claude-code-action`'s execution log (`/home/runner/work/_temp/claude-execution-output.json`) right after each skill invocation, BEFORE the next one overwrites the shared file. Exposes `turns`, `cost_usd`, and `permission_denials` as step outputs and surfaces them in the PR body's new Run cost table. Baseline per-release run is around $6.
2. Reorganise PR body and comments for scannability
Rewrites everything the workflow posts on a PR. Driven by feedback after PRs #779 and #780 — the output read as three authors writing on the same page (log formatter, release-note generator, systems-internals doc), with no visual hierarchy so process lore competed with actionable info.
Structural principles
Details
` for process lore. The two-Opus-session narrative collapses by default.New PR body skeleton
Comments: simplified
Pre-skill (workflow_dispatch only) — was ~50 words, now 1 line:
Post-skill (workflow_dispatch only) — was a 5-row table, now 1 line:
On failure, flags which step died:
Augmentation-failure comment — was a retry-hint paragraph, now a `[!CAUTION]` with the exact `gh` command:
Dropped entirely
Details
`)Alerts and edge cases
Behaviour unchanged
Skill invocations, autofix step, reviewer-assignment logic, concurrency, bootstrap/retry modes. Purely additive on the stats side + presentation-layer changes to comments/body.
Validation
Once merged, the next `workflow_dispatch` or Renovate PR should produce a scannable PR body where a reviewer sees in 5 seconds: what changed, what needs them, and who else is on it. Drilling deeper (cost, process) requires one click.