Skip to content

[TST-380] test: shells, VCS, projects and experimental operations run against the real server - #423

Merged
Blind-Striker merged 1 commit into
masterfrom
test/tst-380-other-flows
Oct 17, 2026
Merged

Blind-Striker merged 1 commit into
masterfrom
test/tst-380-other-flows

Conversation

@Blind-Striker

@Blind-Striker Blind-Striker commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

📝 Description

What does this PR do?
It adds nine real-server tests for operations that had none: shells, VCS, projects, and the experimental MCP and session-instruction operations. They run on the existing simulated-drive fixture, with no new fixture, provider, support type or dependency.

ID Operation Test
H01 CreateShellAsync ShellsClientLiveTests.CreateShellAsync_Should_Start_The_Command_When_The_Workspace_Is_Owned
H02 GetOutputAsync ShellClientLiveTests.GetOutputAsync_Should_Page_The_Captured_Bytes_When_A_Command_Has_Exited
V02 InitializeRepositoryAsync VcsClientLiveTests.InitializeRepositoryAsync_Should_Refuse_Reinitialization_When_The_First_Call_Initialized_Git
P01 UpdateProjectAsync ProjectsClientLiveTests.UpdateProjectAsync_Should_Persist_The_Display_Name_When_A_Project_Exists
E01 AddMcpServerAsync ExperimentalClientLiveTests.AddMcpServerAsync_Should_Register_The_Disabled_Entry_When_No_Connection_Is_Requested
E03 ListSessionInstructionsEntriesAsync ExperimentalClientLiveTests.ListSessionInstructionsEntriesAsync_Should_Return_The_Entry_When_It_Was_Set
E04 RemoveMcpServerAsync ExperimentalClientLiveTests.RemoveMcpServerAsync_Should_Remove_The_Entry_When_It_Exists
E05 RemoveSessionInstructionsEntryAsync ExperimentalClientLiveTests.RemoveSessionInstructionsEntryAsync_Should_Hide_The_Entry_When_It_Exists
E06 SetSessionInstructionsEntryAsync ExperimentalClientLiveTests.SetSessionInstructionsEntryAsync_Should_Replace_The_Value_When_The_Key_Already_Exists
  • ShellsClientLiveTests, ShellClientLiveTests and ExperimentalClientLiveTests are new live classes, with the same fixture and ServerProcess constraint as their siblings.
  • The MCP tests register a typed, disabled, OAuth-off remote config with an inert .invalid URL, so no connection is attempted.
  • Every server object is owned before its first assertion and cleaned up on every path. P01 restores the project's previous display name.

Part of #380 (PR 3 of 4).

Out: E02 ExperimentalClient.GenerateTextAsync. A no-op mutant leaves the drive's invocation waiter pending before the text oracle is reached. Proving the test therefore needs per-call cancellation in the waiter, which is more than the short arrange this sweep allows. The reason is recorded on #380, and this does not claim the operation is unreachable.

🔄 Type of Change

  • 🧪 Test improvements

🎯 Protocol & API Surface

  • No change to the public API surface
  • Nothing under external/, spec/ or src/ was touched

🧪 Testing

Each test is shown to catch the missing or wrong operation. It is green, then red at its oracle, then green again; the mutations are not committed.

Test Mutation Failure
H01 Shell admission fabricated without a spawn the stored shell's Get returns 404
H02 Valid empty output page first byte expected "s", received ""
V02 Initialization returns 204 without acting second call expected 409, received 204
P01 Update body replaced with {} listed name stays empty
E01 Add returns 204 without acting List lacks the owned name, before any event wait
E03 Valid empty list the entry is missing
E04 Removal returns a valid 204 success without sending Expected to not contain sdk-disabled-…, in 3.7 s
E05 Removal returns 204 without acting List still holds the key
E06 Replacement returns 204 without acting the initial value remains

Every failure is an assertion, never a hang guard or timeout. Where an event wait follows (H01, E01, E04), the test checks finite state first, so a no-op cannot stall it.

Review. A fresh read-only review found one defect. E04 waited for the removal event before checking the list, so a true no-op would stall at the event barrier instead of failing at the oracle. The list check now comes first, and the E04 row above is the proof with a true no-op. The review found nothing else.

✅ Completion Gate

Local check (quality-gates.md) on head fd1e5242, base e03fc68b, idle host. Every step's own exit code was read:

  • slopwatch: zero findings
  • dotnet build --configuration Release: 0 warnings, 0 errors
  • dotnet format whitespace / dotnet format style --severity warn: no changes
  • verify-clones: passed, 0 new; no baseline change
  • OpenCode.Sdk.Tools.Tests (all but NativeAot): 1979, 0 failed
  • OpenCode.Sdk.Tests (all but ServiceElection/NativeAot): 8317, 0 failed

The host runs Bun 1.4.3, a maintainer-named off-pin host (OPENCODE_SDK_TESTS_BUN_MISMATCH=allow); the pin is 1.4.2.

✅ Code Quality Checklist

  • No new suppression
  • No tests skipped, weakened, or deleted to make the suite pass

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…he real server

Part of #380 (PR 3 of 4). Nine live tests on the simulated-drive fixture. Each fails at its oracle when its operation is made a no-op that returns a valid success shape, or sent to the wrong operation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant