Skip to content

Commit 2bc32fe

Browse files
committed
⬆️ Bump files with dotnet-file sync
# devlooped/oss - Enhance documentation instructions for project work devlooped/oss@e616d89 - If the OSMF eula is present, switch to its license file devlooped/oss@4b84c54 - Change file type from None to Content for osmfeula.txt devlooped/oss@fd03672 - Ignore *.local recursively devlooped/oss@a225b7a - Add Pack attribute to OSMFEULA content item devlooped/oss@dd13ed3 - Consider either None or Content for OSMF license patching devlooped/oss@083a37b - Cap rate limit wait at 5 minutes, abort if longer devlooped/oss@61a602f
1 parent 35daaf5 commit 2bc32fe

File tree

7 files changed

+138
-13
lines changed

7 files changed

+138
-13
lines changed

.github/copilot-instructions.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# .NET Repository
2+
3+
**Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.**
4+
5+
## Working Effectively
6+
7+
### Essential Build Commands
8+
- **Restore dependencies**: `dotnet restore`
9+
10+
- **Build the entire solution**: `dotnet build`
11+
12+
- **Run tests**: `dnx --yes retest`
13+
- Runs all unit tests across the solution
14+
- If tests fail due to Azure Storage, run the following commands and retry: `npm install azurite` and `npx azurite &`
15+
16+
### Build Validation and CI Requirements
17+
- **Always run before committing**:
18+
* `dnx --yes retest`
19+
* `dotnet format whitespace -v:diag --exclude ~/.nuget`
20+
* `dotnet format style -v:diag --exclude ~/.nuget`
21+
22+
### Project Structure and Navigation
23+
24+
| Directory | Description |
25+
|-----------|-------------|
26+
| `src/` | Contains the repo source code. |
27+
| `bin/` | Contains built packages (if any) |
28+
29+
### Code Style and Formatting
30+
31+
#### EditorConfig Rules
32+
The repository uses `.editorconfig` at the repo root for consistent code style.
33+
34+
- **Indentation**: 4 spaces for C# files, 2 spaces for XML/YAML/JSON
35+
- **Line endings**: LF (Unix-style)
36+
- **Sort using directives**: System.* namespaces first (`dotnet_sort_system_directives_first = true`)
37+
- **Type references**: Prefer language keywords over framework type names (`int` vs `Int32`)
38+
- **Modern C# features**: Use object/collection initializers, coalesce expressions when possible, use var when the type is apparent from the right-hand side of the assignment
39+
- **Visibility modifiers**: only explicitly specify visibility when different from the default (e.g. `public` for classes, no `internal` for classes or `private` for fields, etc.)
40+
41+
#### Formatting Validation
42+
- CI enforces formatting with `dotnet format whitespace` and `dotnet format style`
43+
- Run locally: `dotnet format whitespace --verify-no-changes -v:diag --exclude ~/.nuget`
44+
- Fix formatting: `dotnet format` (without `--verify-no-changes`)
45+
46+
### Testing Practices
47+
48+
#### Test Framework
49+
- **xUnit** for all unit and integration tests
50+
- **Moq** for mocking dependencies
51+
- Located in `src/*.Tests/`
52+
53+
#### Test Attributes
54+
Custom xUnit attributes are sometimes used for conditional test execution:
55+
- `[SecretsFact("XAI_API_KEY")]` - Skips test if required secrets are missing from user secrets or environment variables
56+
- `[LocalFact("SECRET")]` - Runs only locally (skips in CI), requires specified secrets
57+
- `[CIFact]` - Runs only in CI environment
58+
59+
### Dependency Management
60+
61+
#### Adding Dependencies
62+
- Add to appropriate `.csproj` file
63+
- Run `dotnet restore` to update dependencies
64+
- Ensure version consistency across projects where applicable
65+
66+
#### CI/CD Pipeline
67+
- **Build workflow**: `.github/workflows/build.yml` - runs on PR and push to main/rel/feature branches
68+
- **Publish workflow**: Publishes to Sleet feed when `SLEET_CONNECTION` secret is available
69+
- **OS matrix**: Configured in `.github/workflows/os-matrix.json` (defaults to ubuntu-latest)
70+
71+
### Special Files and Tools
72+
73+
#### dnx Command
74+
- **Purpose**: built-in tool for running arbitrary dotnet tools that are published on nuget.org. `--yes` auto-confirms install before run.
75+
- **Example**: `dnx --yes retest` - runs tests with automatic retry on transient failures (retest being a tool package published at https://www.nuget.org/packages/retest)
76+
- **In CI**: `dnx --yes retest -- --no-build` (skips build, runs tests only)
77+
78+
#### Directory.Build.rsp
79+
- MSBuild response file with default build arguments
80+
- `-nr:false` - disables node reuse
81+
- `-m:1` - single-threaded build (for stability)
82+
- `-v:m` - minimal verbosity
83+
84+
#### Code Quality
85+
- All PRs must pass format validation
86+
- Tests must pass on all target frameworks
87+
- Follow existing patterns and conventions in the codebase
88+
89+
## Documenting Work
90+
91+
Project implemention details, design and key decisions should be documented in a top-level AGENTS.md file at the repo root.
92+
Keep this file updated whenever you make change significant changes for future reference.
93+
94+
User-facing features and APIs should be documented to highlight (not extensively, as an overview) key project features and capabilities, in the readme.md file at the repo root.

.github/workflows/triage.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ jobs:
4949
# if we don't have at least 100 requests left, wait until reset
5050
if ($rate.remaining -lt 100) {
5151
$wait = ($rate.reset - (Get-Date (Get-Date).ToUniversalTime() -UFormat %s))
52-
echo "Rate limit remaining is $($rate.remaining), waiting for $($wait / 1000) seconds to reset"
52+
if ($wait -gt 300) {
53+
echo "Rate limit remaining is $($rate.remaining), reset in $wait seconds (more than 5'). Aborting."
54+
exit 1
55+
}
56+
echo "Rate limit remaining is $($rate.remaining), waiting $wait seconds to reset"
5357
sleep $wait
5458
$rate = gh api rate_limit | convertfrom-json | select -expandproperty rate
5559
echo "Rate limit has reset to $($rate.remaining) requests"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ BenchmarkDotNet.Artifacts
1212
.idea
1313
local.settings.json
1414
.env
15+
*.local
1516

1617
*.suo
1718
*.sdf

.netconfig

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@
5959
weak
6060
[file ".gitignore"]
6161
url = https://github.com/devlooped/oss/blob/main/.gitignore
62-
sha = 3776526342afb3f57da7e80f2095e5fdca3c31c9
63-
etag = 11767f73556aa4c6c8bcc153b77ee8e8114f99fa3b885b0a7d66d082f91e77b3
62+
sha = a225b7a9f609f26bcc24e0d84f663387be251a7d
63+
etag = 20a8b49d57024abbd85aac5b0020c30e5eb68e0384b2761e93727c8780c4a991
6464
weak
6565
[file "Directory.Build.rsp"]
6666
url = https://github.com/devlooped/oss/blob/main/Directory.Build.rsp
@@ -84,13 +84,13 @@
8484
weak
8585
[file "src/Directory.Build.props"]
8686
url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.props
87-
sha = 0ff8b7b79a82112678326d1dc5543ed890311366
88-
etag = 3ebde0a8630d526b80f15801179116e17a857ff880a4442e7db7b075efa4fd63
87+
sha = dd13ed3334135c30dcb1e3b2295dc7622de298d9
88+
etag = bd05f9f240823c0ac79ddfefe654061550c36f82dd94fa513b82900e92686a5f
8989
weak
9090
[file "src/Directory.Build.targets"]
9191
url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.targets
92-
sha = 4339749ef4b8f66def75931df09ef99c149f8421
93-
etag = 8b4492765755c030c4c351e058a92f53ab493cab440c1c0ef431f6635c4dae0e
92+
sha = 083a37bd9307ec820bac6ee3c7384083151d36d8
93+
etag = 907682e5632a2ba430357e6e042a4ca33cb8c94a3a215d3091aa03f5958a4877
9494
weak
9595
[file "src/kzu.snk"]
9696
url = https://github.com/devlooped/oss/blob/main/src/kzu.snk
@@ -134,8 +134,8 @@
134134
weak
135135
[file ".github/workflows/triage.yml"]
136136
url = https://github.com/devlooped/oss/blob/main/.github/workflows/triage.yml
137-
sha = 33000c0c4ab4eb4e0e142fa54515b811a189d55c
138-
etag = 013a47739e348f06891f37c45164478cca149854e6cd5c5158e6f073f852b61a
137+
sha = 61a602fc61eedbdae235f01e93657a6219ac2427
138+
etag = 152cd3a559c08da14d1da12a5262ba1d2e0ed6bed6d2eabf5bd209b0c35d8a75
139139
weak
140140
[file "osmfeula.txt"]
141141
url = https://github.com/devlooped/.github/blob/main/osmfeula.txt
@@ -156,3 +156,14 @@
156156
[file "src/nuget.config"]
157157
url = https://github.com/devlooped/oss/blob/main/src/nuget.config
158158
skip
159+
[file "readme.tmp.md"]
160+
url = https://github.com/devlooped/oss/blob/main/readme.tmp.md
161+
skip
162+
[file "oss.cs"]
163+
url = https://github.com/devlooped/oss/blob/main/oss.cs
164+
skip
165+
[file ".github/copilot-instructions.md"]
166+
url = https://github.com/devlooped/oss/blob/main/.github/copilot-instructions.md
167+
sha = e616d89d9537c4b8ccf1c20dd277ab82104167c4
168+
etag = 6ee650d118a57494d3545d54718ccaa5257b09d54504e9c21514fe596edd9678
169+
weak

readme.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,12 @@ The versioning scheme for packages is:
140140
<!-- sponsors.md -->
141141
[![Clarius Org](https://avatars.githubusercontent.com/u/71888636?v=4&s=39 "Clarius Org")](https://github.com/clarius)
142142
[![MFB Technologies, Inc.](https://avatars.githubusercontent.com/u/87181630?v=4&s=39 "MFB Technologies, Inc.")](https://github.com/MFB-Technologies-Inc)
143+
[![Khamza Davletov](https://avatars.githubusercontent.com/u/13615108?u=11b0038e255cdf9d1940fbb9ae9d1d57115697ab&v=4&s=39 "Khamza Davletov")](https://github.com/khamza85)
143144
[![SandRock](https://avatars.githubusercontent.com/u/321868?u=99e50a714276c43ae820632f1da88cb71632ec97&v=4&s=39 "SandRock")](https://github.com/sandrock)
144145
[![DRIVE.NET, Inc.](https://avatars.githubusercontent.com/u/15047123?v=4&s=39 "DRIVE.NET, Inc.")](https://github.com/drivenet)
145146
[![Keith Pickford](https://avatars.githubusercontent.com/u/16598898?u=64416b80caf7092a885f60bb31612270bffc9598&v=4&s=39 "Keith Pickford")](https://github.com/Keflon)
146147
[![Thomas Bolon](https://avatars.githubusercontent.com/u/127185?u=7f50babfc888675e37feb80851a4e9708f573386&v=4&s=39 "Thomas Bolon")](https://github.com/tbolon)
147148
[![Kori Francis](https://avatars.githubusercontent.com/u/67574?u=3991fb983e1c399edf39aebc00a9f9cd425703bd&v=4&s=39 "Kori Francis")](https://github.com/kfrancis)
148-
[![Uno Platform](https://avatars.githubusercontent.com/u/52228309?v=4&s=39 "Uno Platform")](https://github.com/unoplatform)
149149
[![Reuben Swartz](https://avatars.githubusercontent.com/u/724704?u=2076fe336f9f6ad678009f1595cbea434b0c5a41&v=4&s=39 "Reuben Swartz")](https://github.com/rbnswartz)
150150
[![Jacob Foshee](https://avatars.githubusercontent.com/u/480334?v=4&s=39 "Jacob Foshee")](https://github.com/jfoshee)
151151
[![](https://avatars.githubusercontent.com/u/33566379?u=bf62e2b46435a267fa246a64537870fd2449410f&v=4&s=39 "")](https://github.com/Mrxx99)
@@ -160,11 +160,12 @@ The versioning scheme for packages is:
160160
[![4OTC](https://avatars.githubusercontent.com/u/68428092?v=4&s=39 "4OTC")](https://github.com/4OTC)
161161
[![domischell](https://avatars.githubusercontent.com/u/66068846?u=0a5c5e2e7d90f15ea657bc660f175605935c5bea&v=4&s=39 "domischell")](https://github.com/DominicSchell)
162162
[![Adrian Alonso](https://avatars.githubusercontent.com/u/2027083?u=129cf516d99f5cb2fd0f4a0787a069f3446b7522&v=4&s=39 "Adrian Alonso")](https://github.com/adalon)
163-
[![Michael Hagedorn](https://avatars.githubusercontent.com/u/61711586?u=8f653dfcb641e8c18cc5f78692ebc6bb3a0c92be&v=4&s=39 "Michael Hagedorn")](https://github.com/Eule02)
164163
[![torutek](https://avatars.githubusercontent.com/u/33917059?v=4&s=39 "torutek")](https://github.com/torutek)
165-
[![mccaffers](https://avatars.githubusercontent.com/u/16667079?u=739e110e62a75870c981640447efa5eb2cb3bc8f&v=4&s=39 "mccaffers")](https://github.com/mccaffers)
164+
[![mccaffers](https://avatars.githubusercontent.com/u/16667079?u=110034edf51097a5ee82cb6a94ae5483568e3469&v=4&s=39 "mccaffers")](https://github.com/mccaffers)
166165
[![Seika Logiciel](https://avatars.githubusercontent.com/u/2564602?v=4&s=39 "Seika Logiciel")](https://github.com/SeikaLogiciel)
167166
[![Andrew Grant](https://avatars.githubusercontent.com/devlooped-user?s=39 "Andrew Grant")](https://github.com/wizardness)
167+
[![Lars](https://avatars.githubusercontent.com/u/1727124?v=4&s=39 "Lars")](https://github.com/latonz)
168+
[![prime167](https://avatars.githubusercontent.com/u/3722845?v=4&s=39 "prime167")](https://github.com/prime167)
168169

169170

170171
<!-- sponsors.md -->

src/Directory.Build.props

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@
166166
<Using Include="System.ArgumentNullException" Static="true" />
167167
</ItemGroup>
168168

169+
<ItemGroup Label="OSMF" Condition="Exists('$(MSBuildThisFileDirectory)..\osmfeula.txt')">
170+
<Content Include="$(MSBuildThisFileDirectory)..\osmfeula.txt" Link="osmfeula.txt" Pack="true" PackagePath="OSMFEULA.txt" />
171+
</ItemGroup>
172+
169173
<Import Project="Directory.props" Condition="Exists('Directory.props')"/>
170174
<Import Project="Directory.props.user" Condition="Exists('Directory.props.user')" />
171175

src/Directory.Build.targets

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174

175175
<Target Name="UpdatePackageMetadata"
176176
BeforeTargets="PrepareForBuild;GenerateMSBuildEditorConfigFileShouldRun;GetAssemblyVersion;GetPackageMetadata;GenerateNuspec;Pack"
177-
DependsOnTargets="EnsureProjectInformation"
177+
DependsOnTargets="EnsureProjectInformation;UpdatePackageLicense"
178178
Condition="'$(SourceControlInformationFeatureSupported)' == 'true' And
179179
'$(IsPackable)' == 'true'">
180180
<PropertyGroup>
@@ -184,6 +184,16 @@
184184
</PropertyGroup>
185185
</Target>
186186

187+
<Target Name="UpdatePackageLicense">
188+
<!-- If project has a None/Content item with PackagePath=OSMFEULA.txt -->
189+
<PropertyGroup Condition="@(None -> WithMetadataValue('PackagePath', 'OSMFEULA.txt')) != '' or @(Content -> WithMetadataValue('PackagePath', 'OSMFEULA.txt')) != ''">
190+
<PackageLicenseExpression></PackageLicenseExpression>
191+
<PackageLicenseFile>OSMFEULA.txt</PackageLicenseFile>
192+
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
193+
</PropertyGroup>
194+
</Target>
195+
196+
187197
<!-- Import before UsingTask because first to declare tasks wins -->
188198
<Import Project="Directory.targets" Condition="Exists('Directory.targets')"/>
189199
<Import Project="Directory.targets.user" Condition="Exists('Directory.targets.user')" />

0 commit comments

Comments
 (0)