Introduce RefitterAutoScan option in MSBuild package#1098
Conversation
Archive decisions older than 7 days and summarize Lambert history. - Archived all decisions from 2026-04 and 2026-05-01 to decisions-archive.md - Created fresh decisions.md with 2026-05-29 issue #1094 and user directive entries - Summarized Lambert's history.md (16KB) to separate historical context - Created history-archive.md with pre-2026-05-29 summary - Created history-full.md with complete historical reference Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Merged 2 decision inbox entries to decisions.md - Recorded Dallas and Lambert orchestration logs - Wrote session log for issue-1094-real-implementation - Updated agent histories with team work summary Scribe: logged session completion for RefitterAutoScan MSBuild implementation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Merged 1 inbox decision into decisions.md (commit grouping for issue #1094) - Deleted stale inbox file (dallas-commit-grouping.md) - Updated cross-agent histories for Dallas, Bishop, Lambert - No archiving required (decisions.md = 3378 bytes)
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds a ChangesRefitterAutoScan MSBuild Gating Feature
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Pull request overview
This PR introduces an opt-out switch for Refitter.MSBuild’s automatic “scan and generate on every build” behavior, addressing issue #1094 by keeping RefitterGenerate available for explicit/on-demand generation while allowing normal builds to skip the hook.
Changes:
- Add
RefitterAutoScan(defaulttrue) and gate the on-build hook via a new_RefitterGenerateOnBuildwrapper target. - Update MSBuild documentation (package README + docfx article) to describe disabling auto-scan while still invoking
dotnet build -t:RefitterGenerate. - Extend the
msbuild.ymlworkflow to validate all three flows: auto-scan enabled, explicit generation with auto-scan disabled, and normal build with auto-scan disabled.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Refitter.MSBuild/Refitter.MSBuild.targets | Adds RefitterAutoScan defaulting and a wrapper target to gate on-build execution. |
| src/Refitter.MSBuild/README.md | Documents RefitterAutoScan and the explicit RefitterGenerate workflow. |
| docs/docfx_project/articles/msbuild.md | Mirrors README guidance for docfx documentation. |
| .github/workflows/msbuild.yml | Adds CI checks covering enabled/disabled auto-scan and explicit generation. |
| global.json | Changes pinned SDK version (review flagged as potentially problematic). |
| .squad/skills/commit-grouping-hygiene/SKILL.md | Adds Squad skill guidance for commit grouping. |
| .squad/decisions.md | Collapses/updates decisions to current entries and records the RefitterAutoScan decision. |
| .squad/decisions-archive.md | Archives older decision entries. |
| .squad/commit-msg.txt | Removes stale automation artifact. |
| .squad/agents/lambert/history.md | Updates Lambert history for issue #1094 (review flagged a typo). |
| .squad/agents/lambert/history-full.md | Adds Lambert full history archive file. |
| .squad/agents/lambert/history-archive.md | Adds Lambert history archive file. |
| .squad/agents/dallas/history.md | Updates Dallas history with issue #1094 and commit-grouping notes. |
| .squad/agents/bishop/history.md | Updates Bishop history with issue #1094 cross-agent update. |
There was a problem hiding this comment.
Actionable comments posted: 8
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/msbuild.yml:
- Around line 43-79: The dotnet build steps (the three invocations that produce
msbuild.log, msbuild-explicit.log, and msbuild-disabled.log) aren't checking the
native exit code so a failed build can be masked; after each dotnet build call
(both the auto-scan build, the explicit -t:RefitterGenerate build, and the
auto-scan disabled build) add an explicit check of $LASTEXITCODE and throw a
descriptive error if it's non-zero (e.g., if ($LASTEXITCODE -ne 0) { throw
"dotnet build failed (exit code $LASTEXITCODE)" }) so failures in
RefitterAutoScan/RefitterGenerate runs are propagated.
In @.squad/agents/lambert/history-archive.md:
- Around line 66-72: Add a short "Last verified" line for every runnable command
block in history-archive.md using the compact pattern "Last verified:
YYYY-MM-DD, OS/shell, outcome (pass/fail, brief evidence)", and update the
command entries referenced in the comment (the command blocks around the 66-72,
108-117, 128-139, and 1018-1023 areas) to include that line; ensure each command
block shows platform/shell, date, and a one-line outcome/evidence string so
every documented command has an explicit verification status.
In @.squad/agents/lambert/history-full.md:
- Around line 66-72: The history entries like "2026-04-25 CLI help repro",
"2026-04-25 Linux help-test follow-up", and the other dated command paragraphs
lack a standardized validation footer; update each command paragraph referenced
(including the blocks around lines 108-117, 128-139, and 1018-1023) to append a
one-line validation footer in the format "Verified: YYYY-MM-DD | Environment:
<OS/CI> | Result: <pass/fail/notes>" so every command record includes date,
environment, and outcome; apply this consistently to the entries named in the
diff (e.g., the CLI help repro, Linux help-test follow-up, PR `#1064/`#1057
testing pattern, baseline scan, coverage baseline, low-risk coverage targets,
environment-sensitive tests) to make verification explicit and repeatable.
In @.squad/agents/lambert/history.md:
- Line 14: Fix the typo in the history entry referring to RefitterAutoScan:
replace the malformed " rue" (contains a stray tab) with the correct "true" so
the line reads "RefitterAutoScan to true" for the validation note about
src\Refitter.MSBuild\Refitter.MSBuild.targets; ensure no extra whitespace or
tabs remain around the token.
In @.squad/decisions-archive.md:
- Line 1001: Change the inconsistent heading style around the block containing
"timestamp: 2026-05-01T14:34:56.630+02:00" to match the repo's markdownlint
heading convention (use ATX "#" headers if MD003 requires that) and rename or
de-duplicate the repeated heading text that appears later (the duplicate near
the second occurrence) so it no longer matches the earlier heading (MD024);
update only the heading markers/text to a consistent format and a unique title
while keeping the surrounding content intact.
In @.squad/decisions.md:
- Line 3: The section title contains a duplicated word "Refitter
RefitterAutoScan MSBuild Implementation"; update the heading to remove the
duplicate so it reads e.g. "RefitterAutoScan MSBuild Implementation" (or
"Refitter AutoScan MSBuild Implementation") by editing the heading string in the
decision entry to delete the extra "Refitter".
In @.squad/skills/commit-grouping-hygiene/SKILL.md:
- Line 20: Replace the placeholder commands `git add <paths>` and `git commit -m
"<message>"` with concrete, validated examples (e.g., `git add README.md src/`
and `git commit -m "Add README and source files"`) or explicitly label them as
pseudocode and provide a verified runnable variant; update the SKILL.md sentence
referencing these commands so it either shows the runnable examples or notes
"replace paths and message with your actual files/commit message" and ensure the
examples have been tested locally for correctness.
In `@global.json`:
- Line 3: The global.json currently pins the SDK "version" to an invalid value
"10.0.0"; update the "version" field in global.json to a full major.minor.patch
SDK feature-band (patch must be a three-digit feature band), for example
"10.0.100" or whichever full SDK feature-band you intend to target so dotnet
restore/build can resolve the SDK correctly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 54699a24-f0af-4484-8dd7-8ac7cfb228d3
📒 Files selected for processing (14)
.github/workflows/msbuild.yml.squad/agents/bishop/history.md.squad/agents/dallas/history.md.squad/agents/lambert/history-archive.md.squad/agents/lambert/history-full.md.squad/agents/lambert/history.md.squad/commit-msg.txt.squad/decisions-archive.md.squad/decisions.md.squad/skills/commit-grouping-hygiene/SKILL.mddocs/docfx_project/articles/msbuild.mdglobal.jsonsrc/Refitter.MSBuild/README.mdsrc/Refitter.MSBuild/Refitter.MSBuild.targets
💤 Files with no reviewable changes (1)
- .squad/commit-msg.txt
|



Implements #1094
Summary by CodeRabbit
New Features
Documentation
Chores