Skip to content

Commit e9dca79

Browse files
committed
Restore browser suite parallel limits
1 parent 045888f commit e9dca79

File tree

8 files changed

+126
-0
lines changed

8 files changed

+126
-0
lines changed

fix-ui-suite-split-ci.plan.md

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Fix UI Suite Split CI Plan
2+
3+
## Goal
4+
5+
Restore the repository to a state where the test-project split still passes the real all-tests entrypoint and the referenced GitHub Actions run failure pattern is understood and fixed.
6+
7+
## Scope
8+
9+
### In Scope
10+
11+
- Inspect the failing GitHub Actions run `24138107179` and capture the concrete failing test pattern.
12+
- Run the full local all-tests entrypoint with `dotnet test --solution ./PrompterOne.slnx -m:1` and capture the real local baseline.
13+
- Identify the root cause introduced by the UI-suite split and fix the test/configuration/infrastructure issues.
14+
- Update repo commands/docs/config only where required to keep the solution-level test entrypoint correct.
15+
- Re-run the full local verification path until the all-tests entrypoint and the affected suites are green.
16+
17+
### Out Of Scope
18+
19+
- Unrelated feature work outside the failing test/infrastructure path.
20+
- Expanding the split further for wall-clock optimization before the current CI regression is green again.
21+
22+
## Constraints And Risks
23+
24+
- The browser test family must remain self-hosted and browser-realistic; no manual app startup or ad-hoc runners.
25+
- Local verification must include `dotnet test --solution ./PrompterOne.slnx -m:1`.
26+
- Browser test projects must still avoid unsafe overlapping local `dotnet build` or `dotnet test` processes.
27+
- The fix should preserve the intended project split; do not collapse the suites back into one DLL unless the user explicitly asks for that reversal.
28+
- CI and local failures may differ if solution-level test orchestration exposes runner- or discovery-level issues rather than scenario failures.
29+
30+
## Ordered Implementation Plan
31+
32+
- [x] Step 1. Capture the failing GitHub Actions baseline.
33+
- What: Read the failing GitHub Actions runs, identify failing jobs, error signatures, and the actual failing test counts or discovery failures.
34+
- Where: GitHub Actions logs for the referenced run.
35+
- Verify: Summarize the concrete red signal in this plan before editing code.
36+
37+
- [x] Step 2. Capture the local all-tests baseline from the real entrypoint.
38+
- What: Run the real solution-level entrypoint from repo root and record all failures, aborts, or discovery errors.
39+
- Where: Solution root.
40+
- Verify: Update the failing-tests section below with the exact local failures.
41+
42+
- [x] Step 3. Isolate the root cause introduced by the UI-suite split.
43+
- What: Determine whether the failure is in solution-level test orchestration, test discovery, assembly parallelization, shared browser harness ownership, CI workflow shape, or suite-specific test configuration.
44+
- Where: Test project configs, shared UI test base, workflow files, and failing suites.
45+
- Verify: Reproduce the issue with the smallest meaningful command before applying the fix.
46+
47+
- [ ] Step 4. Apply the minimal fix set while preserving the split suite architecture.
48+
- What: Adjust project/test configuration, shared harness code, or workflow/test entrypoint plumbing needed to make the split compatible with the all-tests entrypoint.
49+
- Where: Only the owning test/configuration files.
50+
- Verify: Run the directly affected command(s) and confirm the original failure signature is gone.
51+
52+
- [ ] Step 5. Re-run layered verification.
53+
- What: Re-run the smallest affected tests, then the affected suites, then the full solution-level `dotnet test --solution ./PrompterOne.slnx -m:1`.
54+
- Where: Repo root and affected test projects.
55+
- Verify: All affected commands pass cleanly.
56+
57+
- [ ] Step 6. Push the fix and watch the replacement GitHub Actions run.
58+
- What: Commit the test-configuration fix, push it to `main` per the user's explicit instruction, and monitor the replacement browser-suite run to completion.
59+
- Where: Repo root and GitHub Actions.
60+
- Verify: Replacement run reaches green, or any remaining failure is captured as a new concrete root cause.
61+
62+
- [ ] Step 7. Run final repo validation.
63+
- What: Run the repo-required build and format commands after tests are green.
64+
- Where: Repo root.
65+
- Verify:
66+
- `dotnet build ./PrompterOne.slnx -warnaserror`
67+
- `dotnet test --solution ./PrompterOne.slnx -m:1`
68+
- `dotnet format ./PrompterOne.slnx`
69+
- `dotnet build ./PrompterOne.slnx -warnaserror`
70+
71+
## Testing Methodology
72+
73+
- Start with the real failing CI run and the real local all-tests entrypoint.
74+
- Reproduce the smallest failing command before changing code.
75+
- Preserve real browser acceptance coverage; do not “fix” by skipping or narrowing suites.
76+
- Use targeted reruns for diagnosis, then end on the full solution-level test command.
77+
78+
## Baseline And Existing Failures
79+
80+
- [x] GitHub Actions baseline captured
81+
- Symptom: runs `24138107179` and `24139733925` both show all four split browser jobs failing independently in CI while the supporting suites job stays green.
82+
- Root-cause notes: the current failing SHA `045888f574fdb4c6d9fac9db7e0eaa6bf32135e8` is `Revert "Restore browser test parallel limits"`, which removed the previously restored browser-suite `CiLimit = 2` and `LocalLimit = 15` overrides. The suites now inherit `CiLimit = 10`, which correlates with widespread first-page app-root visibility failures across `Shell`, `Studio`, `Reader`, and `Editor`.
83+
- Intended fix path: restore the safe browser-suite CI cap while keeping the requested per-project `MaxParallelTestsForPipeline` type.
84+
85+
- [x] Local solution-level test baseline captured
86+
- Symptom: `dotnet test --solution ./PrompterOne.slnx` starts multiple browser suite DLLs concurrently and also tries to execute `tests/PrompterOne.Testing` plus the shared `tests/PrompterOne.Web.UITests` base project as runnable test apps with zero tests.
87+
- Root-cause notes: the solution-level entrypoint is currently invalid in two ways:
88+
1. support/base projects still reference `TUnit`, so they are discovered as executable test apps despite having zero tests;
89+
2. the solution-level run needs serialized project execution because multiple browser suite DLLs must not self-host concurrently on one local machine.
90+
- Intended fix path: convert support/base projects to non-engine TUnit package references, then use a serial solution-level test entrypoint.
91+
92+
- [ ] Root-cause remediation checklist
93+
- [ ] Restore browser-suite `CiLimit = 2` while keeping `LocalLimit = 15` in each runnable UI test project.
94+
- [ ] Convert `tests/PrompterOne.Testing` and `tests/PrompterOne.Web.UITests` to non-runnable shared test libraries.
95+
- [ ] Update repo command/documentation surface to `dotnet test --solution ./PrompterOne.slnx -m:1`.
96+
- [ ] Prove `Shell`, `Studio`, `Reader`, and `Editor` pass again under the fixed configuration.
97+
- [ ] Prove the full solution-level all-tests entrypoint passes locally.
98+
- [ ] Prove the replacement GitHub Actions run on the pushed fix is green.
99+
100+
## Final Validation Skills
101+
102+
- [ ] `github:gh-fix-ci`
103+
- Reason: inspect the failing GitHub Actions run and retrieve the authoritative CI failure signature.
104+
105+
- [ ] `dotnet`
106+
- Reason: validate the solution-level .NET test/build workflow and keep fixes aligned with the repo’s actual stack.
107+
108+
## Done Criteria
109+
110+
- [ ] The referenced GitHub Actions failure is understood concretely.
111+
- [ ] `dotnet test --solution ./PrompterOne.slnx -m:1` passes locally.
112+
- [ ] The split browser-suite architecture remains intact.
113+
- [ ] The replacement GitHub Actions run is green.
114+
- [ ] Final build/format validation passes.

