Skip to content

Open the local gate chain with a dotnet tool restore - #44

Merged
ptr727 merged 2 commits into
developfrom
operations-tool-restore
Aug 3, 2026
Merged

Open the local gate chain with a dotnet tool restore#44
ptr727 merged 2 commits into
developfrom
operations-tool-restore

Conversation

@ptr727

@ptr727 ptr727 commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Answers a suppressed Copilot finding from #37 that was raised on that PR's merged head (78581a2) and never answered. It was found while auditing every constituent PR ahead of the develop to main promotion, since a suppressed finding carries no thread and so shows as nothing to resolve.

The finding

OPERATIONS.md:16 - The local gate snippet runs dotnet csharpier/dotnet husky without first restoring local tools. On a fresh clone, this can fail because the repo uses a tool manifest (.config/dotnet-tools.json) and CI explicitly runs dotnet tool restore before CSharpier.

Correct. CSharpier, Husky.Net and dotnet-outdated are local tools declared in .config/dotnet-tools.json with isRoot: true, and validate-task.yml:75 restores them before its CSharpier step. The runbook chain did not.

Verified rather than taken on faith

A warm package cache hides this, so the check needs a cold one. Against a clone with NUGET_PACKAGES and DOTNET_CLI_HOME pointed at empty directories:

  • Without the restore, the chain dies on its first command: Run "dotnet tool restore" to make the "csharpier" command available., exit 1.
  • With the restore ahead of it, dotnet tool restore reports Restore was successful. and CSharpier then formats all 54 files, exit 0.

So the reader who follows the runbook on a machine that has not built this repo before hits a hard failure on line one.

Scope

OPERATIONS.md is the only affected command path. The .NET Tools section of README.md also names these tools, but it documents building the manifest from scratch (dotnet new tool-manifest, then dotnet tool install ...), where a restore would be wrong. CODESTYLE.md names the commands in prose rather than offering a runnable chain.

The prose in the paragraph below the snippet listed the CI-side restore as a difference between local and CI. It is no longer one, so that clause is dropped rather than left asserting the old behavior.

OPERATIONS.md carries no fidelity field in the hub spec/files.json baseline, so it is presence-checked only and its content is repo-owned. This fix will not be reverted by a re-vendor. That is what separates it from the four suppressed findings on #38, which were equally correct but landed on fleet-carried YAML and so went upstream instead.

Verification

  • CSharpier Format, .NET Build, dotnet format style --verify-no-changes: clean, 0 of 57 files formatted, 0 warnings.
  • dotnet husky run: pass. dotnet test: 372 passed, 0 failed, 0 skipped.
  • markdownlint-cli2 over **/*.md: 0 issues in 11 files. editorconfig-checker: clean. Hub prose_lint.py --diff origin/develop: clean.

CSharpier and Husky.Net are local tools declared in .config/dotnet-tools.json,
so on a clone whose package cache does not already hold them the documented
chain failed on its first command with "Run dotnet tool restore to make the
csharpier command available" and exit 1.

CI already restored before its CSharpier step, and the prose called that out as
a difference between the two. It is no longer one, so that clause is dropped.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 3, 2026 18:20
@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.37%. Comparing base (3d6ad1d) to head (6aa7625).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop      #44   +/-   ##
========================================
  Coverage    43.37%   43.37%           
========================================
  Files           28       28           
  Lines         3896     3896           
  Branches       306      306           
========================================
  Hits          1690     1690           
  Misses        2154     2154           
  Partials        52       52           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

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 operational runbook so a fresh clone can run the local “gate” command chain by restoring local .NET tools before invoking dotnet csharpier / dotnet husky.

Changes:

  • Add dotnet tool restore as the first step in the local gate snippet in OPERATIONS.md.
  • Update surrounding prose to remove the now-outdated claim that CI uniquely performs tool restore.

Comment thread OPERATIONS.md Outdated
The paragraph introduces the chain as the `.NET Format` task, so saying the
chain opens with a restore read as a claim about that task. It is not one:
`.NET Format` depends on `CSharpier Format` and `.NET Build`, and none of the
three restores, so the task fails on a fresh clone exactly as the shell chain
did.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 3, 2026 18:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@ptr727
ptr727 merged commit 5e2eee0 into develop Aug 3, 2026
14 checks passed
@ptr727
ptr727 deleted the operations-tool-restore branch August 3, 2026 18:37
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.

2 participants