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.
20 lines
736 B
Python
20 lines
736 B
Python
"""Bootstrap does not ask npm to resolve an unrelated desktop workspace."""
|
|
import os
|
|
from pathlib import Path
|
|
import subprocess
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
|
|
|
|
def test_node_stage_does_not_invoke_ambient_npm(tmp_path):
|
|
sentinel = tmp_path / "npm-called"
|
|
script = f"""source "{(ROOT / 'scripts/install.sh').as_posix()}" --manifest
|
|
npm() {{ touch "{sentinel.as_posix()}"; return 99; }}
|
|
INSTALL_DIR="{tmp_path.as_posix()}"
|
|
stage_node_deps
|
|
"""
|
|
env = dict(os.environ, HOME=tmp_path.as_posix(), HERMES_HOME=tmp_path.as_posix())
|
|
result = subprocess.run(["bash", "-c", script], env=env, capture_output=True, text=True, timeout=30)
|
|
assert result.returncode == 0, result.stderr
|
|
assert not sentinel.exists()
|