Skip to content

Apply relevant updates from TemplateDotNetTool template#105

Merged
Malcolmnixon merged 6 commits intomainfrom
copilot/update-from-template
Mar 4, 2026
Merged

Apply relevant updates from TemplateDotNetTool template#105
Malcolmnixon merged 6 commits intomainfrom
copilot/update-from-template

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

Syncs BuildMark with recent changes in the TemplateDotNetTool template, covering both a full consistency review and specific changes from merged PRs #31#51.

Description

Functional Fixes

  • Error output to stderr (Context.cs, Program.cs): WriteError and exception handlers now write to Console.Error instead of Console.Out; log StreamWriter gets AutoFlush = true
  • PDF/A-3u compliance (build.yaml): All 6 Weasyprint steps gain --pdf-variant pdf/a-3u
  • Code formatting gate (lint.sh, lint.bat): Added dotnet format --verify-no-changes step
  • package.json: Build tools moved from dependenciesdevDependencies

Code Structure

  • src csproj: Single ItemGroup split into labeled Runtime Dependencies, Build Tool Dependencies, and Code Analysis Dependencies sections; Polyfill simplified to PrivateAssets="All" only
  • test csproj: Added explanatory comments to coverlet.collector and analyzer ItemGroups
  • Validation.cs: Output format normalized from PASSED/FAILEDPassed/Failed; removed separate displayName parameter so console output now uses the test name (e.g. ✓ BuildMark_MarkdownReportGeneration - Passed) instead of a human-readable description

Requirements

  • requirements.yaml: All 23 requirement IDs updated to semantic identifiers matching the template pattern:
    • CLI-001CLI-009BuildMark-Cmd-*
    • GH-001GH-003BuildMark-GH-*
    • RPT-001RPT-009BuildMark-Rpt-*
    • VAL-001VAL-004BuildMark-Val-*
    • PLT-001PLT-005BuildMark-Plt-*

Documentation

  • README.md: ### Self-Validation Tests promoted to ## Self Validation with full example output showing test names; CLA sentence added to License section
  • docs/guide/guide.md: Self-Validation section restructured with Validation Report and Validation Tests subsections; removed duplicate # Running Self-Validation top-level section that had been added in addition to the existing ## Self-Validation section
  • CONTRIBUTING.md: Fixed Assert.HasCount argument order (collection, countcount, collection); encoding updated to UTF-8 (no BOM); added Self-Validation Tests, Requirements Management, and Release Process sections
  • AGENTS.md: C# version updated to (latest), lint config reference corrected, UTF-8 encoding, Markdown Link Style section added
  • SECURITY.md: Added Security Disclosure Policy, Third-Party Dependencies, and Additional Resources sections

Developer Experience

  • build.sh / build.bat: Updated shebang, header comments, modernized error handling
  • .vscode/tasks.json: New file with build/validate/lint VS Code task shortcuts
  • .gitignore: Expanded with standard VS/JetBrains/NuGet/test result/Python patterns
  • .cspell.json: Added ~30 common words from template word list

Tests Updated

Three tests updated to capture Console.Error instead of Console.Out following the stderr change: Context_WriteError_NotSilent_WritesToConsole, Validation_Run_WithUnsupportedResultsFileExtension_ShowsError, Validation_Run_WithInvalidResultsFilePath_ShowsError.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code quality improvement

Related Issues

Pre-Submission Checklist

Before submitting this pull request, ensure you have completed the following:

Build and Test

  • Code builds successfully: dotnet build --configuration Release
  • All tests pass: dotnet test --configuration Release
  • Self-validation tests pass:
    dotnet run --project src/DemaConsulting.BuildMark --configuration Release --framework net10.0
    --no-build -- --validate
  • Code produces zero warnings

Code Quality

  • Code formatting is correct: dotnet format --verify-no-changes
  • New code has appropriate XML documentation comments
  • Static analyzer warnings have been addressed

Quality Checks

Please run the following checks before submitting:

  • Spell checker passes: cspell "**/*.{md,cs}"
  • Markdown linter passes: markdownlint "**/*.md"
  • YAML linter passes: yamllint '**/*.{yml,yaml}'

Testing

  • Added unit tests for new functionality
  • Updated existing tests if behavior changed
  • All tests follow the AAA (Arrange, Act, Assert) pattern
  • Test coverage is maintained or improved

Documentation

  • Updated README.md (if applicable)
  • Updated ARCHITECTURE.md (if applicable)
  • Added code examples for new features (if applicable)
  • Updated requirements.yaml (if applicable)

Additional Notes

Security summary: CodeQL analysis (actions + csharp) found 0 alerts. No vulnerabilities introduced.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits March 4, 2026 01:32
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copilot AI changed the title [WIP] Update relevant content from the template Apply relevant updates from TemplateDotNetTool template Mar 4, 2026
@Malcolmnixon
Copy link
Contributor

@copilot Did you actually review the pull-requests of the template? I'm seeing that for example the self-validation printed output contains test descriptions not the test names. Also the requirements don't have semantic IDs. Please re-run by reviewing the pull-requests of the template (as described in the repo-consistency agent) and actually make sure all relevant changes have been applied.