tests/PrompterOne.Core.Tests/TestAssemblyConfiguration.cs

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

tests/PrompterOne.Web.Tests/TestAssemblyConfiguration.cs

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

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

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

77
public sealed class MaxParallelTestsForPipeline : EnvironmentAwareParallelLimitBase
88
{
9+
protected override int CiLimit { get; } = 2;
10+
protected override int LocalLimit { get; } = 15;
911
}

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

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

77
public sealed class MaxParallelTestsForPipeline : EnvironmentAwareParallelLimitBase
88
{
9+
protected override int CiLimit { get; } = 2;
10+
protected override int LocalLimit { get; } = 15;
911
}

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

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

77
public sealed class MaxParallelTestsForPipeline : EnvironmentAwareParallelLimitBase
88
{
9+
protected override int CiLimit { get; } = 2;
10+
protected override int LocalLimit { get; } = 15;
911
}

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

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

77
public sealed class MaxParallelTestsForPipeline : EnvironmentAwareParallelLimitBase
88
{
9+
protected override int CiLimit { get; } = 2;
10+
protected override int LocalLimit { get; } = 15;
911
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ namespace PrompterOne.Web.UITests;
44

55
public sealed class MaxParallelTestsForPipeline : EnvironmentAwareParallelLimitBase
66
{
7+
protected override int CiLimit { get; } = 2;
8+
protected override int LocalLimit { get; } = 15;
79
}
810

911
internal static class UiTestParallelization

0 commit comments

Comments
 (0)