Skip to content

Crane PR update comments should summarize new commits #87

@mrjf

Description

@mrjf

Problem

Crane PR update comments currently identify the pushed commit, but they do not say what the new commit did.

Example from #86:

  • Commit pushed: 10dd58f
  • Commit pushed: 5b4817b

The PR body has a useful iteration summary, but later PR update comments require reviewers to open the commit or diff to understand the new work. The comment should carry the same review-level context as the accepted iteration: what was changed, what milestone moved, and the validation/score result when available.

Desired behavior

When Crane pushes an accepted iteration commit to an existing PR, the PR update comment should include a short summary of the new commit, not only the SHA.

Suggested shape:

[bot] **Iteration 13 accepted** -- [Crane run](<run-url>)

- **Commit**: [`5b4817b`](<commit-url>)
- **Change**: Ported `internal/install/cache_pin.go` and source reference types.
- **Milestone**: Milestone 8 -- `install/` continued
- **Score**: 0.72 (best: 0.72, delta: +0.06) <!-- if available -->
- **Tests/parity**: 218/302 passing <!-- if available -->

If only a commit subject is available, include that subject. If the commit body has bullets, include up to a small bounded number of them. If the workflow also pushes a ci: trigger checks commit, ignore that commit unless it is the only new commit.

Implementation sketch

  1. Update .github/workflows/crane.md in Step 5c (Accept) so existing-PR updates explicitly require a rich PR comment.

    • Do not rely on the automatic push-to-pull-request-branch safe-output comment as the only reviewer-facing update.
    • After the branch push, emit an add-comment safe output targeted at the PR with the accepted iteration summary.
    • Keep the existing PR body update, but make the per-iteration comment mandatory and concrete.
  2. Define one shared summary source for PR body, PR comment, migration issue comment, and repo-memory history.

    • Prefer the accepted iteration summary already written to the state file / migration issue.
    • Include: iteration number, milestone/current focus, concise change summary, commit SHA, run URL, score/delta/progress/parity when available, and fix-attempt count when greater than zero.
  3. Strengthen the commit-message guidance in Step 5a so the commit contains enough structured detail to summarize later.

    • Subject remains [Crane: {migration-name}] Iteration <N>: <short description>.
    • Body should include a compact Changes: bullet list before Run: {run_url}.
    • This gives the comment generator a fallback when score/progress fields are unavailable.
  4. Bound the generated comment.

    • Keep it under roughly 10 bullets or 1,000 characters.
    • Never paste full diffs or long test logs.
    • Link to the commit and workflow run for deeper inspection.
  5. Recompile generated artifacts.

    • Run gh aw compile after editing .github/workflows/crane.md.
    • Run apm compile per repo instructions.
    • Commit the regenerated .github/workflows/crane.lock.yml and APM integration files together.

Acceptance criteria

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions