diff --git a/.editorconfig b/.editorconfig index ecb98adf9..e138b6593 100644 --- a/.editorconfig +++ b/.editorconfig @@ -953,7 +953,7 @@ dotnet_diagnostic.VSTHRD003.severity = none [tests/OpenCode.Sdk.Tests/Harness/Ownership/OwnedOperationDeadlineTests.cs] dotnet_diagnostic.VSTHRD003.severity = none -[tests/OpenCode.Sdk.Tests/Support/SessionLogTranscriptTests.cs] +[tests/OpenCode.Sdk.Tests/Sessions/Support/SessionLogTranscriptTests.cs] dotnet_diagnostic.VSTHRD003.severity = none # The session-removal fault proof controls interrupt entry and expiry, then drains cancellation @@ -970,7 +970,7 @@ dotnet_diagnostic.VSTHRD003.severity = none # These diagnostic proofs control their own operation deadlines and retain supplied disposal # tasks until finally releases and drains them. Winner: causal fixture/status ownership proofs; # the rule remains enabled outside these exact files. -[tests/OpenCode.Sdk.Tests/Support/PtyFailureDiagnosticsTests.cs] +[tests/OpenCode.Sdk.Tests/Ptys/Support/PtyFailureDiagnosticsTests.cs] dotnet_diagnostic.VSTHRD003.severity = none [tests/OpenCode.Sdk.Tests/Support/ServerDiagnosticScenario.cs] @@ -1155,7 +1155,7 @@ dotnet_diagnostic.MA0045.severity = none # DriveManifestTests.cs documents above - and an async factory would make the arrangement # awaitable without making it asynchronous. Winner: the cross-TFM arrangement shape; MA0045 # remains enabled for every other file. -[tests/OpenCode.Sdk.Tests/Support/PathCommandShim.cs] +[tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/PathCommandShim.cs] dotnet_diagnostic.MA0045.severity = none # Optional is the tri-state carrier for a request property the document declares both optional diff --git a/docs/engineering/testing-style.md b/docs/engineering/testing-style.md index d259ee4c4..ab9588c11 100644 --- a/docs/engineering/testing-style.md +++ b/docs/engineering/testing-style.md @@ -1,6 +1,6 @@ # Testing Style — authoring tests -Date: 2026-10-16 +Date: 2026-10-17 Binding authorship style for every test in this repository. `quality-gates.md` owns the current assurance posture and completion gates; operational build-out state belongs in @@ -64,9 +64,11 @@ sized to need: like a BCL type shadows it there: tests under `Debug/` declare `OpenCode.Sdk.Tests.Debug` and qualify `System.Diagnostics.Debug`. A guard test refuses two source types that project onto one test path. -- A helper or fixture one slice uses lives in that test slice's `Support/` or `Fixtures/`; - helpers several slices share stay in the test project's root `Support/`. Live-server harness - code lives in `tests/OpenCode.Sdk.Tests/Harness/`. Files another test project links, and the +- In SDK.Tests, a helper or fixture used by one slice lives in that slice's `Support/` or + `Fixtures/`. Helpers and fixtures used by several slices stay in the test project's root + `Support/` and `Fixtures/`. Embedded fixtures retain their `Fixtures.` resource-name prefix + through explicit `LogicalName` metadata. Live-server harness code lives in + `tests/OpenCode.Sdk.Tests/Harness/`. Files another test project links, and the embedded-fixture loader, stay in `tests/Shared/`, compiled through explicit links. There is no separate test-support project. - The mirror rule also applies to test infrastructure: `Harness/X.cs` is tested in @@ -99,8 +101,9 @@ analyzer enforces it wherever an abstractions assembly is referenced — even te **Raw JSON/XML/string-literal dumps pasted inline in test methods are forbidden.** A test body states *intent*; the data it runs on lives in one of three sanctioned homes: -1. **Embedded fixture files** — under the owning test project's `Fixtures/` folder, - loaded through a resource-loader helper by name. The default for wire-shaped data: +1. **Embedded fixture files** — in the `Fixtures/` folder of the slice that uses them, or the test + project's root `Fixtures/` when several slices share them, loaded through a resource-loader helper + by name. The default for wire-shaped data: one small file per quirk, named for the construct it isolates, reviewable on its own. 2. **Typed builders** — for variation families where files would multiply: red tests composing a valid base plus exactly one offending construct through the builder. The diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Routes/wildcard-path-corpus.json b/tests/OpenCode.Sdk.Tests/FileSystem/Fixtures/wildcard-path-corpus.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Routes/wildcard-path-corpus.json rename to tests/OpenCode.Sdk.Tests/FileSystem/Fixtures/wildcard-path-corpus.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Routes/wildcard-path-expected.json b/tests/OpenCode.Sdk.Tests/FileSystem/Fixtures/wildcard-path-expected.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Routes/wildcard-path-expected.json rename to tests/OpenCode.Sdk.Tests/FileSystem/Fixtures/wildcard-path-expected.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Server/diagnostic-peer.js b/tests/OpenCode.Sdk.Tests/Harness/Fixtures/diagnostic-peer.js similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Server/diagnostic-peer.js rename to tests/OpenCode.Sdk.Tests/Harness/Fixtures/diagnostic-peer.js diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Server/exited-diagnostic-peer.js b/tests/OpenCode.Sdk.Tests/Harness/Fixtures/exited-diagnostic-peer.js similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Server/exited-diagnostic-peer.js rename to tests/OpenCode.Sdk.Tests/Harness/Fixtures/exited-diagnostic-peer.js diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Server/persistent-simulation-host.js b/tests/OpenCode.Sdk.Tests/Harness/Fixtures/persistent-simulation-host.js similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Server/persistent-simulation-host.js rename to tests/OpenCode.Sdk.Tests/Harness/Fixtures/persistent-simulation-host.js diff --git a/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Discovery/LoopbackTransportTests.cs b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Discovery/LoopbackTransportTests.cs index a3ab4bde0..8156434da 100644 --- a/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Discovery/LoopbackTransportTests.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Discovery/LoopbackTransportTests.cs @@ -1,6 +1,7 @@ using System.Net; using System.Net.Sockets; using OpenCode.Sdk.Internal; +using OpenCode.Sdk.Tests.Hosting.BackgroundService.Support; using OpenCode.Sdk.Tests.Support; namespace OpenCode.Sdk.Tests.Hosting.BackgroundService.Discovery; diff --git a/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Discovery/OpenCodeServerDiscoveryIsolatedProcessTests.cs b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Discovery/OpenCodeServerDiscoveryIsolatedProcessTests.cs index 25bc3be87..04388f791 100644 --- a/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Discovery/OpenCodeServerDiscoveryIsolatedProcessTests.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Discovery/OpenCodeServerDiscoveryIsolatedProcessTests.cs @@ -1,6 +1,7 @@ using System.Globalization; using System.Net; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Hosting.BackgroundService.Support; using OpenCode.Sdk.Tests.Support; using Testably.Abstractions; diff --git a/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Discovery/OpenCodeServerDiscoveryLiveTests.cs b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Discovery/OpenCodeServerDiscoveryLiveTests.cs index 38ec75b7d..04cd4d53c 100644 --- a/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Discovery/OpenCodeServerDiscoveryLiveTests.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Discovery/OpenCodeServerDiscoveryLiveTests.cs @@ -1,5 +1,6 @@ using OpenCode.Sdk.Internal; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Hosting.BackgroundService.Support; using OpenCode.Sdk.Tests.Support; using Testably.Abstractions; diff --git a/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Discovery/ServiceInfoProbeTests.cs b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Discovery/ServiceInfoProbeTests.cs index 6f8184eac..f873dc858 100644 --- a/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Discovery/ServiceInfoProbeTests.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Discovery/ServiceInfoProbeTests.cs @@ -4,6 +4,7 @@ using System.Text; using OpenCode.Sdk.Internal; using OpenCode.Sdk.Tests.Hosting.BackgroundService.Registration; +using OpenCode.Sdk.Tests.Hosting.BackgroundService.Support; using OpenCode.Sdk.Tests.Support; namespace OpenCode.Sdk.Tests.Hosting.BackgroundService.Discovery; diff --git a/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Ensure/OpenCodeServerEnsureLiveTests.cs b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Ensure/OpenCodeServerEnsureLiveTests.cs index 3c2209f60..a308a7575 100644 --- a/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Ensure/OpenCodeServerEnsureLiveTests.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Ensure/OpenCodeServerEnsureLiveTests.cs @@ -1,6 +1,7 @@ using System.Text; using OpenCode.Sdk.Internal; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Hosting.BackgroundService.Support; using OpenCode.Sdk.Tests.Support; using Testably.Abstractions; diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-array-root.json b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-array-root.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-array-root.json rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-array-root.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-fractional-pid.json b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-fractional-pid.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-fractional-pid.json rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-fractional-pid.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-invalid-handoff.json b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-invalid-handoff.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-invalid-handoff.json rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-invalid-handoff.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-malformed.json b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-malformed.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-malformed.json rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-malformed.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-missing-expiry.json b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-missing-expiry.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-missing-expiry.json rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-missing-expiry.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-missing-source.json b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-missing-source.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-missing-source.json rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-missing-source.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-nonfinite-expiry.json b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-nonfinite-expiry.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-nonfinite-expiry.json rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-nonfinite-expiry.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-null-handoff.json b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-null-handoff.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-null-handoff.json rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-null-handoff.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-response-expired.json b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-response-expired.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-response-expired.json rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-response-expired.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-response-invalid.json b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-response-invalid.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-response-invalid.json rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-response-invalid.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-response-missing.json b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-response-missing.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-response-missing.json rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-response-missing.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-response-null.json b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-response-null.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-response-null.json rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-response-null.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-response-ticket.json b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-response-ticket.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-response-ticket.json rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-response-ticket.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-sidecar-second-value.json b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-sidecar-second-value.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-sidecar-second-value.json rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-sidecar-second-value.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-sidecar-trailing-garbage.json b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-sidecar-trailing-garbage.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-sidecar-trailing-garbage.json rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-sidecar-trailing-garbage.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-source-without-id.json b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-source-without-id.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-source-without-id.json rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-source-without-id.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-string-pid.json b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-string-pid.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-string-pid.json rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-string-pid.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-ticket-second-value.json b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-ticket-second-value.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-ticket-second-value.json rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-ticket-second-value.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-ticket-trailing-garbage.json b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-ticket-trailing-garbage.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-ticket-trailing-garbage.json rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-ticket-trailing-garbage.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-unknown-members.json b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-unknown-members.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-unknown-members.json rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-unknown-members.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-valid.json b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-valid.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/pty-handoff-valid.json rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/pty-handoff-valid.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/registration-modern.json b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/registration-modern.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/registration-modern.json rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/registration-modern.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/service-config-env.json b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/service-config-env.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/BackgroundService/service-config-env.json rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Fixtures/service-config-env.json diff --git a/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Handoff/ServicePtyHandoffScenario.cs b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Handoff/ServicePtyHandoffScenario.cs index 96175c0dc..89ed689fe 100644 --- a/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Handoff/ServicePtyHandoffScenario.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Handoff/ServicePtyHandoffScenario.cs @@ -1,6 +1,7 @@ using System.Net; using NSubstitute; using OpenCode.Sdk.Internal; +using OpenCode.Sdk.Tests.Hosting.BackgroundService.Support; using OpenCode.Sdk.Tests.Support; using Testably.Abstractions.Testing; diff --git a/tests/OpenCode.Sdk.Tests/Support/LoopbackConnectRecord.cs b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Support/LoopbackConnectRecord.cs similarity index 90% rename from tests/OpenCode.Sdk.Tests/Support/LoopbackConnectRecord.cs rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Support/LoopbackConnectRecord.cs index cd478daa3..9c6254a95 100644 --- a/tests/OpenCode.Sdk.Tests/Support/LoopbackConnectRecord.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Support/LoopbackConnectRecord.cs @@ -1,6 +1,6 @@ using System.Net.Sockets; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Hosting.BackgroundService.Support; /// One connect the probe's loopback transport made itself, as saw it. /// Whether the loopback option took on the socket it connected. diff --git a/tests/OpenCode.Sdk.Tests/Support/RecordingLoopbackConnector.cs b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Support/RecordingLoopbackConnector.cs similarity index 95% rename from tests/OpenCode.Sdk.Tests/Support/RecordingLoopbackConnector.cs rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Support/RecordingLoopbackConnector.cs index ddcd21f93..65725c6a4 100644 --- a/tests/OpenCode.Sdk.Tests/Support/RecordingLoopbackConnector.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Support/RecordingLoopbackConnector.cs @@ -2,7 +2,7 @@ using System.Net.Sockets; using OpenCode.Sdk.Internal; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Hosting.BackgroundService.Support; /// /// The platform connect under the probe's loopback transport, recording each connect the transport diff --git a/tests/OpenCode.Sdk.Tests/Support/ScriptedLoopbackConnector.cs b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Support/ScriptedLoopbackConnector.cs similarity index 92% rename from tests/OpenCode.Sdk.Tests/Support/ScriptedLoopbackConnector.cs rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Support/ScriptedLoopbackConnector.cs index 461a24ec0..b914cecad 100644 --- a/tests/OpenCode.Sdk.Tests/Support/ScriptedLoopbackConnector.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Support/ScriptedLoopbackConnector.cs @@ -1,7 +1,7 @@ #if !NET using OpenCode.Sdk.Internal; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Hosting.BackgroundService.Support; /// /// A loopback connect that completes in a chosen order, with no socket traffic: it cancels the diff --git a/tests/OpenCode.Sdk.Tests/Support/ServiceFixtureOutput.cs b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Support/ServiceFixtureOutput.cs similarity index 97% rename from tests/OpenCode.Sdk.Tests/Support/ServiceFixtureOutput.cs rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Support/ServiceFixtureOutput.cs index fdb207177..ef1b67d9d 100644 --- a/tests/OpenCode.Sdk.Tests/Support/ServiceFixtureOutput.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Support/ServiceFixtureOutput.cs @@ -1,6 +1,6 @@ using System.Globalization; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Hosting.BackgroundService.Support; /// /// The isolated discovery executable's output as a test reads it: the one stdout line for a found diff --git a/tests/OpenCode.Sdk.Tests/Support/ServiceTimingData.cs b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Support/ServiceTimingData.cs similarity index 95% rename from tests/OpenCode.Sdk.Tests/Support/ServiceTimingData.cs rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Support/ServiceTimingData.cs index 1bb1a136e..147d5e7c0 100644 --- a/tests/OpenCode.Sdk.Tests/Support/ServiceTimingData.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Support/ServiceTimingData.cs @@ -1,7 +1,7 @@ using System.Globalization; using OpenCode.Sdk.Internal; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Hosting.BackgroundService.Support; /// /// The probe bound of every background-service test about the probe's answer rather than its diff --git a/tests/OpenCode.Sdk.Tests/Support/SocketConnectRecorder.cs b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Support/SocketConnectRecorder.cs similarity index 97% rename from tests/OpenCode.Sdk.Tests/Support/SocketConnectRecorder.cs rename to tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Support/SocketConnectRecorder.cs index 6debcbdac..4e9e36eef 100644 --- a/tests/OpenCode.Sdk.Tests/Support/SocketConnectRecorder.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Support/SocketConnectRecorder.cs @@ -1,7 +1,7 @@ #if NET using System.Diagnostics.Tracing; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Hosting.BackgroundService.Support; /// /// Records this process's socket connect events while it lives, so a test can read that its own diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Server/child-tree.js b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Fixtures/child-tree.js similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Server/child-tree.js rename to tests/OpenCode.Sdk.Tests/Hosting/Launcher/Fixtures/child-tree.js diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Server/ladder-tree.js b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Fixtures/ladder-tree.js similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Server/ladder-tree.js rename to tests/OpenCode.Sdk.Tests/Hosting/Launcher/Fixtures/ladder-tree.js diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Server/stdout-holder.js b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Fixtures/stdout-holder.js similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Server/stdout-holder.js rename to tests/OpenCode.Sdk.Tests/Hosting/Launcher/Fixtures/stdout-holder.js diff --git a/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerCommandResolutionTests.cs b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerCommandResolutionTests.cs index c48719bcc..93ddfc364 100644 --- a/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerCommandResolutionTests.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerCommandResolutionTests.cs @@ -1,5 +1,6 @@ using OpenCode.Sdk.Internal; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Hosting.Launcher.Support; using OpenCode.Sdk.Tests.Support; using Testably.Abstractions; diff --git a/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerDescriptorTests.cs b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerDescriptorTests.cs index d6e146d24..282a50920 100644 --- a/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerDescriptorTests.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerDescriptorTests.cs @@ -2,6 +2,7 @@ using System.Globalization; using OpenCode.Sdk.Internal; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Hosting.Launcher.Support; using OpenCode.Sdk.Tests.Support; using Testably.Abstractions; using TUnit.Assertions.Enums; diff --git a/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerExitedTests.cs b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerExitedTests.cs index 0b44654de..567df3095 100644 --- a/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerExitedTests.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerExitedTests.cs @@ -1,5 +1,6 @@ using OpenCode.Sdk.Internal; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Hosting.Launcher.Support; using OpenCode.Sdk.Tests.Support; using Testably.Abstractions; diff --git a/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerJobTests.cs b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerJobTests.cs index 115b167dd..d8acc9d54 100644 --- a/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerJobTests.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerJobTests.cs @@ -5,6 +5,7 @@ using Microsoft.Win32.SafeHandles; using OpenCode.Sdk.Internal; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Hosting.Launcher.Support; using OpenCode.Sdk.Tests.Support; using Testably.Abstractions; diff --git a/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerLifecycleTests.cs b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerLifecycleTests.cs index 88194d641..87d67c3da 100644 --- a/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerLifecycleTests.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerLifecycleTests.cs @@ -3,6 +3,7 @@ using NSubstitute; using OpenCode.Sdk.Internal; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Hosting.Launcher.Support; using OpenCode.Sdk.Tests.Support; using Testably.Abstractions; using TUnit.Assertions.Enums; diff --git a/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerOwnerTests.cs b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerOwnerTests.cs index 0d87ab679..6521433d7 100644 --- a/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerOwnerTests.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerOwnerTests.cs @@ -1,6 +1,7 @@ using System.Diagnostics; using System.Globalization; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Hosting.Launcher.Support; using OpenCode.Sdk.Tests.Support; using Testably.Abstractions; diff --git a/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerProcessGroupTests.cs b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerProcessGroupTests.cs index bbc1f9166..e6407194e 100644 --- a/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerProcessGroupTests.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerProcessGroupTests.cs @@ -3,6 +3,7 @@ using NSubstitute; using OpenCode.Sdk.Internal; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Hosting.Launcher.Support; using OpenCode.Sdk.Tests.Support; using Testably.Abstractions; diff --git a/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerReadinessTests.cs b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerReadinessTests.cs index 9bb19e04d..0b1e790a4 100644 --- a/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerReadinessTests.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerReadinessTests.cs @@ -1,6 +1,8 @@ using NSubstitute; using OpenCode.Sdk.Internal; +using OpenCode.Sdk.Tests.Hosting.Launcher.Support; using OpenCode.Sdk.Tests.Support; +using SdkTestSupport = OpenCode.Sdk.Tests.Support; namespace OpenCode.Sdk.Tests.Hosting.Launcher; @@ -149,7 +151,7 @@ public Task StartAsync_Should_Keep_A_Recorded_Exit_When_The_Caller_Cancels_Durin AssertRecordedAtTimeoutAsync(ExitCommand, EarlyExitDiagnostic, cancellationToken, static async (time, arbitrate, caller) => { _ = arbitrate.TrySetResult(); - await time.WaitForArmedAsync(OwnedServerChild.EarlyEndBound, Support.HangGuard.Bound, count: 2); + await time.WaitForArmedAsync(OwnedServerChild.EarlyEndBound, SdkTestSupport.HangGuard.Bound, count: 2); await caller.CancelOnWorkerAsync(); }); @@ -180,10 +182,10 @@ private static async Task AssertRecordedAtTimeoutAsync( var starting = OpenCodeServer.StartWithSeamsAsync(RecordedOptions(publish), seams, caller.Token); try { - var recorded = await entered.Task.WaitAsync(Support.HangGuard.Bound, cancellationToken); - await time.WaitForArmedAsync(ReadinessBound, Support.HangGuard.Bound); + var recorded = await entered.Task.WaitAsync(SdkTestSupport.HangGuard.Bound, cancellationToken); + await time.WaitForArmedAsync(ReadinessBound, SdkTestSupport.HangGuard.Bound); time.Advance(ReadinessBound); - await canceled.Task.WaitAsync(Support.HangGuard.Bound, cancellationToken); + await canceled.Task.WaitAsync(SdkTestSupport.HangGuard.Bound, cancellationToken); // The spawn supplied stdin before the owner entered its wait. await PublishRecordedOutcomeAsync(recorded, input!, closingOutput, cancellationToken); if (closingOutput is not null) @@ -263,11 +265,11 @@ private static async Task AssertRecordedAtTimeoutAsync( private static async Task PublishRecordedOutcomeAsync( Task recorded, Stream input, GatedStream? closingOutput, CancellationToken cancellationToken) { - await input.WriteAsync(new byte[] { 1 }, cancellationToken).AsTask().WaitAsync(Support.HangGuard.Bound, cancellationToken); - await input.FlushAsync(cancellationToken).WaitAsync(Support.HangGuard.Bound, cancellationToken); + await input.WriteAsync(new byte[] { 1 }, cancellationToken).AsTask().WaitAsync(SdkTestSupport.HangGuard.Bound, cancellationToken); + await input.FlushAsync(cancellationToken).WaitAsync(SdkTestSupport.HangGuard.Bound, cancellationToken); closingOutput?.Release(); Task[] recordedTasks = [recorded]; - await Task.WhenAll(recordedTasks).WaitAsync(Support.HangGuard.Bound, cancellationToken); + await Task.WhenAll(recordedTasks).WaitAsync(SdkTestSupport.HangGuard.Bound, cancellationToken); } private static async Task AssertCallerCancellationAsync( @@ -289,11 +291,11 @@ private static async Task AdvanceEarlyEndAsync( ManualTimeProvider time, Task starting, int count, CancellationToken cancellationToken) { // A timeout can finish cleanup without a drain; a recorded early end drains first. - var draining = time.WaitForArmedAsync(OwnedServerChild.EarlyEndBound, Support.HangGuard.Bound, count); + var draining = time.WaitForArmedAsync(OwnedServerChild.EarlyEndBound, SdkTestSupport.HangGuard.Bound, count); Task[] startingTasks = [starting]; - if (await Task.WhenAny(Task.WhenAll(startingTasks), draining).WaitAsync(Support.HangGuard.Bound, cancellationToken) == draining) + if (await Task.WhenAny(Task.WhenAll(startingTasks), draining).WaitAsync(SdkTestSupport.HangGuard.Bound, cancellationToken) == draining) { - await draining.WaitAsync(Support.HangGuard.Bound, cancellationToken); + await draining.WaitAsync(SdkTestSupport.HangGuard.Bound, cancellationToken); time.Advance(OwnedServerChild.EarlyEndBound); } } @@ -340,13 +342,13 @@ private static Func HoldCanceledWait( try { Task[] pendingTasks = [pending]; - await Task.WhenAll(pendingTasks).WaitAsync(token).WaitAsync(Support.HangGuard.Bound, cancellationToken); + await Task.WhenAll(pendingTasks).WaitAsync(token).WaitAsync(SdkTestSupport.HangGuard.Bound, cancellationToken); } catch (OperationCanceledException) when (token.IsCancellationRequested) { _ = canceled.TrySetResult(); Task[] arbitrationTasks = [arbitrate.Task]; - await Task.WhenAll(arbitrationTasks).WaitAsync(Support.HangGuard.Bound, cancellationToken); + await Task.WhenAll(arbitrationTasks).WaitAsync(SdkTestSupport.HangGuard.Bound, cancellationToken); throw; } }; @@ -364,7 +366,7 @@ private static async Task AssertStartOutcomeAsync( } else { - await Assert.That(async () => await Task.WhenAll(startingTasks).WaitAsync(Support.HangGuard.Bound, cancellationToken)).ThrowsNothing(); + await Assert.That(async () => await Task.WhenAll(startingTasks).WaitAsync(SdkTestSupport.HangGuard.Bound, cancellationToken)).ThrowsNothing(); var server = await startingTasks[0]; await Assert.That(server.Endpoint).IsEqualTo(new Uri(ReadyEndpoint)); await Assert.That(server.ChildExited.IsCompleted).IsFalse(); @@ -397,7 +399,7 @@ await starting.ContinueWith(static completed => _ = completed.Exception, Cancell { if (originalOutput is not null) { - await originalOutput.DisposeAsync().AsTask().WaitAsync(Support.HangGuard.Bound); + await originalOutput.DisposeAsync().AsTask().WaitAsync(SdkTestSupport.HangGuard.Bound); } } finally diff --git a/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerWindowsTests.cs b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerWindowsTests.cs index b032ee116..6102a5cda 100644 --- a/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerWindowsTests.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerWindowsTests.cs @@ -1,6 +1,7 @@ using System.Globalization; using OpenCode.Sdk.Internal; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Hosting.Launcher.Support; using OpenCode.Sdk.Tests.Support; using Testably.Abstractions; diff --git a/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerWorkingDirectoryTests.cs b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerWorkingDirectoryTests.cs index e4238ca5a..1a1563d8b 100644 --- a/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerWorkingDirectoryTests.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerWorkingDirectoryTests.cs @@ -1,6 +1,7 @@ using System.Globalization; using OpenCode.Sdk.Internal; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Hosting.Launcher.Support; using OpenCode.Sdk.Tests.Support; using Testably.Abstractions; diff --git a/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OwnedServerChildTests.cs b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OwnedServerChildTests.cs index c3c99cb01..181b3ff3b 100644 --- a/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OwnedServerChildTests.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/OwnedServerChildTests.cs @@ -2,6 +2,7 @@ using System.Text; using NSubstitute; using OpenCode.Sdk.Internal; +using OpenCode.Sdk.Tests.Hosting.Launcher.Support; using OpenCode.Sdk.Tests.Support; using TUnit.Assertions.Enums; diff --git a/tests/OpenCode.Sdk.Tests/Support/LadderTree.cs b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/LadderTree.cs similarity index 98% rename from tests/OpenCode.Sdk.Tests/Support/LadderTree.cs rename to tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/LadderTree.cs index 17a1c4cdb..0f135849e 100644 --- a/tests/OpenCode.Sdk.Tests/Support/LadderTree.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/LadderTree.cs @@ -1,8 +1,9 @@ using System.Globalization; using OpenCode.Sdk.Internal; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Support; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Hosting.Launcher.Support; /// /// The ladder-tree.js server stand-in: a root with the children a flag list asks for, each diff --git a/tests/OpenCode.Sdk.Tests/Support/LauncherHost.cs b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/LauncherHost.cs similarity index 99% rename from tests/OpenCode.Sdk.Tests/Support/LauncherHost.cs rename to tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/LauncherHost.cs index 8f68400ea..adbe394b7 100644 --- a/tests/OpenCode.Sdk.Tests/Support/LauncherHost.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/LauncherHost.cs @@ -6,9 +6,10 @@ using Microsoft.Win32.SafeHandles; using OpenCode.Sdk.Internal; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Support; using Testably.Abstractions; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Hosting.Launcher.Support; /// /// The service fixture's launcher-host mode: a separate .NET process that owns one diff --git a/tests/OpenCode.Sdk.Tests/Support/LauncherHostIgnores.cs b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/LauncherHostIgnores.cs similarity index 90% rename from tests/OpenCode.Sdk.Tests/Support/LauncherHostIgnores.cs rename to tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/LauncherHostIgnores.cs index 460e49c76..096ae2bf4 100644 --- a/tests/OpenCode.Sdk.Tests/Support/LauncherHostIgnores.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/LauncherHostIgnores.cs @@ -1,4 +1,4 @@ -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Hosting.Launcher.Support; /// The signal a starts with ignored, inherited the way a real host inherits it. internal enum LauncherHostIgnores diff --git a/tests/OpenCode.Sdk.Tests/Support/MissingWorkingDirectoryAction.cs b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/MissingWorkingDirectoryAction.cs similarity index 91% rename from tests/OpenCode.Sdk.Tests/Support/MissingWorkingDirectoryAction.cs rename to tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/MissingWorkingDirectoryAction.cs index 3546a5904..cfbce3c42 100644 --- a/tests/OpenCode.Sdk.Tests/Support/MissingWorkingDirectoryAction.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/MissingWorkingDirectoryAction.cs @@ -1,6 +1,6 @@ using OpenCode.Sdk.Internal; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Hosting.Launcher.Support; /// /// A C library without posix_spawn_file_actions_addchdir_np, as glibc before 2.29 is: the diff --git a/tests/OpenCode.Sdk.Tests/Support/PathCommandShim.cs b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/PathCommandShim.cs similarity index 98% rename from tests/OpenCode.Sdk.Tests/Support/PathCommandShim.cs rename to tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/PathCommandShim.cs index 2b052bb15..d252e3a89 100644 --- a/tests/OpenCode.Sdk.Tests/Support/PathCommandShim.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/PathCommandShim.cs @@ -2,7 +2,7 @@ using System.Text; using OpenCode.Sdk.Tests.Harness; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Hosting.Launcher.Support; /// /// An npm-shaped command shim on the process PATH: a temporary directory holding one Windows diff --git a/tests/OpenCode.Sdk.Tests/Support/ProbeOnlyChildExit.cs b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/ProbeOnlyChildExit.cs similarity index 94% rename from tests/OpenCode.Sdk.Tests/Support/ProbeOnlyChildExit.cs rename to tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/ProbeOnlyChildExit.cs index d633bfca1..86a1d7c9f 100644 --- a/tests/OpenCode.Sdk.Tests/Support/ProbeOnlyChildExit.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/ProbeOnlyChildExit.cs @@ -1,6 +1,6 @@ using OpenCode.Sdk.Internal; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Hosting.Launcher.Support; /// /// The real exit-status seam, reporting that the kernel reaps this process's children itself, as diff --git a/tests/OpenCode.Sdk.Tests/Support/RecordingTreeKill.cs b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/RecordingTreeKill.cs similarity index 96% rename from tests/OpenCode.Sdk.Tests/Support/RecordingTreeKill.cs rename to tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/RecordingTreeKill.cs index 318b3dbac..3c07a97c0 100644 --- a/tests/OpenCode.Sdk.Tests/Support/RecordingTreeKill.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/RecordingTreeKill.cs @@ -2,7 +2,7 @@ using System.Diagnostics; using OpenCode.Sdk.Internal; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Hosting.Launcher.Support; /// /// The shipped Windows tree kill behind a recorder: every run is recorded with the time since the diff --git a/tests/OpenCode.Sdk.Tests/Support/ServerStartupTreeHandshake.cs b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/ServerStartupTreeHandshake.cs similarity index 98% rename from tests/OpenCode.Sdk.Tests/Support/ServerStartupTreeHandshake.cs rename to tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/ServerStartupTreeHandshake.cs index a48269223..d0e1b6760 100644 --- a/tests/OpenCode.Sdk.Tests/Support/ServerStartupTreeHandshake.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/ServerStartupTreeHandshake.cs @@ -3,7 +3,7 @@ using System.Net; using System.Net.Sockets; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Hosting.Launcher.Support; /// /// Owns independent root and child control leases, authenticated and observed live before ACK. diff --git a/tests/OpenCode.Sdk.Tests/Support/ServerStartupTreeLease.cs b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/ServerStartupTreeLease.cs similarity index 98% rename from tests/OpenCode.Sdk.Tests/Support/ServerStartupTreeLease.cs rename to tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/ServerStartupTreeLease.cs index 6691fe3eb..762d24457 100644 --- a/tests/OpenCode.Sdk.Tests/Support/ServerStartupTreeLease.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/ServerStartupTreeLease.cs @@ -5,7 +5,7 @@ using System.Text; using System.Text.Json; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Hosting.Launcher.Support; /// /// Owns one authenticated fixture connection and its process observation. Releasing the connection diff --git a/tests/OpenCode.Sdk.Tests/Support/ServerStartupTreeScenario.cs b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/ServerStartupTreeScenario.cs similarity index 99% rename from tests/OpenCode.Sdk.Tests/Support/ServerStartupTreeScenario.cs rename to tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/ServerStartupTreeScenario.cs index 4e6528fb8..b4431f7ab 100644 --- a/tests/OpenCode.Sdk.Tests/Support/ServerStartupTreeScenario.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/ServerStartupTreeScenario.cs @@ -5,7 +5,7 @@ using OpenCode.Sdk.Tests.Harness; using Testably.Abstractions; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Hosting.Launcher.Support; /// /// Starts the launcher against a cooperating Bun process tree and owns the startup and bounded diff --git a/tests/OpenCode.Sdk.Tests/Support/SignalStateReport.cs b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/SignalStateReport.cs similarity index 97% rename from tests/OpenCode.Sdk.Tests/Support/SignalStateReport.cs rename to tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/SignalStateReport.cs index 63d3cd8ba..e4c69c3bc 100644 --- a/tests/OpenCode.Sdk.Tests/Support/SignalStateReport.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/SignalStateReport.cs @@ -1,4 +1,4 @@ -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Hosting.Launcher.Support; /// /// A server stand-in that reports the signal state it started with: the readiness line first, then diff --git a/tests/OpenCode.Sdk.Tests/Support/SpawnWithoutStandardOutput.cs b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/SpawnWithoutStandardOutput.cs similarity index 96% rename from tests/OpenCode.Sdk.Tests/Support/SpawnWithoutStandardOutput.cs rename to tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/SpawnWithoutStandardOutput.cs index f0cc6d39c..486e1e15a 100644 --- a/tests/OpenCode.Sdk.Tests/Support/SpawnWithoutStandardOutput.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/SpawnWithoutStandardOutput.cs @@ -1,6 +1,6 @@ using OpenCode.Sdk.Internal; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Hosting.Launcher.Support; /// /// The shipped spawn of either platform, with the read end of the child's stdout closed and diff --git a/tests/OpenCode.Sdk.Tests/Support/TestJob.cs b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/TestJob.cs similarity index 97% rename from tests/OpenCode.Sdk.Tests/Support/TestJob.cs rename to tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/TestJob.cs index aa5f02717..68cf399bf 100644 --- a/tests/OpenCode.Sdk.Tests/Support/TestJob.cs +++ b/tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/TestJob.cs @@ -2,7 +2,7 @@ using System.Runtime.InteropServices; using OpenCode.Sdk.Internal; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Hosting.Launcher.Support; /// /// A job of the test's own, for a launcher host that must itself run in a job, as a host started by diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-command-attempt-complete.json b/tests/OpenCode.Sdk.Tests/Integrations/Fixtures/known-command-attempt-complete.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-command-attempt-complete.json rename to tests/OpenCode.Sdk.Tests/Integrations/Fixtures/known-command-attempt-complete.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-mcp-server.json b/tests/OpenCode.Sdk.Tests/McpServers/Fixtures/known-mcp-server.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-mcp-server.json rename to tests/OpenCode.Sdk.Tests/McpServers/Fixtures/known-mcp-server.json diff --git a/tests/OpenCode.Sdk.Tests/OpenCode.Sdk.Tests.csproj b/tests/OpenCode.Sdk.Tests/OpenCode.Sdk.Tests.csproj index 4f1ad50cb..934d6f9f5 100644 --- a/tests/OpenCode.Sdk.Tests/OpenCode.Sdk.Tests.csproj +++ b/tests/OpenCode.Sdk.Tests/OpenCode.Sdk.Tests.csproj @@ -73,4 +73,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-persistent-pty-handoff.json b/tests/OpenCode.Sdk.Tests/PersistentPtys/Fixtures/known-persistent-pty-handoff.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-persistent-pty-handoff.json rename to tests/OpenCode.Sdk.Tests/PersistentPtys/Fixtures/known-persistent-pty-handoff.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-persistent-pty-read.json b/tests/OpenCode.Sdk.Tests/PersistentPtys/Fixtures/known-persistent-pty-read.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-persistent-pty-read.json rename to tests/OpenCode.Sdk.Tests/PersistentPtys/Fixtures/known-persistent-pty-read.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-persistent-pty-snapshot.json b/tests/OpenCode.Sdk.Tests/PersistentPtys/Fixtures/known-persistent-pty-snapshot.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-persistent-pty-snapshot.json rename to tests/OpenCode.Sdk.Tests/PersistentPtys/Fixtures/known-persistent-pty-snapshot.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-persistent-pty.json b/tests/OpenCode.Sdk.Tests/PersistentPtys/Fixtures/known-persistent-pty.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-persistent-pty.json rename to tests/OpenCode.Sdk.Tests/PersistentPtys/Fixtures/known-persistent-pty.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Ptys/cursor-second-value.json b/tests/OpenCode.Sdk.Tests/Ptys/Fixtures/cursor-second-value.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Ptys/cursor-second-value.json rename to tests/OpenCode.Sdk.Tests/Ptys/Fixtures/cursor-second-value.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Ptys/cursor-trailing-garbage.json b/tests/OpenCode.Sdk.Tests/Ptys/Fixtures/cursor-trailing-garbage.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Ptys/cursor-trailing-garbage.json rename to tests/OpenCode.Sdk.Tests/Ptys/Fixtures/cursor-trailing-garbage.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Ptys/cursor-truncated-after-value.json b/tests/OpenCode.Sdk.Tests/Ptys/Fixtures/cursor-truncated-after-value.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Ptys/cursor-truncated-after-value.json rename to tests/OpenCode.Sdk.Tests/Ptys/Fixtures/cursor-truncated-after-value.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Ptys/cursor-valid-whitespace.json b/tests/OpenCode.Sdk.Tests/Ptys/Fixtures/cursor-valid-whitespace.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Ptys/cursor-valid-whitespace.json rename to tests/OpenCode.Sdk.Tests/Ptys/Fixtures/cursor-valid-whitespace.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-pty.json b/tests/OpenCode.Sdk.Tests/Ptys/Fixtures/known-pty.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-pty.json rename to tests/OpenCode.Sdk.Tests/Ptys/Fixtures/known-pty.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Ptys/terminal-peer.js b/tests/OpenCode.Sdk.Tests/Ptys/Fixtures/terminal-peer.js similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Ptys/terminal-peer.js rename to tests/OpenCode.Sdk.Tests/Ptys/Fixtures/terminal-peer.js diff --git a/tests/OpenCode.Sdk.Tests/Ptys/PtyFrameReaderTests.cs b/tests/OpenCode.Sdk.Tests/Ptys/PtyFrameReaderTests.cs index 85bfd13e7..d890c92dc 100644 --- a/tests/OpenCode.Sdk.Tests/Ptys/PtyFrameReaderTests.cs +++ b/tests/OpenCode.Sdk.Tests/Ptys/PtyFrameReaderTests.cs @@ -1,7 +1,7 @@ using System.Net.WebSockets; using OpenCode.Sdk.Internal; using OpenCode.Sdk.Tests.Harness; -using OpenCode.Sdk.Tests.Support; +using OpenCode.Sdk.Tests.Ptys.Support; namespace OpenCode.Sdk.Tests.Ptys; diff --git a/tests/OpenCode.Sdk.Tests/Ptys/PtySessionLiveTests.cs b/tests/OpenCode.Sdk.Tests/Ptys/PtySessionLiveTests.cs index 956924f31..08c99e6e5 100644 --- a/tests/OpenCode.Sdk.Tests/Ptys/PtySessionLiveTests.cs +++ b/tests/OpenCode.Sdk.Tests/Ptys/PtySessionLiveTests.cs @@ -2,7 +2,7 @@ using OpenCode.Sdk.Internal; using OpenCode.Sdk.Models; using OpenCode.Sdk.Tests.Harness; -using OpenCode.Sdk.Tests.Support; +using OpenCode.Sdk.Tests.Ptys.Support; namespace OpenCode.Sdk.Tests.Ptys; diff --git a/tests/OpenCode.Sdk.Tests/Ptys/PtySessionTests.cs b/tests/OpenCode.Sdk.Tests/Ptys/PtySessionTests.cs index ad0b16d98..a0694da6a 100644 --- a/tests/OpenCode.Sdk.Tests/Ptys/PtySessionTests.cs +++ b/tests/OpenCode.Sdk.Tests/Ptys/PtySessionTests.cs @@ -1,6 +1,7 @@ using System.Net.WebSockets; using System.Text; using OpenCode.Sdk.Internal; +using OpenCode.Sdk.Tests.Ptys.Support; using OpenCode.Sdk.Tests.Support; namespace OpenCode.Sdk.Tests.Ptys; diff --git a/tests/OpenCode.Sdk.Tests/Support/PtyDiagnosticServer.cs b/tests/OpenCode.Sdk.Tests/Ptys/Support/PtyDiagnosticServer.cs similarity index 95% rename from tests/OpenCode.Sdk.Tests/Support/PtyDiagnosticServer.cs rename to tests/OpenCode.Sdk.Tests/Ptys/Support/PtyDiagnosticServer.cs index 72855d142..51ff137b8 100644 --- a/tests/OpenCode.Sdk.Tests/Support/PtyDiagnosticServer.cs +++ b/tests/OpenCode.Sdk.Tests/Ptys/Support/PtyDiagnosticServer.cs @@ -1,7 +1,8 @@ using System.Net; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Support; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Ptys.Support; /// Serves a healthy external endpoint with either a completed or stalled typed PTY response. internal sealed class PtyDiagnosticServer : IAsyncDisposable diff --git a/tests/OpenCode.Sdk.Tests/Support/PtyFailureDiagnostics.cs b/tests/OpenCode.Sdk.Tests/Ptys/Support/PtyFailureDiagnostics.cs similarity index 98% rename from tests/OpenCode.Sdk.Tests/Support/PtyFailureDiagnostics.cs rename to tests/OpenCode.Sdk.Tests/Ptys/Support/PtyFailureDiagnostics.cs index 41e69f65d..ef47aeb25 100644 --- a/tests/OpenCode.Sdk.Tests/Support/PtyFailureDiagnostics.cs +++ b/tests/OpenCode.Sdk.Tests/Ptys/Support/PtyFailureDiagnostics.cs @@ -3,7 +3,7 @@ using OpenCode.Sdk.Tests.Harness.Ownership; using OpenCode.Sdk.Tests.Harness.Ownership.Abstractions; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Ptys.Support; internal sealed class PtyFailureDiagnostics(IOwnedOperationDeadline? deadline = null) { diff --git a/tests/OpenCode.Sdk.Tests/Support/PtyFailureDiagnosticsTests.cs b/tests/OpenCode.Sdk.Tests/Ptys/Support/PtyFailureDiagnosticsTests.cs similarity index 97% rename from tests/OpenCode.Sdk.Tests/Support/PtyFailureDiagnosticsTests.cs rename to tests/OpenCode.Sdk.Tests/Ptys/Support/PtyFailureDiagnosticsTests.cs index fea537747..6c6945a68 100644 --- a/tests/OpenCode.Sdk.Tests/Support/PtyFailureDiagnosticsTests.cs +++ b/tests/OpenCode.Sdk.Tests/Ptys/Support/PtyFailureDiagnosticsTests.cs @@ -1,9 +1,10 @@ using OpenCode.Sdk.Internal; using OpenCode.Sdk.Tests.Harness; using OpenCode.Sdk.Tests.Harness.Ownership; +using OpenCode.Sdk.Tests.Support; using Testably.Abstractions; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Ptys.Support; [NotInParallel(ParallelConstraintKeys.ServerProcess)] public sealed class PtyFailureDiagnosticsTests diff --git a/tests/OpenCode.Sdk.Tests/Support/PtyFrameData.cs b/tests/OpenCode.Sdk.Tests/Ptys/Support/PtyFrameData.cs similarity index 97% rename from tests/OpenCode.Sdk.Tests/Support/PtyFrameData.cs rename to tests/OpenCode.Sdk.Tests/Ptys/Support/PtyFrameData.cs index 280a64d14..d37186977 100644 --- a/tests/OpenCode.Sdk.Tests/Support/PtyFrameData.cs +++ b/tests/OpenCode.Sdk.Tests/Ptys/Support/PtyFrameData.cs @@ -1,6 +1,6 @@ using System.Text; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Ptys.Support; /// /// The PTY wire literals the session tests run on. The control frame's exact byte shape — a diff --git a/tests/OpenCode.Sdk.Tests/Support/PtyLiveScenario.cs b/tests/OpenCode.Sdk.Tests/Ptys/Support/PtyLiveScenario.cs similarity index 99% rename from tests/OpenCode.Sdk.Tests/Support/PtyLiveScenario.cs rename to tests/OpenCode.Sdk.Tests/Ptys/Support/PtyLiveScenario.cs index c1fdf2c14..c3e107adf 100644 --- a/tests/OpenCode.Sdk.Tests/Support/PtyLiveScenario.cs +++ b/tests/OpenCode.Sdk.Tests/Ptys/Support/PtyLiveScenario.cs @@ -4,7 +4,7 @@ using OpenCode.Sdk.Tests.Harness; using OpenCode.Sdk.Tests.Harness.Ownership; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Ptys.Support; /// /// Owns the normal PTY live test's server-relative location and cleanup. External mode resolves diff --git a/tests/OpenCode.Sdk.Tests/Support/PtyLiveTranscript.cs b/tests/OpenCode.Sdk.Tests/Ptys/Support/PtyLiveTranscript.cs similarity index 99% rename from tests/OpenCode.Sdk.Tests/Support/PtyLiveTranscript.cs rename to tests/OpenCode.Sdk.Tests/Ptys/Support/PtyLiveTranscript.cs index 950cb768e..b4d0d9872 100644 --- a/tests/OpenCode.Sdk.Tests/Support/PtyLiveTranscript.cs +++ b/tests/OpenCode.Sdk.Tests/Ptys/Support/PtyLiveTranscript.cs @@ -1,7 +1,7 @@ using System.Globalization; using System.Text; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Ptys.Support; /// /// Observes one live PTY connection as complete newline-delimited records and server cursor diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Rpc/rpc-call-input.json b/tests/OpenCode.Sdk.Tests/Rpc/Fixtures/rpc-call-input.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Rpc/rpc-call-input.json rename to tests/OpenCode.Sdk.Tests/Rpc/Fixtures/rpc-call-input.json diff --git a/tests/OpenCode.Sdk.Tests/ExtensibleEnumContractTests.cs b/tests/OpenCode.Sdk.Tests/Serialization/ExtensibleEnumContractTests.cs similarity index 99% rename from tests/OpenCode.Sdk.Tests/ExtensibleEnumContractTests.cs rename to tests/OpenCode.Sdk.Tests/Serialization/ExtensibleEnumContractTests.cs index a2d433a20..f41ef01ef 100644 --- a/tests/OpenCode.Sdk.Tests/ExtensibleEnumContractTests.cs +++ b/tests/OpenCode.Sdk.Tests/Serialization/ExtensibleEnumContractTests.cs @@ -3,7 +3,7 @@ using OpenCode.Sdk.Models; using OpenCode.Sdk.Tests.Harness; -namespace OpenCode.Sdk.Tests; +namespace OpenCode.Sdk.Tests.Serialization; /// /// The generated string enums are extensible: a value a newer server sends is kept as it diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/duplicate-known-session-message-marker.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/duplicate-known-session-message-marker.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/duplicate-known-session-message-marker.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/duplicate-known-session-message-marker.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/duplicate-unknown-session-message-marker.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/duplicate-unknown-session-message-marker.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/duplicate-unknown-session-message-marker.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/duplicate-unknown-session-message-marker.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/empty-assistant-marker.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/empty-assistant-marker.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/empty-assistant-marker.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/empty-assistant-marker.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/error-carrying-both-markers.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/error-carrying-both-markers.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/error-carrying-both-markers.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/error-carrying-both-markers.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Unions/first-match-corpus.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/first-match-corpus.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Unions/first-match-corpus.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/first-match-corpus.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Unions/first-match-expected.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/first-match-expected.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Unions/first-match-expected.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/first-match-expected.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-assistant-content.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/known-assistant-content.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-assistant-content.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/known-assistant-content.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-compaction-message.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/known-compaction-message.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-compaction-message.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/known-compaction-message.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-rpc-event.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/known-rpc-event.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-rpc-event.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/known-rpc-event.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-session-message-idle.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/known-session-message-idle.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-session-message-idle.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/known-session-message-idle.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-tool-state.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/known-tool-state.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-tool-state.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/known-tool-state.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-worktree-error.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/known-worktree-error.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-worktree-error.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/known-worktree-error.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/long-unknown-session-message-marker.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/long-unknown-session-message-marker.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/long-unknown-session-message-marker.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/long-unknown-session-message-marker.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/malformed-assistant-marker.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/malformed-assistant-marker.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/malformed-assistant-marker.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/malformed-assistant-marker.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/mismatched-compaction-marker.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/mismatched-compaction-marker.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/mismatched-compaction-marker.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/mismatched-compaction-marker.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/missing-assistant-marker.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/missing-assistant-marker.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/missing-assistant-marker.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/missing-assistant-marker.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/non-object-union-payload.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/non-object-union-payload.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/non-object-union-payload.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/non-object-union-payload.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/null-diff-status.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/null-diff-status.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/null-diff-status.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/null-diff-status.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/null-optional-collection.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/null-optional-collection.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/null-optional-collection.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/null-optional-collection.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/numeric-diff-status.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/numeric-diff-status.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/numeric-diff-status.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/numeric-diff-status.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/session-create-request-absent.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/session-create-request-absent.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/session-create-request-absent.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/session-create-request-absent.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/session-create-request-cleared.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/session-create-request-cleared.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/session-create-request-cleared.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/session-create-request-cleared.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/session-create-request-set.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/session-create-request-set.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/session-create-request-set.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/session-create-request-set.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/stream-events.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/stream-events.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/stream-events.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/stream-events.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/stream-session-messages.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/stream-session-messages.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/stream-session-messages.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/stream-session-messages.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-assistant-content.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-assistant-content.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-assistant-content.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-assistant-content.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-compaction-status.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-compaction-status.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-compaction-status.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-compaction-status.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-config-entry.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-config-entry.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-config-entry.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-config-entry.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-credential-value.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-credential-value.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-credential-value.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-credential-value.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-diff-status.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-diff-status.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-diff-status.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-diff-status.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-error-with-different-marker.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-error-with-different-marker.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-error-with-different-marker.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-error-with-different-marker.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-error-without-marker.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-error-without-marker.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-error-without-marker.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-error-without-marker.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-interrupted-reason-event.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-interrupted-reason-event.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-interrupted-reason-event.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-interrupted-reason-event.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-mcp-oauth-token.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-mcp-oauth-token.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-mcp-oauth-token.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-mcp-oauth-token.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-mcp-status.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-mcp-status.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-mcp-status.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-mcp-status.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-mcp.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-mcp.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-mcp.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-mcp.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-name-tagged-error.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-name-tagged-error.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-name-tagged-error.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-name-tagged-error.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-session-message.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-session-message.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-session-message.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-session-message.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-tool-state.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-tool-state.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/unknown-tool-state.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/unknown-tool-state.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/worktree-error-null-force-required.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/worktree-error-null-force-required.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/worktree-error-null-force-required.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/worktree-error-null-force-required.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/worktree-error-without-force-required.json b/tests/OpenCode.Sdk.Tests/Serialization/Fixtures/worktree-error-without-force-required.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/worktree-error-without-force-required.json rename to tests/OpenCode.Sdk.Tests/Serialization/Fixtures/worktree-error-without-force-required.json diff --git a/tests/OpenCode.Sdk.Tests/SecretMemberPrintingTests.cs b/tests/OpenCode.Sdk.Tests/Serialization/SecretMemberPrintingTests.cs similarity index 99% rename from tests/OpenCode.Sdk.Tests/SecretMemberPrintingTests.cs rename to tests/OpenCode.Sdk.Tests/Serialization/SecretMemberPrintingTests.cs index 66592a2fd..f9ff5b2f8 100644 --- a/tests/OpenCode.Sdk.Tests/SecretMemberPrintingTests.cs +++ b/tests/OpenCode.Sdk.Tests/Serialization/SecretMemberPrintingTests.cs @@ -4,7 +4,7 @@ using OpenCode.Sdk.Models; using OpenCode.Sdk.Tests.Harness; -namespace OpenCode.Sdk.Tests; +namespace OpenCode.Sdk.Tests.Serialization; /// /// A generated model whose member upstream's HTTP recorder redacts, or a curation row marks, diff --git a/tests/OpenCode.Sdk.Tests/StructuralUnionFirstMatchParityTests.cs b/tests/OpenCode.Sdk.Tests/Serialization/StructuralUnionFirstMatchParityTests.cs similarity index 98% rename from tests/OpenCode.Sdk.Tests/StructuralUnionFirstMatchParityTests.cs rename to tests/OpenCode.Sdk.Tests/Serialization/StructuralUnionFirstMatchParityTests.cs index 9d332ff8a..c2ebfda6c 100644 --- a/tests/OpenCode.Sdk.Tests/StructuralUnionFirstMatchParityTests.cs +++ b/tests/OpenCode.Sdk.Tests/Serialization/StructuralUnionFirstMatchParityTests.cs @@ -4,7 +4,7 @@ using OpenCode.Sdk.Models; using OpenCode.Sdk.Tests.Harness; -namespace OpenCode.Sdk.Tests; +namespace OpenCode.Sdk.Tests.Serialization; /// /// Upstream decodes the three same-token unions with Effect's union decode: the first member in diff --git a/tests/OpenCode.Sdk.Tests/StructuralUnionPrintingTests.cs b/tests/OpenCode.Sdk.Tests/Serialization/StructuralUnionPrintingTests.cs similarity index 98% rename from tests/OpenCode.Sdk.Tests/StructuralUnionPrintingTests.cs rename to tests/OpenCode.Sdk.Tests/Serialization/StructuralUnionPrintingTests.cs index 1f9dfe1c2..56bfbe0ae 100644 --- a/tests/OpenCode.Sdk.Tests/StructuralUnionPrintingTests.cs +++ b/tests/OpenCode.Sdk.Tests/Serialization/StructuralUnionPrintingTests.cs @@ -3,7 +3,7 @@ using OpenCode.Sdk.Internal; using OpenCode.Sdk.Models; -namespace OpenCode.Sdk.Tests; +namespace OpenCode.Sdk.Tests.Serialization; /// /// A structural union is a record whose inactive arm properties throw by design, so the diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Simulation/drive-echo-tool.json b/tests/OpenCode.Sdk.Tests/Sessions/Fixtures/drive-echo-tool.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Simulation/drive-echo-tool.json rename to tests/OpenCode.Sdk.Tests/Sessions/Fixtures/drive-echo-tool.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-inbox-compaction.json b/tests/OpenCode.Sdk.Tests/Sessions/Fixtures/known-inbox-compaction.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-inbox-compaction.json rename to tests/OpenCode.Sdk.Tests/Sessions/Fixtures/known-inbox-compaction.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-permission.json b/tests/OpenCode.Sdk.Tests/Sessions/Fixtures/known-permission.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-permission.json rename to tests/OpenCode.Sdk.Tests/Sessions/Fixtures/known-permission.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-session-stats.json b/tests/OpenCode.Sdk.Tests/Sessions/Fixtures/known-session-stats.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-session-stats.json rename to tests/OpenCode.Sdk.Tests/Sessions/Fixtures/known-session-stats.json diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/numeric-status-session.json b/tests/OpenCode.Sdk.Tests/Sessions/Fixtures/numeric-status-session.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/numeric-status-session.json rename to tests/OpenCode.Sdk.Tests/Sessions/Fixtures/numeric-status-session.json diff --git a/tests/OpenCode.Sdk.Tests/Sessions/GettingStartedRecipeLiveTests.cs b/tests/OpenCode.Sdk.Tests/Sessions/GettingStartedRecipeLiveTests.cs index 0c2496f2f..50c1b3d50 100644 --- a/tests/OpenCode.Sdk.Tests/Sessions/GettingStartedRecipeLiveTests.cs +++ b/tests/OpenCode.Sdk.Tests/Sessions/GettingStartedRecipeLiveTests.cs @@ -1,6 +1,6 @@ using OpenCode.Sdk.Models; using OpenCode.Sdk.Tests.Harness; -using OpenCode.Sdk.Tests.Support; +using OpenCode.Sdk.Tests.Sessions.Support; namespace OpenCode.Sdk.Tests.Sessions; diff --git a/tests/OpenCode.Sdk.Tests/Sessions/SessionClientLiveTests.cs b/tests/OpenCode.Sdk.Tests/Sessions/SessionClientLiveTests.cs index 1a086e746..b83609137 100644 --- a/tests/OpenCode.Sdk.Tests/Sessions/SessionClientLiveTests.cs +++ b/tests/OpenCode.Sdk.Tests/Sessions/SessionClientLiveTests.cs @@ -1,6 +1,7 @@ using System.Globalization; using OpenCode.Sdk.Models; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Sessions.Support; using OpenCode.Sdk.Tests.Support; using Testably.Abstractions; diff --git a/tests/OpenCode.Sdk.Tests/Sessions/SessionContextLiveTests.cs b/tests/OpenCode.Sdk.Tests/Sessions/SessionContextLiveTests.cs index 191d42467..2e0dac13f 100644 --- a/tests/OpenCode.Sdk.Tests/Sessions/SessionContextLiveTests.cs +++ b/tests/OpenCode.Sdk.Tests/Sessions/SessionContextLiveTests.cs @@ -2,6 +2,7 @@ using OpenCode.Sdk.Models; using OpenCode.Sdk.Tests.Harness; using OpenCode.Sdk.Tests.Harness.Ownership; +using OpenCode.Sdk.Tests.Sessions.Support; using OpenCode.Sdk.Tests.Support; using TUnit.Assertions.Enums; diff --git a/tests/OpenCode.Sdk.Tests/Sessions/SessionDiffLiveTests.cs b/tests/OpenCode.Sdk.Tests/Sessions/SessionDiffLiveTests.cs index d5e06c8bf..ef1f48dfd 100644 --- a/tests/OpenCode.Sdk.Tests/Sessions/SessionDiffLiveTests.cs +++ b/tests/OpenCode.Sdk.Tests/Sessions/SessionDiffLiveTests.cs @@ -1,6 +1,7 @@ using System.Globalization; using OpenCode.Sdk.Models; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Sessions.Support; using OpenCode.Sdk.Tests.Support; using TUnit.Assertions.Enums; diff --git a/tests/OpenCode.Sdk.Tests/Sessions/SessionInboxLiveTests.cs b/tests/OpenCode.Sdk.Tests/Sessions/SessionInboxLiveTests.cs index a57a332bd..9a05caf2e 100644 --- a/tests/OpenCode.Sdk.Tests/Sessions/SessionInboxLiveTests.cs +++ b/tests/OpenCode.Sdk.Tests/Sessions/SessionInboxLiveTests.cs @@ -1,7 +1,7 @@ using System.Globalization; using OpenCode.Sdk.Models; using OpenCode.Sdk.Tests.Harness; -using OpenCode.Sdk.Tests.Support; +using OpenCode.Sdk.Tests.Sessions.Support; namespace OpenCode.Sdk.Tests.Sessions; diff --git a/tests/OpenCode.Sdk.Tests/Sessions/SessionLogCliProfileLiveTests.cs b/tests/OpenCode.Sdk.Tests/Sessions/SessionLogCliProfileLiveTests.cs index 4632dae52..8bb97db5a 100644 --- a/tests/OpenCode.Sdk.Tests/Sessions/SessionLogCliProfileLiveTests.cs +++ b/tests/OpenCode.Sdk.Tests/Sessions/SessionLogCliProfileLiveTests.cs @@ -1,6 +1,7 @@ using System.Globalization; using OpenCode.Sdk.Models; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Sessions.Support; using OpenCode.Sdk.Tests.Support; namespace OpenCode.Sdk.Tests.Sessions; diff --git a/tests/OpenCode.Sdk.Tests/Sessions/SessionLogLiveTests.cs b/tests/OpenCode.Sdk.Tests/Sessions/SessionLogLiveTests.cs index 671f08667..3e658cc79 100644 --- a/tests/OpenCode.Sdk.Tests/Sessions/SessionLogLiveTests.cs +++ b/tests/OpenCode.Sdk.Tests/Sessions/SessionLogLiveTests.cs @@ -1,6 +1,7 @@ using System.Globalization; using OpenCode.Sdk.Models; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Sessions.Support; using OpenCode.Sdk.Tests.Support; namespace OpenCode.Sdk.Tests.Sessions; diff --git a/tests/OpenCode.Sdk.Tests/Sessions/SessionMessagePaginationLiveTests.cs b/tests/OpenCode.Sdk.Tests/Sessions/SessionMessagePaginationLiveTests.cs index 2caf756a5..248757c1d 100644 --- a/tests/OpenCode.Sdk.Tests/Sessions/SessionMessagePaginationLiveTests.cs +++ b/tests/OpenCode.Sdk.Tests/Sessions/SessionMessagePaginationLiveTests.cs @@ -2,6 +2,7 @@ using System.Text.Json; using OpenCode.Sdk.Models; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Sessions.Support; using OpenCode.Sdk.Tests.Support; using TUnit.Assertions.Enums; diff --git a/tests/OpenCode.Sdk.Tests/Sessions/SessionMetadataLiveTests.cs b/tests/OpenCode.Sdk.Tests/Sessions/SessionMetadataLiveTests.cs index 5b23dd417..3e506a31f 100644 --- a/tests/OpenCode.Sdk.Tests/Sessions/SessionMetadataLiveTests.cs +++ b/tests/OpenCode.Sdk.Tests/Sessions/SessionMetadataLiveTests.cs @@ -2,7 +2,7 @@ using System.Text.Json; using OpenCode.Sdk.Models; using OpenCode.Sdk.Tests.Harness; -using OpenCode.Sdk.Tests.Support; +using OpenCode.Sdk.Tests.Sessions.Support; namespace OpenCode.Sdk.Tests.Sessions; diff --git a/tests/OpenCode.Sdk.Tests/Sessions/SessionPermissionLiveTests.cs b/tests/OpenCode.Sdk.Tests/Sessions/SessionPermissionLiveTests.cs index 13a68da60..f84edb4c4 100644 --- a/tests/OpenCode.Sdk.Tests/Sessions/SessionPermissionLiveTests.cs +++ b/tests/OpenCode.Sdk.Tests/Sessions/SessionPermissionLiveTests.cs @@ -1,5 +1,6 @@ using OpenCode.Sdk.Models; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Sessions.Support; using OpenCode.Sdk.Tests.Support; namespace OpenCode.Sdk.Tests.Sessions; diff --git a/tests/OpenCode.Sdk.Tests/Sessions/SessionToolLifecycleLiveTests.cs b/tests/OpenCode.Sdk.Tests/Sessions/SessionToolLifecycleLiveTests.cs index ecf1bbdc1..4ed661d37 100644 --- a/tests/OpenCode.Sdk.Tests/Sessions/SessionToolLifecycleLiveTests.cs +++ b/tests/OpenCode.Sdk.Tests/Sessions/SessionToolLifecycleLiveTests.cs @@ -1,6 +1,7 @@ using System.Text.Json.Nodes; using OpenCode.Sdk.Models; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Sessions.Support; using OpenCode.Sdk.Tests.Support; namespace OpenCode.Sdk.Tests.Sessions; diff --git a/tests/OpenCode.Sdk.Tests/Sessions/SessionToolPermissionLiveTests.cs b/tests/OpenCode.Sdk.Tests/Sessions/SessionToolPermissionLiveTests.cs index 2bbb0e31c..eb2d5dd91 100644 --- a/tests/OpenCode.Sdk.Tests/Sessions/SessionToolPermissionLiveTests.cs +++ b/tests/OpenCode.Sdk.Tests/Sessions/SessionToolPermissionLiveTests.cs @@ -2,6 +2,7 @@ using System.Text.Json.Nodes; using OpenCode.Sdk.Models; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Sessions.Support; using OpenCode.Sdk.Tests.Support; namespace OpenCode.Sdk.Tests.Sessions; diff --git a/tests/OpenCode.Sdk.Tests/Sessions/SessionsClientLiveTests.cs b/tests/OpenCode.Sdk.Tests/Sessions/SessionsClientLiveTests.cs index f283564fe..4be73d1bf 100644 --- a/tests/OpenCode.Sdk.Tests/Sessions/SessionsClientLiveTests.cs +++ b/tests/OpenCode.Sdk.Tests/Sessions/SessionsClientLiveTests.cs @@ -1,6 +1,7 @@ using System.Globalization; using OpenCode.Sdk.Models; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Sessions.Support; using OpenCode.Sdk.Tests.Support; using TUnit.Assertions.Enums; diff --git a/tests/OpenCode.Sdk.Tests/Support/OwnedDriveInvocation.cs b/tests/OpenCode.Sdk.Tests/Sessions/Support/OwnedDriveInvocation.cs similarity index 97% rename from tests/OpenCode.Sdk.Tests/Support/OwnedDriveInvocation.cs rename to tests/OpenCode.Sdk.Tests/Sessions/Support/OwnedDriveInvocation.cs index 2cc1dfdc9..0c6d865b1 100644 --- a/tests/OpenCode.Sdk.Tests/Support/OwnedDriveInvocation.cs +++ b/tests/OpenCode.Sdk.Tests/Sessions/Support/OwnedDriveInvocation.cs @@ -1,6 +1,6 @@ using OpenCode.Sdk.Tests.Harness; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Sessions.Support; internal sealed class OwnedDriveInvocation { diff --git a/tests/OpenCode.Sdk.Tests/Support/OwnedSessionInboxCleanup.cs b/tests/OpenCode.Sdk.Tests/Sessions/Support/OwnedSessionInboxCleanup.cs similarity index 99% rename from tests/OpenCode.Sdk.Tests/Support/OwnedSessionInboxCleanup.cs rename to tests/OpenCode.Sdk.Tests/Sessions/Support/OwnedSessionInboxCleanup.cs index a3f18513e..79367d905 100644 --- a/tests/OpenCode.Sdk.Tests/Support/OwnedSessionInboxCleanup.cs +++ b/tests/OpenCode.Sdk.Tests/Sessions/Support/OwnedSessionInboxCleanup.cs @@ -5,7 +5,7 @@ using OpenCode.Sdk.Tests.Harness.Ownership; using OpenCode.Sdk.Tests.Harness.Ownership.Abstractions; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Sessions.Support; internal sealed class OwnedSessionInboxCleanup { diff --git a/tests/OpenCode.Sdk.Tests/Support/OwnedSessionInboxCleanupTests.cs b/tests/OpenCode.Sdk.Tests/Sessions/Support/OwnedSessionInboxCleanupTests.cs similarity index 98% rename from tests/OpenCode.Sdk.Tests/Support/OwnedSessionInboxCleanupTests.cs rename to tests/OpenCode.Sdk.Tests/Sessions/Support/OwnedSessionInboxCleanupTests.cs index 683402e96..bf9f1d61b 100644 --- a/tests/OpenCode.Sdk.Tests/Support/OwnedSessionInboxCleanupTests.cs +++ b/tests/OpenCode.Sdk.Tests/Sessions/Support/OwnedSessionInboxCleanupTests.cs @@ -1,7 +1,8 @@ using OpenCode.Sdk.Tests.Harness; using OpenCode.Sdk.Tests.Harness.Ownership; +using OpenCode.Sdk.Tests.Support; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Sessions.Support; public sealed class OwnedSessionInboxCleanupTests { diff --git a/tests/OpenCode.Sdk.Tests/Support/OwnedToolScenario.cs b/tests/OpenCode.Sdk.Tests/Sessions/Support/OwnedToolScenario.cs similarity index 99% rename from tests/OpenCode.Sdk.Tests/Support/OwnedToolScenario.cs rename to tests/OpenCode.Sdk.Tests/Sessions/Support/OwnedToolScenario.cs index 34fb601b9..6c2e2e7df 100644 --- a/tests/OpenCode.Sdk.Tests/Support/OwnedToolScenario.cs +++ b/tests/OpenCode.Sdk.Tests/Sessions/Support/OwnedToolScenario.cs @@ -4,9 +4,9 @@ using OpenCode.Sdk.Models; using OpenCode.Sdk.Tests.Harness; using OpenCode.Sdk.Tests.Harness.Ownership; -using OpenCode.Sdk.Tests.Sessions.Support; +using OpenCode.Sdk.Tests.Support; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Sessions.Support; /// /// One owned model-tool scenario over the shared simulated server: an isolated workspace, a diff --git a/tests/OpenCode.Sdk.Tests/Support/PendingPermissionCleanup.cs b/tests/OpenCode.Sdk.Tests/Sessions/Support/PendingPermissionCleanup.cs similarity index 95% rename from tests/OpenCode.Sdk.Tests/Support/PendingPermissionCleanup.cs rename to tests/OpenCode.Sdk.Tests/Sessions/Support/PendingPermissionCleanup.cs index ea3c31a0a..a4644c194 100644 --- a/tests/OpenCode.Sdk.Tests/Support/PendingPermissionCleanup.cs +++ b/tests/OpenCode.Sdk.Tests/Sessions/Support/PendingPermissionCleanup.cs @@ -1,7 +1,7 @@ using System.Globalization; using OpenCode.Sdk.Models; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Sessions.Support; internal sealed class PendingPermissionCleanup(SessionClient session) { diff --git a/tests/OpenCode.Sdk.Tests/Support/PendingPermissionCleanupTests.cs b/tests/OpenCode.Sdk.Tests/Sessions/Support/PendingPermissionCleanupTests.cs similarity index 98% rename from tests/OpenCode.Sdk.Tests/Support/PendingPermissionCleanupTests.cs rename to tests/OpenCode.Sdk.Tests/Sessions/Support/PendingPermissionCleanupTests.cs index 7c0120451..cf4216c54 100644 --- a/tests/OpenCode.Sdk.Tests/Support/PendingPermissionCleanupTests.cs +++ b/tests/OpenCode.Sdk.Tests/Sessions/Support/PendingPermissionCleanupTests.cs @@ -1,7 +1,8 @@ using OpenCode.Sdk.Models; using OpenCode.Sdk.Tests.Harness.Ownership; +using OpenCode.Sdk.Tests.Support; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Sessions.Support; public sealed class PendingPermissionCleanupTests { diff --git a/tests/OpenCode.Sdk.Tests/Support/SessionLogTranscript.cs b/tests/OpenCode.Sdk.Tests/Sessions/Support/SessionLogTranscript.cs similarity index 98% rename from tests/OpenCode.Sdk.Tests/Support/SessionLogTranscript.cs rename to tests/OpenCode.Sdk.Tests/Sessions/Support/SessionLogTranscript.cs index 7a4edea7f..a004019af 100644 --- a/tests/OpenCode.Sdk.Tests/Support/SessionLogTranscript.cs +++ b/tests/OpenCode.Sdk.Tests/Sessions/Support/SessionLogTranscript.cs @@ -1,6 +1,7 @@ using OpenCode.Sdk.Models; +using OpenCode.Sdk.Tests.Support; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Sessions.Support; internal sealed class SessionLogTranscript { diff --git a/tests/OpenCode.Sdk.Tests/Support/SessionLogTranscriptTests.cs b/tests/OpenCode.Sdk.Tests/Sessions/Support/SessionLogTranscriptTests.cs similarity index 98% rename from tests/OpenCode.Sdk.Tests/Support/SessionLogTranscriptTests.cs rename to tests/OpenCode.Sdk.Tests/Sessions/Support/SessionLogTranscriptTests.cs index d6c1e153d..67f062772 100644 --- a/tests/OpenCode.Sdk.Tests/Support/SessionLogTranscriptTests.cs +++ b/tests/OpenCode.Sdk.Tests/Sessions/Support/SessionLogTranscriptTests.cs @@ -1,6 +1,7 @@ using OpenCode.Sdk.Models; +using OpenCode.Sdk.Tests.Support; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Sessions.Support; public sealed class SessionLogTranscriptTests { diff --git a/tests/OpenCode.Sdk.Tests/Support/SessionMessageEvidence.cs b/tests/OpenCode.Sdk.Tests/Sessions/Support/SessionMessageEvidence.cs similarity index 68% rename from tests/OpenCode.Sdk.Tests/Support/SessionMessageEvidence.cs rename to tests/OpenCode.Sdk.Tests/Sessions/Support/SessionMessageEvidence.cs index 4d9e8002e..f215825bd 100644 --- a/tests/OpenCode.Sdk.Tests/Support/SessionMessageEvidence.cs +++ b/tests/OpenCode.Sdk.Tests/Sessions/Support/SessionMessageEvidence.cs @@ -1,3 +1,3 @@ -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Sessions.Support; internal sealed record SessionMessageEvidence(string Type, string Id, string Text, double Created); diff --git a/tests/OpenCode.Sdk.Tests/Support/SessionMessageEvidenceProjector.cs b/tests/OpenCode.Sdk.Tests/Sessions/Support/SessionMessageEvidenceProjector.cs similarity index 94% rename from tests/OpenCode.Sdk.Tests/Support/SessionMessageEvidenceProjector.cs rename to tests/OpenCode.Sdk.Tests/Sessions/Support/SessionMessageEvidenceProjector.cs index 94b2fb902..7937c0c28 100644 --- a/tests/OpenCode.Sdk.Tests/Support/SessionMessageEvidenceProjector.cs +++ b/tests/OpenCode.Sdk.Tests/Sessions/Support/SessionMessageEvidenceProjector.cs @@ -1,7 +1,8 @@ using System.Text.Json; using OpenCode.Sdk.Models; +using OpenCode.Sdk.Tests.Support; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Sessions.Support; internal sealed class SessionMessageEvidenceProjector { diff --git a/tests/OpenCode.Sdk.Tests/Support/SimulatedSessionTurn.cs b/tests/OpenCode.Sdk.Tests/Sessions/Support/SimulatedSessionTurn.cs similarity index 98% rename from tests/OpenCode.Sdk.Tests/Support/SimulatedSessionTurn.cs rename to tests/OpenCode.Sdk.Tests/Sessions/Support/SimulatedSessionTurn.cs index da8576f10..e8f5a691f 100644 --- a/tests/OpenCode.Sdk.Tests/Support/SimulatedSessionTurn.cs +++ b/tests/OpenCode.Sdk.Tests/Sessions/Support/SimulatedSessionTurn.cs @@ -1,7 +1,8 @@ using OpenCode.Sdk.Models; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Support; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Sessions.Support; /// /// One scripted turn against the simulated server: the subscription is attached before the prompt, diff --git a/tests/OpenCode.Sdk.Tests/Support/LauncherHandleCensusTests.cs b/tests/OpenCode.Sdk.Tests/Shared/LauncherHandleCensusTests.cs similarity index 98% rename from tests/OpenCode.Sdk.Tests/Support/LauncherHandleCensusTests.cs rename to tests/OpenCode.Sdk.Tests/Shared/LauncherHandleCensusTests.cs index b6728cbec..2711ae520 100644 --- a/tests/OpenCode.Sdk.Tests/Support/LauncherHandleCensusTests.cs +++ b/tests/OpenCode.Sdk.Tests/Shared/LauncherHandleCensusTests.cs @@ -1,8 +1,9 @@ using System.Globalization; using OpenCode.Sdk.Tests.Harness; +using OpenCode.Sdk.Tests.Support; using Testably.Abstractions; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Shared; /// /// The census the Windows handle proof rests on: each launcher kind it counts shows while a handle diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Skills/sdk-live-skill.md b/tests/OpenCode.Sdk.Tests/Skills/Fixtures/sdk-live-skill.md similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Skills/sdk-live-skill.md rename to tests/OpenCode.Sdk.Tests/Skills/Fixtures/sdk-live-skill.md diff --git a/tests/OpenCode.Sdk.Tests/TestMirrorTests.cs b/tests/OpenCode.Sdk.Tests/Support/TestMirrorTests.cs similarity index 96% rename from tests/OpenCode.Sdk.Tests/TestMirrorTests.cs rename to tests/OpenCode.Sdk.Tests/Support/TestMirrorTests.cs index 109ca7e54..dd6f0b2ad 100644 --- a/tests/OpenCode.Sdk.Tests/TestMirrorTests.cs +++ b/tests/OpenCode.Sdk.Tests/Support/TestMirrorTests.cs @@ -1,6 +1,4 @@ -using OpenCode.Sdk.Tests.Support; - -namespace OpenCode.Sdk.Tests; +namespace OpenCode.Sdk.Tests.Support; /// /// The test mirror rule () against the real source tree, which must have no diff --git a/tests/OpenCode.Sdk.Tests/Transport/CallerStreamContentTests.cs b/tests/OpenCode.Sdk.Tests/Transport/CallerStreamContentTests.cs index 7edcade04..c56d5f938 100644 --- a/tests/OpenCode.Sdk.Tests/Transport/CallerStreamContentTests.cs +++ b/tests/OpenCode.Sdk.Tests/Transport/CallerStreamContentTests.cs @@ -1,5 +1,6 @@ using OpenCode.Sdk.Internal; using OpenCode.Sdk.Tests.Support; +using OpenCode.Sdk.Tests.Transport.Support; namespace OpenCode.Sdk.Tests.Transport; diff --git a/tests/OpenCode.Sdk.Tests/Transport/NetworkTimeoutTests.cs b/tests/OpenCode.Sdk.Tests/Transport/NetworkTimeoutTests.cs index 29bf226e1..728a87c41 100644 --- a/tests/OpenCode.Sdk.Tests/Transport/NetworkTimeoutTests.cs +++ b/tests/OpenCode.Sdk.Tests/Transport/NetworkTimeoutTests.cs @@ -1,6 +1,7 @@ using System.Threading.Channels; using OpenCode.Sdk.Internal; using OpenCode.Sdk.Tests.Support; +using OpenCode.Sdk.Tests.Transport.Support; namespace OpenCode.Sdk.Tests.Transport; diff --git a/tests/OpenCode.Sdk.Tests/Transport/OwnedTransportTests.cs b/tests/OpenCode.Sdk.Tests/Transport/OwnedTransportTests.cs index a31780837..919463d79 100644 --- a/tests/OpenCode.Sdk.Tests/Transport/OwnedTransportTests.cs +++ b/tests/OpenCode.Sdk.Tests/Transport/OwnedTransportTests.cs @@ -3,6 +3,7 @@ using OpenCode.Sdk.Internal; using OpenCode.Sdk.Models; using OpenCode.Sdk.Tests.Support; +using OpenCode.Sdk.Tests.Transport.Support; namespace OpenCode.Sdk.Tests.Transport; diff --git a/tests/OpenCode.Sdk.Tests/Transport/PipelineMessageTests.cs b/tests/OpenCode.Sdk.Tests/Transport/PipelineMessageTests.cs index 960e56130..0372d69cb 100644 --- a/tests/OpenCode.Sdk.Tests/Transport/PipelineMessageTests.cs +++ b/tests/OpenCode.Sdk.Tests/Transport/PipelineMessageTests.cs @@ -1,6 +1,6 @@ using System.Net; using OpenCode.Sdk.Internal; -using OpenCode.Sdk.Tests.Support; +using OpenCode.Sdk.Tests.Transport.Support; namespace OpenCode.Sdk.Tests.Transport; diff --git a/tests/OpenCode.Sdk.Tests/Transport/PipelineResponseOwnershipTests.cs b/tests/OpenCode.Sdk.Tests/Transport/PipelineResponseOwnershipTests.cs index 9228312d5..cdb044a4e 100644 --- a/tests/OpenCode.Sdk.Tests/Transport/PipelineResponseOwnershipTests.cs +++ b/tests/OpenCode.Sdk.Tests/Transport/PipelineResponseOwnershipTests.cs @@ -1,6 +1,7 @@ using System.Net; using OpenCode.Sdk.Internal; using OpenCode.Sdk.Tests.Support; +using OpenCode.Sdk.Tests.Transport.Support; namespace OpenCode.Sdk.Tests.Transport; diff --git a/tests/OpenCode.Sdk.Tests/Transport/PipelineStreamTests.cs b/tests/OpenCode.Sdk.Tests/Transport/PipelineStreamTests.cs index aa3fe7c68..e589065c3 100644 --- a/tests/OpenCode.Sdk.Tests/Transport/PipelineStreamTests.cs +++ b/tests/OpenCode.Sdk.Tests/Transport/PipelineStreamTests.cs @@ -4,6 +4,7 @@ using OpenCode.Sdk.Internal; using OpenCode.Sdk.Models; using OpenCode.Sdk.Tests.Support; +using OpenCode.Sdk.Tests.Transport.Support; namespace OpenCode.Sdk.Tests.Transport; diff --git a/tests/OpenCode.Sdk.Tests/Transport/PipelineTests.cs b/tests/OpenCode.Sdk.Tests/Transport/PipelineTests.cs index 0d46285da..55c3a51d7 100644 --- a/tests/OpenCode.Sdk.Tests/Transport/PipelineTests.cs +++ b/tests/OpenCode.Sdk.Tests/Transport/PipelineTests.cs @@ -5,6 +5,7 @@ using OpenCode.Sdk.Internal; using OpenCode.Sdk.Models; using OpenCode.Sdk.Tests.Support; +using OpenCode.Sdk.Tests.Transport.Support; namespace OpenCode.Sdk.Tests.Transport; diff --git a/tests/OpenCode.Sdk.Tests/Transport/RequestDecorationPolicyTests.cs b/tests/OpenCode.Sdk.Tests/Transport/RequestDecorationPolicyTests.cs index e019d4f6a..eea73a0be 100644 --- a/tests/OpenCode.Sdk.Tests/Transport/RequestDecorationPolicyTests.cs +++ b/tests/OpenCode.Sdk.Tests/Transport/RequestDecorationPolicyTests.cs @@ -1,5 +1,6 @@ using OpenCode.Sdk.Internal; using OpenCode.Sdk.Tests.Support; +using OpenCode.Sdk.Tests.Transport.Support; namespace OpenCode.Sdk.Tests.Transport; diff --git a/tests/OpenCode.Sdk.Tests/Transport/ResponseBufferingPolicyTests.cs b/tests/OpenCode.Sdk.Tests/Transport/ResponseBufferingPolicyTests.cs index b9f8f9a38..563753a67 100644 --- a/tests/OpenCode.Sdk.Tests/Transport/ResponseBufferingPolicyTests.cs +++ b/tests/OpenCode.Sdk.Tests/Transport/ResponseBufferingPolicyTests.cs @@ -3,6 +3,7 @@ using System.Text; using OpenCode.Sdk.Internal; using OpenCode.Sdk.Tests.Support; +using OpenCode.Sdk.Tests.Transport.Support; #if !NET using TUnit.Assertions.Enums; #endif diff --git a/tests/OpenCode.Sdk.Tests/Support/CancelingContent.cs b/tests/OpenCode.Sdk.Tests/Transport/Support/CancelingContent.cs similarity index 95% rename from tests/OpenCode.Sdk.Tests/Support/CancelingContent.cs rename to tests/OpenCode.Sdk.Tests/Transport/Support/CancelingContent.cs index ff4849722..a8070b7bb 100644 --- a/tests/OpenCode.Sdk.Tests/Support/CancelingContent.cs +++ b/tests/OpenCode.Sdk.Tests/Transport/Support/CancelingContent.cs @@ -1,7 +1,7 @@ using System.Net; using OpenCode.Sdk.Internal; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Transport.Support; /// Cancels the caller token while a one-shot response body is being buffered. internal sealed class CancelingContent : HttpContent diff --git a/tests/OpenCode.Sdk.Tests/Support/CancelingStream.cs b/tests/OpenCode.Sdk.Tests/Transport/Support/CancelingStream.cs similarity index 96% rename from tests/OpenCode.Sdk.Tests/Support/CancelingStream.cs rename to tests/OpenCode.Sdk.Tests/Transport/Support/CancelingStream.cs index eeb9b7b3c..78869afe3 100644 --- a/tests/OpenCode.Sdk.Tests/Support/CancelingStream.cs +++ b/tests/OpenCode.Sdk.Tests/Transport/Support/CancelingStream.cs @@ -1,4 +1,4 @@ -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Transport.Support; /// Fails reads as transport-originated cancellation without canceling the caller token. internal sealed class CancelingStream : Stream diff --git a/tests/OpenCode.Sdk.Tests/Support/DisposalTrackingContent.cs b/tests/OpenCode.Sdk.Tests/Transport/Support/DisposalTrackingContent.cs similarity index 89% rename from tests/OpenCode.Sdk.Tests/Support/DisposalTrackingContent.cs rename to tests/OpenCode.Sdk.Tests/Transport/Support/DisposalTrackingContent.cs index 307b5a9a1..202ce3928 100644 --- a/tests/OpenCode.Sdk.Tests/Support/DisposalTrackingContent.cs +++ b/tests/OpenCode.Sdk.Tests/Transport/Support/DisposalTrackingContent.cs @@ -1,4 +1,4 @@ -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Transport.Support; /// Tracks whether the response owner disposed a buffered string body. internal sealed class DisposalTrackingContent : StringContent diff --git a/tests/OpenCode.Sdk.Tests/Support/DisposalTrackingResponse.cs b/tests/OpenCode.Sdk.Tests/Transport/Support/DisposalTrackingResponse.cs similarity index 92% rename from tests/OpenCode.Sdk.Tests/Support/DisposalTrackingResponse.cs rename to tests/OpenCode.Sdk.Tests/Transport/Support/DisposalTrackingResponse.cs index f951e0c5a..14216a3de 100644 --- a/tests/OpenCode.Sdk.Tests/Support/DisposalTrackingResponse.cs +++ b/tests/OpenCode.Sdk.Tests/Transport/Support/DisposalTrackingResponse.cs @@ -1,6 +1,6 @@ using System.Net; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Transport.Support; /// Tracks whether the pipeline released the response as well as its content. internal sealed class DisposalTrackingResponse : HttpResponseMessage diff --git a/tests/OpenCode.Sdk.Tests/Support/FaultingStream.cs b/tests/OpenCode.Sdk.Tests/Transport/Support/FaultingStream.cs similarity index 97% rename from tests/OpenCode.Sdk.Tests/Support/FaultingStream.cs rename to tests/OpenCode.Sdk.Tests/Transport/Support/FaultingStream.cs index 0455f7f1c..0cbdecac3 100644 --- a/tests/OpenCode.Sdk.Tests/Support/FaultingStream.cs +++ b/tests/OpenCode.Sdk.Tests/Transport/Support/FaultingStream.cs @@ -1,4 +1,4 @@ -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Transport.Support; /// /// Serves one prepared prefix and then fails the way a connection dropped mid-body does, diff --git a/tests/OpenCode.Sdk.Tests/Support/InterruptedBufferingContent.cs b/tests/OpenCode.Sdk.Tests/Transport/Support/InterruptedBufferingContent.cs similarity index 96% rename from tests/OpenCode.Sdk.Tests/Support/InterruptedBufferingContent.cs rename to tests/OpenCode.Sdk.Tests/Transport/Support/InterruptedBufferingContent.cs index 88402c68b..74723d568 100644 --- a/tests/OpenCode.Sdk.Tests/Support/InterruptedBufferingContent.cs +++ b/tests/OpenCode.Sdk.Tests/Transport/Support/InterruptedBufferingContent.cs @@ -1,6 +1,7 @@ using System.Net; +using OpenCode.Sdk.Tests.Support; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Transport.Support; /// /// Reproduces .NET 10's HttpContent failure mode deterministically: the read-stream diff --git a/tests/OpenCode.Sdk.Tests/Support/ReadObservingContent.cs b/tests/OpenCode.Sdk.Tests/Transport/Support/ReadObservingContent.cs similarity index 96% rename from tests/OpenCode.Sdk.Tests/Support/ReadObservingContent.cs rename to tests/OpenCode.Sdk.Tests/Transport/Support/ReadObservingContent.cs index 27eb97669..32cda0643 100644 --- a/tests/OpenCode.Sdk.Tests/Support/ReadObservingContent.cs +++ b/tests/OpenCode.Sdk.Tests/Transport/Support/ReadObservingContent.cs @@ -1,6 +1,6 @@ using System.Net; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Transport.Support; /// A body that completes immediately and records whether the pipeline drained it. internal sealed class ReadObservingContent : HttpContent diff --git a/tests/OpenCode.Sdk.Tests/Support/RecordingResponseAdapter.cs b/tests/OpenCode.Sdk.Tests/Transport/Support/RecordingResponseAdapter.cs similarity index 93% rename from tests/OpenCode.Sdk.Tests/Support/RecordingResponseAdapter.cs rename to tests/OpenCode.Sdk.Tests/Transport/Support/RecordingResponseAdapter.cs index 60163366c..83b21507d 100644 --- a/tests/OpenCode.Sdk.Tests/Support/RecordingResponseAdapter.cs +++ b/tests/OpenCode.Sdk.Tests/Transport/Support/RecordingResponseAdapter.cs @@ -1,7 +1,8 @@ using System.Text; using OpenCode.Sdk.Internal; +using OpenCode.Sdk.Tests.Support; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Transport.Support; internal sealed class RecordingResponseAdapter : ResponseAdapter { diff --git a/tests/OpenCode.Sdk.Tests/Support/ScriptedFramer.cs b/tests/OpenCode.Sdk.Tests/Transport/Support/ScriptedFramer.cs similarity index 95% rename from tests/OpenCode.Sdk.Tests/Support/ScriptedFramer.cs rename to tests/OpenCode.Sdk.Tests/Transport/Support/ScriptedFramer.cs index 09d404a60..dcbc1527e 100644 --- a/tests/OpenCode.Sdk.Tests/Support/ScriptedFramer.cs +++ b/tests/OpenCode.Sdk.Tests/Transport/Support/ScriptedFramer.cs @@ -1,7 +1,7 @@ using System.Runtime.CompilerServices; using OpenCode.Sdk.Internal; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Transport.Support; /// Substitutes the framer seam: yields a scripted frame sequence and records what it framed. internal sealed class ScriptedFramer : IEventStreamFramer diff --git a/tests/OpenCode.Sdk.Tests/Support/TimeoutContent.cs b/tests/OpenCode.Sdk.Tests/Transport/Support/TimeoutContent.cs similarity index 89% rename from tests/OpenCode.Sdk.Tests/Support/TimeoutContent.cs rename to tests/OpenCode.Sdk.Tests/Transport/Support/TimeoutContent.cs index d153be81f..36837a866 100644 --- a/tests/OpenCode.Sdk.Tests/Support/TimeoutContent.cs +++ b/tests/OpenCode.Sdk.Tests/Transport/Support/TimeoutContent.cs @@ -1,6 +1,6 @@ using System.Net; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Transport.Support; /// Simulates the transport timing out while the response body streams. internal sealed class TimeoutContent : HttpContent diff --git a/tests/OpenCode.Sdk.Tests/Support/TrackingByteArrayPool.cs b/tests/OpenCode.Sdk.Tests/Transport/Support/TrackingByteArrayPool.cs similarity index 97% rename from tests/OpenCode.Sdk.Tests/Support/TrackingByteArrayPool.cs rename to tests/OpenCode.Sdk.Tests/Transport/Support/TrackingByteArrayPool.cs index 6b1a3c4fd..2a9ca3ddf 100644 --- a/tests/OpenCode.Sdk.Tests/Support/TrackingByteArrayPool.cs +++ b/tests/OpenCode.Sdk.Tests/Transport/Support/TrackingByteArrayPool.cs @@ -1,6 +1,6 @@ using System.Buffers; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Transport.Support; /// Tracks byte-array ownership and pre-fills spare capacity so tests catch out-of-range reads. internal sealed class TrackingByteArrayPool : ArrayPool diff --git a/tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-websearch-response.json b/tests/OpenCode.Sdk.Tests/Websearch/Fixtures/known-websearch-response.json similarity index 100% rename from tests/OpenCode.Sdk.Tests/Fixtures/Serialization/known-websearch-response.json rename to tests/OpenCode.Sdk.Tests/Websearch/Fixtures/known-websearch-response.json diff --git a/tests/OpenCode.Sdk.Tests/Support/OwnedWorktreeScenario.cs b/tests/OpenCode.Sdk.Tests/Worktrees/Support/OwnedWorktreeScenario.cs similarity index 98% rename from tests/OpenCode.Sdk.Tests/Support/OwnedWorktreeScenario.cs rename to tests/OpenCode.Sdk.Tests/Worktrees/Support/OwnedWorktreeScenario.cs index 31a7f1c5e..ae8f40bf3 100644 --- a/tests/OpenCode.Sdk.Tests/Support/OwnedWorktreeScenario.cs +++ b/tests/OpenCode.Sdk.Tests/Worktrees/Support/OwnedWorktreeScenario.cs @@ -3,7 +3,7 @@ using OpenCode.Sdk.Tests.Harness; using OpenCode.Sdk.Tests.Harness.Ownership; -namespace OpenCode.Sdk.Tests.Support; +namespace OpenCode.Sdk.Tests.Worktrees.Support; /// /// Owns a live worktree scenario's Git repository workspace from creation to teardown: the diff --git a/tests/OpenCode.Sdk.Tests/Worktrees/WorktreesClientLiveTests.cs b/tests/OpenCode.Sdk.Tests/Worktrees/WorktreesClientLiveTests.cs index 229556c58..321861441 100644 --- a/tests/OpenCode.Sdk.Tests/Worktrees/WorktreesClientLiveTests.cs +++ b/tests/OpenCode.Sdk.Tests/Worktrees/WorktreesClientLiveTests.cs @@ -1,7 +1,7 @@ using System.Globalization; using OpenCode.Sdk.Models; using OpenCode.Sdk.Tests.Harness; -using OpenCode.Sdk.Tests.Support; +using OpenCode.Sdk.Tests.Worktrees.Support; namespace OpenCode.Sdk.Tests.Worktrees; diff --git a/tests/OpenCode.Sdk.Tools.Tests/RepositoryGates/collapsed-assertions.txt b/tests/OpenCode.Sdk.Tools.Tests/RepositoryGates/collapsed-assertions.txt index c522dc93f..60bfd20cd 100644 --- a/tests/OpenCode.Sdk.Tools.Tests/RepositoryGates/collapsed-assertions.txt +++ b/tests/OpenCode.Sdk.Tools.Tests/RepositoryGates/collapsed-assertions.txt @@ -32,9 +32,9 @@ tests/OpenCode.Sdk.Tests/PersistentPtys/PersistentPtySessionTests.cs 1 tests/OpenCode.Sdk.Tests/PersistentPtys/PersistentPtyUpgradeFailurePolicyTests.cs 1 tests/OpenCode.Sdk.Tests/Ptys/PtySessionTests.cs 2 tests/OpenCode.Sdk.Tests/Ptys/PtysClientContractTests.cs 3 -tests/OpenCode.Sdk.Tests/SecretMemberPrintingTests.cs 1 tests/OpenCode.Sdk.Tests/Serialization/OpenCodeJsonContextTests.cs 4 tests/OpenCode.Sdk.Tests/Serialization/OpenModelRoundTripTests.cs 1 +tests/OpenCode.Sdk.Tests/Serialization/SecretMemberPrintingTests.cs 1 tests/OpenCode.Sdk.Tests/Server/ServerClientLiveTests.cs 1 tests/OpenCode.Sdk.Tests/Sessions/SessionClientContractTests.cs 1 tests/OpenCode.Sdk.Tests/Sessions/SessionClientPaginationTests.cs 4 @@ -46,9 +46,9 @@ tests/OpenCode.Sdk.Tests/Sessions/SessionParentFilterTests.cs 1 tests/OpenCode.Sdk.Tests/Sessions/SessionPermissionLiveTests.cs 2 tests/OpenCode.Sdk.Tests/Sessions/SessionsClientContractTests.cs 2 tests/OpenCode.Sdk.Tests/Sessions/SessionsClientLiveTests.cs 11 +tests/OpenCode.Sdk.Tests/Sessions/Support/SessionLogTranscriptTests.cs 1 tests/OpenCode.Sdk.Tests/Streaming/ServerSentEventReaderTests.cs 7 tests/OpenCode.Sdk.Tests/Support/OwnedEventReaderTests.cs 1 -tests/OpenCode.Sdk.Tests/Support/SessionLogTranscriptTests.cs 1 tests/OpenCode.Sdk.Tests/Transport/PipelineStreamTests.cs 2 tests/OpenCode.Sdk.Tests/Transport/PipelineTests.cs 7 tests/OpenCode.Sdk.Tests/Transport/RequestDecorationPolicyTests.cs 7 diff --git a/tests/OpenCode.Sdk.Tools.Tests/RepositoryGates/order-blind-equivalence.txt b/tests/OpenCode.Sdk.Tools.Tests/RepositoryGates/order-blind-equivalence.txt index 0f9d4c15c..e474ccb75 100644 --- a/tests/OpenCode.Sdk.Tools.Tests/RepositoryGates/order-blind-equivalence.txt +++ b/tests/OpenCode.Sdk.Tools.Tests/RepositoryGates/order-blind-equivalence.txt @@ -27,9 +27,9 @@ tests/OpenCode.Sdk.Tests/Sessions/GettingStartedRecipeLiveTests.cs 1 tests/OpenCode.Sdk.Tests/Sessions/SessionInboxLiveTests.cs 2 tests/OpenCode.Sdk.Tests/Sessions/SessionMetadataLiveTests.cs 2 tests/OpenCode.Sdk.Tests/Sessions/SessionPermissionLiveTests.cs 2 +tests/OpenCode.Sdk.Tests/Sessions/Support/PendingPermissionCleanupTests.cs 1 tests/OpenCode.Sdk.Tests/Support/OwnedEventReaderTests.cs 3 -tests/OpenCode.Sdk.Tests/Support/PendingPermissionCleanupTests.cs 1 -tests/OpenCode.Sdk.Tests/TestMirrorTests.cs 1 +tests/OpenCode.Sdk.Tests/Support/TestMirrorTests.cs 1 tests/OpenCode.Sdk.Tests/Transport/CallerStreamContentTests.cs 3 tests/OpenCode.Sdk.Tests/Transport/NetworkTimeoutTests.cs 1 tests/OpenCode.Sdk.Tests/Transport/OwnedTransportTests.cs 1 diff --git a/tests/OpenCode.Sdk.Tools.Tests/RepositoryGates/real-clock.txt b/tests/OpenCode.Sdk.Tools.Tests/RepositoryGates/real-clock.txt index c42935e3e..98830c061 100644 --- a/tests/OpenCode.Sdk.Tools.Tests/RepositoryGates/real-clock.txt +++ b/tests/OpenCode.Sdk.Tools.Tests/RepositoryGates/real-clock.txt @@ -22,23 +22,23 @@ tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerJobTests.cs 4 tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerLifecycleTests.cs 3 tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerProcessGroupTests.cs 5 tests/OpenCode.Sdk.Tests/Hosting/Launcher/PosixServerLadderTests.cs 4 +tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/LadderTree.cs 2 +tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/RecordingTreeKill.cs 2 +tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/ServerStartupTreeHandshake.cs 1 +tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/ServerStartupTreeScenario.cs 3 tests/OpenCode.Sdk.Tests/Hosting/Platform/Windows/TaskkillTreeKillTests.cs 1 tests/OpenCode.Sdk.Tests/Hosting/Platform/Windows/WindowsExitWatchTests.cs 2 tests/OpenCode.Sdk.Tests/LocationTargetingLiveTests.cs 1 tests/OpenCode.Sdk.Tests/PersistentPtys/PersistentPtySessionTests.cs 1 tests/OpenCode.Sdk.Tests/Ptys/PtySessionTests.cs 1 +tests/OpenCode.Sdk.Tests/Ptys/Support/PtyFailureDiagnosticsTests.cs 1 +tests/OpenCode.Sdk.Tests/Ptys/Support/PtyLiveTranscript.cs 2 tests/OpenCode.Sdk.Tests/Sessions/SessionLogCliProfileLiveTests.cs 2 tests/OpenCode.Sdk.Tests/Sessions/SessionMetadataLiveTests.cs 1 tests/OpenCode.Sdk.Tests/Sessions/SessionPermissionRulesLiveTests.cs 1 -tests/OpenCode.Sdk.Tests/Support/LadderTree.cs 2 +tests/OpenCode.Sdk.Tests/Sessions/Support/SessionLogTranscript.cs 1 tests/OpenCode.Sdk.Tests/Support/LiveReadiness.cs 3 tests/OpenCode.Sdk.Tests/Support/OwnedEventReader.cs 1 tests/OpenCode.Sdk.Tests/Support/ProcessObservation.cs 1 -tests/OpenCode.Sdk.Tests/Support/PtyFailureDiagnosticsTests.cs 1 -tests/OpenCode.Sdk.Tests/Support/PtyLiveTranscript.cs 2 -tests/OpenCode.Sdk.Tests/Support/RecordingTreeKill.cs 2 tests/OpenCode.Sdk.Tests/Support/ServerDiagnosticScenario.cs 1 -tests/OpenCode.Sdk.Tests/Support/ServerStartupTreeHandshake.cs 1 -tests/OpenCode.Sdk.Tests/Support/ServerStartupTreeScenario.cs 3 tests/OpenCode.Sdk.Tests/Support/SessionEventProbe.cs 1 -tests/OpenCode.Sdk.Tests/Support/SessionLogTranscript.cs 1 diff --git a/tests/OpenCode.Sdk.Tools.Tests/Snapshots/SuppressionLedgerTests.Ledger_Should_Count_Every_Suppression_In_The_Repository.verified.txt b/tests/OpenCode.Sdk.Tools.Tests/Snapshots/SuppressionLedgerTests.Ledger_Should_Count_Every_Suppression_In_The_Repository.verified.txt index ca60a74ff..c0b4f0912 100644 --- a/tests/OpenCode.Sdk.Tools.Tests/Snapshots/SuppressionLedgerTests.Ledger_Should_Count_Every_Suppression_In_The_Repository.verified.txt +++ b/tests/OpenCode.Sdk.Tools.Tests/Snapshots/SuppressionLedgerTests.Ledger_Should_Count_Every_Suppression_In_The_Repository.verified.txt @@ -151,10 +151,13 @@ editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/S editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/ServiceFileSystemTests.cs] dotnet_diagnostic.VSTHRD103.severity = none editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Stop/OpenCodeServerStop{Live,Escalation}Tests.cs] dotnet_diagnostic.MA0045.severity = none editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Stop/ServiceStopperTests.cs] dotnet_diagnostic.MA0045.severity = none +editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/PathCommandShim.cs] dotnet_diagnostic.MA0045.severity = none editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/Hosting/OpenCodeServerContractTests.cs] dotnet_diagnostic.CA2000.severity = none editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/PersistentPtys/PersistentPtySessionTests.cs] dotnet_diagnostic.CA2000.severity = none editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/Ptys/PtySessionTests.cs] dotnet_diagnostic.CA2000.severity = none +editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/Ptys/Support/PtyFailureDiagnosticsTests.cs] dotnet_diagnostic.VSTHRD003.severity = none editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/Sessions/SessionMessagePaginationLiveTests.cs] dotnet_diagnostic.VSTHRD003.severity = none +editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/Sessions/Support/SessionLogTranscriptTests.cs] dotnet_diagnostic.VSTHRD003.severity = none editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/Support/BlockingStream.cs] dotnet_diagnostic.CA1844.severity = none editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/Support/ChildExitObservation.cs] dotnet_diagnostic.VSTHRD003.severity = none editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/Support/ControlledOperationDeadline.cs] dotnet_diagnostic.VSTHRD003.severity = none @@ -162,13 +165,10 @@ editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/Support/OperationDeadlineSc editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/Support/OwnedCleanupDeadlineTests.cs] dotnet_diagnostic.VSTHRD003.severity = none editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/Support/OwnedEventReader.cs] dotnet_diagnostic.VSTHRD003.severity = none editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/Support/OwnedEventReaderTests.cs] dotnet_diagnostic.VSTHRD003.severity = none -editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/Support/PathCommandShim.cs] dotnet_diagnostic.MA0045.severity = none -editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/Support/PtyFailureDiagnosticsTests.cs] dotnet_diagnostic.VSTHRD003.severity = none editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/Support/ScriptedTerminalWebSocket.cs] dotnet_diagnostic.VSTHRD003.severity = none editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/Support/ServerDiagnosticScenario.cs] dotnet_diagnostic.VSTHRD003.severity = none editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/Support/SessionEventProbe.cs] dotnet_diagnostic.VSTHRD003.severity = none editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/Support/SessionEventProbeTests.cs] dotnet_diagnostic.VSTHRD003.severity = none -editorconfig .editorconfig [tests/OpenCode.Sdk.Tests/Support/SessionLogTranscriptTests.cs] dotnet_diagnostic.VSTHRD003.severity = none editorconfig .editorconfig [tests/Shared/ProcessMark.cs] dotnet_diagnostic.MA0045.severity = none editorconfig .editorconfig [tools/OpenCode.Sdk.Tools/Generator/Ingestion/Projection/EnumSchemaProjector.cs] dotnet_diagnostic.CA1822.severity = none editorconfig .editorconfig [tools/OpenCode.Sdk.Tools/Generator/Ingestion/Projection/EnumSchemaProjector.cs] dotnet_diagnostic.S2325.severity = none @@ -210,12 +210,12 @@ pragma src/OpenCode.Sdk/Internal/Terminal/TerminalReceivePump.cs VSTHRD003 pragma tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Ensure/ServiceEnsurerTests.cs MA0045 pragma tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Handoff/ServicePtyHandoffScenario.cs MA0045 pragma tests/OpenCode.Sdk.Tests/Hosting/BackgroundService/Handoff/ServicePtyHandoffTests.cs MA0045 +pragma tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/LauncherHost.cs VSTHRD003 pragma tests/OpenCode.Sdk.Tests/PersistentPtys/PersistentPtySessionTests.cs CA2025 +pragma tests/OpenCode.Sdk.Tests/Ptys/Support/PtyDiagnosticServer.cs VSTHRD003 pragma tests/OpenCode.Sdk.Tests/Support/DiagnosticWriteBarrier.cs VSTHRD003 pragma tests/OpenCode.Sdk.Tests/Support/Gate.cs VSTHRD003 -pragma tests/OpenCode.Sdk.Tests/Support/LauncherHost.cs VSTHRD003 pragma tests/OpenCode.Sdk.Tests/Support/LoopbackHttpServer.cs VSTHRD003 -pragma tests/OpenCode.Sdk.Tests/Support/PtyDiagnosticServer.cs VSTHRD003 pragma tests/OpenCode.Sdk.Tests/Transport/OwnedTransportTests.cs VSTHRD003 pragma tools/OpenCode.Sdk.Tools/Generator/Emission/ExperimentalAttributeSyntax.cs S1075 pragma tools/OpenCode.Sdk.Tools/Generator/Ingestion/Projection/AllOfWrapperKeywords.cs CS0618 @@ -246,8 +246,8 @@ slopwatch-suppress tests/OpenCode.Sdk.ServiceFixture/WindowsLauncherProbe.cs SW0 slopwatch-suppress tests/OpenCode.Sdk.Tests/Harness/MachineLock.cs SW004 slopwatch-suppress tests/OpenCode.Sdk.Tests/Harness/PinnedManagedServiceFixture.cs SW004 slopwatch-suppress tests/OpenCode.Sdk.Tests/Hosting/Launcher/OpenCodeServerJobTests.cs SW004 +slopwatch-suppress tests/OpenCode.Sdk.Tests/Hosting/Launcher/Support/LadderTree.cs SW004 slopwatch-suppress tests/OpenCode.Sdk.Tests/Hosting/Platform/Windows/WindowsExitWatchTests.cs SW004 -slopwatch-suppress tests/OpenCode.Sdk.Tests/Support/LadderTree.cs SW004 slopwatch-suppress tests/OpenCode.Sdk.Tests/Support/LiveReadiness.cs SW004 slopwatch-suppress tests/OpenCode.Sdk.Tests/Support/ProcessObservation.cs SW003 slopwatch-suppress tests/OpenCode.Sdk.Tools.Tests/Packaging/PackedConsumerFeed.cs SW003 diff --git a/tools/jscpd/src.baseline.json b/tools/jscpd/src.baseline.json index 7db9b06dc..a2bc50a59 100644 --- a/tools/jscpd/src.baseline.json +++ b/tools/jscpd/src.baseline.json @@ -3,7 +3,6 @@ "fingerprints": { "173100cf60860d5c": 1, "379f83d9f5f49b50": 1, - "694a350883370d46": 1, "7efebb0c6647bc37": 1 } } diff --git a/tools/jscpd/tests.baseline.json b/tools/jscpd/tests.baseline.json index 0b762c77d..3d78de49d 100644 --- a/tools/jscpd/tests.baseline.json +++ b/tools/jscpd/tests.baseline.json @@ -46,10 +46,11 @@ "0a6e5c2d3b8c81ff": 1, "0a83952fafd4de0d": 1, "0aa5ac7a294d6eeb": 1, - "0b045197b94f8863": 1, "0b1dd9528bf9f4d7": 1, + "0bb960006757fa5d": 2, "0bf07eca2ad5d37a": 1, "0c15dec97c59fb17": 1, + "0c2d1ea4ed7d84e1": 1, "0c4aa6cdd20ff426": 1, "0c53a2dd00579986": 1, "0c6ad1b72d1c5abd": 1, @@ -90,6 +91,7 @@ "14c95e594f5e88c9": 1, "14f3cf459e8fd59e": 1, "14f4b594979ef4be": 1, + "15d5cc8200fcb115": 1, "15f6943efefbba82": 1, "15f72a1f46f3211c": 1, "163be34070c86587": 1, @@ -155,7 +157,6 @@ "29e2d3f4c6ced0a9": 1, "2a2ea864e10f10a0": 1, "2a6fba049050425f": 1, - "2a967d498d7ada65": 1, "2ad053ce77d6dfb2": 1, "2bef63e501d18ed2": 1, "2cce43ebc1614860": 1, @@ -304,6 +305,7 @@ "5977e81f73804251": 1, "59df1ab3f8808846": 1, "5ae402699aab9b4f": 1, + "5b49296fbe1a85c1": 1, "5b5f89cf29e631cb": 1, "5bb29ca2159fbdc5": 1, "5bcc598790149aed": 1, @@ -341,7 +343,6 @@ "658230c0c4b098a5": 1, "65c592402d3c35db": 1, "666a7f0d59bdfda9": 1, - "6698ef2d1387e09e": 1, "673cdefbc0e27446": 1, "67f863244c398a2e": 1, "686f4cbec8a0fd92": 1, @@ -377,6 +378,7 @@ "6eede9ab9fb16d7c": 1, "6efa92670898d4c4": 1, "7015815c99e52132": 1, + "7065dbb5645a57f7": 1, "70b546f19e61694e": 1, "70bd27545e44e77c": 1, "70e78f68bbb3f8b1": 1, @@ -386,6 +388,7 @@ "7155143a76ead712": 1, "7194ef683df831bc": 1, "729ecae0417d0f29": 1, + "72a9b264ea6e4f80": 1, "731af5ab97f97192": 1, "7348221dfe25068d": 1, "7383f1c75dba03da": 1, @@ -465,6 +468,7 @@ "8990b0dcf557805f": 1, "89b40759e47ca8db": 1, "89da94f6e3a69c7d": 1, + "8a2fbe60831c0ff1": 1, "8a46989d4cc28dc2": 1, "8a7412eb78a37817": 1, "8a79ca5fee4584ac": 1, @@ -499,6 +503,7 @@ "926d6280af25895e": 1, "929f55f8ba581bce": 1, "92a23a8351ac6f5b": 1, + "92c51ace17ce9e06": 1, "93ab56e01aefd998": 1, "93b9870af2c85e3c": 1, "943a5cceaaa0085d": 1, @@ -516,7 +521,9 @@ "9807478b48fb6f6a": 1, "98c9c3613c3d13da": 1, "98cf46d5ad809549": 1, + "98e56399e03423a5": 1, "98f0810d451927f1": 1, + "9901c04be163c8bf": 1, "99234a03fbba27b8": 1, "99a67420ab2fdabd": 2, "99ab2f421483cca1": 1, @@ -525,6 +532,7 @@ "9a358c85f07b6c11": 1, "9a6d3e40660da4b5": 1, "9aaacc3995d7f2de": 1, + "9ab6ff5266fa89da": 1, "9afaad4e059435eb": 1, "9b108a480389775d": 1, "9b2cd4682ff8f174": 1, @@ -653,6 +661,7 @@ "c27beabd28694361": 1, "c3312d7a632e3665": 1, "c377e5bc7e557f04": 1, + "c38bc63bccefdbac": 1, "c3d10f9320c71fb3": 1, "c4d921ac33389a47": 1, "c4e680d4321eb064": 1, @@ -662,6 +671,7 @@ "c6cce4bd6bf12d59": 1, "c780753c13cd3f21": 1, "c7f342c6c31cf572": 1, + "c865526eaff63e67": 1, "c8d00c6953c98eca": 1, "c958f2914094b197": 1, "c96ee9924b3f4ea7": 1, @@ -689,6 +699,7 @@ "ced45d1f3dfdf4bf": 1, "ceefd01b00d7a785": 1, "cf5d9fe2b8d23875": 1, + "d08941b3f1f42146": 1, "d13f1005c59d1243": 1, "d1debd6e7118e546": 1, "d20c4d175159aa90": 1, @@ -737,6 +748,7 @@ "e45d1d2fb94c859b": 1, "e4bc846ba130e160": 1, "e4c2843bfae3d310": 1, + "e53558b47dfffdd1": 1, "e539609f53bb27d3": 1, "e6460fb624a61900": 1, "e71da0387666d746": 1, @@ -753,7 +765,6 @@ "ea339e6d78da0f57": 1, "eaee9a41a0b130d0": 1, "eb0bbed02f67f613": 1, - "eb124ee954a17bd6": 1, "eb7e225d5bfe0159": 1, "ebec59933509b551": 1, "ebfb2fa4553fc40c": 1, @@ -776,6 +787,7 @@ "f05e80092b0c0382": 1, "f09e3e55245ee073": 1, "f102cbf1fab8a3d9": 1, + "f14901c53868eee4": 1, "f1812b941eb02542": 1, "f1f7493a31b45480": 1, "f23a5dc8edef52e2": 1, diff --git a/tools/oracles/first-match-union.ts b/tools/oracles/first-match-union.ts index b219f1bff..fabdce477 100644 --- a/tools/oracles/first-match-union.ts +++ b/tools/oracles/first-match-union.ts @@ -1,6 +1,6 @@ // The parity oracle for the structural union first-match arm (ADR-0016). // -// It decodes every value of tests/OpenCode.Sdk.Tests/Fixtures/Unions/first-match-corpus.json with +// It decodes every value of tests/OpenCode.Sdk.Tests/Serialization/Fixtures/first-match-corpus.json with // upstream's own schemas and upstream's own Effect, then writes which union member took each value // to first-match-expected.json beside it. The SDK's parity test asserts that the generated // converters pick the same member. Re-run it when a refresh moves the pinned Effect version (the @@ -18,7 +18,7 @@ import { fileURLToPath } from "node:url" const repository = join(dirname(fileURLToPath(import.meta.url)), "..", "..") const upstream = join(repository, "external", "opencode") const schemaPackage = join(upstream, "packages", "schema") -const fixtures = join(repository, "tests", "OpenCode.Sdk.Tests", "Fixtures", "Unions") +const fixtures = join(repository, "tests", "OpenCode.Sdk.Tests", "Serialization", "Fixtures") const { Schema } = await import(createRequire(join(schemaPackage, "package.json")).resolve("effect")) const reference = await import(join(schemaPackage, "src", "config", "reference.ts")) diff --git a/tools/oracles/wildcard-path.ts b/tools/oracles/wildcard-path.ts index b58d2811d..6dabbb440 100644 --- a/tools/oracles/wildcard-path.ts +++ b/tools/oracles/wildcard-path.ts @@ -1,7 +1,7 @@ // The parity oracle for the trailing-wildcard route rule (fs.read). // // It calls upstream's own generated Promise client (packages/client/src/promise/generated/client.ts) -// with a recording fetch, once per path of tests/OpenCode.Sdk.Tests/Fixtures/Routes/ +// with a recording fetch, once per path of tests/OpenCode.Sdk.Tests/FileSystem/Fixtures/ // wildcard-path-corpus.json, and writes the request path the client produced to // wildcard-path-expected.json beside it. The SDK's route test asserts the generated route builder // produces the same path. Re-run it when a refresh moves the watched codegen rule @@ -17,7 +17,7 @@ import { fileURLToPath } from "node:url" const repository = join(dirname(fileURLToPath(import.meta.url)), "..", "..") const upstream = join(repository, "external", "opencode") -const fixtures = join(repository, "tests", "OpenCode.Sdk.Tests", "Fixtures", "Routes") +const fixtures = join(repository, "tests", "OpenCode.Sdk.Tests", "FileSystem", "Fixtures") const { make } = await import(join(upstream, "packages", "client", "src", "promise", "generated", "client.ts")) const corpus: string[] = JSON.parse(readFileSync(join(fixtures, "wildcard-path-corpus.json"), "utf8"))