Prepare dependency generations before selecting them. Keep shipped tool bytes separate from writable additions, and store facts beside their entries. Validate proposed plugin sets before config publication. Restore the previous config if the facts write fails. Consolidate duplicate updater, backup, setup, and voice helpers. Repair launcher selection, dependency consumers, download ownership, update feeds, and native Windows process and file handling. Verification: 206 changed/prior-failing Python files reported 4630 passed, one failed, and 330 skipped. Fix the remaining Hindsight fixture boundary. The final targeted rerun reported 234 passed and two skipped. The store review regression batch reported 83 passed and one skipped. Desktop TypeScript checks, 56 selected Electron tests, 24 release tests, and the removed-import/compatibility guards passed. This is an integration checkpoint, not full audit acceptance. The complete Python suite has not run on this fixed tree. Crash-atomic plugin publication, generation cleanup, receipt correlation, and packaged lifecycle acceptance remain open in docs/pm-audit-status.md.
24 lines
830 B
Python
24 lines
830 B
Python
"""The migration check prunes excluded trees before traversing them."""
|
|
from scripts import check_compat_pointers as checker
|
|
|
|
|
|
def test_inventory_does_not_descend_into_excluded_trees(tmp_path, monkeypatch):
|
|
included = tmp_path / "hermes_cli"
|
|
included.mkdir()
|
|
(included / "entry.py").touch()
|
|
nested = included / "node_modules"
|
|
nested.mkdir()
|
|
(nested / "not_source.py").touch()
|
|
real_walk = checker.os.walk
|
|
visited = []
|
|
|
|
def walk(*args, **kwargs):
|
|
for directory, dirs, files in real_walk(*args, **kwargs):
|
|
visited.append(directory)
|
|
yield directory, dirs, files
|
|
|
|
monkeypatch.setattr(checker, "ROOT", tmp_path)
|
|
monkeypatch.setattr(checker.os, "walk", walk)
|
|
assert list(checker._py_files()) == [included / "entry.py"]
|
|
assert str(nested) not in visited
|