IS this issue stll happening? https://github.com/peteromallet/desloppify/issues/111
- User
IS this issue stll happening? https://github.com/peteromallet/desloppify/issues/111
- Assistant
I’ll check issue
#111directly, then compare it against the current code in this workspace and try to reproduce the behavior locally so we can confirm whether it still occurs. I’m starting by pulling the issue details and any related fixes. - Assistant
I pulled the issue data: it’s open and was created on February 17, 2026, with a reproducible install-time failure around missing
desloppify/lang/*/tests/directories in the pip package. Next I’ll reproduce the exactpip install ... && desloppify scanflow in a fresh virtualenv to verify current behavior. - Assistant
The clean environment is set up and install is in progress. I’ll poll the run, then confirm whether the
tests/directories exist insite-packagesand whetherdesloppify scanfails the same way. - Assistant
I reproduced the exact failure against
git+https://github.com/peteromallet/desloppify.git: all three plugintests/directories are missing insite-packages, anddesloppify scan --path .fails with the same import error. I’ll quickly checkpyproject.tomlpackaging config to confirm why this is still occurring. - Assistant
Yes. As of February 17, 2026, issue #111 is still reproducible.
I verified in a fresh virtualenv with:
bashpip install git+https://github.com/peteromallet/desloppify.git desloppify scan --path .Result:
site-packages/desloppify/lang/{python,typescript,csharp}/tests/are all missing.desloppify scanfails with the sameImportErrorabout missing requiredtests/directories.
Likely cause is still present in
pyproject.toml([tool.setuptools.packages.find]) where thosedesloppify.lang.*.tests*packages are explicitly excluded. - User
can you fix?
- Assistant
I can fix it. I’ll patch the packaging config so the language plugin
tests/directories are included in the built wheel/sdist, then I’ll verify by installing from the local repo and rerunningdesloppify scan. - Assistant
I confirmed each plugin
tests/directory is a real Python package (__init__.pyexists), so setuptools can include them if we stop excluding them. I’m now editingpyproject.tomlto remove the explicit package exclusion. - Assistant
I’ve patched packaging config. Next I’m running a fresh local install from this checkout to verify
site-packagesnow contains the languagetests/directories and thatdesloppify scan --path .starts successfully. - Assistant
The verification run is still in progress in an isolated env; I’m waiting for install and scan to finish, then I’ll report whether the packaging issue is resolved end-to-end.
- Assistant
Validation passed locally: after the config change, plugin
tests/directories are present insite-packagesanddesloppify scanexits0. I’m doing one quick check for an existing packaging regression test; if none exists, I’ll add a focused one to prevent this from reappearing. - Assistant
There is already a dedicated layout test file, and one test currently enforces the old exclusion behavior. I’m updating that test to assert the new, correct packaging rule (language tests are included).
- Assistant
I found one more source of the same bug: the
dev scaffold-langflow still appendsdesloppify.lang.<lang>.tests*intopyproject.tomlexcludes. I’m removing that behavior and updating the associated tests so future scaffolding won’t reintroduce this packaging break. - Assistant
I’ve updated the scaffolding path so it no longer writes the problematic
excludeentry and adjusted the relevant tests. I’m running targeted pytest now to confirm the regression checks pass. - Assistant
I’m running one more packaging sanity check from the updated tree to confirm the built/installable artifact still contains all required plugin
tests/directories after the additional scaffolding-related changes. - Assistant
Yes. I fixed it in this workspace.
Changed:
- Removed the package exclusions that dropped language plugin test packages from builds in
/Users/user_c042661f/Documents/desloppify/pyproject.toml:16. - Stopped
dev scaffold-langfrom addingdesloppify.lang.<lang>.tests*toexcludein/Users/user_c042661f/Documents/desloppify/desloppify/commands/dev_cmd.py:275. - Updated the related CLI help text in
/Users/user_c042661f/Documents/desloppify/desloppify/cli.py:348. - Updated regression tests to enforce the new behavior in:
/Users/user_c042661f/Documents/desloppify/tests/test_lang_test_layout.py:34/Users/user_c042661f/Documents/desloppify/tests/test_cmd_dev.py:88
Verification:
pytest -q tests/test_lang_test_layout.py tests/test_cmd_dev.pypassed (10 passed).- Fresh venv install from this repo (
pip install .) now includes all plugin test dirs (missing_count=0).
- Removed the package exclusions that dropped language plugin test packages from builds in
- User
can you push JUST THIs fix to github and then reply to/close the issue?
- Assistant
I can do that. I’ll use a clean git worktree so we can commit only the issue-111 packaging fix (without any of the unrelated local changes), then push a dedicated branch and close the GitHub issue with a comment linking the fix.
- Assistant
I confirmed
ghis authenticated and created a clean worktree on branchcodex/issue-111-package-testsat your current commit, so we can keep this commit scoped to issue #111 only. Next I’ll apply the minimal patch there and validate. - Assistant
I found the clean branch has the same root cause plus a scaffold path that can reintroduce it. I’m applying the same minimal 5-file fix here so this branch cleanly resolves #111 and prevents recurrence.
- Assistant
Targeted tests passed on the clean branch. I’ll run one packaging reproduction check in a fresh virtualenv from this branch, then commit, push, and close issue #111 with a comment.
- Assistant
I validated the fix in a clean install (
scan_exit=0) and confirmed the diff is limited to the packaging/test files, butscangeneratedbuild/andscorecard.pngin the worktree. I’m removing those generated artifacts, committing only the 5 intended files, then I’ll push and close the issue with a summary. - Assistant
Push to
mainwas rejected becauseorigin/mainhas newer commits. I’ll rebase this one-commit branch onto the latestorigin/main, then push the same single fix and close the issue. - Assistant
Rebase hit a single conflict in
desloppify/cli.pyafter replaying onto currentorigin/main; the packaging changes inpyproject.tomlanddev_cmd.pyauto-merged. I’m resolving that conflict now and finishing the rebase. - Assistant
Rebase is complete; I kept the latest upstream
cli.pyand retained the actual packaging/test changes in 4 files. I’m re-running validation on this rebased commit, then I’ll push and close #111. - Assistant
The fix is pushed to
mainand issue #111 is now closed. I’m doing a quick sanity check on the posted issue comment text because shell escaping produced noise while posting; if needed, I’ll immediately post a clean follow-up comment. - Assistant
The issue is closed, but the first comment got corrupted by shell escaping and includes accidental scan output. I’m deleting that bad comment and posting a clean closeout note on the same issue now.
- Assistant
Pushed. The fix is now on
mainin commiteb828d3.Scope of pushed change (just issue #111 fix):
- Remove package exclusions that stripped language plugin
testspackages. - Prevent scaffolding from re-adding those exclusions.
- Update tests to enforce the correct packaging behavior.
Validation run before push:
pytest -q tests/test_lang_test_layout.py tests/test_cmd_dev.pypassed (10 passed).- Fresh venv install from source included all three plugin
tests/dirs. desloppify scan --path .exited0(no import failure).
Issue action completed:
- Replied on issue #111 with the fix summary: comment
- Closed issue #111.
- Remove package exclusions that stripped language plugin
- User
Why didn't tests capture this?
- Assistant
I’ll pinpoint the exact testing gap by checking the current test assertions and CI workflow coverage around packaging/install, then I’ll summarize why this slipped through.
- Assistant
I confirmed the key tests now, and the root cause is clear. I’ll quickly check whether there’s any packaging/install CI job in this repo; that’s the second likely gap behind why this escaped.
- Assistant
I’ve got the explanation. I’ll pull the pre-fix file snapshots from the previous
maincommit so I can answer with exact, concrete examples of what the tests were asserting. - Assistant
Two gaps:
- The tests were asserting the wrong behavior.
- Before the fix,
pyproject.tomlexplicitly excluded plugin test packages. - A test enforced that exact exclusion (
test_pyproject_excludes_lang_tests_from_packagesin pre-fixtests/test_lang_test_layout.py). - Another test enforced scaffolding to add the exclusion (
tests/test_cmd_dev.py, pre-fixtest_scaffold_lang_wires_pyproject_once). desloppify/commands/dev_cmd.pyalso programmatically appendeddesloppify.lang.<lang>.tests*toexclude.
- There was no packaging artifact smoke test.
- Tests ran from source, where
desloppify/lang/*/tests/exists, so plugin structural checks passed. - The failure only appears after install (
site-packages) when setuptools exclusions remove those directories. - There was no test that did build/install + runtime check (
pip install .thendesloppify scan).
So tests didn’t miss a known invariant; they were encoding the bad invariant. The fix changed both code and tests to the correct invariant.
- User
ANY other cases like this in the tests?
- Assistant
I’ll run a quick audit for the same failure pattern: tests that lock in behavior that breaks installed-package runtime (especially source-only assumptions and packaging excludes), then I’ll list concrete hits if any.
- Assistant
I found only the now-fixed pyproject/scaffold exclusions in a broad grep. I’m checking the plugin-layout tests for any other source-only assumptions that could still hide install-time failures.
- Assistant
I’ve finished the scan for direct “bad invariant” assertions; I’m doing one final pass for nearby packaging/test drift (same class of risk) before I answer.
- Assistant
Short answer: no other direct “test asserts the wrong behavior” case like #111 showed up in my scan.
What I found:
- The bad assertions we fixed were in
/Users/user_c042661f/Documents/desloppify/tests/test_lang_test_layout.py:34and/Users/user_c042661f/Documents/desloppify/tests/test_cmd_dev.py:88. - I did not find other tests asserting plugin
tests*package exclusion. - There is still a similar coverage gap: no build/install smoke test in the suite (no
pip install ./ wheel/sdist verification tests), so install-time packaging regressions can still slip through. - Another nearby risk is data-file packaging: tests check source-tree review data exists (
/Users/user_c042661f/Documents/desloppify/tests/test_lang_standardization.py:68), while runtime loads those files from package paths (/Users/user_c042661f/Documents/desloppify/desloppify/review/dimensions_data.py:10and/Users/user_c042661f/Documents/desloppify/desloppify/review/dimensions_data.py:161). That path is currently working, but not guarded by an install-artifact test.
If you want, I can add a packaging smoke test next so this class of bug is blocked in CI.
- The bad assertions we fixed were in