Skip to content

test: serialize legacy model environment overrides#1656

Merged
Aaronontheweb merged 6 commits into
devfrom
fix/serialize-legacy-model-environment-tests
Jul 15, 2026
Merged

test: serialize legacy model environment overrides#1656
Aaronontheweb merged 6 commits into
devfrom
fix/serialize-legacy-model-environment-tests

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Collaborator

Failure

PR #1653 exposed an unrelated Windows-only race: ModelCommandTests.Set_ClearContextWindow_RemovesStoredClamp failed because NETCLAW_Models__Main__ModelId was temporarily set by a concurrently running doctor test. The model command correctly refuses migration under that legacy override.

Fix

Put the two test classes that mutate NETCLAW_Models__Main__ModelId in an xUnit collection with DisableParallelization = true. This serializes the process-wide environment mutation against the entire assembly while preserving parallel execution for tests that do not mutate it.

Validation

  • Full Netclaw.Cli.Tests: 1,252 passed
  • dotnet slopwatch analyze
  • pwsh ./scripts/Add-FileHeaders.ps1 -Verify

@Aaronontheweb
Aaronontheweb enabled auto-merge (squash) July 15, 2026 14:51
@Aaronontheweb
Aaronontheweb force-pushed the fix/serialize-legacy-model-environment-tests branch from d659f9b to 8bff6d1 Compare July 15, 2026 14:57
@Aaronontheweb
Aaronontheweb merged commit f1d0840 into dev Jul 15, 2026
21 checks passed
@Aaronontheweb
Aaronontheweb deleted the fix/serialize-legacy-model-environment-tests branch July 15, 2026 18:03
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.

1 participant