Repository navigation
fix(macos): stable TCC anchor for uv-managed python interpreter - #85416
Closed
webtecnica wants to merge 1 commit into
Closed
webtecnica wants to merge 1 commit into
webtecnica wants to merge 1 commit into
Conversation
fix(macos): stable TCC anchor for uv-managed python interpreter Good design (real-file copy +
|
teknium1
added a commit
that referenced
this pull request
Aug 26, 2026
Follow-ups on the #85416 salvage: - _store_bin_names()/_sibling_names() derive the versioned interpreter name from the RUNNING interpreter instead of a hardcoded 3.11-3.13 list, with a sorted python3.* glob fallback for stores/aliases built by a different Python minor (major bumps, fixtures) — no future version bump can silently leave an alias resolving back into the versioned uv store. - _repoint_alias_symlinks unions expected alias names with the versioned symlinks actually on disk before repointing.
teknium1
added a commit
that referenced
this pull request
Aug 26, 2026
Follow-ups on the #85416 salvage: - _store_bin_names()/_sibling_names() derive the versioned interpreter name from the RUNNING interpreter instead of a hardcoded 3.11-3.13 list, with a sorted python3.* glob fallback for stores/aliases built by a different Python minor (major bumps, fixtures) — no future version bump can silently leave an alias resolving back into the versioned uv store. - _repoint_alias_symlinks unions expected alias names with the versioned symlinks actually on disk before repointing.
Collaborator
|
Merged via #95131 (5259f56) with your commit cherry-picked intact — thanks @webtecnica! Follow-up on top: alias/store binary names are now derived from the running interpreter (with a glob fallback) instead of the hardcoded 3.11–3.13 lists, so future Python bumps can't leave an alias resolving back into the versioned store. The real-Mac smoke test (grant surviving a simulated patch bump) is flagged for maintainer verification on hardware. |
and7777
pushed a commit
to and7777/hermes-agent
that referenced
this pull request
Aug 27, 2026
Follow-ups on the NousResearch#85416 salvage: - _store_bin_names()/_sibling_names() derive the versioned interpreter name from the RUNNING interpreter instead of a hardcoded 3.11-3.13 list, with a sorted python3.* glob fallback for stores/aliases built by a different Python minor (major bumps, fixtures) — no future version bump can silently leave an alias resolving back into the versioned uv store. - _repoint_alias_symlinks unions expected alias names with the versioned symlinks actually on disk before repointing.
melon-xf
added a commit
to melon-xf/hermes-agent
that referenced
this pull request
Sep 3, 2026
Follow-ups on the NousResearch#85416 salvage: - _store_bin_names()/_sibling_names() derive the versioned interpreter name from the RUNNING interpreter instead of a hardcoded 3.11-3.13 list, with a sorted python3.* glob fallback for stores/aliases built by a different Python minor (major bumps, fixtures) — no future version bump can silently leave an alias resolving back into the versioned uv store. - _repoint_alias_symlinks unions expected alias names with the versioned symlinks actually on disk before repointing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On macOS, TCC permission grants (microphone, screen recording, etc.) are keyed to the resolved client binary path. The uv-managed Python interpreter lives in
~/.local/share/uv/python/cpython-<patch>-macos-*/bin/python3.11— every patch bump creates a new directory → orphaned grants → permission prompts return after every update. Symlinks don't help (TCC resolves through them).Change (stable anchor — "copy to fixed path before invoking")
hermes_cli/macos_tcc_anchor.py(new, +277): replaces thevenv/bin/pythonsymlink (which resolves into the versioned uv store) with a real copy of the interpreter binary. The venv path is stable across updates and, being a regular file, there's no symlink for TCC to resolve → constant client path.pyvenv.cfg(home → uv store) untouched, so stdlib still loads as today. Self-healing: detects patch bump via.tcc-anchor-sourcemarker (re-copies) and re-pointspython3/python3.11aliases to the anchor. No-op on non-macOS and non-uv interpreters (Homebrew already has a stable path). Best-effort, never raises.hermes_cli/doctor.py(+52): reports anchor state (healthy / stale / would-fix).hermes_cli/update_cmd.py(+15): runs the anchor heal after update.tests/hermes_cli/test_macos_tcc_anchor.py(new, +296): uv-store detection, patch-bump re-copy, symlink replacement, no-op cases (monkeypatched — real TCC behavior not testable on Linux CI).Verification
tests/hermes_cli/test_macos_tcc_anchor.py: 20 passed. Real macOS validation left to review (CI is Linux).Closes #85345