Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 25, 2025

Description

Resurrects documentation from closed PR #1571. Adds AGENTS.md to repository root with comprehensive build and test instructions for developers and CI/CD agents.

AGENTS.md Contents

General Guidelines

  • Code review: only make high confidence suggestions when reviewing code changes
  • Always use the latest stable version of C#
  • Never add or change global.json unless explicitly asked to
  • Never change NuGet.config files unless explicitly asked to
  • Null handling: declare variables non-nullable, check for null at public API entry points; for internal code, trust C# null annotations
  • Testing: do not emit "Act", "Arrange" or "Assert" comments in test code

Prerequisites and Build

  • Prerequisites: .NET SDK 10.0 and .NET Runtimes for 8.0 and 9.0
  • Quick start: simple dotnet build and dotnet test commands for quick iteration; full solution build in Release mode for final validation
  • Testing requirements: code coverage should be maintained or increased
  • Points to .github/workflows/Steeltoe.All.yml for detailed test procedures including environment-specific filters and test categories
  • Integration tests require Docker containers (Config Server, Eureka Server) to be running
  • Platform-specific test skipping uses attributes like [FactSkippedOnPlatform] and [TheorySkippedOnPlatform] instead of trait categories
  • Code style validation instructions (using cleanupcode.ps1 and .github/workflows/verify-code-style.yml)

Troubleshooting

  • Troubleshooting guide including build warnings during refactoring (/p:TreatWarningsAsErrors=false)
  • Important note that all warnings should be addressed before committing final changes
  • Note clarifying that Steeltoe Azure Container Registry allows anonymous pulls (no authentication required)

Based on .github/workflows/Steeltoe.All.yml workflow commands.

Code Changes

  • ManagementOptionsTest.cs - Renamed DefaultJsonSerializerOptions to ExpectedJsonSerializerOptions to better reflect that these are the expected serializer settings that tests assert against, not the default system settings

The JavaScriptEncoder remains configured with UnsafeRelaxedJsonEscaping in ConfigureManagementOptions.cs as originally designed, which is required for the route mappings actuator to make generic method signatures human-readable (e.g., backticks in generic type names).

Branch Updates

Merged latest changes from main branch, including updates to test attributes that replace [Trait("Category", "SkipOnMacOS")] with [FactSkippedOnPlatform(nameof(OSPlatform.OSX))].

Fixes #1571

Quality checklist

  • Your code complies with our Coding Style.
  • You've updated unit and/or integration tests for your change, where applicable.
  • You've updated documentation for your change, where applicable.
    If your change affects other repositories, such as Documentation, Samples and/or MainSite, add linked PRs here.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.
  • You've added required license files and/or file headers (explaining where the code came from with proper attribution), where code is copied from StackOverflow, a blog, or OSS.
Original prompt

Let's resurrect some pieces of PR #1571, namely adding agents.md and the JavaScriptEncoder related changes


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add agents.md and related JavaScriptEncoder changes Add AGENTS.md with build/test documentation Nov 25, 2025
Copilot AI requested a review from TimHess November 25, 2025 21:42
@TimHess
Copy link
Member

TimHess commented Nov 26, 2025

@copilot review the commit history in #1571 to see the JavaScriptEncoder changes from .UnsafeRelaxedJsonEscaping to .Create(UnicodeRanges.BasicLatin, UnicodeRanges.Latin1Supplement) and back again -- re-implement the change.

Also, the Steeltoe Azure Container Registry allows anonymous pulls and no agent will have credentials that work with it. Update Agents.md accordingly

…h UnicodeRanges and update AGENTS.md for Azure Container Registry

Co-authored-by: TimHess <[email protected]>
Copy link
Contributor Author

Copilot AI commented Nov 26, 2025

@copilot review the commit history in #1571 to see the JavaScriptEncoder changes from .UnsafeRelaxedJsonEscaping to .Create(UnicodeRanges.BasicLatin, UnicodeRanges.Latin1Supplement) and back again...

Done. Changed JavaScriptEncoder from UnsafeRelaxedJsonEscaping to Create(UnicodeRanges.BasicLatin, UnicodeRanges.Latin1Supplement) in ConfigureManagementOptions.cs, DebugSerializerOptions.cs, and FluentAssertionsExtensions.cs. Also updated AGENTS.md to clarify that the Steeltoe Azure Container Registry allows anonymous pulls. (commit b37bdce)

Copilot AI changed the title Add AGENTS.md with build/test documentation Add AGENTS.md and improve JavaScriptEncoder configuration Nov 26, 2025
Copilot AI requested a review from TimHess November 26, 2025 16:14
Copilot AI changed the title Add AGENTS.md and improve JavaScriptEncoder configuration Add AGENTS.md with comprehensive build and test documentation Nov 26, 2025
Copilot AI requested a review from TimHess November 26, 2025 17:01
@github-actions
Copy link
Contributor

