Skip to content

feat(ci): automated bug retro checklist on issue close #819

Closed

Description

@diberry

Problem Statement

When bugs are fixed and their issues closed, there is no systematic process to ask "why did this escape CI?" and "what should we change to prevent this class of bug?" Retros happen ad-hoc (if at all), and the lessons learned are lost. The casting/upgrade drift bug (#817) and SDK compatibility gap (#818) were both discovered by Brady during insiders testing — not by CI, not by code review, and not by automated tests.

Background

Requirements

FR-1: Bug Retro Checklist on Issue Close

When a bug-labeled issue is closed, automatically post a retro checklist comment.

Acceptance criteria:

  • GitHub Actions workflow triggers on issues.closed where label includes bug
  • Posts a comment with retro checklist (see template below)
  • Skippable — checklist says "Skip if trivial (cosmetic/typo)"
  • Does NOT trigger on non-bug issues

FR-2: Retro Checklist Template

The comment should include:
``

🔄 Bug Retro Checklist

  • Why did this escape CI? (missing test? untested code path? mock hid it?)
  • Test added that would have caught it? (link PR)
  • Is this a class of bug? (could the same pattern exist elsewhere?)
  • CI/review change needed? (new lint rule? workflow gate? PR template checkbox?)
  • Retro complete — check when all above are addressed or skipped

Auto-generated for closed bugs. Skip if trivial (cosmetic/typo). Uncheck "Retro complete" to reopen the retro.
``

FR-3: Severity-Based Retro Depth (Future)

Optional enhancement: use labels to determine retro depth.

Acceptance criteria:

  • bug + severity:critical or security → full retro (all 4 questions mandatory)
  • bug alone → lightweight retro (checklist, skippable)
  • bug + cosmetic or typo → no retro posted

FR-4: Retro Tracking Dashboard (Future)

Track retro completion rates.

Acceptance criteria:

  • Script or query that finds closed bug issues where "Retro complete" is unchecked
  • Weekly summary of retro completion rate
  • Stale retro reminder after 7 days unchecked

FR-5: Smart Pre-Fill via Copilot Skill (Future)

A Squad skill that reads the fix PR diff and pre-fills retro answers.

Acceptance criteria:

  • Skill reads the linked PR's diff
  • Identifies if a test was added (yes/no + file path)
  • Identifies the bug category (mock-hidden, untested path, race condition, etc.)
  • Pre-fills checklist with suggested answers
  • Human reviews and confirms/edits

Non-Functional Requirements

NFR-1: Zero Noise for Trivial Bugs

The checklist must not create toil for typo/cosmetic fixes. Clear skip guidance.

NFR-2: No Mandatory Gating

Retro is advisory, not blocking. Closing an issue doesn't require completing the retro.

NFR-3: Works with @copilot PRs

When @copilot closes a bug issue via PR, the retro checklist still posts. The human reviewer should complete it.

Design Decisions

DD-1: Comment, Not Issue

Post as a comment on the closed issue, not as a new issue. Keeps context together.

DD-2: Checklist, Not Form

GitHub issue forms don't work on comments. Markdown checkboxes are universally supported and easy to complete.

DD-3: Phase 1 is Just the Workflow

Start with FR-1 + FR-2 (the workflow + template). FR-3/4/5 are future enhancements that build on the foundation.

Effort Estimates

Requirement Effort Priority
FR-1: Workflow + checklist 30 min 🔴 Critical
FR-2: Template design included 🔴 Critical
FR-3: Severity-based depth 1-2 hrs 🟡 Medium
FR-4: Tracking dashboard 2-3 hrs 🟢 Low
FR-5: Smart pre-fill skill 4-6 hrs 🟢 Low
Total Phase 1 30 min
Total all phases ~8-12 hrs

Implementation

Phase 1 workflow:
yaml name: Bug Retro Prompt on: issues: types: [closed] jobs: retro: if: contains(github.event.issue.labels.*.name, 'bug') runs-on: ubuntu-latest steps: - uses: actions/github-script@v7 with: script: | await github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, body: '## 🔄 Bug Retro Checklist\n\n- [ ] **Why did this escape CI?**\n- [ ] **Test added that would have caught it?**\n- [ ] **Is this a class of bug?**\n- [ ] **CI/review change needed?**\n- [ ] **Retro complete**\n\n_Auto-generated. Skip if trivial._' });

References

Activity

  1. diberry commented on Apr 6, 2026

    @diberry
    ContributorAuthor

    ✈️ Flight PRD Assessment

    Verdict: This issue already IS a well-structured PRD — complete and ready for implementation.

    The issue body has FR-1 through FR-5, DD-1/DD-2/DD-3, NFR-1/NFR-2/NFR-3, and effort estimates. This is a proper PRD.

    Strengths:

    • DD-1 (comment not issue) keeps context together — correct call
    • DD-2 (checklist not form) is pragmatic — GitHub forms don't work on comments
    • DD-3 (Phase 1 = just the workflow) scopes it perfectly
    • NFR-1 (zero noise for trivial bugs) prevents toil
    • FR-1 effort estimate (30 min) is realistic

    Assessment:

    • FR-1 + FR-2 are Phase 1 — ship immediately as a single workflow file
    • FR-3 (severity-based depth), FR-4 (dashboard), FR-5 (Copilot skill pre-fill) are future enhancements clearly deferred
    • No missing sections — acceptance criteria are checkbox-ready

    Recommendation: This is a 30-minute implementation. One .github/workflows/bug-retro.yml file. Ship it.

  2. added a commit that references this issue on Apr 8, 2026
    6d3d955
  3. diberry commented on Apr 10, 2026

    @diberry
    ContributorAuthor

    Closing — descoping high-touch feature work to focus on existing PRs and low-touch fixes.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions