Skip to content

doc-healer: stop retrying rejected docs-only fix direction from closed unmerged [docs] PRs#33900

Merged
pelikhan merged 3 commits into
mainfrom
copilot/doc-healer-improvement-skip-reattempting-fixes
May 22, 2026
Merged

doc-healer: stop retrying rejected docs-only fix direction from closed unmerged [docs] PRs#33900
pelikhan merged 3 commits into
mainfrom
copilot/doc-healer-improvement-skip-reattempting-fixes

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 22, 2026

Daily Documentation Healer Step 1 only treated merged [docs] PRs as “addressed,” so it could repeatedly re-attempt the same docs-only change after maintainers had already closed that direction unmerged. This update adds an explicit rejection-signal path so the workflow escalates strategy instead of re-filing churn PRs.

  • Step 1: Add closed-unmerged rejection detection

    • Add a post-merge-check branch to search for prior closed [docs] PR candidates from github-actions[bot] with documentation + automation labels for the same drift.
    • Keep this check scoped to recent history (last 30 days) and drift-linked terms.
  • Verification rules for candidate PRs

    • Require explicit unmerged verification (pull_request_read with merged == false).
    • Require closure-context verification via issue metadata/comments, including collaborator/maintainer signal checks, before treating closure as intentional rejection.
  • Behavior change on confirmed rejection

    • Do not re-attempt the same docs-only fix direction.
    • Instruct healer to open a [doc-healer] improvement issue that names the rejected PR, states unresolved drift, proposes the inverse fix direction, and tags the closure actor (closed_by.login) for a deliberate next-step decision.
    • If closure actor is unavailable, instruct escalation in issue body instead of silently suppressing retries.
  • Prompt clarity hardening

    • Clarify query placeholders and runtime substitution (<OWNER/REPO>, <DRIFT_KEYWORD>), including concrete drift-key examples.
repo:<OWNER/REPO> is:pr is:closed author:github-actions[bot] label:documentation label:automation <DRIFT_KEYWORD>

Copilot AI and others added 2 commits May 22, 2026 00:20
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve doc-healer to skip closed-unmerged prior docs PRs doc-healer: stop retrying rejected docs-only fix direction from closed unmerged [docs] PRs May 22, 2026
Copilot AI requested a review from gh-aw-bot May 22, 2026 00:29
@github-actions
Copy link
Copy Markdown
Contributor

Hey @Copilot 👋 — thanks for working on improving the doc-healer workflow logic! The rejection-detection feature looks well thought out. However, there are a few process items to address:

  • Missing issue discussion — this repository requires contributions to start with a detailed agentic plan in an issue, followed by discussion with the core team before implementation. There's no reference to a prior issue in this PR.
  • No tests — the workflow logic changes don't include test coverage. Consider adding test scenarios that verify the rejection-detection behavior.

Per the CONTRIBUTING.md guidelines, non-core contributors should create an issue with a detailed agentic plan first. A core team member can then pick it up and implement it. If you're part of the core team, this PR may be fine — just ensure it aligns with internal workflow expectations.

If you'd like to convert this into the proper contribution format, here's a prompt for your coding agent:

Create a GitHub issue titled "[Agentic Plan] doc-healer: Add rejection detection for closed unmerged [docs] PRs"

The issue should contain:
1. Problem statement: Daily Documentation Healer currently re-attempts the same docs-only changes even after maintainers close those PRs unmerged, causing churn.
2. Proposed solution: Add closed-unmerged rejection detection with explicit escalation path (create improvement issue instead of retrying).
3. Implementation steps:
   - Add post-merge-check branch to search for closed DDUw [docs] PRs
   - Verify unmerged status and closure context
   - On confirmed rejection, create [doc-healer] improvement issue instead of retrying
   - Clarify query placeholders in workflow documentation
4. Expected outcome: Workflow stops churning on rejected directions and escalates to maintainers for strategy decisions.
5. Testing approach: Add test cases covering rejection-detection logic and escalation path.

Label the issue with appropriate tags (e.g., "enhancement", "workflow", "documentation").

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • patchdiff.githubusercontent.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "patchdiff.githubusercontent.com"

See Network Configuration for more information.

Generated by ✅ Contribution Check · ● 2.6M ·

@pelikhan pelikhan marked this pull request as ready for review May 22, 2026 02:04
Copilot AI review requested due to automatic review settings May 22, 2026 02:04
@pelikhan pelikhan merged commit 7e3ae58 into main May 22, 2026
1 check passed
@pelikhan pelikhan deleted the copilot/doc-healer-improvement-skip-reattempting-fixes branch May 22, 2026 02:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the Daily Documentation Healer workflow instructions so that previously closed-but-unmerged [docs] PRs are treated as an explicit “rejection” signal, preventing repeated re-attempts of the same docs-only fix direction and instead escalating via a [doc-healer] improvement issue.

Changes:

  • Add Step 1 logic to search for recently closed (last 30 days) unmerged DDUw [docs] PRs matching the same drift/issue keywords and treat confirmed cases as rejection.
  • Define verification steps for “rejection” (unmerged validation + closure-context inspection) and specify the resulting escalation behavior (create [doc-healer] improvement issue, tag closed_by).
  • Minor guideline formatting fix (“Exit cleanly” bullet alignment).
Show a summary per file
File Description
.github/workflows/daily-doc-healer.md Adds closed-unmerged PR rejection detection + escalation instructions to avoid churn PR retries.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment on lines +98 to +104
- Before treating it as rejection, inspect closure context with `issue_read` (`method: get` and `method: get_comments`): treat as rejected only when `closed_by` appears in GitHub MCP `list_repository_collaborators` results and comments/reviews indicate intentional direction (or explicit lack of acceptance), not an obvious transient/accidental closure.

- A closed-unmerged DDUw `[docs]` PR is a strong rejection signal for that fix direction. Do **not** re-attempt the same docs fix.
- Instead, create a `[doc-healer]` improvement issue that:
1. Names the rejected PR and the unresolved drift.
2. Proposes the inverse fix direction (for example, code change instead of docs-only change).
3. Tags `@<closed_by.login>` (login extracted from the `closed_by` user object in rejected PR issue data) for an explicit next-step decision. If `closed_by` is unavailable, do not suppress retries automatically; escalate uncertainty in the improvement issue body.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[doc-healer] DDUw / doc-healer improvement: skip re-attempting fixes from closed-unmerged prior [docs] PRs

4 participants