Stop file diet duplicates and keep issues open - #16435
Stop file diet duplicates and keep issues open#16435Azat Mukhametshin (azat-msft) wants to merge 17 commits into
Conversation
skip-if-match only matches open issues, and create-issue expires after two days. The issue closes, the skip stops matching, and the next scheduled run files it again. That loop produced 16 issues about TestRequestManager.cs since 2026-06-19, every one auto-closed as not planned without being acted on. Give the workflow repo-memory so it records every file it proposes and never proposes the same one twice, whether the earlier issue is open or closed. This follows the convention efficiency-improver.md already uses. Seed memory with the two files that have already been proposed so the fix applies on the first run. Also exclude vendored third-party code. Jsonite, SimpleJSON and Nuget.Frameworks are copies kept in sync with upstream, and they were three of the top four candidates, so the ranking could never reach a first-party file below them. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> 🤖
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: dcff0136-3c69-4bce-a668-be8a5ad53747 🤖
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: dcff0136-3c69-4bce-a668-be8a5ad53747 🤖
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: dcff0136-3c69-4bce-a668-be8a5ad53747 🤖
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: dcff0136-3c69-4bce-a668-be8a5ad53747 🤖
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 72f04ecf-1a5e-4d1e-8b8f-134309c548f6
Remove the candidate ranking cap, reconcile deferred issue creation before writing proposal memory, and document the intentional one-open-issue throttle. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ce22acd7-ddad-4132-ae77-741709f1083a
There was a problem hiding this comment.
🟡 Changes recommended
The updated ranking command introduces a confirmed performance regression (xargs -n 1 wc -l) and the prompt text contains an inaccurate “full path” description that should be corrected.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Updates the Daily File Diet agentic workflow to avoid repeatedly filing the same refactoring issues by introducing persistent repo memory, excluding vendored sources from candidacy, and keeping [file-diet] issues open until maintainers close them.
Changes:
- Enables repo memory and documents a memory-backed “propose once ever” policy, including a seed list of already-proposed files.
- Updates the candidate ranking/exclusion guidance to skip vendored third-party sources (path-based + header/provenance check).
- Regenerates the compiled lock workflow to include repo-memory plumbing and updated gh-aw runtime components.
File summaries
| File | Description |
|---|---|
.github/workflows/daily-file-diet.md |
Adds repo-memory usage + seed proposals, vendored exclusions, and revised candidate selection rules. |
.github/workflows/daily-file-diet.lock.yml |
Regenerated compiled workflow reflecting repo-memory support and updated gh-aw tooling/runtime. |
Review details
- Files reviewed: 1/2 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Batch line counting while filtering aggregate rows and describe candidate paths accurately. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ce22acd7-ddad-4132-ae77-741709f1083a
There was a problem hiding this comment.
🟡 Changes recommended
The updated ranking command can emit an unbounded full-repo list (including sub-threshold files), which may significantly increase workflow runtime/log size and prompt/token usage in practice.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 1/2 changed files
- Comments generated: 1
- Review effort level: Lite
Keep every eligible candidate while excluding sub-threshold files from workflow output and prompt context. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ce22acd7-ddad-4132-ae77-741709f1083a
There was a problem hiding this comment.
🔵 Needs a closer look
The compiled lock file includes a small but concrete generation artifact (duplicated line) that should be cleaned up to keep the workflow deterministic and reviewable.
Review details
- Files reviewed: 1/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
Use gh-aw v0.87.10 to remove the duplicate generated lock-file line reported during review. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ce22acd7-ddad-4132-ae77-741709f1083a
|
The duplicated generated line was produced by gh-aw v0.86.2. I regenerated the lock with official gh-aw v0.87.10 in 04f5a03; the duplicate is gone and compilation completes with 0 warnings using the repository schedule seed. |
There was a problem hiding this comment.
🟡 Changes recommended
The updated workflow prompt contains contradictory/over-broad guidance that can cause the agent to skip valid candidates or mis-handle retries.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 1/2 changed files
- Comments generated: 3
- Review effort level: Lite
Clarify proposal retry semantics, narrow vendored-source detection, and pin the regenerated gh-aw action to its immutable release commit. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ce22acd7-ddad-4132-ae77-741709f1083a
There was a problem hiding this comment.
🟡 Changes recommended
The new Memory section wording is internally inconsistent with skip-if-match behavior and should be clarified to avoid incorrect agent execution semantics.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 1/2 changed files
- Comments generated: 1
- Review effort level: Lite
State that verification occurs on the next eligible run after maintainers close the open issue. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ce22acd7-ddad-4132-ae77-741709f1083a
There was a problem hiding this comment.
🟢 Approval recommended
The changes align with the stated goal (prevent duplicates, skip vendored code, keep issues open) and match existing repo patterns for repo-memory and compiled lock workflows without introducing schema-inconsistent anomalies relative to other workflows.
Review details
- Files reviewed: 1/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
Replace the workflow's orphan-branch repo memory with a checked-in ledger under eng/agentic-workflows and update it through tightly scoped state pull requests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ce22acd7-ddad-4132-ae77-741709f1083a
There was a problem hiding this comment.
🟢 Approval recommended
The functional changes align with the stated goal (prevent duplicates, skip vendored files, keep issues open) and the only feedback is a small documentation wording inconsistency.
Review details
- Files reviewed: 3/4 changed files
- Comments generated: 1
- Review effort level: Lite
Describe the checked-in state as a durable sorted ledger so additions and corrections are both unambiguous. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ce22acd7-ddad-4132-ae77-741709f1083a
There was a problem hiding this comment.
🔵 Needs a closer look
The workflow instructions currently say to call noop “with the PR number”, which can cause an invalid/noisy noop invocation instead of a proper status message and should be corrected.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
.github/workflows/daily-file-diet.md:72
noopsafe output is typically called with a short status message; saying “callnoopwith the PR number” can lead the agent to pass just a number (or omit context), which may not match the tool’s expected input and makes the run output less informative. Suggest callingnoopwith a brief message that includes the PR number.
- Files reviewed: 3/4 changed files
- Comments generated: 0 new
- Review effort level: Lite
Give the agent an explicit noop message when a file-diet state PR is still open. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ce22acd7-ddad-4132-ae77-741709f1083a
There was a problem hiding this comment.
🟢 Approval recommended
The changes consistently implement durable state tracking + vendored exclusions for Daily File Diet, and the large lockfile diff appears to be a straightforward regeneration aligned with the updated workflow.
Review details
- Files reviewed: 3/4 changed files
- Comments generated: 0 new
- Review effort level: Lite
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ce22acd7-ddad-4132-ae77-741709f1083a
Supersedes #16410 and includes the permanent-expiry change from nohwnd#13.
The workflow skips vendored sources, scans every file at or above the size threshold, and keeps each file-diet issue open until maintainers close it. Proposed and excluded files are persisted in
eng/agentic-workflows/daily-file-diet.txt; tightly scoped state PRs update that ledger.