GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||
GeezerVison is showing github.com — tests: run the query_rewrite reconstruction checks from the repository alone by simin-yuan · Pull Request #17 · Neboy72/nexus-memory Conversation
|
| Where | main (586d300) |
this branch |
|---|---|---|
| Clean clone, Python 3.11, package not installed | no tests ran (exit 5) |
26 passed |
Ubuntu, GitHub Actions 41352084725, Python 3.11, pip install -e . |
no tests ran, pytest exit=5 |
26 passed, pytest exit=0 |
| Windows 11, Python 3.11, in-repo worktree | no tests ran |
26 passed |
The test can still catch a regression — injected locally, never committed. Making _clean_output return its input unchanged:
$ git diff --stat src/ # after the injection
$ python -m pytest tests/test_query_rewrite_recon.py -q
FAILED tests/test_query_rewrite_recon.py::test_thinking_wrapper_stripped
FAILED tests/test_query_rewrite_recon.py::test_prefix_stripped
FAILED tests/test_query_rewrite_recon.py::test_quotes_stripped
FAILED tests/test_query_rewrite_recon.py::test_single_line
4 failed, 22 passed
Reverted, same command: 26 passed.
Same worktree, same interpreter, same environment; only tests/test_query_rewrite_recon.py and CHANGELOG.md differ.
| failed | passed | skipped | time | |
|---|---|---|---|---|
main (586d300), this file unchanged |
10 | 2471 | 57 | 1009.40s |
| this branch | 10 | 2497 | 57 | 1076.06s |
pytest tests/ --collect-only -q differs by exactly the 26 new test ids and nothing else. The 10 failures are the same 10 on both sides — the pre-existing environment failures here (test_catalog_admission_round2 ×2, TestWebhookStore ×3, test_collection_default_is_overridden_by_the_env_file, TestH10ReleaseGate ×3, test_behavior_public_url_accepted). Nothing under src/ changes, so the pin guard stays quiet.
Only tests/test_query_rewrite_recon.py and CHANGELOG.md are touched.
Both CI jobs are red on exactly one test, and that test is red on main right now:
FAILED tests/test_wave23_fixes.py::TestNr408PackageVersions::test_lockfile_version_consistent
- AssertionError: assert '1.21.16' == '1.22.0'
audit: 1 failed, 2040 passed, 30 skipped in 87.74s
audit-windows: 1 failed, 2024 passed, 46 skipped in 975.01s
main is now 2e91139 chore(openclaw): 1.22.0, which bumped plugins/openclaw/package.json to 1.22.0 and left plugins/openclaw/package-lock.json at 1.21.16. The test asserts those two agree, so it fails on a plain checkout of main — verified locally at 2e91139, 1 failed in 1.11s — and therefore also on the merge commit GitHub builds for a PR (run 41357625504).
Nothing else fails. I did not touch the lockfile; that is a one-line change on main, unrelated to this test.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…y alone `tests/test_query_rewrite_recon.py` put `<parent-of-the-clone>/nexus-memory-test/src` on `sys.path` and imported `nexus_memory` through it. Two consequences: - In a clone without that sibling directory the path is dead weight. The module was a script, so pytest imported it and reported zero tests for the file — a broken check could only appear as a collection error, never as a failing test. - Where the sibling does exist, the inserted path takes precedence over `src/` (which `tests/conftest.py` appends in the same import), so the checks measured that other checkout instead of the code in the repository. The import now goes through the ordinary source layout the rest of the suite uses, and each check is a separate `test_*` function, so it is counted and fails like any other test. Same cases, same expected values; environment variables are handled with `monkeypatch` so the module no longer leaves `NEXUS_REWRITE` behind for other tests.
There was an error while loading. Please reload this page.
|
Thanks, I measured the same thing here before merging.
Merged. Your note about the lockfile is right: on main, plugins/openclaw/package.json says 1.22.0 while package-lock.json still says 1.21.16 in both places, and the repo test that compares them fails on a plain checkout. I fix that in a separate commit right after this merge. If you want to keep going, the most useful next thing is anything that only shows up on Windows, because I cannot reproduce that here, and a test that only fails on your machine is a defect I never see. And if you run Nexus Memory yourself, tell me where it gets in your way. That is worth more to me than another green test. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…y alone (#17) `tests/test_query_rewrite_recon.py` put `<parent-of-the-clone>/nexus-memory-test/src` on `sys.path` and imported `nexus_memory` through it. Two consequences: - In a clone without that sibling directory the path is dead weight. The module was a script, so pytest imported it and reported zero tests for the file — a broken check could only appear as a collection error, never as a failing test. - Where the sibling does exist, the inserted path takes precedence over `src/` (which `tests/conftest.py` appends in the same import), so the checks measured that other checkout instead of the code in the repository. The import now goes through the ordinary source layout the rest of the suite uses, and each check is a separate `test_*` function, so it is counted and fails like any other test. Same cases, same expected values; environment variables are handled with `monkeypatch` so the module no longer leaves `NEXUS_REWRITE` behind for other tests.
…y alone (#17) `tests/test_query_rewrite_recon.py` put `<parent-of-the-clone>/nexus-memory-test/src` on `sys.path` and imported `nexus_memory` through it. Two consequences: - In a clone without that sibling directory the path is dead weight. The module was a script, so pytest imported it and reported zero tests for the file — a broken check could only appear as a collection error, never as a failing test. - Where the sibling does exist, the inserted path takes precedence over `src/` (which `tests/conftest.py` appends in the same import), so the checks measured that other checkout instead of the code in the repository. The import now goes through the ordinary source layout the rest of the suite uses, and each check is a separate `test_*` function, so it is counted and fails like any other test. Same cases, same expected values; environment variables are handled with `monkeypatch` so the module no longer leaves `NEXUS_REWRITE` behind for other tests.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.