Skip to content

[codex] test(theme): enable Windows CI coverage - #589

Merged
runkids merged 1 commit into
runkids:mainfrom
star-nebula:codex/windows-theme-tests
Oct 21, 2026
Merged

runkids merged 1 commit into
runkids:mainfrom
star-nebula:codex/windows-theme-tests

Conversation

@star-nebula

@star-nebula star-nebula commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Type

  • Bug fix
  • Small improvement (docs, typo, minor refactor)
  • Feature proposal (proposals/ only)

Linked Issue

Related to #344. This covers the theme package only; the remaining Windows coverage gaps stay open.

Change

The theme tests currently expect Unix's non-TTY fallback on Windows, where canDetect() intentionally allows detection through lipgloss. This causes three resolution tests to fail and keeps the package out of the Windows CI allowlist.

Pin the renderer's dark-background result, redirect stdout to the null device, and clear the forwarded-theme environment in those tests. Assert the exact expected source for each platform and restore all modified state during cleanup. Replace the no-op Windows detection test with an assertion that Windows allows detection even with CI=true and TERM=dumb.

Add internal/theme to the existing Windows unit-test job. Production theme behavior is unchanged.

Validation

  • Before the change: three resolution tests failed on a real Windows AMD64 host.
  • Devcontainer: make check passed on the original base 70ceacca (context checks, formatting, vet, build, unit tests, integration tests).
  • Updated to upstream 364af363: context checks, formatting, vet and build pass. A standalone full unit-suite run passed, but two full make check attempts failed during unit tests; the logged attempt identifies the pre-existing internal/plugin test described below and did not reach integration tests.
  • Devcontainer: go test -race -count=1 ./internal/theme.
  • Updated base: standalone make test-int passed (integration suite: 323.862s).
  • Cross-compile in the devcontainer with GOOS=windows GOARCH=amd64 go test -c ./internal/theme; run the resulting executable on a non-administrator Windows AMD64 host with -test.v -test.count=1 -test.timeout=60s: all 14 top-level tests pass.

Existing full-suite limitation: TestPiProjectLockLostMidApply/replaced in internal/plugin intermittently reports err = <nil> instead of ErrPiExtensionsBusy. A focused 20-run reproduction failed 7 times. The plugin package is unchanged from upstream and does not import theme; this PR does not change that lock behavior. The earliest failed attempt's specific failing test was not retained in the truncated console output.

GitHub checks on eaeba2b9: Windows unit tests (including theme), Linux unit tests, Ubuntu and macOS integration tests, Docker offline sandbox and redteam all passed. Docker online sandbox and redteam-signal were skipped by the existing workflow conditions. The first Codex review completed with no findings.

Not covered: the pinned renderer tests validate resolution and platform gating, not physical terminal background detection. No Windows ARM64 host run or dedicated macOS host run was performed. Existing environment-dependent skips remain in effect, including root permission checks and real-shell completion tests when zsh/fish are unavailable.

Checklist

  • I've read CONTRIBUTING.md
  • Tests included and passing (make check) — theme tests pass on Linux and Windows; the updated-base full check is blocked by the existing intermittent plugin lock test described above.
  • No unrelated changes in the diff
  • Scope is focused — one concern per PR

Correct Unix-only resolution expectations on Windows and pin terminal and renderer state so the package is deterministic. Add theme to the Windows test job to catch future platform regressions. Related to runkids#344.
@star-nebula

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T06:03:46.464325Z eaeba2b Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: eaeba2b947

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@runkids
runkids marked this pull request as ready for review October 20, 2026 06:00
@runkids

runkids commented Oct 20, 2026

Copy link
Copy Markdown
Owner

@star-nebula Thanks for improving the Windows theme test coverage and validating it on a real Windows host! Is this ready for me to merge, or is there anything else you would like to adjust first? I really appreciate your help.

@runkids
runkids merged commit e10304e into runkids:main Oct 21, 2026
8 checks passed
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.

2 participants