Skip to content

validate-task Runs dotnet format at the Root Where No Project or Solution Sits There #1938

Closed

Description

@ptr727

Summary

validate-task.yml's "Check C# style step" runs dotnet format style --verify-no-changes --severity=info --verbosity=detailed from the repository root whenever hashFiles('**/*.csproj') != ''. A caller whose only project sits in a subdirectory, with no solution or project file at the root, fails that step unconditionally:

Unhandled exception: System.IO.FileNotFoundException: Could not find a MSBuild project file or solution file in '<root>'. Specify which to use with the <workspace> argument.

No input lets the caller scope or skip it. validate-task.yml takes only markdown-exclude-globs, repo-gate-exclude-globs, python-directories, and python-versions.

Evidence

  • validate-task.yml at 0aa86c3 (2.0.712), lines 178-200, unchanged at f431a02.
  • Hit adopting the task in ptr727/Vantage-Config#19. That repo tracks FindInFile/FindInFile.csproj, an incidental helper, and nothing at the root. Reproduced locally with .NET SDK 10.0.401 against a copy of FindInFile/ plus the repo's .editorconfig, exit 1.

Expected

Either the step runs against each detected project or solution rather than the bare root, or the task takes an input (for example a list of .NET workspaces, mirroring python-directories) so a caller can name the workspace or declare that it has none to gate.

Activity

  1. ptr727 commented on Nov 1, 2026

    @ptr727
    OwnerAuthor

    Decision needed (decision triage, 2026-11-01)

    Question: When a caller has no .sln, .slnx, or .csproj at its root, should validate-task.yml's "Check C# style step" (dotnet format style ... --severity=info) find the .NET workspaces itself, or take a new input naming them, like python-directories?

    Options, recommended first:

    1. Find workspaces in the tree, no new input (recommended): A root workspace keeps today's behavior, and a root with none runs once per tracked .sln/.slnx, else per .csproj. Keeps the workflow's stated rule that language lint goes by what the tree holds ("Python is the one exception"), fixes ptr727/Vantage-Config#19 with no caller change. Apply the same fix to the dotnet test step. No work in flight.
    2. Add a dotnet-directories input like python-directories: Explicit, lets a caller declare nothing to gate, copies the Gate Each Declared Python Directory on Its Code #1914 design (input, registry field, audit check), but every subdirectory-only caller must opt in and one that forgets still fails. No work in flight.
    3. Detect by default, let an input override: Most flexible, but carries both costs for a need no repo has yet. No work in flight.

    Evidence: validate-task.yml:290-292 runs the style step from the root with no workspace argument when hashFiles('**/*.csproj') != ''. Comment at :267-268: "Language lint by tree detection ... Python is the one exception". Inputs :20-60 have nothing for .NET. :624-627 runs dotnet test at the root, breaking the same way for a subdirectory-only test project. Python needed an input (#1800, bb09334, #1914) because a pyproject.toml does not state its profile, while a .NET solution lists its projects.

    Blocks: none

  2. added
    decision
    on Nov 1, 2026
  3. ptr727 commented on Nov 1, 2026

    @ptr727
    OwnerAuthor

    Maintainer answer (decision triage, 2026-11-01): Option 1: validate-task.yml finds the .NET workspaces in the tree with no new input. A root workspace keeps today's behavior, otherwise the step runs once per tracked .sln/.slnx, else per .csproj. Apply the same fix to the dotnet test step. This is now work for the next burndown round.

  4. removed
    decision
    on Nov 1, 2026
  5. ptr727 commented on Nov 1, 2026

    @ptr727
    OwnerAuthor

    Released (2026-11-02): worktree and branch removed, so this claim holds no files. Its fix merged to develop in PR #3796.

    Backlog burndown claim (round 2, group R2G3). Branch: feature/burn-3334. Issues: #3334, #1516, #3487, #1485, #1938.

    Predicted file set:

    • .github/workflows/test-pull-request.yml, .github/workflows/validate-task.yml, .github/workflows/build-release-task.yml
    • catalog/snippets/workflows/test-pull-request.yml, catalog/snippets/workflows/test-pull-request-smoke.yml
    • docs/reusable-workflows.md, WORKFLOW.md, spec/audit.py, spec/files.json, scripts/repo_gate.py
    • spec/project-types.json, spec/fidelity-model.md (added in adjudication)
    • tests/test_audit.py, tests/test_audit_helpers.py, tests/test_release_guards.py, tests/test_repo_gate.py
    • .agents/skills/workflow-ci-contract/ and its generated trees (.github/skills/workflow-ci-contract/, .claude-plugin/fleet-skills/skills/workflow-ci-contract/, .claude-plugin/fleet-skills/.source-digests/workflow-ci-contract)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions