Skip to content

ci: add a Windows smoke test job - #89

Open
napetrov wants to merge 5 commits into
intel:mainfrom
napetrov:claude/zen-hopper-i1tf3i
Open

napetrov wants to merge 5 commits into
intel:mainfrom
napetrov:claude/zen-hopper-i1tf3i

Conversation

@napetrov

Copy link
Copy Markdown
Contributor

Builds and installs the wheel on windows-latest, runs the installed-package smoke test and a few fast unit tests (CLI help, console encoding).

Claude-Session: https://claude.ai/code/session_014c5XskkF73QCnmajmCAq8j

Summary

Adds a windows-smoke job to ci.yml on windows-latest. It’s a basic check that dokimi works on Windows, not full validation: it builds and installs the wheel, runs scripts/smoke_installed.py against the installed package, and runs a few fast unit tests (test_cli_help.py, test_console_encoding.py). It uses a GitHub-hosted runner because the Intel pool has no Windows runners. No changelog fragment is needed because the change touches CI only.

Changes

Risk

Testing

Checklist

  • Tests added/updated and pytest passes
  • ruff, mypy, and schema checks pass
  • Docs updated (or N/A) — see the docs-drift checklist in CONTRIBUTING.md
  • No ad-hoc run artifacts committed
  • New files carry the SPDX license header (or are exempt in .github/.licenserc.yaml)

Builds and installs the wheel on windows-latest, runs the installed-package
smoke test and a few fast unit tests (CLI help, console encoding).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014c5XskkF73QCnmajmCAq8j
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
@napetrov
napetrov force-pushed the claude/zen-hopper-i1tf3i branch from 781a5c5 to 67548b4 Compare October 18, 2026 05:44
@codecov-commenter

codecov-commenter commented Oct 18, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.27%. Comparing base (f76a760) to head (700eee5).
⚠️ Report is 4 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #89      +/-   ##
==========================================
+ Coverage   90.26%   90.27%   +0.01%     
==========================================
  Files         206      206              
  Lines       24289    24347      +58     
  Branches     3906     3921      +15     
==========================================
+ Hits        21924    21980      +56     
- Misses       1700     1702       +2     
  Partials      665      665              

see 12 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new job needs local-CI integration to prevent its wheel-install argument from breaking make dev.

1 open issue
What changed in this PR

Adds a lightweight Windows compatibility check for the packaged application without running the full test suite.

Changes:

  • Adds a GitHub-hosted Windows job using Python 3.13.
  • Builds and installs the wheel, then runs the installed-package smoke test.
  • Runs focused CLI help and console encoding tests.
File Description
.github/​workflows/​ci.yml Adds the Windows build, installation, and smoke-test job.

Review effort: Balanced

Comment thread .github/workflows/ci.yml Outdated
run: |
python -m pip install --upgrade pip build
python -m build --wheel --outdir "$RUNNER_TEMP/dist"
pip install "$RUNNER_TEMP"/dist/*.whl

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in commit 79e1fd9. Added windows-smoke to both ISOLATED and NEEDS_NETWORK in ci_local.py, matching package-smoke treatment to ensure the job runs in an isolated venv when ci_local is executed. Also added regression test test_windows_smoke_is_registered_as_isolated() and test_isolated_job_ids_match_real_jobs() to catch future renames.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Already in 79e1fd9: windows-smoke is in both ISOLATED and NEEDS_NETWORK. Checked on the branch; no further change.

Copilot AI balanced review requested due to automatic review settings October 19, 2026 08:00
…pansion of wheel wildcard

The windows-smoke job builds and installs packages like package-smoke, but ci_local.py
was not treating it as isolated. This caused make dev to pass $RUNNER_TEMP/dist/*.whl
as a literal path to uv pip install instead of expanding it, breaking environment setup.

Add windows-smoke to both ISOLATED and NEEDS_NETWORK sets to match package-smoke treatment.

Add regression tests: test_isolated_job_ids_match_real_jobs() validates that all ISOLATED
jobs have pip install steps, and test_windows_smoke_is_registered_as_isolated() specifically
verifies windows-smoke is registered.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No unresolved findings remain, and the previous local-runner integration issue is fixed with regression coverage.

1 open issue

Review effort: Balanced

@antonwolfy antonwolfy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review at 79e1fd9. The job and the ci_local.py registration are right: windows-smoke is now isolated like package-smoke, and tool_specs() no longer returns the literal wheel glob. The regression test does not guard that property, and the docs around the job are now stale. Inline comments cover both.

What I ran, on a Linux review host at 79e1fd9:

  • make ci-local: 23 passed, 0 failed, 4 skipped (docker, test-latest, docs.yml:deploy, semgrep). 5181 tests passed, 1 skipped. The windows-smoke steps ran in the isolated venv and passed.
  • zizmor on the workflows: no findings.
  • Mutation check on ci_local.py: dropping windows-smoke from only ISOLATED, or from only NEEDS_NETWORK, fails test_windows_smoke_is_registered_as_isolated (1 failed, 17 passed). test_isolated_job_ids_match_real_jobs stays green in both runs.

Checked, no issues

  • Pins and permissions: the action SHAs match package-smoke, persist-credentials: false is set, and the workflow-level permissions and concurrency apply.
  • Changelog: the PR touches only .github/, scripts/ and tests/, so no fragment is needed.
  • Windows steps: I could not run them. By reading, smoke_installed.py is portable (pathlib, explicit UTF-8), and the lock file carries the colorama and tzdata Windows markers.

Comment thread dokimi/tests/test_ci_local.py Outdated
Comment thread .github/workflows/ci.yml
Copilot AI balanced review requested due to automatic review settings October 19, 2026 14:09
The test was asserting that windows-smoke is in the constants, but the
actual bug it guards against is tool_specs() returning unescaped shell
variables or wildcards like $RUNNER_TEMP/dist/*.whl.

Changed to assert tool_specs() output contains no $ or * characters.

Also update ci.yml header comment to document that windows-smoke is an
exception to the rule that PR checks run on intel-ubuntu-latest.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

5 open issues

Review effort: Lite

Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
Comment thread dokimi/tests/test_ci_local.py Outdated
Comment thread .github/workflows/ci.yml Outdated
Copilot AI balanced review requested due to automatic review settings October 19, 2026 14:56
…hten test assertion

Three improvements to the windows-smoke job:

1. Use `python -m pip` consistently instead of invoking `pip` directly,
   avoiding edge cases where `pip` resolves to a different interpreter
   than the Python configured by actions/setup-python.

2. Run pytest from a clean directory ($RUNNER_TEMP) instead of from inside
   the repo checkout (dokimi/), ensuring imports resolve to the installed
   wheel rather than the local working tree.

3. Tighten the test assertion to specifically check for $RUNNER_TEMP rather
   than any $ or *, making it more focused on the actual regression
   (windows-smoke not registered in ISOLATED).

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@antonwolfy antonwolfy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review at 91f269b. The ci.yml header comment is fixed and the regression test now looks at tool_specs() output. One of the new changes does not do what its commit says: the pytest step still imports dokimi from the checkout.

What I ran, on a Linux review host at 91f269b:

  • make ci-local: 23 passed, 0 failed, 4 skipped (docker, test-latest, docs.yml:deploy, semgrep). The windows-smoke steps ran in the isolated venv.
  • Mutation runs on test_ci_local.py: removing windows-smoke from ISOLATED only fails test_windows_smoke_is_registered_as_isolated. Removing it from NEEDS_NETWORK only leaves all 18 tests green.
  • A probe test run from a clean directory with the same pytest arguments, with the Windows runner itself not run. It shows the checkout is on sys.path, see the inline comment.

Still open from my earlier review:

  • dokimi/docs/architecture.md:346 (outside this diff): the ci.yml job list still stops at package-smoke, with no windows-smoke.
  • dokimi/scripts/ci_local.py:19 (outside this diff): the docstring still says the jobs that install the package are "(package-smoke)", while ISOLATED now holds two.
  • dokimi/tests/test_ci_local.py:344 (outside this diff): test_isolated_job_ids_match_real_jobs still accepts any pip install substring, so pip install -r x satisfies it.

Checked, no issues

  • Local runner: windows-smoke is in both ISOLATED and NEEDS_NETWORK. With the registration removed from ISOLATED, the test fails and shows $RUNNER_TEMP/dist/*.whl in the specs.
  • pytest config from another cwd: with absolute file arguments, pytest still picks dokimi/pyproject.toml as the ini file, so --allow-hosts, the timeout and the filters apply. Both test files pass (89 passed).
  • Lock file: pytest and the plugins are in requirements.lock.txt with no platform markers. colorama and tzdata carry the win32 markers.
  • Changelog: the PR touches only .github/, scripts/ and tests/, so no fragment is needed.

Comment thread .github/workflows/ci.yml Outdated
Comment thread dokimi/tests/test_ci_local.py Outdated
…utput

The fast tests ran from RUNNER_TEMP, but conftest puts the checkout on
sys.path, so they never exercised the installed wheel. The test that
guards ISOLATED now checks every tool_specs() entry for unexpanded $ or
*, which catches any job, and isolated jobs must also be network-gated.
The architecture doc and ci_local docstring list windows-smoke.

Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>

This branch has not been deployed

No deployments
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.

4 participants