Commit Graph

3 Commits

Author SHA1 Message Date
ethernet
427d4936c2 test: retarget merge-fallout tests at pm-clean's seams; drop tests of retired code
The merges from main kept or added about 45 test files written against the
legacy updater and installer seams that pm-clean replaced. Each failing test
was checked against the current code:

- Deleted, because every test targets code that pm-clean removed or that is
  only reachable from dead or frozen old-updater code:
  update_orphan/handoff_backend_reap, handoff_desktop_rebuild,
  interrupted_recovery (it also launched a real completion against the live
  checkout), update_stale_virtualenv, update_venv_health,
  verify_core_dependencies, lazy_refresh_venv_repair,
  certifi_repair (already dropped in 2f20ceb6f7; the merge resurrected it),
  banner_git_state (covered by test_source_check).
- Retargeted where production reads now:
  - version identity via version_info.get_code_identity
  - update receipts via a ContextVar scope
  - pm.extras / pm.installed_package / pm.ensure_import for matrix,
    computer_use, fal and tirith
  - install hints via pm.install_hint
  - the lock pins in pm/lock.json
  - probe_root for the critical-module probe
- Fixture repairs:
  - git-committed trees for source stamps
  - activate's real `--runtime-only` argument
  - a semver install stamp for requires_hermes gates
  - the Windows gateway restart after a verified update
  - snowflake-length ids that cannot collide with the runner uid
- Collection fix: one platforms() marker per test in gateway_proc_fallback.
2026-09-23 16:55:09 -04:00
ethernet
f99d780006 test: finish the CI python-tests backlog against a CI-shaped environment
Verified with a build_environment test venv (no editable finder, no committed
PM selection) plus real uv on PATH — the shape CI runs.

- test_old_updater_takeover: the fake NEW checkout carries update_handoff.py;
  the test never relied on the source being importable from an editable venv.
- test_update_launch_completion: record the completion-tail child instead of
  running the checkout's (nonexistent) source_completion.py.
- test_update_missing_configured_deps: source_launch already stubs
  hermes_cli/; link the remaining modules beside the stub.
- test_worker: the injected runtime_lock stub accepts the timeout kwarg the
  worker now passes (it raised TypeError before reaching the lock).
- test_plugin_guard / test_plugin_install_ref: PM publishes plugins only under
  the active home's plugins/ and does so in the worker — install into the
  sandboxed home, and fail the metadata write inside the worker.
- test_pm_build_consumers: setup_toolchain deliberately puts uv on PATH after
  the interpreter (c8bbac5c6e); assert that ordering instead of its absence.
- test_icon_flavors: tile_color reads the most chromatic lower-half pixel (the
  inward contrasting border and LANCZOS smear defeat a fixed coordinate); the
  SHA glyph readback skips cells the portrait covers (da9f6d2dcd renders her in
  front of the badge) and requires a majority of each glyph.
- test_desktop_update_target: the fixture CLI reports the checkout as its
  install directory again (parents[1] inside the string was bumped with the
  file move in cb7c688171).
- test_termux_python_linkage: skip when the host has no shared libpython or no
  patchelf (relocatable python-build-standalone in CI).
- test_source_build_env: smoke-env.mjs is dependency-free (main removed the
  Playwright entry it imported through); pm/_fixtures.stage_host_python copies
  the stdlib beside the interpreter for payload tests.

test_api_server_runs::test_events_stream_forwards_interim_commentary is an
upstream flake (identical file on origin/main fails 2/3 locally).
2026-09-20 12:40:38 -04:00
ethernet
cb7c688171 test: mirror the source tree for 27 misfiled root tests; one PM home fixture
Root-level tests/ is for root-level modules; 19 files testing scripts/, 3 testing
pm/ and 5 testing hermes_cli/ move to the mirrored directory (workflow file lists
and cross-imports updated; path arithmetic bumped one level).

tests/pm gains a conftest with the isolated_machine_home fixture that seven
modules had copy-pasted verbatim.
2026-09-18 20:13:26 -04:00