Skip to content

Compare resolved paths in legacy-profile and windows-updates tests - #23

Merged
10-X-eng merged 1 commit into
stevecad:mainfrom
M3NT8L-One:fix/tests-resolved-temp-paths
Nov 6, 2026
Merged

10-X-eng merged 1 commit into
stevecad:mainfrom
M3NT8L-One:fix/tests-resolved-temp-paths

Conversation

@M3NT8L-One

Copy link
Copy Markdown
Contributor

What doesn't work

On macOS, /tmp and /var are symlinks to /private/tmp and /private/var. Temp paths from tempfile therefore show up as /var/folders/…, while anything that calls Path.resolve() returns /private/var/folders/….

Two unit tests fail only on Mac because they assert an unresolved temp path against a resolved return value:

  1. Legacy profile test: asserts target == root/'Steve/CAD' but migrate_profile returns a resolved path (/private/var/folders/…).
  2. Windows updates test: asserts pending(profile) == candidate but pending returns a resolved candidate.

The change

  • tests/test_legacy_profile.py: expect (root/'Steve/CAD').resolve().
  • tests/test_windows_updates.py: expect candidate.resolve().

No production code change. No change to report redaction (that lands in the companion PR). No change to windows_updates.py, updater, signing, local_git.py, workflows, or deps. Split from #18; this PR carries only the two test expects.

Tests

Studio Mac (/tmp/cadmac-smoke/venv read-only, PYTHONPATH=src:., QT_QPA_PLATFORM=offscreen, vault_hook armed under python -m unittest, pgrep SecurityAgent empty before and after; no smoke test; /tmp/cadmac-smoke left alone):

sha focused modules full unittest discover
Before (upstream main) 583e858 legacy 1 failed; windows 3 ran, 1 failed 271 ran, 4 failed, 40 skipped
After (this branch) 05e0b855 legacy OK; windows 3 ran, OK 271 ran, 2 failed, 40 skipped

The remaining 2 discover failures on this branch are: the redaction test (covered by the companion PR) plus a pre-existing test_hot_worker failure also present on upstream main on this Studio (not introduced here). Focused legacy + windows modules are green standalone.

On Darwin, /tmp and /var resolve under /private, so migrate_profile and
pending return resolved Paths. Match the test expects. Split from stevecad#18.
@10-X-eng

10-X-eng commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Thanks! We have a few things from you to look at already, and we'll get to this one soon. We look at a few items from each person a day, so everyone gets a turn.

1 similar comment
@10-X-eng

10-X-eng commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Thanks! We have a few things from you to look at already, and we'll get to this one soon. We look at a few items from each person a day, so everyone gets a turn.

@10-X-eng 10-X-eng added the needs-human Waiting for a maintainer's decision label Nov 5, 2026
@10-X-eng

10-X-eng commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Thanks for the contribution! These test edits only address failures on macOS, which Steve desktop doesn't currently support, so a maintainer needs to decide whether to take them as platform work. We'll follow up here.

@10-X-eng
10-X-eng merged commit b8699b5 into stevecad:main Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-human Waiting for a maintainer's decision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants