Skip to content

feat(automation): ✨ add hosted-session diagnostics and safer ui test gates#160

Merged
PrzemyslawKlys merged 2 commits intov2-speedygonzalesfrom
codex/hosted-session-diagnostics-and-test-safety
Mar 24, 2026
Merged

feat(automation): ✨ add hosted-session diagnostics and safer ui test gates#160
PrzemyslawKlys merged 2 commits intov2-speedygonzalesfrom
codex/hosted-session-diagnostics-and-test-safety

Conversation

@PrzemyslawKlys
Copy link
Copy Markdown
Member

Summary

  • add first-class hosted-session diagnostic readers for both PowerShell and CLI
  • add opt-in control mutation verification records for PowerShell control cmdlets
  • tighten UI test gates so owned-window UI, owned-window mutations, foreground steals, and system-wide mutations are explicitly separated
  • document the new operator surfaces and verification flows

Verification

  • dotnet build Sources/DesktopManager.PowerShell/DesktopManager.PowerShell.csproj --nologo
  • dotnet build Sources/DesktopManager.Cli/DesktopManager.Cli.csproj --nologo
  • dotnet test Sources/DesktopManager.Tests/DesktopManager.Tests.csproj -f net8.0-windows --nologo --filter "FullyQualifiedNamePowerShellControlMutationTests|FullyQualifiedNamePowerShellWindowMutationTests|FullyQualifiedName~PowerShellHostedSessionDiagnosticTests"
  • dotnet test Sources/DesktopManager.Tests/DesktopManager.Tests.csproj -f net8.0-windows --nologo --filter "FullyQualifiedNameDiagnosticCommandOutputTests|FullyQualifiedNameHostedSessionDiagnosticReaderCliTests|FullyQualifiedNameCliApplicationTests|FullyQualifiedNameHelpTextTests"

Notes

  • I intentionally did not rerun the full UI-capable suite after the user reported a live window being restored from maximized to normal during local testing.
  • The safety fix in this PR tightens the gate split so generic RUN_UI_TESTS is no longer enough to open repo-owned harness windows; owned-window harness tests now also require RUN_OWNED_WINDOW_UI_TESTS=true, and owned-window mutations still require RUN_DESTRUCTIVE_UI_TESTS=true.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 84c1748ba0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Assert.Inconclusive("Test requires Windows");
}
TestHelper.RequireOwnedWindowUiTests();
TestHelper.RequireForegroundWindowUiTests();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore owned-window gate before running activation harness test

Switching this test from RequireOwnedWindowUiTests() to RequireForegroundWindowUiTests() drops the RUN_OWNED_WINDOW_UI_TESTS safeguard (and its interactive-desktop check), so the repo-owned WinForms harness can now run whenever foreground gates are enabled even if owned-window tests were intentionally left disabled. That undermines the safety split introduced in this change and can unexpectedly open/activate harness windows in environments that set foreground flags but do not opt into owned-window UI tests.

Useful? React with 👍 / 👎.

@PrzemyslawKlys PrzemyslawKlys merged commit d516057 into v2-speedygonzales Mar 24, 2026
7 checks passed
@PrzemyslawKlys PrzemyslawKlys deleted the codex/hosted-session-diagnostics-and-test-safety branch March 24, 2026 19:16
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