Skip to content

Add behavior-preserving refactor recipe to file diet - #11821

Merged
Amaury Levé (Evangelink) merged 2 commits into
mainfrom
dev/amauryleve/refactor-equivalence-skill
Oct 8, 2026
Merged

Amaury Levé (Evangelink) merged 2 commits into
mainfrom
dev/amauryleve/refactor-equivalence-skill

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Adds a repository-owned behavior-preserving-refactor skill and wires its implementation checklist into Daily File Diet's generated issues. Scope is limited to the new skill, daily-file-diet.md, and its regenerated lock file; no product code changes.

The recipe inventories baseline behavior and relevant tests, preserves ordering, short-circuit evaluation, exact type selection and first/last-match semantics, and includes distinguishing duplicate/malformed-input examples. It traces partial declarations, source-linked consumers, target frameworks, project includes and tracked API surfaces; preserves hot-path allocation/performance behavior; and keeps adjacent modernization out of structural moves. If the size target cannot be met without changing semantics, the implementer must report the constraint rather than force a behavior change.

Preserved inspection budget: Daily File Diet still inspects only the first 100 lines and at most 50 declaration lines of the single largest file. Proposed splits are provisional; deeper equivalence preflight belongs to the later implementer, not the bounded issue-generation run. Triggers, permissions, tools, safe outputs and executable lock content are unchanged; strict recompilation updates only the body hash.

Motivated by refactor feedback in #11304, #11304's malformed-input follow-up, #11147, and #11283. This PR does not modify those product changes.

Validation performed:

  • gh aw compile daily-file-diet --strict --no-check-update — passed using the aligned v0.89.21 compiler, zero warnings.
  • gh aw compile daily-file-diet --strict --no-emit --no-check-update — passed, zero warnings.
  • python .github\scripts\check_action_pins.py — passed; 2,562 references across 56 files.
  • Get-Content .github\skills\behavior-preserving-refactor\SKILL.md | markdownlint-cli2 - — passed; zero errors.
  • git --no-pager diff --check and git --no-pager diff --cached --check — passed.
  • Read-only assertions confirmed unchanged frontmatter, the original inspection commands/budget, and executable lock content, plus the regenerated body hash and skill reference.

No product build/test run or live issue-generating workflow run was performed: this is instruction/prompt-only work, and invoking the live workflow would create unrelated GitHub objects.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7416f642-5d88-4782-9c3e-9791150f564f
Copilot AI balanced review requested due to automatic review settings October 8, 2026 11:22
@github-actions github-actions Bot added the needs/merge-conflict-resolution PR has merge conflicts that must be resolved. label Oct 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The prompt-only changes are coherent, preserve the inspection budget, and include the required regenerated lock file.

0 open findings

What changed in this PR

Adds repository-owned guidance for behavior-preserving refactors and incorporates it into Daily File Diet issues without changing product code or workflow permissions.

Changes:

  • Adds a focused refactoring safety recipe.
  • Updates generated issue guidance and acceptance criteria.
  • Regenerates the strict-mode workflow lock metadata.
File Description
.github/​skills/​behavior-preserving-refactor/​SKILL.md Defines refactor equivalence and validation guidance.
.github/​workflows/​daily-file-diet.md Adds the recipe to generated issues.
.github/​workflows/​daily-file-diet.lock.yml Updates the generated body hash.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Regenerate Daily File Diet lock to retain refactor guidance with updated base action and container pins.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7416f642-5d88-4782-9c3e-9791150f564f
Copilot AI balanced review requested due to automatic review settings October 8, 2026 12:11
@github-actions github-actions Bot added state/needs-review Awaiting review from the team. and removed needs/merge-conflict-resolution PR has merge conflicts that must be resolved. labels Oct 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused instruction-only changes preserve the inspection budget and workflow execution configuration while adding coherent implementation safeguards.

0 open findings

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

@Evangelink
Amaury Levé (Evangelink) enabled auto-merge (squash) October 8, 2026 12:26
@microsoft-github-policy-service microsoft-github-policy-service Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Oct 8, 2026
@Evangelink
Amaury Levé (Evangelink) merged commit 109b925 into main Oct 8, 2026
21 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the dev/amauryleve/refactor-equivalence-skill branch October 8, 2026 12:28
@microsoft-github-policy-service microsoft-github-policy-service Bot removed the state/needs-review Awaiting review from the team. label Oct 8, 2026
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.

3 participants