Detect page-set changes when flagging adp-docs follow-ups - #1871
Conversation
The structural-change detection only parsed the diff summary for New/Removed/Deprecated command rows, which keys on the command tree. The rpk ai connection pages appeared with zero tree changes: the commands existed in the 0.2.31 tree as stubs, and removing their overrides excludes is what created the pages. The flag step therefore skipped on the first production run even though three pages were new (micheleRP's finding after the first end-to-end run). The detection now also treats any added, deleted, or renamed page or partial under the plugin's directories as structural, keeping the summary grep for tree-level renames. Pure content modifications stay non-structural.
✅ Deploy Preview for redpanda-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Warning Review limit reached
Next review available in: 56 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
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. Comment |
micheleRP
left a comment
There was a problem hiding this comment.
Approving. This closes a gap I would not have predicted from reading the original condition, and the comment explaining why is the valuable part of the change.
The summary-table grep only fires when the command tree changes, and the rpk ai connection pages appeared with the tree unchanged: the commands already existed as stubs, and removing their exclude overrides is what created the pages. So the one signal that mattered was invisible to the one signal being checked. Adding page-set add/delete/rename as an independent trigger is the right fix, and restricting it to ^[ADR] so pure content edits do not flag is the right scope.
Two small things I checked rather than assumed: the pathspec includes modules/reference/pages/rpk/rpk-${PLUGIN}, which does not exist for ai since it renders as partials, and a git diff path filter that matches nothing is fine rather than an error. And --name-status has rename detection on by default, so the R case is reachable.
Fixes the first of @micheleRP's follow-ups from the first production rpk ai run: the "Flag adp-docs follow-up" step skipped even though three connection pages were new.
Root cause is a detection-model gap, not a broken grep: the step keys on the diff summary's New/Removed/Deprecated command rows, which reflect the command tree. The connection pages appeared with zero tree changes —
rpk ai connectionexisted in the 0.2.31 tree already (as coming-soon stubs), and what created the pages was #1869 removing their overrides excludes. Tree diff said nothing changed, sostructural=falsewas computed correctly and was still the wrong answer for adp-docs, whose stubs track the page set.Fix: the step now treats any added, deleted, or renamed page/partial under the plugin's own directories (
partials/rpk-<plugin>,pages/rpk/rpk-<plugin>) as structural — viagit diff --staged --name-status— while keeping the summary grep as the second signal for tree-level changes. Pure content modifications remain non-structural, so routine description refreshes don't spam the label.Verified against the actual production case: the 03:57 run's changeset (three added
rpk-ai-connection*partials) matches^Aand would have setstructural=true. The merge-time notify hook covered this instance, so this is belt-and-braces for visibility at PR time.Related PRs (rpk docs automation train)
Follow-up from the #1868/#1869 production run.