Skip to content

chore(process): add feature-removal sweep checklist (#908) - #913

Merged
LucasSantana-Dev merged 2 commits into
release/v2.12.0from
chore/feature-removal-sweep-checklist
May 21, 2026
Merged

LucasSantana-Dev merged 2 commits into
release/v2.12.0from
chore/feature-removal-sweep-checklist

Conversation

@LucasSantana-Dev

@LucasSantana-Dev LucasSantana-Dev commented May 21, 2026 •

Copy link
Copy Markdown
Owner

Goal

Prevent orphan code (Prisma models, broken test files, dead types) from being left behind after feature/route removal PRs. PR #903 had to clean up 2-week-old orphans from PR #801.

Changes

  1. PR Template: Added .github/PULL_REQUEST_TEMPLATE.md with a new "Feature-removal sweep" checklist section (skip-friendly) covering:

    • Orphan Prisma models removed
    • Broken/stale test files removed
    • Unused type aliases removed
    • Imports/exports cleaned up
    • ADRs and CONTEXT.md cross-references updated
  2. Dangerfile Guard: Added rule Bump npm-check-updates from 16.14.20 to 18.0.1 #9 to dangerfile.ts that detects commit messages matching removal patterns (remove|delete|retire|drop|deprecate + route|handler|endpoint|model|toggle|feature) and warns if the PR body doesn't contain the sweep checklist text.

Acceptance

  • PR template has "Feature-removal sweep" section
  • Dangerfile rule flags qualifying commit bodies
  • Ready for validation against next 3 feature-removal PRs

See docs/decisions/2026-05-19-retire-per-guild-feature-toggles.md for context.

Summary by CodeRabbit

  • Chores
    • Enhanced pull request template with contributor guidelines, including reminders for testing and changelog updates.
    • Added automated CI check to ensure feature removal pull requests include proper code cleanup verification.

Review Change Stack

@vercel

vercel Bot commented May 21, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lucky Ready Ready Preview, Comment May 21, 2026 5:34am

Request Review

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@github-actions

Copy link
Copy Markdown

Failed to generate code suggestions for PR

@coderabbitai

coderabbitai Bot commented May 21, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@LucasSantana-Dev has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 58 minutes and 30 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9c48aea7-b375-462a-9efe-dbbb4c07b1a2

📥 Commits

Reviewing files that changed from the base of the PR and between a465fd2 and c0a6634.

⛔ Files ignored due to path filters (1)
  • CHANGELOG.md is excluded by !**/CHANGELOG.md
📒 Files selected for processing (2)
  • .github/PULL_REQUEST_TEMPLATE.md
  • dangerfile.ts
📝 Walkthrough

Walkthrough

PR template expanded to include checklist sections for testing, changelog updates, TypeScript builds, and a new "Feature-removal sweep" section. Dangerfile enhanced to detect removal-related commits and warn authors when the checklist is absent from the PR body.

Changes

Feature-removal enforcement

Layer / File(s) Summary
PR template with feature-removal checklist
.github/PULL_REQUEST_TEMPLATE.md
PR template expanded with description sections, test/build/changelog checklists, and a "Feature-removal sweep" section that guides cleanup of orphaned code when removing routes, handlers, endpoints, models, or toggles.
Feature-removal guard in dangerfile
dangerfile.ts
Dangerfile checks commit messages for removal-related prefixes combined with route/model/toggle/feature keywords; warns if removals are detected without the feature-removal sweep checklist present in the PR body.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

  • LucasSantana-Dev/Lucky#908: This PR implements the proposed feature-removal sweep checklist template and dangerfile guard that detects removal commits and enforces checklist completion.

Possibly related PRs

Suggested labels

ci, infra

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore(process): add feature-removal sweep checklist' clearly and specifically describes the main change: adding a feature-removal sweep checklist to the process workflow.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/feature-removal-sweep-checklist

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@dangerfile.ts`:
- Line 144: The current check using hasSweepChecklistInBody =
prBody.includes('Feature-removal sweep') is case-sensitive and will miss
variations; update the detection to be case-insensitive by normalizing prBody
(e.g., prBody.toLowerCase()) or using a case-insensitive regex (e.g.,
/feature-removal sweep/i) when checking for the string so
hasSweepChecklistInBody reliably matches any capitalization variations.
- Line 154: The markdown link in dangerfile.ts uses `${pr.html_url}` (the PR
URL) but the link text refers to the ADR file; update the template so the URL
points to the actual ADR document (e.g., the repository blob URL or relative
path to docs/decisions/2026-05-19-retire-per-guild-feature-toggles.md) instead
of `${pr.html_url}`; locate the string template containing `[See
docs/decisions/2026-05-19-retire-per-guild-feature-toggles.md](${pr.html_url})`
and replace the `${pr.html_url}` portion with the correct ADR file URL (or a
repo/blob path using repo/pr/base ref variables if needed).
- Around line 142-147: The removalPattern is too restrictive because it requires
the removal keyword at the start of the commit message; update the detection
used by hasRemovalCommit so it matches removal keywords anywhere in the message
(e.g., remove the leading ^ and ensure word boundaries and case-insensitivity)
or implement a two-step check that looks for any removal verb and any target
noun separately in each danger.git.commits message (refer to removalPattern and
hasRemovalCommit to locate the logic); ensure prBody/hasSweepChecklistInBody
logic remains unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 97707b0d-6fb4-4218-b8ae-184471dc0174

📥 Commits

Reviewing files that changed from the base of the PR and between 748a5da and a465fd2.

📒 Files selected for processing (2)
  • .github/PULL_REQUEST_TEMPLATE.md
  • dangerfile.ts

Comment thread dangerfile.ts Outdated
Comment thread dangerfile.ts Outdated
Comment thread dangerfile.ts Outdated
Three findings from CodeRabbit on the original PR:

1. removalPattern was anchored to `^` — would miss removal-verbs anywhere
   except commit-message start. Split into two case-insensitive word-boundary
   regexes (removalVerb + removalTarget) and require both to match the same
   commit message.
2. hasSweepChecklistInBody used case-sensitive includes() — would miss the
   "feature-removal sweep" or "Feature-removal Sweep" capitalisation variants.
   Switched to case-insensitive regex.
3. ADR link in the warn() interpolated pr.html_url (the PR URL) but labelled
   it as the ADR file. Now builds the correct repo blob URL from pr.base
   {repo.full_name, ref} + relative ADR path.

Also: add the CHANGELOG [Unreleased] entry for the sweep checklist PR (#908).
@LucasSantana-Dev
LucasSantana-Dev force-pushed the chore/feature-removal-sweep-checklist branch from a465fd2 to c0a6634 Compare May 21, 2026 05:31

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@sonarqubecloud

Copy link
Copy Markdown

@LucasSantana-Dev
LucasSantana-Dev merged commit 0751f4b into release/v2.12.0 May 21, 2026
27 of 28 checks passed
@LucasSantana-Dev
LucasSantana-Dev deleted the chore/feature-removal-sweep-checklist branch May 21, 2026 12:16
@LucasSantana-Dev LucasSantana-Dev mentioned this pull request May 21, 2026
3 tasks
LucasSantana-Dev added a commit that referenced this pull request May 21, 2026
## Release v2.13.0

Promotes \`release/v2.13.0\` to \`main\` for the v2.13.0 cut.

**$AHEAD commits across all merged PRs since v2.11.0 ship.**

(Skipping v2.12.0 — the branch existed but its work was rolled forward
into v2.13.0 alongside this session's Zod migration + CVE patches +
standards adoption.)

## Headline changes

**Added** — Guild Automation Module Executor pilot (#901), Sentry
frontend (#876), Prometheus metrics on bot+backend (#873, #875), guild
membership history (#872), Trivy image-scan Phase A (#883), landing
redesign (#868).

**Changed** — Backend migrated to Zod 4 API (#919), 3 bot circular-deps
clusters broken (#885/#886/#888).

**Fixed** — brace-expansion + ws moderate CVEs (#921), nginx-alpine CVEs
(#881), CI postinstall rate limit (#878), madge actionlint (#905).

**Internal** — shared coverageThreshold gate (#909/#914),
Feature-removal sweep checklist + dangerfile guard (#908/#913),
monitoring network, AI-doc policy, 4 new ADRs.

Full list in [CHANGELOG.md](./CHANGELOG.md).

## Merge method

This PR should land via **merge commit** (NOT squash) to preserve the
individual PR SHAs in main's history. After merge:

1. Tag \`v2.13.0\` on the merge commit
2. Create GitHub release with notes from CHANGELOG.md
3. Fast-forward \`release/v2.13.0\` to match the new main HEAD

## Test plan

- [ ] All 30 checks green except infra (snyk plan cap)
- [ ] Verify \`gh pr view 922 --json mergeCommit\` shows the chore-bump
commit on release tip
- [ ] After merge: confirm \`origin/main\` contains the full $AHEAD
commits

This branch was successfully deployed

1 active deployment
Preview — c0a66342 Deployed May 21, 2026 by vercel[bot]
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.

1 participant