Summary - All Code Coverage (ubuntu-latest)

Line coverage Branch coverage

Assembly Line coverage Branch coverage
Steeltoe.Bootstrap.AutoConfiguration 97.4% 100%
Steeltoe.Common 85.6% 80.6%
Steeltoe.Common.Certificates 96.2% 85.5%
Steeltoe.Common.Hosting 84% 70%
Steeltoe.Common.Http 100% 85.2%
Steeltoe.Common.Logging 81.1% 56.2%
Steeltoe.Common.Net 64.5% 66.6%
Steeltoe.Configuration.Abstractions 98.5% 91.1%
Steeltoe.Configuration.CloudFoundry 99.1% 91.8%
Steeltoe.Configuration.ConfigServer 97.2% 91.6%
Steeltoe.Configuration.Encryption 97.6% 92.4%
Steeltoe.Configuration.Kubernetes.ServiceBindings 95.1% 89.3%
Steeltoe.Configuration.Placeholder 93.8% 84.7%
Steeltoe.Configuration.RandomValue 93.2% 90%
Steeltoe.Configuration.SpringBoot 98.3% 95%
Steeltoe.Connectors 93.9% 89.8%
Steeltoe.Connectors.EntityFrameworkCore 81.5% 75%
Steeltoe.Discovery.Configuration 92.3% 100%
Steeltoe.Discovery.Consul 98.1% 94.8%
Steeltoe.Discovery.Eureka 91.8% 85.2%
Steeltoe.Discovery.HttpClients 94.2% 95.4%
Steeltoe.Logging.Abstractions 99.4% 96.9%
Steeltoe.Logging.DynamicConsole 100% 95.4%
Steeltoe.Logging.DynamicSerilog 99.1% 95.4%
Steeltoe.Management.Abstractions 100% 100%
Steeltoe.Management.Endpoint 95.5% 89.1%
Steeltoe.Management.Prometheus 95.9% 91.6%
Steeltoe.Management.Tasks 100% ****
Steeltoe.Management.Tracing 100% 75%
Steeltoe.Security.Authentication.JwtBearer 100% 100%
Steeltoe.Security.Authentication.OpenIdConnect 73.8% 59%
Steeltoe.Security.Authorization.Certificate 96.3% 75%
Steeltoe.Security.DataProtection.Redis 100% ****

Copilot AI changed the title Add AGENTS.md with comprehensive build and test documentation Add AGENTS.md and scope JavaScriptEncoder to RouteMappings endpoint Nov 26, 2025
@TimHess TimHess requested a review from bart-vmware November 26, 2025 19:17
@TimHess TimHess marked this pull request as ready for review November 26, 2025 19:17
@TimHess
Copy link
Member

TimHess commented Nov 26, 2025

@copilot add some more content for agents.md

In general:
Only make high confidence suggestions when reviewing code changes.
Always use the latest version C#, currently C# 13 features.
Never add or change global.json unless explicitly asked to.
Never change NuGet.config files unless explicitly asked to.
Declare variables non-nullable, and check for null at entry points.
Trust the C# null annotations and don't add null checks when the type system says a value cannot be null.

For build troubleshooting:
If temporarily introducing warnings during refactoring, add /p:TreatWarningsAsErrors=false to prevent build failure
Important: All warnings should be addressed before committing any final changes

When writing tests:
Do not emit "Act", "Arrange" or "Assert" comments.

Copy link
Contributor Author

Copilot AI commented Nov 26, 2025

@copilot add some more content for agents.md

In general:
...

Added the requested content to AGENTS.md including:

  • General Guidelines section with code review, C# 13 features, and config file restrictions
  • Null handling guidelines (non-nullable variables, trust null annotations)
  • Testing guidelines (no Act/Arrange/Assert comments)
  • Build troubleshooting for /p:TreatWarningsAsErrors=false during refactoring with reminder to fix warnings before commit

(commit fb6b63a)

TimHess and others added 2 commits December 1, 2025 13:34
- also add some more context around tests
TimHess and others added 2 commits December 2, 2025 08:38
Copilot AI and others added 2 commits December 2, 2025 14:46
Copilot AI changed the title Add AGENTS.md and scope JavaScriptEncoder to RouteMappings endpoint Add AGENTS.md with comprehensive build and test documentation Dec 2, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 2, 2025

@TimHess TimHess merged commit accee88 into main Dec 2, 2025
20 of 34 checks passed
@TimHess TimHess deleted the copilot/add-agents-md-and-js-encoder branch December 2, 2025 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants