Skip to content

Commit 01aeda8

Browse files
committed
config
1 parent ff0fea6 commit 01aeda8

File tree

13 files changed

+14
-11
lines changed

13 files changed

+14
-11
lines changed

AGENTS.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ Rule format:
110110
- For deploy-only, domain, CI, or static-site hosting tasks, do not spend time on unrelated app/browser test suites unless the user explicitly asks or the runtime behavior itself changes; prefer workflow, build, and publish-config validation only.
111111
- Repo-wide .NET SDK and test-runner selection belong in the root `global.json`; do not split `global.json` test-runner opt-ins per project or subfolder once the user asks for a global test-platform policy.
112112
- Browser and component tests must use one selector format only: `data-test`; do not mix in any alternate test-attribute naming variants.
113+
- Shared test-support libraries that contain no runnable test cases must not reference the TUnit engine package directly; keep them on non-engine TUnit packages so solution-level `dotnet test` does not discover zero-test support DLLs as runnable test apps.
113114
- Every runnable test project must declare `MaxParallelTestsForPipeline : EnvironmentAwareParallelLimitBase` with `LocalLimit = 15`; do not keep lower per-project local parallel caps unless the user explicitly asks for an exception.
115+
- Browser-suite runnable test projects must keep `CiLimit = 2` unless the user explicitly approves a different cap; do not inherit a broader default CI worker count after a suite split.
116+
- Local regression verification must include solution-level `dotnet test --solution ./PrompterOne.slnx -m:1` so test-project split changes are proven under the real all-tests entrypoint, not only as isolated per-project runs.
114117
- Selector-contract remediation requests must be handled repo-wide across all relevant test files (`Web.Tests` and `Web.UITests`), not as partial per-file cleanups.
115118
- Repo-wide quality audits and agent-generated review handoff artifacts must be written as root-level task files so other coding agents can pick them up quickly; do not bury those temporary audit results under `docs/` unless the task is explicitly about durable product documentation.
116119
- Repo-wide cleanup and review passes must explicitly inventory forbidden implementation string literals, `MarkupString` or raw-HTML UI composition, duplicated JS/CSS patterns, architecture-boundary drift, and `foreach`-driven test scenarios that should become isolated TUnit cases.
@@ -123,7 +126,7 @@ Rule format:
123126
### Commands
124127

125128
- `build`: `dotnet build ./PrompterOne.slnx -warnaserror`
126-
- `test`: `dotnet test --project ./tests/PrompterOne.Core.Tests/PrompterOne.Core.Tests.csproj && dotnet test --project ./tests/PrompterOne.Web.Tests/PrompterOne.Web.Tests.csproj && dotnet test --project ./tests/PrompterOne.Web.UITests.Shell/PrompterOne.Web.UITests.Shell.csproj && dotnet test --project ./tests/PrompterOne.Web.UITests.Studio/PrompterOne.Web.UITests.Studio.csproj && dotnet test --project ./tests/PrompterOne.Web.UITests.Editor/PrompterOne.Web.UITests.Editor.csproj && dotnet test --project ./tests/PrompterOne.Web.UITests.Reader/PrompterOne.Web.UITests.Reader.csproj`
129+
- `test`: `dotnet test --solution ./PrompterOne.slnx -m:1`
127130
- `format`: `dotnet format ./PrompterOne.slnx`
128131
- `coverage`: `dotnet test --project ./tests/PrompterOne.Core.Tests/PrompterOne.Core.Tests.csproj -- --coverage --coverage-output-format cobertura && dotnet test --project ./tests/PrompterOne.Web.Tests/PrompterOne.Web.Tests.csproj -- --coverage --coverage-output-format cobertura && dotnet test --project ./tests/PrompterOne.Web.UITests.Shell/PrompterOne.Web.UITests.Shell.csproj -- --coverage --coverage-output-format cobertura && dotnet test --project ./tests/PrompterOne.Web.UITests.Studio/PrompterOne.Web.UITests.Studio.csproj -- --coverage --coverage-output-format cobertura && dotnet test --project ./tests/PrompterOne.Web.UITests.Editor/PrompterOne.Web.UITests.Editor.csproj -- --coverage --coverage-output-format cobertura && dotnet test --project ./tests/PrompterOne.Web.UITests.Reader/PrompterOne.Web.UITests.Reader.csproj -- --coverage --coverage-output-format cobertura`
129132

@@ -140,6 +143,7 @@ Useful focused commands:
140143
- app run: `cd ./src/PrompterOne.Web && dotnet run`
141144
- core tests: `dotnet test --project ./tests/PrompterOne.Core.Tests/PrompterOne.Core.Tests.csproj`
142145
- component tests: `dotnet test --project ./tests/PrompterOne.Web.Tests/PrompterOne.Web.Tests.csproj`
146+
- all tests: `dotnet test --solution ./PrompterOne.slnx -m:1`
143147
- ui tests: `dotnet test --project ./tests/PrompterOne.Web.UITests.Shell/PrompterOne.Web.UITests.Shell.csproj && dotnet test --project ./tests/PrompterOne.Web.UITests.Studio/PrompterOne.Web.UITests.Studio.csproj && dotnet test --project ./tests/PrompterOne.Web.UITests.Editor/PrompterOne.Web.UITests.Editor.csproj && dotnet test --project ./tests/PrompterOne.Web.UITests.Reader/PrompterOne.Web.UITests.Reader.csproj`
144148
- ui shell tests: `dotnet test --project ./tests/PrompterOne.Web.UITests.Shell/PrompterOne.Web.UITests.Shell.csproj`
145149
- ui studio tests: `dotnet test --project ./tests/PrompterOne.Web.UITests.Studio/PrompterOne.Web.UITests.Studio.csproj`
@@ -153,7 +157,7 @@ Browser test execution rules:
153157
- Use one `dotnet test` process at a time for a browser suite project when running locally.
154158
- The browser suite family self-hosts the built WASM assets on a dynamically assigned loopback HTTP origin.
155159
- Each browser-suite host startup MUST request a fresh OS-assigned loopback port via `http://127.0.0.1:0`. Never pin or reuse a fixed browser-test port across runs.
156-
- Inside a single browser-suite process, the suite may run up to `15` parallel TUnit workers locally; when repeated full-suite CI runs prove resource contention, lower the CI worker cap instead of weakening browser assertions.
160+
- Inside a single browser-suite process, the suite may run up to `15` parallel TUnit workers locally and up to `2` in CI; do not raise the CI cap as part of split-suite plumbing unless the user explicitly asks for that experiment.
157161
- Do not run any `PrompterOne.Web.UITests*` project in parallel with another `dotnet build` or `dotnet test` command on the same local machine context.
158162
- In GitHub Actions, run the browser suite family in dedicated macOS jobs or matrix entries and keep supporting suites in separate jobs so CI can parallelize work without Linux x64 browser-runner contention stretching release validation.
159163
- GitHub Actions pipelines must expose explicit staged jobs with readable names such as restore, build, supporting tests, browser tests, release publish, and deploy; vague single-job `validate` graphs are not acceptable when the user needs to see pipeline phases clearly in the Actions UI.

Directory.Packages.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
<PackageVersion Include="Sentry" Version="6.3.0" />
2323
<PackageVersion Include="Shouldly" Version="4.3.0" />
2424
<PackageVersion Include="TUnit" Version="1.28.7" />
25+
<PackageVersion Include="TUnit.Assertions" Version="1.28.7" />
26+
<PackageVersion Include="TUnit.Core" Version="1.28.7" />
2527
<PackageVersion Include="TUnit.Playwright" Version="1.28.7" />
2628
</ItemGroup>
2729
</Project>

tests/PrompterOne.Core.Tests/TestAssemblyConfiguration.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ namespace PrompterOne.Core.Tests;
99
/// </summary>
1010
public sealed class MaxParallelTestsForPipeline : EnvironmentAwareParallelLimitBase
1111
{
12-
protected override int LocalLimit { get; } = 15;
1312
}

tests/PrompterOne.Testing/AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
- Keep only reusable test infrastructure here; do not move feature-specific test cases or app behavior assertions into this project.
1616
- Shared helpers must stay test-only and must not leak into production projects.
1717
- Prefer stable low-level helpers that reduce duplication across multiple test projects.
18+
- This shared support project must not reference the runnable TUnit engine package directly; keep it on non-engine TUnit packages so solution-level `dotnet test` does not try to execute it as a zero-test app.
1819

1920
## Project-Local Commands
2021

tests/PrompterOne.Testing/PrompterOne.Testing.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<ItemGroup>
1010
<PackageReference Include="Shouldly" />
11-
<PackageReference Include="TUnit" />
11+
<PackageReference Include="TUnit.Core" />
1212
</ItemGroup>
1313

1414
</Project>

tests/PrompterOne.Web.Tests/TestAssemblyConfiguration.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ namespace PrompterOne.Web.Tests;
99
/// </summary>
1010
public sealed class MaxParallelTestsForPipeline : EnvironmentAwareParallelLimitBase
1111
{
12-
protected override int LocalLimit { get; } = 15;
1312
}

tests/PrompterOne.Web.UITests.Editor/TestAssemblyConfiguration.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ namespace PrompterOne.Web.UITests.Editor;
66

77
public sealed class MaxParallelTestsForPipeline : EnvironmentAwareParallelLimitBase
88
{
9-
protected override int LocalLimit { get; } = 15;
109
}

tests/PrompterOne.Web.UITests.Reader/TestAssemblyConfiguration.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ namespace PrompterOne.Web.UITests.Reader;
66

77
public sealed class MaxParallelTestsForPipeline : EnvironmentAwareParallelLimitBase
88
{
9-
protected override int LocalLimit { get; } = 15;
109
}

tests/PrompterOne.Web.UITests.Shell/TestAssemblyConfiguration.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ namespace PrompterOne.Web.UITests.Shell;
66

77
public sealed class MaxParallelTestsForPipeline : EnvironmentAwareParallelLimitBase
88
{
9-
protected override int LocalLimit { get; } = 15;
109
}

tests/PrompterOne.Web.UITests.Studio/TestAssemblyConfiguration.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ namespace PrompterOne.Web.UITests.Studio;
66

77
public sealed class MaxParallelTestsForPipeline : EnvironmentAwareParallelLimitBase
88
{
9-
protected override int LocalLimit { get; } = 15;
109
}

0 commit comments

Comments
 (0)