…tic IDs

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 4, 2026

@copilot Did you actually review the pull-requests of the template? I'm seeing that for example the self-validation printed output contains test descriptions not the test names. Also...

Fixed in dd67a72.

Two changes made:

  1. Validation output now uses test names: Removed the separate displayName parameter from RunValidationTest — the console output now uses the test name directly, e.g. ✓ BuildMark_MarkdownReportGeneration - Passed instead of ✓ Markdown Report Generation Test - Passed.

  2. Requirements have semantic IDs: All 23 requirement IDs in requirements.yaml updated to follow the semantic pattern from template PR Pre-release quality audit and testability improvements #50:

    • CLI-001CLI-009BuildMark-Cmd-*
    • GH-001GH-003BuildMark-GitHub-*
    • RPT-001RPT-009BuildMark-Report-*
    • VAL-001VAL-004BuildMark-Validate-*
    • PLT-001PLT-005BuildMark-Platform-*

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/BuildMark/BuildMark/test/DemaConsulting.BuildMark.Tests/bin/Release/net10.0/DemaConsulting.BuildMark.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/BuildMark/BuildMark/test/DemaConsulting.BuildMark.Tests/bin/Release/net10.0/DemaConsulting.BuildMark.Tests.deps.json /home/REDACTED/work/BuildMark/BuildMark/test/DemaConsulting.BuildMark.Tests/bin/Release/net10.0/testhost.dll --port 34849 --endpoint 127.0.0.1:034849 --role client --parentprocessid 4283 --telemetryoptedin false (http block)
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/BuildMark/BuildMark/test/DemaConsulting.BuildMark.Tests/bin/Release/net8.0/DemaConsulting.BuildMark.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/BuildMark/BuildMark/test/DemaConsulting.BuildMark.Tests/bin/Release/net8.0/DemaConsulting.BuildMark.Tests.deps.json /home/REDACTED/work/BuildMark/BuildMark/test/DemaConsulting.BuildMark.Tests/bin/Release/net8.0/testhost.dll --port 35699 --endpoint 127.0.0.1:035699 --role client --parentprocessid 4275 --telemetryoptedin false (http block)
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/BuildMark/BuildMark/test/DemaConsulting.BuildMark.Tests/bin/Release/net9.0/DemaConsulting.BuildMark.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/BuildMark/BuildMark/test/DemaConsulting.BuildMark.Tests/bin/Release/net9.0/DemaConsulting.BuildMark.Tests.deps.json /home/REDACTED/work/BuildMark/BuildMark/test/DemaConsulting.BuildMark.Tests/bin/Release/net9.0/testhost.dll --port 39717 --endpoint 127.0.0.1:039717 --role client --parentprocessid 4268 --telemetryoptedin false (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@Malcolmnixon Malcolmnixon marked this pull request as ready for review March 4, 2026 02:09
@Malcolmnixon
Copy link
Contributor

@copilot The lint is reporting issues:

Error: docs/guide/guide.md:377 MD024/no-duplicate-heading Multiple headings with the same content [Context: "Running Validation"] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md024.md
Error: docs/guide/guide.md:383 MD024/no-duplicate-heading Multiple headings with the same content [Context: "Validation Tests"] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md024.md

The fact there are multiple headings with the same name indicates you didn't correctly update the user guide and instead may have duplicated information. Please compare in detail the self-validation sections of both documents and correct as appropriate.

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 4, 2026

@copilot The lint is reporting issues:

Error: docs/guide/guide.md:377 MD024/no-duplicate-heading Multiple headings with the same content [Context: "Running Validation"] https:/...

Fixed in 1e13ce3. The ## Self-Validation section at line 185 already had correct sub-sections (### Running Validation, ### Validation Report, ### Validation Tests) with proper content and test names. A second top-level # Running Self-Validation block had been added below that duplicated the content with old-style descriptions and PASSED casing. Removed the entire duplicate section — markdownlint now passes with 0 errors.

@Malcolmnixon
Copy link
Contributor

@copilot Let's try shortening some of the requirement IDs:

  • "BuildMark-GitHub-" can be "BuildMark-GH-"
  • "BuildMark-Report-" can be "BuildMark-Rpt-"
  • "BuildMark-Validate-" can be "BuildMark-Val-"
  • "BuildMark-Platform-" can be "BuildMark-Plt-"

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 4, 2026

@copilot Let's try shortening some of the requirement IDs:

  • "BuildMark-GitHub-" can be "BuildMark-GH-"
  • "BuildMark-Report-" can be "BuildMark-Rpt-"
    ...

Done in 2f5ebfe. All 21 requirement IDs in requirements.yaml updated with the shorter prefixes: BuildMark-GH-*, BuildMark-Rpt-*, BuildMark-Val-*, BuildMark-Plt-*.

@Malcolmnixon Malcolmnixon merged commit 4f9e4fc into main Mar 4, 2026
11 checks passed
@Malcolmnixon Malcolmnixon deleted the copilot/update-from-template branch March 4, 2026 02:52
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