Skip to content

fix(wren): make test-unit run the whole unit tree like CI does - #2768

Merged
goldmedal merged 1 commit into
Canner:mainfrom
lihongyuan99:ci/align-test-unit-with-ci
Oct 1, 2026
Merged

goldmedal merged 1 commit into
Canner:mainfrom
lihongyuan99:ci/align-test-unit-with-ci

Conversation

@lihongyuan99

@lihongyuan99 lihongyuan99 commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

just test-unit filtered the unit tree with -m "unit and not slow". The unit
marker is opt-in, so a file that never marks its tests contributes nothing to that
run — and the recipe still exits 0 on it. This makes the recipe run the same
selection the unit tests job in .github/workflows/wren-ci.yml already runs,
which documents the identical reasoning ("the marker is opt-in, so any unmarked
file ... was silently skipped"). The CI job was fixed; the developer entry point
was not.

What it actually runs today (measured on main @ d26ab6a, from core/wren/)

selection result
before — uv run --no-sync pytest tests/unit/ -v -m "unit and not slow" 7 failed, 842 passed, 81 skipped, 727 deselected in 20.83s
after — CI's selection (this PR) 1 failed, 1498 passed, 2 skipped in 33.51s
  • 40 files contribute at least one test under the old filter; 72 do under the new
    one. 33 files run zero tests today — e.g. test_context_cli.py,
    test_convert_mdl.py, test_coerce_limit.py, test_athena_semicolon.py,
    test_check_descriptions_guards.py. Verified by diffing
    pytest tests/unit/ --collect-only -q with and without the marker filter.
  • The one failure in the "after" row is pre-existing on main under this exact
    selection: tests/unit/test_cloud.py::test_create_refuses_without_a_git_identity_before_creating_anything,
    which needs a git identity in the environment. It is not caused by this change.
  • The 6 extra failures in the "before" row are test_memory.py onnx cases. CI runs
    those in the dedicated memory tests (onnx, torch-free) job; the new selection
    leaves them to that job instead of running them here without the memory extra.

No test or source file is touched — this changes only which tests the documented
entry point executes.

Summary by CodeRabbit

  • Tests
    • The unit test command now runs all tests under tests/unit/ except tests covered by dedicated jobs for optional extras.

The recipe filtered on '-m "unit and not slow"'. The marker is opt-in, so
33 of the 72 files under tests/unit/ contribute no test at all and the
recipe still exits successfully on them. .github/workflows/wren-ci.yml
already made the opposite choice for the same reason in its 'unit tests'
job; this brings the developer entry point in step with it.
@github-actions github-actions Bot added python Pull requests that update Python code core labels Sep 25, 2026
@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 88eed81b-2681-49b4-8f3d-e9b82102126a

📥 Commits

Reviewing files that changed from the base of the PR and between d26ab6a and ce35e63.

📒 Files selected for processing (1)
  • core/wren/justfile

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


Walkthrough

The test-unit command now runs tests under tests/unit/ without marker filtering. It excludes test_memory.py and test_mcp_server.py.

Changes

Unit Test Selection

Layer / File(s) Summary
Unit test command selection
core/wren/justfile
The command runs tests under tests/unit/ without the unit and not slow marker filter. It excludes test_memory.py and test_mcp_server.py.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Suggested reviewers: ttw225

Merge Risk: ⚪ Minimal · up to ce35e

No actionable merge-blocking risk remains.

Architecture Summary

Architecture risk: 🔵 Low · up to ce35e

The change affects 1 system.

Changed systems: core

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — core (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in core/wren/justfile: test-unit now runs the full unit-test directory without the previous unit and not slow marker filter, and explicitly ignores test_memory.py and test_mcp_server.py.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description explains the marker-filtering failure, provides measured before-and-after results, identifies the pre-existing failure, and explains the CI alignment. It does not include explicit How …
Title check ✅ Passed The title clearly and concisely states that the fix makes test-unit run the complete unit tree in alignment with CI.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the test list twice
Two extra-hungry tests stay out
The unit suite runs by directory
No marker maze to hop about
The carrots wait; the checks begin

Comment @coderabbitai help to get the list of available commands.

@goldmedal goldmedal left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @lihongyuan99, make sense to me 👍

@goldmedal
goldmedal merged commit 702e17d into Canner:main Oct 1, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants