Repository navigation
Add behavior-preserving refactor recipe to file diet - #11821
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7416f642-5d88-4782-9c3e-9791150f564f
There was a problem hiding this comment.
🟢 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
There was a problem hiding this comment.
🟢 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.
Adds a repository-owned
behavior-preserving-refactorskill 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 --checkandgit --no-pager diff --cached --check— passed.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.